Jejunum
The jejunum lies between the duodenum and the ileum and is considered to start at the suspensory muscle of the duodenum, a location called the duodenojejunal flexure. The division between the jejunum and ileum is not anatomically distinct due to the fact that in adult humans, the small intestine is usually 6-7m long, about two-fifths of which (2.5 m) is the jejunum.
Small intestine
Absorption of the majority of nutrients takes place in the jejunum, with the following notable exceptions:The small intestine supports the body's immune system. The presence of gut flora appears to contribute positively to the host's immune system. 
Peyer's patches, located within the ileum of the small intestine, are an important part of the digestive tract's local immune system. They are part of the lymphatic system, and provide a site for antigens from potentially harmful bacteria or other microorganisms in the digestive tract to be sampled, and subsequently presented to the immune system.