Method, apparatus, and program to keep a JVM running during the shutdown process of a Java based server executing daemon threads

   
   

A single normal Java thread referred to as a "waiter" thread is used to prevent premature exit of the Java Virtual Machine during the shutdown process of the server application by waiting for any daemon threads in the JVM to complete execution. Using this mechanism, any daemon thread flagged by the application runs to completion before the JVM is allowed to exit. Once all flagged daemon threads exit, the waiter thread exits and allows the server application to properly terminate. The waiter thread uses an efficient mechanism to maintain a queue of threads. When a daemon thread is flagged, it is simply appended to the end of the queue. The waiter thread waits for the first thread in the queue to complete. Once the first thread in the queue completes, it is removed from the queue. At this point, the queue is searched for any other inactive threads and those threads are also removed from the queue. This allows the waiter thread to efficiently manage the queue and keep the memory and resource requirements to a minimum.

 
Web www.patentalert.com

< Execution of synchronized Java methods in Java computing environments

< Intelligent management module application programming interface with utility objects

> System, method, and computer program product for enabling on-device servers, offline forms, and dynamic ad tracking on mobile devices

> Apparatus and method for an enhanced integer divide in an IA64 architecture

~ 00193