2 Replies Latest reply on Mar 20, 2009 8:45 AM by bradsdavis

    Enterprise Timers - Load Order

    bradsdavis

      What is the ideal way to bind to timers? When I have the following configuration for scheduler:

       <service name="scheduler">
       <factory>
       <bean name="org.jbpm.scheduler.ejbtimer.EntitySchedulerServiceFactory" class="org.jbpm.scheduler.ejbtimer.EntitySchedulerServiceFactory">
       <field name="timerEntityHomeJndiName"><string value="java:ejb/TimerEntityBean"/></field>
       </bean>
       </factory>
       </service>
      


      I receive an exception related to the timer service starting up before the LocalCommandServiceHome is started.

      What am I missing here?

        • 1. Re: Enterprise Timers - Load Order
          bradsdavis

          Here is the exception that comes up when the server starts:

          08:30:43,109 ERROR [LogInterceptor] EJBException in method: public abstract void javax.ejb.TimedObject.ejbTimeout(javax.ejb.Timer)
          :
          javax.ejb.NoSuchObjectLocalException: failed to retrieve command service home
           at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:221)
           at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:104)
           at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:76)
           at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
           at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
           at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
           at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
           at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
           at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
           at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
           at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:527)
           at org.jboss.ejb.Container.invoke(Container.java:960)
           at org.jboss.ejb.txtimer.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:99)
           at org.jboss.ejb.txtimer.TimerImpl$TimerTaskImpl.run(TimerImpl.java:561)
           at java.util.TimerThread.mainLoop(Timer.java:512)
           at java.util.TimerThread.run(Timer.java:462)
          


          Can anyone give me insight into how I can prevent this?

          • 2. Re: Enterprise Timers - Load Order
            bradsdavis

            This is happening because EJB Timers loads before jBPM. But if you change that load order, jBPM still waits on ejb timers I think. Anyone have a solution?