0 Replies Latest reply on Sep 22, 2011 4:45 PM by sejanick

    Jobs error out trying to execute during jboss startup with beans not available yet

    sejanick Newbie

      Hi,

       

      I am currently having a problem with jbpm jobs erroring out during a jboss restart due to needed beans not being started up yet while a job is trying to run.

       

      So, basically, if we shutdown jboss while workflows are running with jobs, we will have jobs waiting to be executed in the database after jboss finishes shutting down and everything is stopped.  That's cool.  Next, we restart jboss, and jbpm is the first thing to start up, so that jobs start to execute again.  However, because the rest of our beans (which the jobs need to actually do anything) aren't started up yet, we get a lot of name not bound errors and many of the jbpm jobs will go through their three retries and error out for good before jboss finishes starting up.

       

      What I'd like to do is have the jbpm service depend on our beans to be started up before jbpm starts up or the jobs start running.  Does anybody have a suggestion for where I can do that?  I've tried setting depends-on on the ProcessEngine bean, but that hasn't had any effect.

       

      I feel like I might be missing something obvious here, or maybe there's another approach I should be trying.  Any suggestions?  This seems like it would be a pretty common issue.

       

      If it helps, we are using jBPM 4.4 and JBOSS 5.

       

      Thanks in advance.