7 Replies Latest reply on Sep 9, 2008 3:04 AM by Mike Schulze

    3.2 scheduler in ear

    brittm Novice

      I'm feeling a bit stupid here. I'm running the 3.2 ear out of jbpm-jpdl-suite-3.2.GA under the example server, but the scheduler isn't running. And well, I don't know how to make it run.

      Yes, the example server comes with the WAR configured to run independently--and the servlet starts the scheduler properly, but the EAR, naturally, doesn't use that particular WAR or the servlet, and doesn't process timers.

      So, somebody please tell me that I accidentally deleted something or didn't configure something. If it really isn't working in the release, I'll create a JIRA issue.


        • 1. Re: 3.2 scheduler in ear
          Martin Weiler Apprentice


          in 3.2 the scheduler is bound to the EJB Timer Service, which is a Stateless Session Bean. This is all in the jbpm-enterprise.jar within the ear - have a look at Chapter 5.5 in the docu to see what else is in there.

          If you are not in a J2EE environment the JobExecuterServlet can be used for that purpose.


          • 2. Re: 3.2 scheduler in ear
            brittm Novice

            Yes, the TimerServiceBean is in there. Yes, I'm in an ejb container: as mentioned, I'm using the JBoss 4.0.4 server that is distributed with 3.2.GA. I've simply removed the existing jbpm-console.war from the server's jbpm/deploy directory and replaced it with the prebuilt jbpm-enterprise.ear from the distribution's 'jbpm-jpdl-3.2.GA/deploy directory.

            Can someone verify that the timer service is working (or not) in this scenario?


            • 3. Re: 3.2 scheduler in ear
              brittm Novice

              I'm seeing this:

              10:46:39,984 DEBUG [EjbSchedulerService] creating timer timer(myTimeout,10:46:39,983)
              10:46:40,166 DEBUG [Services] executing default save operations
              10:46:40,166 DEBUG [HibernateSaveOperation] saving process instance
              10:46:40,166 DEBUG [SaveLogsOperation] flushing logs to logging service.
              10:46:40,250 DEBUG [CascadeSaveOperation] cascading save of 'org.jbpm.graph.exe.ProcessInstance@462718'
              10:46:40,267 DEBUG [JbpmContext] closing JbpmContext
              10:46:40,267 DEBUG [Services] closing service 'persistence': org.jbpm.persistence.jta.JtaDbPersistenceService@be1539
              10:46:40,268 DEBUG [DbPersistenceService] committing hibernate transaction
              10:46:40,424 DEBUG [Services] closing service 'scheduler': org.jbpm.scheduler.ejbtimer.EjbSchedulerService@1731840
              10:46:40,424 DEBUG [EjbSchedulerService] removing the timer service session bean
              10:46:40,425 DEBUG [Services] closing service 'tx': org.jbpm.tx.TxService@13d2b1c
              10:46:40,425 DEBUG [Services] closing service 'logging': org.jbpm.logging.db.DbLoggingService@d97a79
              10:46:40,425 DEBUG [Services] closing service 'authentication': org.jbpm.security.authentication.DefaultAuthenticationService@1f7d5c3

              But from TimerServiceBean.ejbTimeout() I'm never seeing this happen:
              log.debug("ejb timer "+ejbTimer+" fires");

              • 4. Re: 3.2 scheduler in ear
                Tom Baeyens Master

                try increasing the duedate.

                i suspect that the ejb timer service doesn't execute timers that are scheduled for the past.

                at 10:46:39,984 you schedule a timer for 10:46:39,983

                • 5. Re: 3.2 scheduler in ear
                  Mike Schulze Newbie

                  Hi - I know it's been awhile since this post was started, but now I am having the same problem. If I'm using the JobExecutor-Servlet within the JBoss-AppServer of the jBPM-Suite my Timer is executed as it should. But when i want to use the ejb-timer-service and substitute the jbpm-conole.war with the ear my timer isn't executed anymore. I already tried increasing the duedate - nothing changes.
                  I guess I have to change some configurations on my JBoss-App-Server. Can anybody give me a hint what i am doing wrong?

                  Thx in advance

                  • 6. Re: 3.2 scheduler in ear
                    Ronald van Kuijk Master

                    that is very hard with this limited amount of information.

                    • 7. Re: 3.2 scheduler in ear
                      Mike Schulze Newbie

                      Thx for your answer kukeltj.

                      I designed a process-definition with a timer. I deployed it to my hsql-database and used the JobExecutor Servlet for the Timer-Handling. So far so good. My process can be startet and the timer is activated (and removed from the JBPM_JOB-table) at the right time.
                      After that I wanted to switch to the EJB-Timer-Services supported by jbpm-enterprise.ear. I deployed the ear to my JBoss and deployed the same process-definition to it. The JBoss i use is the one that is published with jbpm-suite.
                      When I start a process, an entry for my timer is added to my jbpm_job table. Also there is a new table - called TIMERS in which the app-server adds an entry for a timer too (using the ejb-deployers.xml). The later one fires and after that the entry is remove from the TIMERS-table, but not my jbpm-job.
                      So I guess, there is still something misconfigured and jbpm is not connected to the EJB-Timer. All configuration files are from jbpm-enterprise.ear :-(

                      I've read the docs and searched this forum but haven't found anything to help me yet. I'm using:
                      - jBPM 3.2.3
                      - JBoss AS 4.2.2 (out of jbpm-suite) and
                      - jbpm-entrerprise.ear - so i guessed the all configurations should have been made.

                      Thx - Mike