[jboss-user] [EJB 3.0] - Lazy EJB3.1 timerservice deployment starting JBoss AS 6.0.0.M5

jaikiran pai do-not-reply at jboss.com
Sat Sep 25 11:25:55 EDT 2010

jaikiran pai [http://community.jboss.org/people/jaikiran] created the document:

"Lazy EJB3.1 timerservice deployment starting JBoss AS 6.0.0.M5"

To view the document, visit: http://community.jboss.org/docs/DOC-15884

h5. Background:

EJB3.1 timerservice support was introduced in AS 6.0.0.M4  http://community.jboss.org/docs/DOC-15643 http://community.jboss.org/wiki/EJB31inJBossAS600M4. The implementation is based on JPA (Hibernate as the provider in JBoss AS). This added around 3-4 second increase in the boot time of the JBoss AS server, due the initialization involved for deploying the timerservice jar. Since the timerservice was only applicable for EJB3.x deployments, it did not make sense to increase the default boot time if the server doesn't have any EJB3.x deployments. Hence we decided to "lazily" deploy the timerservice.

h5. Forum discussion:

 http://community.jboss.org/thread/155800 http://community.jboss.org/thread/155800

h5. Details:

Starting JBoss AS 6.0.0.M5, which was released recently  http://community.jboss.org/blogs/donnamishelly/2010/09/24/jboss-as-600m5-released http://community.jboss.org/blogs/donnamishelly/2010/09/24/jboss-as-600m5-released, the jboss-ejb3-timerservice-mk2.jar now resides in JBOSS_HOME/common/deploy folder. This jar will be deployed lazily by the server. The server will  deploy this jar only when the first EJB3.x deployment is made available in the server. By default, JBoss AS doesn't ship any EJB3.x deployments and hence the lazy deployment of timerservice jar saves a few seconds of the server boot time.

h5. How to disable the "lazy" timerservice deployment:

If users want to disable the "lazy" deployment of timerservice and instead deploy it always, irrespective of the presence of an EJB3.x deployment, then follow the steps mentioned below:

* Move (cut/paste) jboss-ejb3-timerservice-mk2.jar from JBOSS_HOME/common/deploy to JBOSS_HOME/server/< servername>/deploy folder. Ex: Move it to JBOSS_HOME/server/default/deploy folder, if you use the "default" server config.

* Edit the JBOSS_HOME/server/< servername>/deployers/ejb3.deployer/META-INF/ejb3-as-deployers-jboss-beans.xml and comment out (or remove) the following MC bean configuration:


<bean name="EJB3MetadataOnDemandDeploymentDeployer" class="org.jboss.ejb3.deployers.EJB3MetadataOnDemandDeploymentDeployer">
      <property name="profileService"><inject bean="jboss.profileservice:service=ProfileService"/></property>
      <!-- Build a profile from the contents of this single URI -->
      <property name="deploymentRoot">${jboss.common.base.url}deploy</property>
      <!--  We just have a single on-demand deployment - the jboss-ejb3-timerservice-mk2.jar
        Note: If there are multiple deployments which need to be deployed on-demand, then 
        set the "deploymentNames" collection property *instead of* "singleDeployment"
      <property name="singleDeployment">jboss-ejb3-timerservice-mk2.jar</property>
        Whether activation of the profile (i.e. deployment of the URI contents)
        should be deferred until the first EJB3.x deployment (true) or done as part of
        the start of this bean (false).
        WARNING: This configuration option may be altered in a subsequent AS 6.0
        milestone release.
        FIXME: https://jira.jboss.org/jira/browse/JBAS-7714        
      <property name="activateOnDemand">${jboss.as.deployment.ondemand:true}</property>



If you have any related issues or questions, please report/ask them in our user forum here  http://community.jboss.org/community/ejb3 http://community.jboss.org/community/ejb3?view=discussions  

Comment by going to Community

Create a new document in EJB 3.0 at Community
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100925/bfe03369/attachment-0001.html 

More information about the jboss-user mailing list