Author: djencks Date: Sun Jan 16 14:59:04 2005 New Revision: 125371 URL: http://svn.apache.org/viewcvs?view=rev&rev=125371 Log: Print out a list of non-started gbeans when server is started. Fix PersistentConfigList (GERONIMO-543) Modified: geronimo/trunk/modules/assembly/src/plan/system-plan.xml geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/main/Daemon.java
Modified: geronimo/trunk/modules/assembly/src/plan/system-plan.xml Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/plan/system-plan.xml?view=diff&rev=125371&p1=geronimo/trunk/modules/assembly/src/plan/system-plan.xml&r1=125370&p2=geronimo/trunk/modules/assembly/src/plan/system-plan.xml&r2=125371 ============================================================================== --- geronimo/trunk/modules/assembly/src/plan/system-plan.xml (original) +++ geronimo/trunk/modules/assembly/src/plan/system-plan.xml Sun Jan 16 14:59:04 2005 @@ -45,7 +45,7 @@ </gbean> <!-- Persistent List of running Configurations service --> - <gbean namePart="PersistentConfigurationList" class="org.apache.geronimo.system.configuration.FileConfigurationList"> + <gbean namePart="Default" type="PersistentConfigurationList" class="org.apache.geronimo.system.configuration.FileConfigurationList"> <reference name="ServerInfo">geronimo.server:name=ServerInfo,*</reference> <attribute name="configFile" type="java.lang.String">var/config/config.list</attribute> </gbean> Modified: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/main/Daemon.java Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/main/Daemon.java?view=diff&rev=125371&p1=geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/main/Daemon.java&r1=125370&p2=geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/main/Daemon.java&r2=125371 ============================================================================== --- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/main/Daemon.java (original) +++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/main/Daemon.java Sun Jan 16 14:59:04 2005 @@ -31,6 +31,8 @@ import org.apache.commons.logging.LogFactory; import org.apache.geronimo.gbean.GBeanData; import org.apache.geronimo.kernel.Kernel; +import org.apache.geronimo.kernel.GBeanNotFoundException; +import org.apache.geronimo.kernel.management.State; import org.apache.geronimo.kernel.jmx.JMXUtil; import org.apache.geronimo.kernel.jmx.JMXGBeanRegistry; import org.apache.geronimo.kernel.config.ConfigurationManager; @@ -42,6 +44,7 @@ */ public class Daemon { private static Log log; + private static final ObjectName PERSISTENT_CONFIGURATION_LIST_NAME_QUERY = JMXUtil.getObjectName("*:j2eeType=PersistentConfigurationList,*"); static { // This MUST be done before the first log is acquired @@ -126,7 +129,7 @@ if (configs.isEmpty()) { // nothing explicit, see what was running before - Set configLists = kernel.listGBeans(JMXUtil.getObjectName("*:role=PersistentConfigurationList,*")); + Set configLists = kernel.listGBeans(PERSISTENT_CONFIGURATION_LIST_NAME_QUERY); for (Iterator i = configLists.iterator(); i.hasNext();) { ObjectName configListName = (ObjectName) i.next(); try { @@ -163,12 +166,24 @@ } // Tell every persistent configuration list that the kernel is now fully started - Set configLists = kernel.listGBeans(JMXUtil.getObjectName("*:role=PersistentConfigurationList,*")); + Set configLists = kernel.listGBeans(PERSISTENT_CONFIGURATION_LIST_NAME_QUERY); for (Iterator i = configLists.iterator(); i.hasNext();) { ObjectName configListName = (ObjectName) i.next(); kernel.setAttribute(configListName, "kernelFullyStarted", Boolean.TRUE); } + Set allGBeans = kernel.listGBeans(JMXUtil.getObjectName("*:*")); + for (Iterator iterator = allGBeans.iterator(); iterator.hasNext();) { + ObjectName objectName = (ObjectName) iterator.next(); + try { + Integer state = (Integer) kernel.getAttribute(objectName, "state"); + if (state.intValue() != State.RUNNING_INDEX) { + log.info("GBean " + objectName + " is not running in state " + State.fromInteger(state).getName()); + } + } catch (GBeanNotFoundException e) { + log.info("Alleged GBean " + objectName + " is not a GBean"); + } + } log.info("Server startup completed"); // capture this thread until the kernel is ready to exit