4 Replies Latest reply on Jun 28, 2011 6:24 PM by jbossuser71

    Can I Turning off 'EJBTimerService' in JBoss 6.0 ?

    jbossuser71

      Hi All,

      I am using "Jboss AS 6.0.Final" release with "default" configuration.

      I am not using 'EJBTimerService' in my J2EE application.

      Wondering is it possible to turn off or disable this service?

       

      My initial intention was to turn off 'Hypersonic DB' service - but to turn off that I have noticed that EJBTimerService needs that 'Hypersonic DB' service.

      So I tried to trun off EJBTimerService by removing "ejb2-timer-service.xml" from 'deploy' directory and by commenting  related entry in default\deployers\"ejb-deployer-jboss-beans.xml" file. But this did not help - all of my EJB deployment failed with:

      "** UNRESOLVED Demands 'jboss.ejb:service=EJBTimerService' **"

       

      So, I believe somewhere else in the configuration area we must have referred to the EJBTimerService - which I donot know.

      can anyone pls. suggest how to disable this service?

       

      By googling I find few similar discussions, but those are mostly applicable for JBoss 5.x release - not for the latest JBoss AS release.

       

      Thanks in advance,

        • 1. Re: Can I Turning off 'EJBTimerService' in JBoss 6.0 ?
          wdfink

          I suppose that the timer service is required by the deployment.

          If you don't need it remove the bean from the ejb2-timer-service.xml and use the commented section as shown below

            <mbean code="org.jboss.ejb.txtimer.NoopPersistencePolicy" name="jboss.ejb:service=EJBTimerService,persistencePolicy=noop"/>

          • 2. Re: Can I Turning off 'EJBTimerService' in JBoss 6.0 ?
            jbossuser71

            Thanks for the response.

            I followed your suggestion - but that did not help.

             

            I did comment out the related MBean code i.e. '<mbean code="org.jboss.ejb.txtimer.DatabasePersistencePolicy"'

            - but I still get deployment error.

             

            Looks like, the 'DatabasePersistencePolicy' is being invoked internally when JBoss starts up - so probably we cannot get rid of 'DatabasePersistencePolicy'.

             

             

            at org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin.init(GeneralPurposeDatabasePersistencePlugin.java:117) [:6.0.0.Final]
            at org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin.init(GeneralPurposeDatabasePersistencePlugin.java:100) [:6.0.0.Final]
            at org.jboss.ejb.txtimer.DatabasePersistencePolicy.startService(DatabasePersistencePolicy.java:89) [:6.0.0.Final]
            at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:355) [:6.0.0.Final (Build SVNTag:JBoss_6.0.0.Final date: 20101228)]
            at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:301) [:6.0.0.Final (Build SVNTag:JBoss_6.0.0.Final date: 20101228)]
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_26]
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_26]
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_26]
            at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_26]
            at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157) [:6.0.0.GA]
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) [:6.0.0.GA]
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) [:6.0.0.GA]
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:271) [:6.0.0.GA]
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670) [:6.0.0.GA]
            at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:189) [:2.2.0.GA]
            • 3. Re: Can I Turning off 'EJBTimerService' in JBoss 6.0 ?
              wdfink

              Ooh,

              looks like different in JBoss6.

              There is another Timer (Tx aware) a bit below.

              Look to line 49 (default configuration), I attach my ejb2-timer-service.xml from the fresh 'default' deploy folder.

              • 4. Re: Can I Turning off 'EJBTimerService' in JBoss 6.0 ?
                jbossuser71

                Yes - that works!

                I tried similar combinations but not this one!

                THANKs a lot.