1 Reply Latest reply on Jul 9, 2008 1:31 PM by Rene Felgenträger

    long transaction

    Benito Juarez Newbie


      i got an error while processing a long running transaction (about 20 minutes)

      The entity manager is the seam managed one:

      private EntityManager entityManager;

      And the method looks like this:

      public String doLongProcess() 
         foreach line from big text file:
             MyEntity e = new MyEntity(some data);

      After 10 Minutes one half of the text file is processed and the following error occours:

      11:20:09,366 INFO   MyActionBean.doLongProcess() Fehler javax.persistence.TransactionR
      equiredException: no transaction is in progress
              at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:293)
              at org.jboss.seam.persistence.EntityManagerProxy.flush(EntityManagerProxy.java:90)

      any hints?
      thx BJ

        • 1. Re: long transaction
          Rene Felgenträger Newbie

          JBOSS AS has a default transaction-timeout! In your case u must overwrite the default settings!

          look for this statement in the jboss-service.xml:

             <mbean code="com.arjuna.ats.jbossatx.jta.TransactionManagerService"
                <attribute name="TransactionTimeout">300</attribute>
                <attribute name="ObjectStoreDir">${jboss.server.data.dir}/tx-object-store</attribute>      

          the TransactionTimeout-property is weighted in seconds!