Reputation: 383
I am writing a Spring application where I need to trigger an external job and wait till the job finishes (which updates a field in an Oracle table) - I am thinking of polling the table till its updated. Could anyone suggest a method of doing that in Java? Thanks
Upvotes: 0
Views: 191
Reputation: 12817
Shell script
Create a shell script, run for external job in a separate thread,let it return a proper exit code, based on the exit code received from shell, execute your dependent process
Messaging
Let the external job to notify once it's done, on receiving the trigger/event you can start the other process waiting for this to be done.
Upvotes: 1