8 Replies Latest reply on Dec 15, 2008 8:45 AM by vkozlov

    How to configure org.jbpm.web.JobExecutorLauncher?

    vkozlov

      As I can see in documentation, the JobExecutorLauncher's jbpm configuration file path can be configured using jbpm.configuration.resource parameter.

      But, org.jbpm.web.JobExecutorLauncher is a listener, not servlet, and I user in web.xml such snippet:

      <listener>
       <description>Starts the job executor</description>
       <listener-class>org.jbpm.web.JobExecutorLauncher</listener-class>
       </listener>
       <listener>
       <description>Closes the jBPM configuration</description>
       <listener-class>org.jbpm.web.JbpmConfigurationCloser</listener-class>
       </listener>


      So, where I can insert jbpm.configuration.resource parameter?

        • 1. Re: How to configure org.jbpm.web.JobExecutorLauncher?
          kukeltje

          The jobexecutor is configured via the jbpm config file as is in the docs

          The title of your post does not match the question....

          jbpm.configuration.resource parameter is used (as you could see in the source) as init parameters for either the filter or servlets and configured in the web.xml. This is one of the ways to specify a different config file than e.g. one named 'jbpm.cfg.xml' and putting it on your classpath

          • 2. Re: How to configure org.jbpm.web.JobExecutorLauncher?
            vkozlov

             

            "kukeltje" wrote:

            The title of your post does not match the question....


            Sorry for my poor English, my native language is Java :)

            "kukeltje" wrote:
            jbpm.configuration.resource parameter is used (as you could see in the source) as init parameters for either the filter or servlets and configured in the web.xml. This is one of the ways to specify a different config file than e.g. one named 'jbpm.cfg.xml' and putting it on your classpath


            This is exactly what I want. I need to have two jbpm config files - one for my servlets (in which jbpm transaction support must be disabled) ant another for Job Executor (for example job_bot_jbpm.cfg.xml, in which jbpm transaction support must be enabled). But, how I can configure it in web.xml? JobExecutorLauncher isn't a servlet, it is a listener, so it not accepts <init-param> tag. Can you give me an example?

            • 3. Re: How to configure org.jbpm.web.JobExecutorLauncher?
              kukeltje

              sorry, it accepts context param's as far as i know. But why do you want *no* transaction around yor jobs? weird, never heard anybody want that.

              • 4. Re: How to configure org.jbpm.web.JobExecutorLauncher?
                vkozlov

                 

                "kukeltje" wrote:
                sorry, it accepts context param's as far as i know. But why do you want *no* transaction around yor jobs? weird, never heard anybody want that.


                For Seam/jBPM integration and using of Seam managed JBpmContext, it's required to disable transaction management in JBPM and use Seam's transactions. Besides, if I disable transactions, it causes incorrect work of Job Executor. So I need two configs - one for Seam managed JBPM, another for Job Executor Servlet (which will run in same web app but outside of Seam contexts)

                • 5. Re: How to configure org.jbpm.web.JobExecutorLauncher?
                  kukeltje

                  Yes, but that is the other way around as you described it initially.... this makes sense, although.... can't the job executor work with seam transactions? There was something in the Jira, but I think it was fixed

                  • 6. Re: How to configure org.jbpm.web.JobExecutorLauncher?
                    mputz

                     

                    can't the job executor work with seam transactions?


                    Just recently, I made a similar test and added the JobExecutorServlet to the dvdstore demo and experienced no issues when a timer fired. This was with Seam 2.0.2, and no other changes to the jBPM configs were necessary.

                    • 7. Re: How to configure org.jbpm.web.JobExecutorLauncher?
                      vkozlov

                       

                      "mputz" wrote:

                      Just recently, I made a similar test and added the JobExecutorServlet to the dvdstore demo and experienced no issues when a timer fired. This was with Seam 2.0.2, and no other changes to the jBPM configs were necessary.


                      Thanks!

                      • 8. Re: How to configure org.jbpm.web.JobExecutorLauncher?
                        vkozlov

                        mputz, I tried it just now - but unsuccessfully. I use Firebird as JBPM DB, and as far as I can see - the JobExecutor holds opened transaction from its start to infinite...
                        The only one solution I can find is https://jira.jboss.org/jira/browse/JBSEAM-3837
                        - because https://jira.jboss.org/jira/browse/JBPM-1166 still not fixed.

                        But, sporadically it causes deadlocks in Firebird and/or conflicts in Entity Manager, so I decided to make separate webapplication for Job Executor instead of two context (Seam'ed and Seam'less) in one app. Of course it's stupid way but simple, anyway it works for me :)