Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Java threads & deamons
AlexLi wrote:
> Hi.
>
> We are trying to make a "batch" execution in a Oracle DB 9.2.4 with
> the java.lang.threads. In other word we want to execute a
> procedure/package without waiting the result from the (for example)
> SQL*Plus propmt.
>
> The java class we have created has this piece of code inside:
>
> . . .
> Thread thread = new forkato();
> thread.setDaemon(true);
> thread.start();
> . . .
>
> but the class don't terminate, waiting the thread forkato ending: as
> opposed as we want !
>
> Anybody has used this method ?
AlexLi,
I assume that "forkato" is a java class that extends class "Thread".
I assume "forkato" has a "run()" method. Perhaps you have coded an
infinite loop in this "run()" method? When the "run()" method
terminates, the thread terminates -- regardless of whether you make
it a daemon thread or not. Have you tried using the "forkato" class
in a different JVM -- outside of the database? Does it terminate
correctly in a different JVM?
Good Luck,
Avi.
Received on Thu May 06 2004 - 03:17:33 CDT
![]() |
![]() |