RE: Servlet.destroy but not init called when context is reloaded

2003-09-15 Thread Shapira, Yoav

Howdy,

Looking at the log this weird behaviour seems to start after init()
threw
an
exception. I did restart the Tomcat service, but the somehow the server
kept
malfunctioning from this point onwards. Can the init() somehow be
disabled,
so it wont be called on future reloads ?

No, init cannot be disabled.  It is your responsibility to ensure proper
init processing or alternatively be ready to deal with an undefined
state for that servlet.

Is this 1) an issue with garbage collection order 2) some JRE problem,
that
persists across Tomcat reloads 3) Potentially a Tomcat bug 4) Me being
stupid ?

None of the above.  It's an issue with you not properly handling an
errorneous init() method.

looking at the log, there might be a 5th possibility relating to Axis
being
being busy starting, resulting in a socket timeout that leaves the
communication in an unstable state, does that sound plausible ?

Possibly, yes.  Only you would know, as that's very implementation
specific.

Rather than waste your time by pasting a 1000 lines from the logfile.
My
question is simply : what is the most likely cause of my problem ?

Make sure you init method catches exceptions and handles them properly.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Servlet.destroy but not init called when context is reloaded

2003-09-14 Thread Henrik Vendelbo
BusinessBluprints letterI have to admit that I am quite baffled. Hopefully
someone can point me in the right direction, so I can find out what is going
wrong.

My overall setup is a Servlet front calling a WebService backend. The whole
thing runs on the same Tomcat server under Win2k. I have combined Tomcat and
Axis according to descriptions, and have been using it for a while without
any problems. So it probably isnt in the Axis department I should look.

If I restart the Tomcat service and make one request to the servlet it
correctly calls the webservice, receives a reply, and formats it into a nice
HTML reply. I can go on making that exact same HTTP request and I will get
the same HTML result, with no apparent failures in the logs.

Now, if I make a slightly different servlet request (that would normally
succeed) the context is reloaded calling destroy() but not init() on the
servlet, which subsequently fails because I rely on init being called before
doGet(..).

To make matters even more confusing, it makes no difference if I reload the
Tomcat service. On the next request the context will be reloaded and call
destroy() but no init().

Looking at the log this weird behaviour seems to start after init() threw an
exception. I did restart the Tomcat service, but the somehow the server kept
malfunctioning from this point onwards. Can the init() somehow be disabled,
so it wont be called on future reloads ?

Is this 1) an issue with garbage collection order 2) some JRE problem, that
persists across Tomcat reloads 3) Potentially a Tomcat bug 4) Me being
stupid ?

looking at the log, there might be a 5th possibility relating to Axis being
being busy starting, resulting in a socket timeout that leaves the
communication in an unstable state, does that sound plausible ?

Rather than waste your time by pasting a 1000 lines from the logfile. My
question is simply : what is the most likely cause of my problem ?

Environment :
Tomcat 4.1.27
Axis 1.1
J2SDK 1.4.2


Thanks for your time,

Henrik Vendelbo



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]