3 Replies Latest reply on Aug 17, 2009 8:44 AM by Parragh Szabolcs

    timer in ear: nothing happens

    Parragh Szabolcs Newbie

      Hi!

      I've seen quite a few enties about this, but none gave me a solution. I'm making an ear, with jbpm (3.3.1). The ear has the jbpm-enterprise.jar as a module, all EJB-s in that deploy properly (CommandServiceBean, TimerEntityBean etc.)

      I use the default jbpm.cfg.xml, no changes there. That already contains the line:

       <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
      


      My timers are configured like this in the process definition:

      <create-timer duedate='10 seconds' transition='end' />
      


      And nothing happens! :( Nothing triggers the timers. The actions are created and can be found in the DB, though.

      Could someone please help me out: how can I make the scheduler service start, so my timers run properly?

      Thanks a lot!
      PSz

        • 2. Re: timer in ear: nothing happens
          Parragh Szabolcs Newbie

           

          "kukeltje" wrote:
          It's in the docs: http://docs.jboss.org/jbpm/v3.2/userguide/html_single/#d0e140


          Thanks a lot! I missed that unfortunately!

          In my experiments, though I tried to set up the environment with EntityScheduler:

           <service name="scheduler" factory="org.jbpm.scheduler.ejbtimer.EntitySchedulerServiceFactory" />
          


          It seems to work: I get an exception ("Transaction is not active: tx=TransactionImple < ac") -- but the timers are created and run properly.



          • 3. Re: timer in ear: nothing happens
            Parragh Szabolcs Newbie

             

            "parszab" wrote:

            It seems to work: I get an exception ("Transaction is not active: tx=TransactionImple < ac") -- but the timers are created and run properly.


            I beleive it is because the CMT transactions don't get propagated to the TimerEntity bean somehow when the timers are created. One issue is that the timers don't get deleted this way -- at least that is, what the log says:

            14:37:49,853 WARN [DatabasePersistencePolicy] Unable to delete timer
            org.jboss.util.NestedSQLException: Transaction is not active:
            tx=TransactionImple < ac, BasicAction: 7f000101:90b1:4a894efe:9a status: ActionStatus.ABORTED >;
             - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000101:90b1:4a894efe:9a status: ActionStatus.ABORTED >)
             at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
             at org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin.deleteTimer(GeneralPurposeDatabasePersistencePlugin.java:311)
             at org.jboss.ejb.txtimer.DatabasePersistencePolicy.deleteTimer(DatabasePersistencePolicy.java:139)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:597)
             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
             at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
             at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
             at $Proxy243.deleteTimer(Unknown Source)
             at org.jboss.ejb.txtimer.TimerServiceImpl.shutdown(TimerServiceImpl.java:138)
            ....