Runtime.exec - multithread ?
Runtime.exec - multithread ?
- Subject: Runtime.exec - multithread ?
- From: Erwin <email@hidden>
- Date: Tue, 9 Nov 2004 09:08:54 +0100
In one of my components I launch (successfully..) a C-Program using Runtime.exec command-line to convert an Image
..........
try{
Process runningApp = Runtime.getRuntime().exec(command);
//
BufferedReader dtinstrm = new BufferedReader(new InputStreamReader(runningApp.getInputStream()) );
BufferedReader dterrstrm = new BufferedReader(new InputStreamReader(runningApp.getErrorStream()) );
runningApp.waitFor();
..........
Once it's finished, the image is stored into the file system, a DB is updated with the path to the converted image and an email is sent to the user.
As the conversion process takes some time (even in C), I wonder if it's possible to give hand back to the user (with a warning: you will get an email when the converted image will be ready for access)
In this case my component should not wait for the return code from the C program, but I don't know where and how I should manage this return code to perform the DB update and email sending.
Any track or tip on it ?
thanks a lot
Erwin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden