1 Reply Latest reply on Jan 28, 2011 2:45 AM by Martin Frey

    Best method for triggering a long running task?

    Mason Clear Newbie

      I have a web application that needs to allow the end user to kick off some integrations with third party APIs, such as REST and SOAP endpoints, along with db queries that take awhile to process. One of the intergrations usually takes 30mins to an hour to complete, while another can take hours to fully complete, due to an extremely slow REST webservice provided by a SaaS vender.


      I am trying to figure out the best method to handle these requirements. So far I have reviewed using @Observer by raising asynch events, and @Asynchronous methods. I have also briefly looked at using JbossMQ or jBPM. At this point im testing kicking off the processes with asynch observer events. But I havent fully converted the core java app's to be used by the seam app, so I dont know if they wont time out or anything.

        • 1. Re: Best method for triggering a long running task?
          Martin Frey Newbie

          I think with the @Observer and @Asynchronous declaration you are going in the good direction. I use this to trigger email sending in the application i'm supporting and this works quite well. These are not extremely long running tasks and i think in your case you probably have to look at transaction timeouts. (?)
          Another way could be to use JMS with MessageDrivenBeans but there i do not have alot of knowledge cause the only thing i use are two quartz jobs which are not Seamcomponents yet.


          Martin