Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Paulo Cesar Dias Lima
Greenhorn
Posts: 12
  • 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.
 
William Markito Oliveira
Author
Greenhorn
Posts: 9
5
Java Linux Python
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!