Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Batch Applications for the Java Platform (JSR 352) vs. EJB Timer Service

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Batch Applications for the Java Platform (JSR 352) vs. EJB Timer Service (java.ejb.Schedule or java.ejb.Schedules annotations.)
I would like to know if is there some recommendation regards the possibility to integration between EJB Timer Service that needs to start a Batch Applications.

Other concern is about if it possible to check the status of execution (running, finished, wait) before EJB timer invokes a Batch process.

Is it possible to Batch process invoke (call back) a EJB method or post a JMS message when finished ?

I checked that JobExecution interface provides methods check status, but I not found a way to notify or register a listener for job conclusion.

Regards,

Paulo Lima.
 
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paulo,

You can monitor a Job status through a JobListener, please check the following page and look for "The Listener Batch Artifacts" section.
http://docs.oracle.com/javaee/7/tutorial/doc/batch-processing008.htm#BCGJHEHJ
API: http://docs.oracle.com/javaee/7/api/javax/batch/api/listener/JobListener.html

On the afterJob method you can post the JMS message or whatever needed.

Cheers
 
No. No. No. No. Changed my mind. Wanna come down. To see this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic