Hi Yan,
You can have the proc invoked from java make an entry to a table and return. This will act like an enqueue process. Another proc, proc2, can run as a continuous dequeue process listening to the entry on this table and then carry out the rest of the logic using proc2 .