ashok kumar wrote on Apr 13, 2011 11:27:
I am fetching mails from a mail box using a quartz scheduler to download the attachments and store it in the database. The problem i am facing is there are 100s of mails and the transaction breaks in between. The error that i see is
20:30:10,785 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.BasicAction_58] - Abort of action id 7f000002:b947:4da5b923:2d invoked while multiple threads active within it. 20:30:10,785 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.CheckedAction_2] - CheckedAction::check - atomic action 7f000002:b947:4da5b923:2d aborting with 1 threads active!
Everything thing stops working after this error and transaction is rolled back. I understand that there is some limit for the transactions/threads which is exceeding but i am not able to resolve it.
Please let me know how do i fix this. I have tried increasing the transaction timeout value in jboss-service.xml inside jboss conf directory.
Any help would be appreciated.
Thanks in advance.
Also, i can not use native queries in this case.
You can try Annotating to your method with @Transactional(TransactionPropagationType.NEVER) if you dont want to set time out.
The default transaction time out can be changed in your appliocation server (file transaction-jboss-beans.xml) and try to handle retrieving the messagss outside the transaction and processing each message individually inside a transaction.