Closed glassfishrobot closed 12 years ago
@glassfishrobot Commented Reported by erich_liebmann
@glassfishrobot Commented shreedhar_ganapathy said: Transferring to Joe for eval and closure.
@glassfishrobot Commented @jfialli said: this shoal gms issue would prevent glassfish v2 and v3.1 and higher application server from exiting. It has been fixed in all versions of shoal gms.
@glassfishrobot Commented This issue was imported from java.net JIRA SHOAL-113
@glassfishrobot Commented Marked as fixed on Wednesday, November 9th 2011, 1:03:39 pm
We experience problems to gracefully shutdown the JVM because Shoal does not terminate all non-deamon threads upon shutdown.
We initiate Shoal shutdown via the following API call but this does not terminate the GMSContext "viewWindowThread" and "messageWindowThread" and the Router "signalHandlerThread" (non-daemon) threads.
haGroupManagementService.shutdown(shutdownType.INSTANCE_SHUTDOWN);
To work around this problem we had to implement the following hack:
haGroupManagementService.shutdown(shutdownType.INSTANCE_SHUTDOWN); DirectFieldAccessor gmsContextDirectFieldAccessor = new DirectFieldAccessor(gmsContext); gmsContextDirectFieldAccessor.setPropertyValue("shuttingDown", true); ((Thread)gmsContextDirectFieldAccessor.getPropertyValue("viewWindowThread")).interrupt(); ((Thread)gmsContextDirectFieldAccessor.getPropertyValue("messageWindowThread")).interrupt();
Router router = gmsContext.getRouter(); DirectFieldAccessor routerDirectFieldAccessor = new DirectFieldAccessor(router); ((Thread)routerDirectFieldAccessor.getPropertyValue("signalHandlerThread")).interrupt();
Kindly fix this shutdown issue. Please let me know should you require a proper source code patch for this.
Affected Versions
[1.1]