From: markt Date: Fri, 1 Oct 2010 16:49:29 +0000 (+0000) Subject: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49915 X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=637d55c83f01b157b128405e26bf652857173bc7;p=tomcat7.0 Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49915 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 --- diff --git a/java/org/apache/catalina/core/StandardServer.java b/java/org/apache/catalina/core/StandardServer.java index 5b9bbbebd..7a538e65c 100644 --- a/java/org/apache/catalina/core/StandardServer.java +++ b/java/org/apache/catalina/core/StandardServer.java @@ -584,27 +584,17 @@ public final class StandardServer extends LifecycleMBeanBase * Write the configuration information for this entire Server * 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); } diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 3eee3faf4..4d2028c0d 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -187,6 +187,11 @@ 47950 that prevented JSTL classes being loaded. (markt) + 49915: Make error more obvious, particularly when accessed + via JConsole, if StandardServer.storeConfig() is called when there is + no StoreConfig implementation present. (markt) + + 50018: Fix some minor Javadoc errors in Jasper source. Based on a patch by sebb. (timw)