Well removing the extra element from my server.xml fixed the
problem and I now only have the one Background thread I intended. You
are right, less resources consumed. I am not sure where I got the idea
I needed:
Probably read it as an example in a book.
Christopher Schultz wrote
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
David,
On 5/4/2009 2:41 PM, David.Meldrum wrote:
>unpackWARs="true" autoDeploy="true"
> xmlValidation="false" xmlNamespaceAware="false">
>
>
>unpackWARs="true" autoDeploy="true"
>
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
David,
On 5/1/2009 1:23 PM, David.Meldrum wrote:
> Chris, This is a good point. What I am discovering is that while I was
> calling a terminate method on the Thread in the
> ContextListener.contextDestroyed() method, my thread lives for quite
> while
This may be the key to duplicate Thread. I am not really confident in
my server.xml so here it is. Note that I have two "hosts" one for
"localhost" and the other for the domain "southchurch.atx.cx" Is that
correct? Could that cause the application to run twice?
Server.xml
SSLEngine=
> From: David.Meldrum [mailto:david.meld...@verizon.net]
> Subject: Re: Extra Threads in background
>
> I did not call the "destroy()" method because I though it was
> deprecated and dangerous.
I believe Chris meant the ServletContextListener.contextDestroyed() me
Chris, This is a good point. What I am discovering is that while I was
calling a terminate method on the Thread in the
ContextListener.contextDestroyed() method, my thread lives for quite
while, because it is sleeping and does not wake up to test the terminate
flag for several minutes. My sol
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
David,
On 4/28/2009 10:52 PM, David.Meldrum wrote:
> I need a background task which I implemented as a thread that I stated
> in the ContextListerner.
[snip]
> The problem I noticed is that while I only call
> the BackGroundThread.*start()* method o
> From: David.Meldrum [mailto:david.meld...@verizon.net]
> My least favorite activity is programming by experiment.
Try Morris dancing sometime ;-).* Alternatively, enable debugging, connect a
suitable debugger and set a breakpoint in the code you want to prevent being
called twice? Depends on
Pid, Logging the stack trace is an excellent idea! I already have been
counting the the number of Thread starts() (run()) and I found it is
indeed being started again somewhere. Looks like I need lots of
experiments. My least favorite activity is programming by experiment.
-d
Pid wrote:
D
David.Meldrum wrote:
> Running Tomcat 6.0.18 Standalone on Windows XP.
>
> I need a background task which I implemented as a thread that I stated
> in the ContextListerner. In the contextInitilized() method I create and
> started the background process. I give it a name and made it a daemon.
>
10 matches
Mail list logo