A Container stores EJB instances and is responsible for the lifecycle, state management, concurrency, transactions, security, naming, resource management, etc. It does the above by interposing actions before and after invocations on EJBs. It uses the ProtocolManager, SecurityManager, TransactionManager, NamingManager for help with the above responsibilities. There are four types of Containers: StatefulSessionContainer, StatelessSessionContainer, EntityContainer, and MessageBeanContainer. Note: the term "Container" here refers to an instance of one of the above container classes. In the EJB spec "container" refers to a process or JVM which hosts EJB instances.
There is one instance of the Container for each EJB type (deployment desc). When a JAR is deployed on the EJB server, a Container instance is created for each EJB declared in the ejb-jar.xml for the EJB JAR.
The Container interface provides methods called from other parts of the RI as well as from generated EJBHome/EJBObject implementations.