Uploaded image for project: 'BatchEE'
  1. BatchEE
  2. BATCHEE-88

rollback fails if the connection already got closed by the container

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.3-incubating
    • 0.4-incubating
    • jbatch-core
    • None

    Description

      We get the following Exception in some cases. Happens if our Oracle closes the connection alltogether after a constraint problem in the db.

      2016-01-15 09:16:29,805 [@Asynchronous myapp-batches - 1] noSessionActive noUserId ERROR controller.BaseStepController No transaction associated with current thread
      java.lang.IllegalStateException: No transaction associated with current thread
              at org.apache.geronimo.transaction.manager.TransactionManagerImpl.setRollbackOnly(TransactionManagerImpl.java:241)
              at org.apache.openejb.core.CoreUserTransaction.setRollbackOnly(CoreUserTransaction.java:92)
              at org.apache.batchee.tools.services.thread.UserTransactionTransactionService$UserTransactionTxAdapter.setRollbackOnly(UserTransactionTransactionService.java:102)
              at org.apache.batchee.container.impl.controller.chunk.ChunkStepController.rollback(ChunkStepController.java:650)
              at org.apache.batchee.container.impl.controller.chunk.ChunkStepController.invokeChunk(ChunkStepController.java:632)
              at org.apache.batchee.container.impl.controller.chunk.ChunkStepController.invokeCoreStep(ChunkStepController.java:666)
              at org.apache.batchee.container.impl.controller.BaseStepController.execute(BaseStepController.java:152)
              at org.apache.batchee.container.impl.controller.ExecutionTransitioner.doExecutionLoop(ExecutionTransitioner.java:106)
              at org.apache.batchee.container.impl.controller.JobThreadRootController.originateExecutionOnThread(JobThreadRootController.java:110)
              at org.apache.batchee.container.util.BatchWorkUnit.run(BatchWorkUnit.java:62)
      

      Any rollback exception should get catched away and the execution should continue normally imo.

      Any thoughts?

      Attachments

        1. BATCHEE-88.patch
          3 kB
          Mark Struberg

        Activity

          People

            struberg Mark Struberg
            struberg Mark Struberg
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: