4 Replies Latest reply on Dec 17, 2008 4:51 AM by Amira Talbi

    SLSB + JBPM Rollback

    Amira Talbi Newbie

      Hi;
      I need an urgent help please concerning JBPM exception handling. I have a process where I modeled a general exception. All my action handlers delegate business logic to Session beans (SLSB). And when an error is to be catched by that exception handler, it has to be rollbacked, and at that moment, "no transaction active " error occures.

      I found a subject on JIRA that explains in other way my problem.
      https://jira.jboss.org/jira/browse/JBPM-681

      I changed by hand the hbm files as mentionned and rebuild JBPM from sources but no way, it doesn't work ... :(
      Could you hellp me please ?

        • 1. Re: SLSB + JBPM Rollback
          Ronald van Kuijk Master

           

          I found a subject on JIRA that explains in other way my problem.
          https://jira.jboss.org/jira/browse/JBPM-681
          It can't since that is solved (unless you use 3.2.2)

          You should explain to us how your transactions are configured in SLSB, jBPM etc... otherwise we can't help you

          • 2. Re: SLSB + JBPM Rollback
            Amira Talbi Newbie

            Hi kukeltje;
            Thanks for your reply.

            I'm using JBPM3.2.2 and I checked out project from SVN to change the hbm files us mentionned.

            My transaction schema is :
            - I'm receinving messages from asynchronous systems via an MDB, the MDB dispatches the message to a session Bean that fire the process instance to move to next state, from that, the process is entering a fork node with 2 transistions. I throwed an exception in one of that transitions. So when the exception is thrown, exception handler is invoqued + a rollback from the lower level of the transaction.


            - Process action handlers use a SLSB to do the business logic and this SLSB is injecting other ones

            Hope that I was clear in my description
            Thkx in advance

            • 3. Re: SLSB + JBPM Rollback
              Amira Talbi Newbie

              Sorry, I'm using JBPM 3.2.3

              • 4. Re: SLSB + JBPM Rollback
                Amira Talbi Newbie

                here is my jbpm.cfg.xml config :

                <service name="persistence">
                 <factory>
                 <bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory">
                 <field name="isTransactionEnabled"><false /></field>
                 <field name="isCurrentSessionEnabled"><true /></field>
                 </bean>
                 </factory>
                 </service>


                and hibernate.Cfg
                <?xml version='1.0' encoding='utf-8'?>
                
                <!DOCTYPE hibernate-configuration PUBLIC
                 "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
                 "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
                
                <hibernate-configuration>
                 <session-factory>
                
                 <!-- hibernate dialect -->
                
                 <!-- JDBC connection properties (end) -->
                 <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
                
                 <!-- DataSource properties (begin) -->
                 <property name="hibernate.connection.datasource">java:/jbpm</property>
                 <!--==== DataSource properties (end) -->
                
                 <!-- JTA transaction properties (begin) === -->
                 <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
                 <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
                 <!--==== JTA transaction properties (end) -->
                
                 <!-- CMT transaction properties (begin) ===
                 <property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
                 <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
                 ==== CMT transaction properties (end) -->
                
                 <!-- logging properties (begin) ===
                 <property name="hibernate.show_sql">false</property>
                 <property name="hibernate.format_sql">true</property>
                 <property name="hibernate.use_sql_comments">true</property>
                 ==== logging properties (end) -->
                
                
                 </session-factory>
                </hibernate-configuration>