A container acts as an interface between a platform-specific functionality and a component. The component must be assembled before a web or enterprise bean or application client component execution, into a JEE application and deployed into its container.
The settings of a container can be customized for underlying support provided by the JEE server. These include security, transaction management, and Java Naming and Directory Interface lookups.
The management of non configurable services such as servlet life cycle, enterprise bean life cycle, database connection, data persistence, database connection pooling also can be done by the container.