Sanket Mohile
2013-04-10 06:12:21 UTC
Sanket Mohile [https://community.jboss.org/people/sanket.mohile] created the discussion
"Multiple ksession dispose issue"
To view the discussion, visit: https://community.jboss.org/message/807338#807338
--------------------------------------------------------------
Hi,
I'm getting a WARN message when working with ksession1 even if I'm disposing ksession2.
Following is the scenario -
1. Create ksession1. Bind HT Handler 1.
2. Start a process with HT and timer(Timer period 30s)
3. DO NOT DISPOSE ksession1, neither the HT Handler 1.
4. Timer continues as expected.
5. Now, create ksession2. Bind HT Handler 2.
6. Start a process with HT, no timers in this.
7. Dispose the HT Handler 2 and ksession2 in transaction using CMTDisposeCommand. Gets disposed successfully.
8. Timer still continues, but now I get following the WARN message on every timer tick(30s in my case)
It is evident from the active timer that ksession1 is still active, no issues with that. It is just the WARN message that I am curious about.
|| *WARN Message* ||
| 17:27:26,945 INFOÂ [stdout] (pool-35-thread-1) Current Bill: 503.0
17:27:26,945 INFOÂ [stdout] (pool-35-thread-1) Your bill was incremented. Total ammount: $504.0
17:27:26,965 WARNÂ [com.arjuna.ats.jta] (pool-35-thread-1) ARJUNA016029: SynchronizationImple.afterCompletion - failed for ***@1913209 (mailto:***@1913209) with exception: java.lang.IllegalStateException: Illegal method call. This session was previously disposed.
at org.drools.reteoo.DisposedReteooWorkingMemory.getProcessRuntime(DisposedReteooWorkingMemory.java:270) [drools-core-5.5.0.Final.jar:5.5.0.Final]
at org.drools.impl.StatefulKnowledgeSessionImpl.getProcessRuntime(StatefulKnowledgeSessionImpl.java:874) [drools-core-5.5.0.Final.jar:5.5.0.Final]
at org.drools.persistence.SingleSessionCommandService$SynchronizationImpl.afterCompletion(SingleSessionCommandService.java:455) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final]
at org.drools.persistence.jta.JtaTransactionSynchronizationAdapter.afterCompletion(JtaTransactionSynchronizationAdapter.java:22) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final]
at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:96)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:402)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:103)
at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:164)
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1165)
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:117)
at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:167)
at org.drools.persistence.jta.JtaTransactionManager.commit(JtaTransactionManager.java:179) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final]
at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:376) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final]
at org.drools.persistence.jpa.JpaTimerJobInstance.call(JpaTimerJobInstance.java:34) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final]
at org.drools.persistence.jpa.JpaTimerJobInstance.call(JpaTimerJobInstance.java:14) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_43]
at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_43]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98) [rt.jar:1.6.0_43]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206) [rt.jar:1.6.0_43]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_43]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_43]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_43]
17:27:27,007 WARNÂ [com.arjuna.ats.arjuna] (pool-35-thread-1) ARJUNA012127: TwoPhaseCoordinator.afterCompletion - returned failure for SynchronizationImple< 0:ffff0ae1a951:66eea469:51640136:10c, ***@1913209 (mailto:***@1913209) > |
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/807338#807338]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
"Multiple ksession dispose issue"
To view the discussion, visit: https://community.jboss.org/message/807338#807338
--------------------------------------------------------------
Hi,
I'm getting a WARN message when working with ksession1 even if I'm disposing ksession2.
Following is the scenario -
1. Create ksession1. Bind HT Handler 1.
2. Start a process with HT and timer(Timer period 30s)
3. DO NOT DISPOSE ksession1, neither the HT Handler 1.
4. Timer continues as expected.
5. Now, create ksession2. Bind HT Handler 2.
6. Start a process with HT, no timers in this.
7. Dispose the HT Handler 2 and ksession2 in transaction using CMTDisposeCommand. Gets disposed successfully.
8. Timer still continues, but now I get following the WARN message on every timer tick(30s in my case)
It is evident from the active timer that ksession1 is still active, no issues with that. It is just the WARN message that I am curious about.
|| *WARN Message* ||
| 17:27:26,945 INFOÂ [stdout] (pool-35-thread-1) Current Bill: 503.0
17:27:26,945 INFOÂ [stdout] (pool-35-thread-1) Your bill was incremented. Total ammount: $504.0
17:27:26,965 WARNÂ [com.arjuna.ats.jta] (pool-35-thread-1) ARJUNA016029: SynchronizationImple.afterCompletion - failed for ***@1913209 (mailto:***@1913209) with exception: java.lang.IllegalStateException: Illegal method call. This session was previously disposed.
at org.drools.reteoo.DisposedReteooWorkingMemory.getProcessRuntime(DisposedReteooWorkingMemory.java:270) [drools-core-5.5.0.Final.jar:5.5.0.Final]
at org.drools.impl.StatefulKnowledgeSessionImpl.getProcessRuntime(StatefulKnowledgeSessionImpl.java:874) [drools-core-5.5.0.Final.jar:5.5.0.Final]
at org.drools.persistence.SingleSessionCommandService$SynchronizationImpl.afterCompletion(SingleSessionCommandService.java:455) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final]
at org.drools.persistence.jta.JtaTransactionSynchronizationAdapter.afterCompletion(JtaTransactionSynchronizationAdapter.java:22) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final]
at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:96)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:402)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:103)
at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:164)
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1165)
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:117)
at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:167)
at org.drools.persistence.jta.JtaTransactionManager.commit(JtaTransactionManager.java:179) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final]
at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:376) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final]
at org.drools.persistence.jpa.JpaTimerJobInstance.call(JpaTimerJobInstance.java:34) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final]
at org.drools.persistence.jpa.JpaTimerJobInstance.call(JpaTimerJobInstance.java:14) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_43]
at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_43]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98) [rt.jar:1.6.0_43]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206) [rt.jar:1.6.0_43]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_43]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_43]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_43]
17:27:27,007 WARNÂ [com.arjuna.ats.arjuna] (pool-35-thread-1) ARJUNA012127: TwoPhaseCoordinator.afterCompletion - returned failure for SynchronizationImple< 0:ffff0ae1a951:66eea469:51640136:10c, ***@1913209 (mailto:***@1913209) > |
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/807338#807338]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]