5 Replies Latest reply on Oct 17, 2012 9:41 AM by swiderski.maciej

    How to copy timer events between sessions

    tmag

      Our process has a set of timer tasks & running as a seperate application (REST webservice calls).

      Its not a complex process though.

       

      1. There can be multiple parallel requests (REST calls). Do we need a new session for each request? or can use one single session?

      2. As per thread - https://community.jboss.org/thread/168837 - how to copy timer events from current session to centralized session? If we have to use session per request  need a centralized session to restore timer events.

       

      IncidentProcess-image.png

        • 1. Re: How to copy timer events between sessions
          tmag

          Did any one do this before - copy time events from current session to a centralized session ? Please help.

          • 2. Re: How to copy timer events between sessions
            swiderski.maciej

            as far as I know it is not possible to copy timers from one session to another currently. I would need to either keep one session that runs all your processes with timers or implement alternative TimerService.

             

            HTH

            1 of 1 people found this helpful
            • 3. Re: How to copy timer events between sessions
              tmag

              1. Could you please elaborate what you mean by 'alternate timer service' ? Its within jBPM or you saying to use something else like Quartz ?

                      If its in jBPM could you please point me to some samples - if you have any ?

               

              2. For our process flow - which I posted above -  Do we need a new session for each request? or a single session would suffice to serve parallel requests ? Please advice.

               


              • 4. Re: How to copy timer events between sessions
                tmag

                As the centralized session cannot be restored simultaneously, if multiple developers try to bring up their local applications pointing to a central db.

                 

                 

                1. Thats why we implemented it as seperate service (REST) decoupled from the original application. Is it a good approach?

                2. For now we are using a single session for this REST based service. As there can be multiple parallel requests - do we need a new session per each request ? or a single session can serve all requests?

                 

                Please help.

                • 5. Re: How to copy timer events between sessions
                  swiderski.maciej

                  single session should be good for your case as session is considered thread safe, just remember to keep it alive for the life cycle of the system that exposes it via REST and don't dispose it between requests.

                  tmag wrote:

                   

                  1. Could you please elaborate what you mean by 'alternate timer service' ? Its within jBPM or you saying to use something else like Quartz ?

                          If its in jBPM could you please point me to some samples - if you have any ?

                  I mean new implementation that could be plugged into jbpm and it could be using quartz

                   

                   

                  tmag wrote:

                   

                  2. For our process flow - which I posted above -  Do we need a new session for each request? or a single session would suffice to serve parallel requests ? Please advice.

                  I believe single session should be fine for this process as I don't see any rule tasks that will require its own (separate) context per process instance.

                   

                  HTH