Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@www.apache.org Received: (qmail 91348 invoked from network); 11 Jan 2005 20:02:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 11 Jan 2005 20:02:25 -0000 Received: (qmail 70083 invoked by uid 500); 11 Jan 2005 20:02:17 -0000 Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 70037 invoked by uid 500); 11 Jan 2005 20:02:17 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 70022 invoked by uid 500); 11 Jan 2005 20:02:17 -0000 Received: (qmail 70018 invoked by uid 99); 11 Jan 2005 20:02:17 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 11 Jan 2005 12:02:17 -0800 Received: (qmail 91242 invoked by uid 1923); 11 Jan 2005 20:02:14 -0000 Date: 11 Jan 2005 20:02:14 -0000 Message-ID: <20050111200214.91241.qmail@minotaur.apache.org> From: pero@apache.org To: jakarta-tomcat-catalina-cvs@apache.org Subject: cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N pero 2005/01/11 12:02:14 Modified: catalina/src/share/org/apache/catalina/core StandardServer.java modules/storeconfig/src/share/org/apache/catalina/storeconfig StoreConfigLifecycleListener.java server-registry.xml modules/storeconfig/test/src/share/org/apache/catalina/storeconfig ManagerSFTest.java webapps/docs changelog.xml Log: Integrate StoreConfig at StandardServer and fix small StoreConfig bugs Revision Changes Path 1.40 +32 -4 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardServer.java Index: StandardServer.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardServer.java,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- StandardServer.java 25 Oct 2004 15:28:23 -0000 1.39 +++ StandardServer.java 11 Jan 2005 20:02:13 -0000 1.40 @@ -41,6 +41,7 @@ import javax.management.MBeanServer; import javax.management.ObjectName; import javax.naming.directory.DirContext; +import javax.servlet.http.HttpServletResponse; import org.apache.catalina.Container; import org.apache.catalina.Context; @@ -87,6 +88,8 @@ * * @author Craig R. McClanahan * @version $Revision$ $Date$ + * TODO remove useless code + * TODO test the new save context backuo saving mode!! */ public final class StandardServer @@ -675,6 +678,17 @@ */ 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) { + log.error(t); + } +/* // Calculate file objects for the old and new configuration files. String configFile = "conf/server.xml"; // FIXME - configurable? File configOld = new File(configFile); @@ -761,7 +775,7 @@ configOld.getAbsolutePath() + " to " + configSave.getAbsolutePath()); } - +*/ } @@ -777,7 +791,21 @@ * by the persistence mechanism */ public synchronized void storeContext(Context context) throws Exception { - + + ObjectName sname = null; + try { + sname = new ObjectName("Catalina:type=StoreConfig"); + if(mserver.isRegistered(sname)) { + mserver.invoke(sname, "store", + new Object[] {context}, + new String [] { "java.lang.String"}); + } else + log.error("StoreConfig mbean not registered" + sname); + } catch (Throwable t) { + log.error(t); + } + + /* String configFile = context.getConfigFile(); if (configFile != null) { @@ -820,7 +848,7 @@ throw (e); } } - +*/ } 1.2 +1 -1 jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/StoreConfigLifecycleListener.java Index: StoreConfigLifecycleListener.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/StoreConfigLifecycleListener.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- StoreConfigLifecycleListener.java 8 Jan 2005 11:14:07 -0000 1.1 +++ StoreConfigLifecycleListener.java 11 Jan 2005 20:02:13 -0000 1.2 @@ -84,7 +84,7 @@ MBeanServer mserver = MBeanUtils.createServer(); InputStream descriptor = null; try { - ObjectName objectName = new ObjectName("Catalina:type=StoreConfig,resource=\"" +loader.getRegistryResource()+ "\""); + ObjectName objectName = new ObjectName("Catalina:type=StoreConfig" ); if (!mserver.isRegistered(objectName)) { descriptor = this.getClass().getResourceAsStream( "mbeans-descriptors.xml"); 1.2 +4 -4 jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/server-registry.xml Index: server-registry.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/server-registry.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- server-registry.xml 8 Jan 2005 11:14:07 -0000 1.1 +++ server-registry.xml 11 Jan 2005 20:02:13 -0000 1.2 @@ -95,7 +95,7 @@ tag="Manager" standard="false" default="false" - tagClass="org.apache.catalina.session.Manager" + tagClass="org.apache.catalina.Manager" storeFactoryClass="org.apache.catalina.storeconfig.ManagerSF"> entropy distributable @@ -234,9 +234,9 @@ cacheTTL cached caseSensitive - org.apache.naming.resoures.WARDirContext - org.apache.naming.resoures.FileDirContext - org.apache.naming.resoures.ProxyDirContext + org.apache.naming.resources.WARDirContext + org.apache.naming.resources.FileDirContext + org.apache.naming.resources.ProxyDirContext + + First integration at StoreConfig to StandardServer (pero) + 32714 : Don't make the AccessLogValve final (funkman) --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org