The thymus gland, despite containing glandular tissue and producing several hormones, is much more closely associated with the immune system than with the endocrine system. The thymus serves a vital role in the training and development of T-lymphocytes or T cells, an extremely important type of white blood cell.