[ http://jira.jboss.com/jira/browse/JBAS-604?page=history ] Juha Lindfors closed JBAS-604: ------------------------------
Resolution: Out of Date > housekeeping in ServerImpl and ServerConfigLocator > -------------------------------------------------- > > Key: JBAS-604 > URL: http://jira.jboss.com/jira/browse/JBAS-604 > Project: JBoss Application Server > Type: Bug > Versions: JBossAS-3.2.6 Final > Reporter: SourceForge User > Assignee: Juha Lindfors > > > SourceForge Submitter: rodburgett . > This patch addresses housekeeping deficiencies in the > org.jboss.system.server.ServerImpl and > ServerConfigLocator classes. > The ServerConfigLocator class has no shutdown method > but it does hold a static reference to an > MBeanProxyExt. This reference becomes invalid when > the MBeanServer is shutdown. This patch adds a static > shutdown method to null out the reference. Code to > invoke this new method is added to the shutdown > processing in ServerImpl. > Several updates are made to the ServerImpl class, some > making use of updates to other classes from this and > another patch. The dependency on another patch is > noted in the change descriptions below. > There are two changes to the ServerImpl.shutdown() > method: the shutdown hook that was registered with > the system runtime during startup is removed, and a null > check is added before invoking accessors on the > ServerConfig. > It makes sense to unregister the shutdown hook when > JBoss is shutdown manually. In the situation where > JBoss startup/shutdown is controlled by an outside > class, this shutdown hook will attempt to repeat the > process when the VM exits. > Since the init() method will throw an > IllegalStateException if it finds a non-null config field, > the shutdown process needs to null out this field. That > makes it prudent to check for a null value prior to > attempting to access methods. Default values for > local 'exitOnShutdown' and 'blockingShutdown' flags are > taken from ServerConfig when config == null. > A few lines of cleanup are added to the > ShutdownHook.run() method to null out some ServerImpl > fields and to encourage the GC to run. This shutdown() > method needs a (config == null) before attempting to > find and delete the tmp/deploy directory. > A few comments and error literals from the > ShutdownHook.shutdownDeployments() and > shutdownServices() methods suffered from cut-n-paste > lapse, they are corrected in this patch. > The ShutdownHook.removeMBeans() method is updated > to include a check for non-null mbean server reference. > Also, the previous request that the MBeanServerFactory > release the current mbean server is replaced with a > request to shutdown the mbean registry. The registry > shutdown() method is added by JBoss patch #763378, > which includes addition of a shutdown method to the > MBeanServerImpl. The mbean server shutdown process > includes a call to the > MBeanSercverFactory.releaseMBeanServer() method. > Note that the current patch will cause a run time error - > probably UnsupportedMethod - if patch #763378 is not > applied before the current patch. > Prior to shutting down the registry, a new > ShutdownHook method is called to remove any leftover > service mbeans. This new method, > removeLeftoverMBeans(), queries the mbean server for > all registered mbeans and attempts to remove most. > This server impl lacks permission to remove mbeans from > the 'implementation' domain, so these are skipped, they > must be removed by the mbean server. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development