[jboss-user] [jBPM] - Re: Multiple Sessions - Timer Tasks - some triggered twice and some missed

tmag do-not-reply at jboss.com
Sat Jan 19 14:41:06 EST 2013


tmag [https://community.jboss.org/people/tmag] created the discussion

"Re: Multiple Sessions - Timer Tasks - some triggered twice and some missed"

To view the discussion, visit: https://community.jboss.org/message/793026#793026

--------------------------------------------------------------
Seems there are multiple problems - for repeating timer tasks in regular intervals.

1. Sometimes multiple instances of ScheduledThreadPool objects getting created on single session - which we tried to avoid by making scheduler static as above.
2. ProcessContext data getting corrupted with duplicate process instance info. 
When we print out the session & process info from context  in our registered custom timer service  - its showing duplicate process instance ids as shown below.

+*ProcessJobContext processJobContext = (ProcessJobContext) ctx;*+
+*StatefulKnowledgeSessionImpl ksessionImpl = (StatefulKnowledgeSessionImpl) processJobContext.getKnowledgeRuntime();*+
+*System.out.println("**********>session id : "+ ksessionImpl.getId() + "; process id : "+ processJobContext.getProcessInstanceId());*+


**********> session id : 0; process id : 6
**********> session id : 0; process id : 7
**********> session id : 0; process id : 8
**********> session id : 0; process id : 9
**********> session id : 0; process id : 10
 ......................

**********> session id : 0; process id : 6
**********> session id : 0; process id : 7
**********> session id : 0; process id : 8
**********> session id : 0; process id : 9
**********> session id : 0; process id : 10

These processes 6 to 10 are getting scheduled twice & executing twice.+*
*+
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/793026#793026]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130119/d1cb941b/attachment.html 


More information about the jboss-user mailing list