× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



There is nothing special about it, Vengoal. As you probably know, servlets
have both an init() and a destroy() as 'exits' so that you can initialize
and housekeep respectively when the container initializes the web
application or removes the web application.

I don't have the code in front of me but, in the overridden destroy()
method, but there is something like a super.destroy(), a Hibernate
closeCurrentThreadSessions() method followed by a notifyAll() to unblock a
waiting thread that closes down the main.

Sorry I can't be more specific here.

Chris J.

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx
[mailto:java400-l-bounces@xxxxxxxxxxxx]On Behalf Of Vengoal Chang
Sent: Sunday, October 30, 2005 9:13 PM
To: Java Programming on and around the iSeries / AS400
Subject: Re: Unable to end the QP0ZSPWT job when shutting down Tomcat


Hello Christopher,

    Could you share the destroy() method code ?

Best regards,

Vengoal

Christopher J. Jewell wrote:

>Just to follow up on this - David was right in speculating that the issue
>was associated with the database connections not shutting down. I resolved
>this by overriding the destroy() method in the Controller Servlet and
>explicitly shutting down the thread. I'm pretty sure I have a timeout on
the
>database connections (c3p0 via Hibernate) and so would have expected the
>QP0ZSPWT to end normally after the expected interval when shutting down
>Tomcat. It's obviously good practise to shutdown the application in a
>controlled manner and so the solution was perfect, with the job submitted
to
>start Tomcat ending normally.
>
>As far as being able to identify the QP0ZSPWT job, it seems that it is
>impossible to do so using native iSeries commands or apis. However, you can
>use the QSH to execute the command 'ps' to list processes 'grepping' on
some
>known attribute of your Job - this reveals Process Id's which could be
>parsed out and input to the 'kill' command. Interestingly, if you use QSH
to
>'kill' the original job submitted to start Tomcat, all spawned threads are
>shutdown, including the stubbornly persistent QP0ZSPWT job - this behavior
>is different from an ENDJOB *IMMED on the job.
>
>Thanks for your consideration - all is now resolved.
>
>Chris J.
>
>
>
>-----Original Message-----
>From: java400-l-bounces@xxxxxxxxxxxx
>[mailto:java400-l-bounces@xxxxxxxxxxxx]On Behalf Of David Morris
>Sent: Wednesday, October 26, 2005 12:03 PM
>To: java400-l@xxxxxxxxxxxx
>Subject: RE: Unable to end the QP0ZSPWT job when shutting down Tomcat
>
>
>Chris,
>
>Every time I have run into this it was a JDBC shutdown issue. You might
>try disabling any connection pool or connections and running shutdown.
>
>--David Morris
>
>
>
>>>>jewellcj@xxxxxxxxxxxxxxxxx 10/26/05 11:47 AM >>>
>>>>
>>>>
>Thanks for this, Pierce.
>
>I have only one copy of Tomcat installed on the system.
>
>The web application is fully started with jars attached at the time
>the
>'end' is submitted.
>
>After ending, a NETSTAT *CNN indicates the Tomcat-associated ports are
>indeed shutdown. The Tomcat log indicates that all Web Applications
>are
>'removed'. So, I guess the issue is that the JVM is not shutting down
>due to
>a programmatically spawned thread from the web application (and the
>still
>open port is indeed the port associated with the spawned thread).
>
>My programmatic thread is created as a daemon thread thus supposedly
>causing
>the JVM to shutdown when all other non-daemon threads (in this case,
>Tomcat
>threads) have died. To resolve this, I think I will need to program a
>shut
>down of the spawned thread thereby shutting down the JVM. Either that
>or
>discover some way of accurately identifying the QP0ZSPWT job that does
>not
>involve creating and running in a new subsystem.
>
>My sense now is that this is more of a Tomcat issue and so likely more
>appropriate for a Tomcat forum.
>
>Again, thanks for your help.
>
>Chris Jewell
>
>--
>This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
>mailing list
>To post a message email: JAVA400-L@xxxxxxxxxxxx
>To subscribe, unsubscribe, or change list options,
>visit: http://lists.midrange.com/mailman/listinfo/java400-l
>or email: JAVA400-L-request@xxxxxxxxxxxx
>Before posting, please take a moment to review the archives
>at http://archive.midrange.com/java400-l.
>
>
>

--
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.