This is the base class for all EJB-containers in JBoss. A Container
functions as the central hub of all metadata and plugins. Through this
the container plugins can get hold of the other plugins and any metadata
they need.
The EJBDeployer creates instances of subclasses of this class
and calls the appropriate initialization methods.
createBeanClassInstance() Returns a new instance of the bean class or a subclass of the bean class.
This factory style method is speciffically used by a container to supply
an implementation of the abstract accessors in EJB2.0, but could be
usefull in other situations.
getJmxName() Build a JMX name using the pattern jboss.j2ee:service=EJB,jndiName=[jndiName]
where the [jndiName] is either the bean remote home JNDI binding, or
the local home JNDI binding if the bean has no remote interfaces.
This is the classloader of this container. All classes and resources that
the bean uses will be loaded from here. By doing this we make the bean
re-deployable
This is the local classloader of this container. Used for loading
resources that must come from the local jar file for the container.
NOT for loading classes!
This is the new metadata. it includes information from both ejb-jar and
jboss.xml the metadata for the application can be accessed trough
metaData.getApplicationMetaData()
Returns a new instance of the bean class or a subclass of the bean class.
This factory style method is speciffically used by a container to supply
an implementation of the abstract accessors in EJB2.0, but could be
usefull in other situations. This method should ALWAYS be used instead
of getBeanClass().newInstance();
the new instance See Also:java.lang.Class.newInstance
The EJBDeployer calls this method. The EJBDeployer has set
all the plugins and interceptors that this bean requires and now proceeds
to initialize the chain. The method looks for the standard classes in
the URL, sets up the naming environment of the bean. The concrete
container classes should override this method to introduce
implementation specific initialization behaviour.
throws: Exception - if loading the bean class failed(ClassNotFoundException) or setting up "java:"naming environment failed (DeploymentException)
A default implementation of destroying the container service (no-op).
The concrete container classes should override this method to introduce
implementation specific destroy behaviour.
Build a JMX name using the pattern jboss.j2ee:service=EJB,jndiName=[jndiName]
where the [jndiName] is either the bean remote home JNDI binding, or
the local home JNDI binding if the bean has no remote interfaces.
Creates the single Timer Service for this container if not already created
Parameters: pKey - Bean id Container Timer Service throws: IllegalStateException - If the type of EJB is not allowed to use thetimer service, or the bean class does not implement javax.ejb.TimedObject See Also: javax.ejb.EJBContext.getTimerService
getTransactionManager
public TransactionManager getTransactionManager()(Code)
Returns this container's transaction manager.
A concrete instance of javax.transaction.TransactionManager
This method is called when a method call comes
in on the Home object. The Container forwards this call to the
interceptor chain for further processing.
Parameters: mi - the object holding all info about this invocation the result of the home invocation throws: Exception -
Removes Timer Service for this container
Parameters: pKey - Bean id throws: IllegalStateException - If the type of EJB is not allowed to use the timer service
Sets the application deployment unit for this container. All the bean
containers within the same application unit share the same instance.
Parameters: app - application for this container
Sets the local class loader for this container.
Used for loading resources from the local jar file for this container.
NOT for loading classes!
Parameters: cl -
A default implementation of starting the container service.
The container registers it's dynamic MBean interface in the JMX base.
The concrete container classes should override this method to introduce
implementation specific start behaviour.
todo implement the service lifecycle methods in an xmbean interceptor so
non lifecycle managed ops are blocked when mbean is not started.
throws: Exception - An exception that occured during start
A default implementation of stopping the container service (no-op). The
concrete container classes should override this method to introduce
implementation specific stop behaviour.