Forums Register Login

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

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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
Let's go to the waterfront with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1712 times.
Similar Threads
EJB vs Web Services
Timer are persisted
JSR 352 - Batch JSR
Spring Batch vs other options
Apache Axis vs. WebLogic
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 09:48:00.