Maybe you can use quartz. http://quartz-scheduler.org/
On Sat, Apr 18, 2015, 8:01 AM Lars-Fredrik Smedberg [via TomEE & OpenEJB] < [email protected]> wrote: > Understand that... Unfortunately we are running Java EE6 in production and > cannot pull it in as a third party prod for various reasons > On Apr 18, 2015 4:58 PM, <[hidden email] > <http:///user/SendEmail.jtp?type=node&node=4674476&i=0>> wrote: > > > I am very happy with jbatch aka batchee. > > > > Skickat från min iPhone > > > > > 18 apr 2015 kl. 16:36 skrev Lars-Fredrik Smedberg <[hidden email] > <http:///user/SendEmail.jtp?type=node&node=4674476&i=1>>: > > > > > > Hi > > > > > > I need to run a background task that will poll messages from a > > > BlockingQueue, aggregate data (to some degree) and at regular > intervals > > > write the data to a file (append to a file). > > > > > > Each appserver instance will write to its own file so there is no need > to > > > sync within a cluster or similar... > > > > > > I guess I could at startup create my own thread and peek the queue > etc... > > > but if I would keep it more strict Java EE 6 and also need access to > > > @ApplicationScoped beans then I guess I could either use a one-off > > > programmatic EJB timer or calling an @Asynchronous EJB methos > > > (started/called from a @Singleton @Startup... EJB). > > > > > > What is the preferred approach you would use? > > > > > > Regards > > > LF > > > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://tomee-openejb.979440.n4.nabble.com/Long-running-background-tasks-using-Java-EE-6-tp4674474p4674476.html > To start a new topic under TomEE Users, email > [email protected] > To unsubscribe from TomEE Users, click here > <http://tomee-openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=979441&code=Y2NoYWNpbkBnbWFpbC5jb218OTc5NDQxfDE2NzcwMDYzOTY=> > . > NAML > <http://tomee-openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > ----- Carlos Chacin http://github.com/cchacin -- View this message in context: http://tomee-openejb.979440.n4.nabble.com/Long-running-background-tasks-using-Java-EE-6-tp4674474p4674477.html Sent from the TomEE Users mailing list archive at Nabble.com.
