JBoss.org Community Documentation

11.3.2. Container Plug-in Framework

The JBoss EJB container uses a framework pattern that allows one to change implementations of various aspects of the container behavior. The container itself does not perform any significant work other than connecting the various behavioral components together. Implementations of the behavioral components are referred to as plugins, because you can plug in a new implementation by changing a container configuration. Examples of plug-in behavior you may want to change include persistence management, object pooling, object caching, container invokers and interceptors. There are four subclasses of the org.jboss.ejb.Container class, each one implementing a particular bean type:

  • org.jboss.ejb.EntityContainer : handles javax.ejb.EntityBean types

  • org.jboss.ejb.StatelessSessionContainer : handles Stateless javax.ejb.SessionBean types

  • org.jboss.ejb.StatefulSessionContainer : handles Stateful javax.ejb.SessionBean types

  • org.jboss.ejb.MessageDrivenContainer handles javax.ejb.MessageDrivenBean types

The EJB containers delegate much of their behavior to components known as container plug-ins. The interfaces that make up the container plugin points include the following:

  • org.jboss.ejb.ContainerPlugin

  • org.jboss.ejb.ContainerInvoker

  • org.jboss.ejb.Interceptor

  • org.jboss.ejb.InstancePool

  • org.jboss.ejb.InstanceCache

  • org.jboss.ejb.EntityPersistanceManager

  • org.jboss.ejb.EntityPersistanceStore

  • org.jboss.ejb.StatefulSessionPersistenceManager

The container's main responsibility is to manage its plug-ins. This means ensuring that the plug-ins have all the information they need to implement their functionality.