1 Reply Latest reply on Jul 12, 2010 8:15 PM by rebody

    Command service txn management

    gubespam

      In the default jbpm JTA configuration (jbpm.tx.jta.cfg.xml), the command service is set up three different ways (see below). Can someone say how jbpm which one to pick in each case? Looking at the code, it seems like jbpm should always pick the "newTxRequiredCommandService".

       

      {code}
          <command-service name="txRequiredCommandService">
            <skip-interceptor />
            <environment-interceptor />
            <retry-interceptor type="jta" />
            <jta-transaction-interceptor />
          </command-service>

          <command-service name="newTxRequiredCommandService">
            <environment-interceptor policy="requiresNew" />
            <retry-interceptor type="jta" />
            <jta-transaction-interceptor policy="requiresNew" />
          </command-service>

          <command-service>
            <environment-interceptor />
          </command-service>
      {code}
        • 1. Re: Command service txn management
          rebody

          Hi MM,

           

          The DatabaseIdGenerator need second commandService to fetch the id from database in a seperated Transaction,  please refer jbpm.default.cfg.xml

           

          <object class='org.jbpm.pvm.internal.id.DatabaseDbidGenerator'>
                <field name="commandService"><ref object="newTxRequiredCommandService" /></field>
              </object>
          

           

          I didn't know anything about the third commandService,  maybe it is an out of date configuration.