Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49915
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 1 Oct 2010 16:49:29 +0000 (16:49 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 1 Oct 2010 16:49:29 +0000 (16:49 +0000)
Make error more obvious, particularly when accessed via JConsole, if StandardServer.storeConfig() is called when there is no StoreConfig implementation present.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1003581 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/core/StandardServer.java
webapps/docs/changelog.xml

index 5b9bbbe..7a538e6 100644 (file)
@@ -584,27 +584,17 @@ public final class StandardServer extends LifecycleMBeanBase
      * Write the configuration information for this entire <code>Server</code>
      * out to the server.xml configuration file.
      *
-     * @exception javax.management.InstanceNotFoundException if the managed resource object
-     *  cannot be found
-     * @exception javax.management.MBeanException if the initializer of the object throws
-     *  an exception, or persistence is not supported
-     * @exception javax.management.RuntimeOperationsException if an exception is reported
-     *  by the persistence mechanism
+     * @exception   javax.management.InstanceNotFoundException
+     *              if the managed resource object cannot be found
+     * @exception   javax.management.MBeanException
+     *              if the initializer of the object throws an exception, or
+     *              persistence is not supported
+     * @exception   javax.management.RuntimeOperationsException
+     *              if an exception is reported by the persistence mechanism
      */
     public synchronized void storeConfig() throws Exception {
-
-        ObjectName sname = null;    
-        try {
-           sname = new ObjectName("Catalina:type=StoreConfig");
-           if(mserver.isRegistered(sname)) {
-               mserver.invoke(sname, "storeConfig", null, null);            
-           } else
-               log.error("StoreConfig mbean not registered" + sname);
-        } catch (Throwable t) {
-            ExceptionUtils.handleThrowable(t);
-            log.error(t);
-        }
-
+        ObjectName sname = new ObjectName("Catalina:type=StoreConfig");
+        mserver.invoke(sname, "storeConfig", null, null);            
     }
 
 
index 3eee3fa..4d2028c 100644 (file)
         <bug>47950</bug> that prevented JSTL classes being loaded. (markt)
       </fix>
       <fix>
+        <bug>49915</bug>: Make error more obvious, particularly when accessed
+        via JConsole, if StandardServer.storeConfig() is called when there is
+        no StoreConfig implementation present. (markt)
+      </fix>
+      <fix>
         <bug>50018</bug>: Fix some minor Javadoc errors in Jasper source.
         Based on a patch by sebb. (timw)
       </fix>