× 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.



Chris Wolcott wrote:

(This is my first JAVA app that runs on an AS/400.)

I have a JAVA app on our AS/400 (JVM 1.4 / OS V5R1) that accepts
requests from an outside source and spawns a thread to handle each
request.  (Typically a max of 5, average around 3 at a time.)  Each
thread creates an AS/400 object and a JDBC Connection object.  The
command services are disconnected and the connection statements closed
after each use.  The JDBC Connection is closed at the end of the thread.
The threads are kept in a home grown thread pool that periodically goes
through and sets unused threads to null so they can be GC'd.
Nulling the threads just removes the references but does not stop the threads and clean them up. As long as the run() method runs they are still there

My guess is that the old not-terminated threads are still lingering around, and you hit some hard limit for the OS/400 JVM.

See http://java.sun.com/docs/books/tutorial/essential/threads/lifecycle.html under "Stopping a thread" for the proper way to do this.

--
 Thorbjørn

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.