This service provides containers for EJB2.1 components.
An EJB container can be created from an ejb-jar
file using one of the following
possibilities:
The ejb-jar
file has been
copied under $JONAS_BASE/deploy
The ejb-jar
file is
packaged inside an ear file as a component of a Java EE application. The container
will be created when the Java EE application will be deployed via the
ear service.
EJB containers may be dynamically created from ejb-jar files using the JonasAdmin tool.
EJB containers may be dynamically created from ejb-jar files using the command jonas admin:
jonas admin -a <some-dir>/sb.jar
The ejb service can (and by default does) provide monitoring options. Monitoring provides the following values at a per-EJB basis for stateful and stateless beans:
Number of calls done on all methods.
Total business time, i.e. the time spent executing business (applicative) code.
Total time, i.e. the total time spent executing code (business code + container code).
The warningThreshold option can be used to generate a warning each time a method takes more than warningThreshold milliseconds to execute. By default, warningThreshold is set to 20 seconds.
Here is the part of jonas.properties
concerning
the ejb2 service:
###################### JOnAS EJB 2 Container service configuration # # Set the name of the implementation class of the ejb2 service jonas.service.ejb2.class org.ow2.jonas.ejb2.internal.JOnASEJBService # Set the XML deployment descriptors parsing mode (with or without validation) jonas.service.ejb2.parsingwithvalidation true # If enabled, the GenIC tool will be called if : # - JOnAS version of the ejb-jar is not the same version than the running JOnAS instance # - Stubs/Skels stored in the ejb-jar are not the same than the JOnAS current protocols. # By default, this is enabled jonas.service.ejb2.auto-genic true # Arguments for the auto GenIC (-invokecmd, -verbose, etc.) jonas.service.ejb2.auto-genic.args -invokecmd # Note: these two settings can be overriden by the EJB descriptor. # # If EJB monitoring is enabled, statistics about method call times will be # collected. This is a very lightweight measurement and should not have much # impact on performance. jonas.service.ejb2.monitoringEnabled true # If EJB monitoring is enabled, this value indicates after how many # milliseconds spent executing an EJB method a warning message should be # displayed. If 0, no warning will ever be displayed. jonas.service.ejb2.warningThreshold 20000
For customizing the ejb2 service it is possible to:
Set or not the XML validation at the deployment descriptor parsing time
Set or not the automatic generation via the GenIC tool
Specify the arguments to pass to the GenIC tool