From: "Perianayagam.T"
Sender: "Perianayagam.T"
Reply-To: "Perianayagam.T"
Subject: Re: Thread Spawn
Newsgroups: weblogic.developer.interest.servlet
X-User-Info: 139.85.50.249
References: <3efd60aa$1@newsgroups.bea.com>
NNTP-Posting-Host: 139.85.50.249
X-Original-NNTP-Posting-Host: 139.85.50.249
Message-ID: <3f0c34c8@newsgroups.bea.com>
Date: 9 Jul 2003 08:29:12 -0700
X-Trace: newsgroups.bea.com 1057764552 139.85.50.249 (9 Jul 2003 08:29:12 -0700)
X-Original-Trace: 9 Jul 2003 08:29:12 -0700, 139.85.50.249
Organization: BEA NEWS SITE
Lines: 29
XPident: Unknown
Path: newsgroups.bea.com!not-for-mail
Xref: newsgroups.bea.com weblogic.developer.interest.servlet:9556


Iam not getting what u mean by stopping the context...
But what I suggest you is in the destroy() method of the servlet (which is bascially
the destructor of the servlet ) you can interrupt (thread.interrupt() )the thread
which was spawned initially...

pls let me know if my understanding was correct..

Thanks
Perianayagam.T

"TH Lim" wrote:
>
>Hi,
>
>What is the best way to spawn a thread when the servlet context starts
>and terminates
>when the context stops or ends in Weblogic 6.1? At the moment, I use
>a startup
>on load servlet to kick off a thread to start my background process.
>This process
>does a JDBC SELECT, performs some calculations and finally, JDBC INSERT
>or UPDATE
>resutls into a few tables. The problem I'm faing now is that when the
>context
>is stopped, the thread still running. Pls. advise. Thank you.
>
>/lim/