| Author |
Servlets and PL\SQL
|
O. Ziggy
Ranch Hand
Joined: Oct 02, 2005
Posts: 430
|
|
Hi guys, I've got the following code that calls a stored procedure from a web based servlet application. The above statement calls a PL\SQL stored procedure in the database. The stored procedure takes about 2 hrs to complete. When my servlet calls this procedure, the relevant webpage on the front end is showing that its waiting for the stored procedure to return something. How can i call the stored procedure and have it run in the background while the servlet returns e.g. a message saying that the stored procedure is running in the background. I just need an idea or references as to how i can do this. Does the servlet have to call the PL\SQL in another thread? Is there something in CallableStatement that i can use to tell the servlet not to wait for a response from the PL\sqL? Thanks
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
If it takes 2 hours, I would make the call in a new thread and email the user when it's done. If you want simple example of a webapp that starts a long running process in a new thread see: http://simple.souther.us/not-so-simple.html Look for LongRunningProcess.
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
 |
|
|
subject: Servlets and PL\SQL
|
|
|