geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r514568 - in /geronimo/server/branches/1.2/modules: geronimo-kernel/src/main/java/org/apache/geronimo/gbean/runtime/ geronimo-kernel/src/main/java/org/apache/geronimo/kernel/ geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ ...
Date Mon, 05 Mar 2007 06:42:34 GMT
Author: djencks
Date: Sun Mar  4 22:42:34 2007
New Revision: 514568

URL: http://svn.apache.org/viewvc?view=rev&rev=514568
Log:
GERONIMO-2932 make it easier to find out what went wrong starting a module

Modified:
    geronimo/server/branches/1.2/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java
    geronimo/server/branches/1.2/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/Kernel.java
    geronimo/server/branches/1.2/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/KernelGBean.java
    geronimo/server/branches/1.2/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java
    geronimo/server/branches/1.2/modules/geronimo-system/src/main/java/org/apache/geronimo/system/jmx/KernelDelegate.java

Modified: geronimo/server/branches/1.2/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.2/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java?view=diff&rev=514568&r1=514567&r2=514568
==============================================================================
--- geronimo/server/branches/1.2/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java
(original)
+++ geronimo/server/branches/1.2/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java
Sun Mar  4 22:42:34 2007
@@ -938,8 +938,10 @@
                 Throwable targetException = e.getTargetException();
                 stateReason = "the service constructor threw an exception. \n" + printException(e);
                 if (targetException instanceof Exception) {
+                    stateReason = "the service constructor threw an exception. \n" + printException(targetException);
                     throw (Exception) targetException;
                 } else if (targetException instanceof Error) {
+                    stateReason = "the service constructor threw an exception. \n" + printException(targetException);
                     throw (Error) targetException;
                 }
                 throw e;

Modified: geronimo/server/branches/1.2/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/Kernel.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.2/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/Kernel.java?view=diff&rev=514568&r1=514567&r2=514568
==============================================================================
--- geronimo/server/branches/1.2/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/Kernel.java
(original)
+++ geronimo/server/branches/1.2/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/Kernel.java
Sun Mar  4 22:42:34 2007
@@ -373,4 +373,6 @@
      * @deprecated Use AbstractName version instead
      */
     Object invoke(ObjectName name, String methodName, Object[] args, String[] types) throws
GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception;
+
+    String getStateReason(AbstractName abstractName);
 }

Modified: geronimo/server/branches/1.2/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/KernelGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.2/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/KernelGBean.java?view=diff&rev=514568&r1=514567&r2=514568
==============================================================================
--- geronimo/server/branches/1.2/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/KernelGBean.java
(original)
+++ geronimo/server/branches/1.2/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/KernelGBean.java
Sun Mar  4 22:42:34 2007
@@ -334,6 +334,10 @@
         return kernel.invoke(objectName, methodName, args, types);
     }
 
+    public String getStateReason(AbstractName abstractName) {
+        return kernel.getStateReason(abstractName);
+    }
+
     public Object invoke(AbstractName abstractName, String methodName, Object[] args, String[]
types) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception
{
         return kernel.invoke(abstractName, methodName, args, types);
     }

Modified: geronimo/server/branches/1.2/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.2/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java?view=diff&rev=514568&r1=514567&r2=514568
==============================================================================
--- geronimo/server/branches/1.2/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java
(original)
+++ geronimo/server/branches/1.2/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java
Sun Mar  4 22:42:34 2007
@@ -160,7 +160,8 @@
         try {
             kernel.startGBean(configurationName);
             if (State.RUNNING_INDEX != kernel.getGBeanState(configurationName)) {
-                throw new InvalidConfigurationException("Configuration gbean failed to start
" + configurationId);
+                String stateReason = kernel.getStateReason(configurationName);
+                throw new InvalidConfigurationException("Configuration gbean failed to start
" + configurationId + "\nreason: " + stateReason);
             }
 
             // get the configuration

Modified: geronimo/server/branches/1.2/modules/geronimo-system/src/main/java/org/apache/geronimo/system/jmx/KernelDelegate.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.2/modules/geronimo-system/src/main/java/org/apache/geronimo/system/jmx/KernelDelegate.java?view=diff&rev=514568&r1=514567&r2=514568
==============================================================================
--- geronimo/server/branches/1.2/modules/geronimo-system/src/main/java/org/apache/geronimo/system/jmx/KernelDelegate.java
(original)
+++ geronimo/server/branches/1.2/modules/geronimo-system/src/main/java/org/apache/geronimo/system/jmx/KernelDelegate.java
Sun Mar  4 22:42:34 2007
@@ -537,6 +537,16 @@
         return invokeKernel("invoke", new Object[]{objectName, methodName, args, types},
new String[]{ObjectName.class.getName(), String.class.getName(), Object[].class.getName(),
String[].class.getName()});
     }
 
+    public String getStateReason(AbstractName abstractName) {
+        try {
+            return ((String) invokeKernel("getStateReason", new Object[]{abstractName}, new
String[]{AbstractName.class.getName()}));
+        } catch (RuntimeException e) {
+            throw e;
+        } catch (Exception e) {
+            throw new InternalKernelException(e);
+        }
+    }
+
     public Object invoke(AbstractName abstractName, String methodName, Object[] args, String[]
types) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception
{
         return invokeKernel("invoke", new Object[]{abstractName, methodName, args, types},
new String[]{AbstractName.class.getName(), String.class.getName(), Object[].class.getName(),
String[].class.getName()});
     }



Mime
View raw message