Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-10308

Graceful shutdown doesn't wait on active transactions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Blocker Blocker
    • None
    • 7.1.0.DR16
    • Transactions
    • Hide
      git clone https://gitlab.mw.lab.eng.bos.redhat.com/dsimko/tests-transactions.git JBOSS_HOME=... (downloadable at http://download.eng.brq.redhat.com/devel/candidates/JBEAP/)
      
      DS_PROPS="-Dds0.db=postgresql -Dds0.jdbc.driver.url=http://www.qa.jboss.com/jdbc-drivers-products/EAP/7.1.0/postgresql94/jdbc4/postgresql-9.4.1209.jar -Dds0.jdbc.xa-class=org.postgresql.xa.PGXADataSource -Dds0.jdbc.url=jdbc:postgresql://gen-vm006.mw.lab.eng.bos.redhat.com:5432/crashrec -Dds0.db.name=crashrec -Dds0.user=crashrec -Dds0.pass=crashrec -Dds0.jdbc.driver.jar=postgresql-driver.jar -Dds1.db=postgresql"
      
      mvn clean verify -Djboss.dist=$JBOSS_HOME -am -pl jbossts -DfailIfNoTests=false -Dsurefire.forked.process.timeout=0 -Djbossts.noJTS -Dmaven.repo.local=path_to_eap-local-maven-repository -Deap -Dversion.eap=7.1.0.Beta1-redhat-1 -Dsurefire.rerunFailingTestsCount=0 -Dtest=JPAShutdownTestCase#gracefulShutdownShouldKnowAboutActiveTx
      
      Show
      git clone https: //gitlab.mw.lab.eng.bos.redhat.com/dsimko/tests-transactions.git JBOSS_HOME=... (downloadable at http://download.eng.brq.redhat.com/devel/candidates/JBEAP/) DS_PROPS= "-Dds0.db=postgresql -Dds0.jdbc.driver.url=http: //www.qa.jboss.com/jdbc-drivers-products/EAP/7.1.0/postgresql94/jdbc4/postgresql-9.4.1209.jar -Dds0.jdbc.xa-class=org.postgresql.xa.PGXADataSource -Dds0.jdbc.url=jdbc:postgresql://gen-vm006.mw.lab.eng.bos.redhat.com:5432/crashrec -Dds0.db.name=crashrec -Dds0.user=crashrec -Dds0.pass=crashrec -Dds0.jdbc.driver.jar=postgresql-driver.jar -Dds1.db=postgresql" mvn clean verify -Djboss.dist=$JBOSS_HOME -am -pl jbossts -DfailIfNoTests= false -Dsurefire.forked.process.timeout=0 -Djbossts.noJTS -Dmaven.repo.local=path_to_eap-local-maven-repository -Deap -Dversion.eap=7.1.0.Beta1-redhat-1 -Dsurefire.rerunFailingTestsCount=0 -Dtest=JPAShutdownTestCase#gracefulShutdownShouldKnowAboutActiveTx

      We have following test scenario:

      1) transaction is started on a client side (userTransaction.begin())
      2) remote ejb call is invoked (updates db)
      3) server is commanded to gracefully shutdown with 60s timeout
      4) another remote call is invoked (in the same transaction as the first one)
      5) transaction commit

      but in the step 4) we get "java.net.ConnectException: Connection refused" because server doesn't wait on "in flight transaction" and stops immediately.

      Another test (serverShouldNotRefuseSameTx) scenario is similar but before commanding the server to shutdown (with 60s timeout) another remote ejb call is invoked from another thread which only does Thread.sleep for 50s in order to keep server alive. But next remote ejb call is also not proceeds to the server.

              ochaloup@redhat.com Ondrej Chaloupka (Inactive)
              dsimko Daniel Simko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: