DO NOT REPLY [Bug 52579] Tomcat5.5.35+Java1.5 cannot return proper value of a request parameter
https://issues.apache.org/bugzilla/show_bug.cgi?id=52579 --- Comment #3 from Keiichi Fujino 2012-02-03 09:32:27 UTC --- Created attachment 28257 --> https://issues.apache.org/bugzilla/attachment.cgi?id=28257 new implementation of ByteChunk.toStringInternal() Hi All. I am using Charaset affected by this issue. Although I know this is a issue in Java, I propose new implementation of ByteChunk.toStringInternal(). I will propose to STATUS.txt. (both 5.5.x and 6.0.x) -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1240047 - in /tomcat/trunk/java/org/apache/catalina: StoreManager.java session/PersistentManagerBase.java valves/PersistentValve.java
Author: markt Date: Fri Feb 3 09:44:00 2012 New Revision: 1240047 URL: http://svn.apache.org/viewvc?rev=1240047&view=rev Log: New interface to remove dependency between valve and session packages Added: tomcat/trunk/java/org/apache/catalina/StoreManager.java Modified: tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java tomcat/trunk/java/org/apache/catalina/valves/PersistentValve.java Added: tomcat/trunk/java/org/apache/catalina/StoreManager.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/StoreManager.java?rev=1240047&view=auto == --- tomcat/trunk/java/org/apache/catalina/StoreManager.java (added) +++ tomcat/trunk/java/org/apache/catalina/StoreManager.java Fri Feb 3 09:44:00 2012 @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.catalina; + +/** + * PersistentManager would have been a better name but that would have clashed + * with the implementation name. + */ +public interface StoreManager { + +/** + * Return the Store object which manages persistent Session + * storage for this Manager. + */ +Store getStore(); + +/** + * Remove this Session from the active Sessions for this Manager, + * but not from the Store. (Used by the PersistentValve) + * + * @param session Session to be removed + */ +void removeSuper(Session session); +} Modified: tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java?rev=1240047&r1=1240046&r2=1240047&view=diff == --- tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java Fri Feb 3 09:44:00 2012 @@ -30,6 +30,7 @@ import org.apache.catalina.LifecycleExce import org.apache.catalina.LifecycleState; import org.apache.catalina.Session; import org.apache.catalina.Store; +import org.apache.catalina.StoreManager; import org.apache.catalina.security.SecurityUtil; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; @@ -47,7 +48,8 @@ import org.apache.juli.logging.LogFactor * @version $Id$ */ -public abstract class PersistentManagerBase extends ManagerBase { +public abstract class PersistentManagerBase extends ManagerBase +implements StoreManager { private static final Log log = LogFactory.getLog(PersistentManagerBase.class); Modified: tomcat/trunk/java/org/apache/catalina/valves/PersistentValve.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/PersistentValve.java?rev=1240047&r1=1240046&r2=1240047&view=diff == --- tomcat/trunk/java/org/apache/catalina/valves/PersistentValve.java (original) +++ tomcat/trunk/java/org/apache/catalina/valves/PersistentValve.java Fri Feb 3 09:44:00 2012 @@ -26,9 +26,9 @@ import org.apache.catalina.Context; import org.apache.catalina.Manager; import org.apache.catalina.Session; import org.apache.catalina.Store; +import org.apache.catalina.StoreManager; import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Response; -import org.apache.catalina.session.PersistentManager; /** @@ -86,8 +86,8 @@ public class PersistentValve extends Val String sessionId = request.getRequestedSessionId(); Manager manager = context.getManager(); if (sessionId != null && manager != null) { -if (manager instanceof PersistentManager) { -Store store = ((PersistentManager) manager).getStore(); +if (manager instanceof StoreManager) { +Store store = ((StoreManager) manager).getStore(); if (store != null) { Session session = null; try { @@ -144,15 +144,15 @@ public class PersistentValve extends Val } if (newsessionId!=null) {
Re: svn commit: r1239522 - in /tomcat/trunk/java/org/apache/catalina: Server.java core/ContainerBase.java core/StandardEngine.java core/StandardServer.java mbeans/MBeanFactory.java startup/Tomcat.java
On 03/02/2012 01:28, Konstantin Kolinko wrote: > Several comments regarding the changes in Tomcat.initBaseDir(): > > 1. Tomcat#setBaseDir() Javadoc says that if system properties are > unset the value used is $HOME/tomcat.$PORT. > > Though further it says "TODO: better default ? Maybe current dir ?" > > The actual implementation of iniBaseDir() uses > System.getProperty("user.dir") which is $PWD. The home directory > property name would be "user.home". Comment corrected to align with implementation. > > 2. Old implementation of initBaseDir() updated Tomcat#basedir field. >> basedir = home.getCanonicalPath(); > > That is no longer done. It could be > basedir = baseFile.getPath(); Agreed. Fixed. > 3. There are two further bugs in setting catalinaHome besides the one > fixed by r1239784: > > 1) s/setCatalinaBase()/setCatalinaHome()/ > > 2) If catalina home value is null it should fallback to the value of > catalina base. In the old code it was: >> System.setProperty(Globals.CATALINA_HOME_PROP, basedir); Both fixed. > 4. if (!homeFile.isAbsolute()) checks when setting base and home: > > I wonder whether "isAbsolute()" check is needed. Though it matches > with what the old code was doing. > > The Bootstrap class (as updated in r1239527) always converts both > paths to canonical form unconditionally. The old code in > Catalina#initDirs() (removed in r1239527) did conversion > conditionally. > > I think it is safer to convert it to canonical form here as well, and > that would be more consistent with bootstrap. Consistency and minimal breakage from the existing behaviour was what I was looking for. There were so many places base and home were being calculated I was beginning to lose track of where I was. Making both unconditional seems the right way to go to me. > I wonder whether there > is a use case that requires absolute but non-canonical value here. Not that I can think of. > Anyway we are already using canonical paths in many places internally. > If someone expects that he can change absolute->canonical mapping > while tomcat is running (e.g. change a symlink) he wouldn't go far > with that already. SecurityManager also operates on canonical paths > IIRC. > > So I think it is OK to convert to canonical form unconditionally, > though it is slight change in behaviour. This series of patches is full of slight changes in behaviour - the main reason I have no intention of back-porting it to 7.0.x. One more won't hurt and the consistency is worth it. Thanks for your review comments. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1240048 - /tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java
Author: markt Date: Fri Feb 3 09:44:39 2012 New Revision: 1240048 URL: http://svn.apache.org/viewvc?rev=1240048&view=rev Log: Review comments on r1239522 from kkolinko Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java?rev=1240048&r1=1240047&r2=1240048&view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Fri Feb 3 09:44:39 2012 @@ -154,11 +154,9 @@ public class Tomcat { * * By default, if this method is not called, we use: * - system properties - catalina.base, catalina.home - * - $HOME/tomcat.$PORT - * ( /tmp doesn't seem a good choice for security ). + * - $PWD/tomcat.$PORT + * (/tmp doesn't seem a good choice for security). * - * - * TODO: better default ? Maybe current dir ? * TODO: disable work dir if not needed ( no jsp, etc ). */ public void setBaseDir(String basedir) { @@ -596,26 +594,25 @@ public class Tomcat { File baseFile = new File(basedir); baseFile.mkdirs(); -if (!baseFile.isAbsolute()) { -try { -baseFile = baseFile.getCanonicalFile(); -} catch (IOException e) { -baseFile = baseFile.getAbsoluteFile(); -} +try { +baseFile = baseFile.getCanonicalFile(); +} catch (IOException e) { +baseFile = baseFile.getAbsoluteFile(); } server.setCatalinaBase(baseFile); +basedir = baseFile.getPath(); -if (catalinaHome != null) { +if (catalinaHome == null) { +server.setCatalinaHome(baseFile); +} else { File homeFile = new File(catalinaHome); homeFile.mkdirs(); -if (!homeFile.isAbsolute()) { -try { -homeFile = homeFile.getCanonicalFile(); -} catch (IOException e) { -homeFile = homeFile.getAbsoluteFile(); -} +try { +homeFile = homeFile.getCanonicalFile(); +} catch (IOException e) { +homeFile = homeFile.getAbsoluteFile(); } -server.setCatalinaBase(homeFile); +server.setCatalinaHome(homeFile); } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1240049 - /tomcat/trunk/java/org/apache/catalina/StoreManager.java
Author: markt Date: Fri Feb 3 09:45:52 2012 New Revision: 1240049 URL: http://svn.apache.org/viewvc?rev=1240049&view=rev Log: Fix eol Modified: tomcat/trunk/java/org/apache/catalina/StoreManager.java (contents, props changed) Modified: tomcat/trunk/java/org/apache/catalina/StoreManager.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/StoreManager.java?rev=1240049&r1=1240048&r2=1240049&view=diff == --- tomcat/trunk/java/org/apache/catalina/StoreManager.java (original) +++ tomcat/trunk/java/org/apache/catalina/StoreManager.java Fri Feb 3 09:45:52 2012 @@ -1,38 +1,38 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.catalina; - -/** - * PersistentManager would have been a better name but that would have clashed - * with the implementation name. - */ -public interface StoreManager { - -/** - * Return the Store object which manages persistent Session - * storage for this Manager. - */ -Store getStore(); - -/** - * Remove this Session from the active Sessions for this Manager, - * but not from the Store. (Used by the PersistentValve) - * - * @param session Session to be removed - */ -void removeSuper(Session session); -} +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.catalina; + +/** + * PersistentManager would have been a better name but that would have clashed + * with the implementation name. + */ +public interface StoreManager { + +/** + * Return the Store object which manages persistent Session + * storage for this Manager. + */ +Store getStore(); + +/** + * Remove this Session from the active Sessions for this Manager, + * but not from the Store. (Used by the PersistentValve) + * + * @param session Session to be removed + */ +void removeSuper(Session session); +} Propchange: tomcat/trunk/java/org/apache/catalina/StoreManager.java -- svn:eol-style = native - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1240051 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: kfujino Date: Fri Feb 3 09:47:55 2012 New Revision: 1240051 URL: http://svn.apache.org/viewvc?rev=1240051&view=rev Log: Proposal. Modified: tomcat/tc6.0.x/trunk/STATUS.txt Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1240051&r1=1240050&r2=1240051&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Feb 3 09:47:55 2012 @@ -111,6 +111,13 @@ PATCHES PROPOSED TO BACKPORT: 2) Patch http://people.apache.org/~kkolinko/patches/2012-01-18_tc6_LicenseRtf.patch +* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52579 + Propose new implementation of ByteChunk.toStringInternal(). + This fix does not reintroduce issue BZ51400. + This fix avoids http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6196991. + https://issues.apache.org/bugzilla/attachment.cgi?id=28257 + +1: kfujino + -1: PATCHES/ISSUES THAT ARE STALLED - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1240052 - /tomcat/tc5.5.x/trunk/STATUS.txt
Author: kfujino Date: Fri Feb 3 09:48:43 2012 New Revision: 1240052 URL: http://svn.apache.org/viewvc?rev=1240052&view=rev Log: Proposal. Modified: tomcat/tc5.5.x/trunk/STATUS.txt Modified: tomcat/tc5.5.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=1240052&r1=1240051&r2=1240052&view=diff == --- tomcat/tc5.5.x/trunk/STATUS.txt (original) +++ tomcat/tc5.5.x/trunk/STATUS.txt Fri Feb 3 09:48:43 2012 @@ -28,4 +28,11 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK/ PATCHES PROPOSED TO BACKPORT: [ New proposals should be added at the end of the list ] +* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52579 + Propose new implementation of ByteChunk.toStringInternal(). + This fix does not reintroduce issue BZ51400. + This fix avoids http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6196991. + https://issues.apache.org/bugzilla/attachment.cgi?id=28257 + +1: kfujino + -1: - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52579] Tomcat5.5.35+Java1.5 cannot return proper value of a request parameter
https://issues.apache.org/bugzilla/show_bug.cgi?id=52579 Mark Thomas changed: What|Removed |Added Attachment #28257|0 |1 is patch|| -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52579] Tomcat5.5.35+Java1.5 cannot return proper value of a request parameter
https://issues.apache.org/bugzilla/show_bug.cgi?id=52579 --- Comment #4 from Hiroki Hayashi 2012-02-03 10:22:20 UTC --- Thank you very much for the answer, Mr. Kolinko. And Thank you for the patch to the issue, Mr. Fujino. I tried to run the program from Mr. Kolinko, and could get the "Broken charset" like Shift_JIS. I could understand that the issue is a bug in JRE, and it is sure that the support limitation of Java5 was over. Thank you, sir. On the other hand, there is a message"Tomcat5.5.x requires 5.0 or later"on the page. http://tomcat.apache.org/tomcat-5.5-doc/building.html#Download_and_install_a_Java_Development_Kit_1.4.x_or_later So, We hope to get the patch to the program. Thank you very much. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: SPDY support
On 02/02/2012 13:30, Remy Maucherat wrote: > On Thu, 2012-02-02 at 12:28 +, Pid wrote: >>> Of course, I'm even less sure about websockets since it's kind of a mess. >> >> I'd say it was the other way round. WebSockets finalised before Xmas, >> and there's lots of interest from various communities to judge from the BZ. > > Websocrap is a bad transport. If it wasn't, we'd know if it was message > or stream based, and it would be message based. :) P -- [key:62590808] signature.asc Description: OpenPGP digital signature
svn commit: r1240101 - /tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java
Author: markt Date: Fri Feb 3 12:05:48 2012 New Revision: 1240101 URL: http://svn.apache.org/viewvc?rev=1240101&view=rev Log: Deprecate unused code Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java?rev=1240101&r1=1240100&r2=1240101&view=diff == --- tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java (original) +++ tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Fri Feb 3 12:05:48 2012 @@ -259,7 +259,10 @@ public class MBeanUtils { * @param loader The Loader to be managed * * @exception Exception if an MBean cannot be created or registered + * + * @deprecated Unused. Will be removed in Tomcat 8.0.x */ +@Deprecated static DynamicMBean createMBean(Loader loader) throws Exception { @@ -291,7 +294,10 @@ public class MBeanUtils { * @param factory The MBeanFactory to be managed * * @exception Exception if an MBean cannot be created or registered + * + * @deprecated Unused. Will be removed in Tomcat 8.0.x */ +@Deprecated static DynamicMBean createMBean(MBeanFactory factory) throws Exception { @@ -322,7 +328,10 @@ public class MBeanUtils { * @param resource The NamingResources to be managed * * @exception Exception if an MBean cannot be created or registered + * + * @deprecated Unused. Will be removed in Tomcat 8.0.x */ +@Deprecated static DynamicMBean createMBean(NamingResources resource) throws Exception { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1240102 - /tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java
Author: markt Date: Fri Feb 3 12:06:28 2012 New Revision: 1240102 URL: http://svn.apache.org/viewvc?rev=1240102&view=rev Log: Remove unused code Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java?rev=1240102&r1=1240101&r2=1240102&view=diff == --- tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java (original) +++ tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Fri Feb 3 12:06:28 2012 @@ -254,109 +254,6 @@ public class MBeanUtils { /** * Create, register, and return an MBean for this - * Loader object. - * - * @param loader The Loader to be managed - * - * @exception Exception if an MBean cannot be created or registered - * - * @deprecated Unused. Will be removed in Tomcat 8.0.x - */ -@Deprecated -static DynamicMBean createMBean(Loader loader) -throws Exception { - -String mname = createManagedName(loader); -ManagedBean managed = registry.findManagedBean(mname); -if (managed == null) { -Exception e = new Exception("ManagedBean is not found with "+mname); -throw new MBeanException(e); -} -String domain = managed.getDomain(); -if (domain == null) -domain = mserver.getDefaultDomain(); -DynamicMBean mbean = managed.createMBean(loader); -ObjectName oname = createObjectName(domain, loader); -if( mserver.isRegistered( oname )) { -// side effect: stop it -mserver.unregisterMBean( oname ); -} -mserver.registerMBean(mbean, oname); -return (mbean); - -} - - -/** - * Create, register, and return an MBean for this - * MBeanFactory object. - * - * @param factory The MBeanFactory to be managed - * - * @exception Exception if an MBean cannot be created or registered - * - * @deprecated Unused. Will be removed in Tomcat 8.0.x - */ -@Deprecated -static DynamicMBean createMBean(MBeanFactory factory) -throws Exception { - -String mname = createManagedName(factory); -ManagedBean managed = registry.findManagedBean(mname); -if (managed == null) { -Exception e = new Exception("ManagedBean is not found with "+mname); -throw new MBeanException(e); -} -String domain = managed.getDomain(); -if (domain == null) -domain = mserver.getDefaultDomain(); -DynamicMBean mbean = managed.createMBean(factory); -ObjectName oname = createObjectName(domain, factory); -if( mserver.isRegistered(oname )) { -mserver.unregisterMBean(oname); -} -mserver.registerMBean(mbean, oname); -return (mbean); - -} - - -/** - * Create, register, and return an MBean for this - * NamingResources object. - * - * @param resource The NamingResources to be managed - * - * @exception Exception if an MBean cannot be created or registered - * - * @deprecated Unused. Will be removed in Tomcat 8.0.x - */ -@Deprecated -static DynamicMBean createMBean(NamingResources resource) -throws Exception { - -String mname = createManagedName(resource); -ManagedBean managed = registry.findManagedBean(mname); -if (managed == null) { -Exception e = new Exception("ManagedBean is not found with "+mname); -throw new MBeanException(e); -} -String domain = managed.getDomain(); -if (domain == null) -domain = mserver.getDefaultDomain(); -DynamicMBean mbean = managed.createMBean(resource); -ObjectName oname = createObjectName(domain, resource); -if( mserver.isRegistered( oname )) { -mserver.unregisterMBean(oname); -} -mserver.registerMBean(mbean, oname); -return (mbean); - -} - - -/** - * Create, register, and return an MBean for this * Role object. * * @param role The Role to be managed - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1240103 - /tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java
Author: markt Date: Fri Feb 3 12:07:04 2012 New Revision: 1240103 URL: http://svn.apache.org/viewvc?rev=1240103&view=rev Log: Use final Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java?rev=1240103&r1=1240102&r2=1240103&view=diff == --- tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java (original) +++ tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Fri Feb 3 12:07:04 2012 @@ -79,7 +79,7 @@ public class MBeanUtils { * createManagedBean(). The first element of each pair * is a class name, and the second element is the managed bean name. */ -private static String exceptions[][] = { +private static final String exceptions[][] = { { "org.apache.catalina.users.MemoryGroup", "Group" }, { "org.apache.catalina.users.MemoryRole", @@ -908,7 +908,7 @@ public class MBeanUtils { } -static Hashtable seq = new Hashtable(); +static final Hashtable seq = new Hashtable(); static int getSeq( String key ) { int i[]=seq.get( key ); if (i == null ) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1240105 - in /tomcat/trunk/java/org/apache/catalina: Container.java core/ContainerBase.java core/StandardHost.java deploy/NamingResources.java mbeans/MBeanUtils.java realm/RealmBase.java
Author: markt Date: Fri Feb 3 12:08:09 2012 New Revision: 1240105 URL: http://svn.apache.org/viewvc?rev=1240105&view=rev Log: Refactor to remove some circular dependencies Modified: tomcat/trunk/java/org/apache/catalina/Container.java tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java tomcat/trunk/java/org/apache/catalina/core/StandardHost.java tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java tomcat/trunk/java/org/apache/catalina/startup/FailedContext.java tomcat/trunk/java/org/apache/catalina/valves/ValveBase.java Modified: tomcat/trunk/java/org/apache/catalina/Container.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Container.java?rev=1240105&r1=1240104&r2=1240105&view=diff == --- tomcat/trunk/java/org/apache/catalina/Container.java (original) +++ tomcat/trunk/java/org/apache/catalina/Container.java Fri Feb 3 12:08:09 2012 @@ -159,6 +159,17 @@ public interface Container extends Lifec */ public ObjectName getObjectName(); + +/** + * Calculate the key properties string to be added to an object's + * {@link ObjectName} to indicate that it is associated with this container. + * + * @return A string suitable for appending to the ObjectName + * + */ +public String getMBeanKeyProperties(); + + /** * Return the Pipeline object that manages the Valves associated with * this Container. Modified: tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java?rev=1240105&r1=1240104&r2=1240105&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java Fri Feb 3 12:08:09 2012 @@ -45,7 +45,10 @@ import org.apache.catalina.Cluster; import org.apache.catalina.Container; import org.apache.catalina.ContainerEvent; import org.apache.catalina.ContainerListener; +import org.apache.catalina.Context; +import org.apache.catalina.Engine; import org.apache.catalina.Globals; +import org.apache.catalina.Host; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleException; import org.apache.catalina.LifecycleState; @@ -54,9 +57,11 @@ import org.apache.catalina.Manager; import org.apache.catalina.Pipeline; import org.apache.catalina.Realm; import org.apache.catalina.Valve; +import org.apache.catalina.Wrapper; import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Response; import org.apache.catalina.mbeans.MBeanUtils; +import org.apache.catalina.util.ContextName; import org.apache.catalina.util.LifecycleMBeanBase; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; @@ -1405,6 +1410,44 @@ public abstract class ContainerBase exte return MBeanUtils.getDomain(this); } + +@Override +public String getMBeanKeyProperties() { +Container c = this; +StringBuilder keyProperties = new StringBuilder(); +int containerCount = 0; + +// Work up container hierarchy, add a component to the name for +// each container +while (!(c instanceof Engine)) { +if (c instanceof Wrapper) { +keyProperties.append(",servlet="); +keyProperties.append(c.getName()); +} else if (c instanceof Context) { +keyProperties.append(",context="); +ContextName cn = new ContextName(c.getName()); +keyProperties.append(cn.getDisplayName()); +} else if (c instanceof Host) { +keyProperties.append(",host="); +keyProperties.append(c.getName()); +} else if (c == null) { +// May happen in unit testing and/or some embedding scenarios +keyProperties.append(",container"); +keyProperties.append(containerCount++); +keyProperties.append("=null"); +break; +} else { +// Should never happen... +keyProperties.append(",container"); +keyProperties.append(containerCount++); +keyProperties.append('='); +keyProperties.append(c.getName()); +} +c = c.getParent(); +} +return keyProperties.toString(); +} + public ObjectName[] getChildren() { ObjectName result[]=new ObjectName[children.size()]; Iterator it=children.values().iterator(); Modified: tomcat/trunk/java/org/apache/catalina/core/StandardHost.java URL: http://svn.apache.org
svn commit: r1240106 - /tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java
Author: markt Date: Fri Feb 3 12:08:48 2012 New Revision: 1240106 URL: http://svn.apache.org/viewvc?rev=1240106&view=rev Log: Deprecate Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java?rev=1240106&r1=1240105&r2=1240106&view=diff == --- tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java (original) +++ tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Fri Feb 3 12:08:48 2012 @@ -1563,7 +1563,11 @@ public class MBeanUtils { * @param container The container the object is associated with * @return A string suitable for appending to the ObjectName * + * @deprecated To be removed since to creates a circular dependency. Will + * be replaced in Tomcat 8 by a new method on {@link + * Container}. */ +@Deprecated public static String getContainerKeyProperties(Container container) { Container c = container; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1240107 - /tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java
Author: markt Date: Fri Feb 3 12:09:26 2012 New Revision: 1240107 URL: http://svn.apache.org/viewvc?rev=1240107&view=rev Log: REmove deprecated code Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java?rev=1240107&r1=1240106&r2=1240107&view=diff == --- tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java (original) +++ tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Fri Feb 3 12:09:26 2012 @@ -42,7 +42,6 @@ import org.apache.catalina.Service; import org.apache.catalina.User; import org.apache.catalina.UserDatabase; import org.apache.catalina.Valve; -import org.apache.catalina.Wrapper; import org.apache.catalina.connector.Connector; import org.apache.catalina.deploy.ContextEnvironment; import org.apache.catalina.deploy.ContextResource; @@ -1554,55 +1553,4 @@ public class MBeanUtils { return domain; } - - -/** - * Calculate the key properties string to be added to an object's - * {@link ObjectName} to indicate that it is associated with that container. - * - * @param container The container the object is associated with - * @return A string suitable for appending to the ObjectName - * - * @deprecated To be removed since to creates a circular dependency. Will - * be replaced in Tomcat 8 by a new method on {@link - * Container}. - */ -@Deprecated -public static String getContainerKeyProperties(Container container) { - -Container c = container; -StringBuilder keyProperties = new StringBuilder(); -int containerCount = 0; - -// Work up container hierarchy, add a component to the name for -// each container -while (!(c instanceof Engine)) { -if (c instanceof Wrapper) { -keyProperties.append(",servlet="); -keyProperties.append(c.getName()); -} else if (c instanceof Context) { -keyProperties.append(",context="); -ContextName cn = new ContextName(c.getName()); -keyProperties.append(cn.getDisplayName()); -} else if (c instanceof Host) { -keyProperties.append(",host="); -keyProperties.append(c.getName()); -} else if (c == null) { -// May happen in unit testing and/or some embedding scenarios -keyProperties.append(",container"); -keyProperties.append(containerCount++); -keyProperties.append("=null"); -break; -} else { -// Should never happen... -keyProperties.append(",container"); -keyProperties.append(containerCount++); -keyProperties.append('='); -keyProperties.append(c.getName()); -} -c = c.getParent(); -} - -return keyProperties.toString(); -} } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1240108 - in /tomcat/trunk/java/org/apache/catalina: ./ core/ loader/ realm/ session/ startup/ valves/
Author: markt Date: Fri Feb 3 12:10:32 2012 New Revision: 1240108 URL: http://svn.apache.org/viewvc?rev=1240108&view=rev Log: Refactor to remove circular dependencies Modified: tomcat/trunk/java/org/apache/catalina/Container.java tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java tomcat/trunk/java/org/apache/catalina/startup/FailedContext.java tomcat/trunk/java/org/apache/catalina/valves/ValveBase.java Modified: tomcat/trunk/java/org/apache/catalina/Container.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Container.java?rev=1240108&r1=1240107&r2=1240108&view=diff == --- tomcat/trunk/java/org/apache/catalina/Container.java (original) +++ tomcat/trunk/java/org/apache/catalina/Container.java Fri Feb 3 12:10:32 2012 @@ -161,6 +161,13 @@ public interface Container extends Lifec /** + * Obtain the domain under which this container will be / has been + * registered. + */ +public String getDomain(); + + +/** * Calculate the key properties string to be added to an object's * {@link ObjectName} to indicate that it is associated with this container. * Modified: tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java?rev=1240108&r1=1240107&r2=1240108&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java Fri Feb 3 12:10:32 2012 @@ -60,7 +60,6 @@ import org.apache.catalina.Valve; import org.apache.catalina.Wrapper; import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Response; -import org.apache.catalina.mbeans.MBeanUtils; import org.apache.catalina.util.ContextName; import org.apache.catalina.util.LifecycleMBeanBase; import org.apache.juli.logging.Log; @@ -1407,7 +1406,13 @@ public abstract class ContainerBase exte @Override protected String getDomainInternal() { -return MBeanUtils.getDomain(this); + +Container p = this.getParent(); +if (p == null) { +return null; +} else { +return p.getDomain(); +} } Modified: tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java?rev=1240108&r1=1240107&r2=1240108&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardEngine.java Fri Feb 3 12:10:32 2012 @@ -374,6 +374,13 @@ public class StandardEngine extends Cont return "type=Engine"; } + +@Override +protected String getDomainInternal() { +return getName(); +} + + // --- Inner classes protected static final class NoopAccessLog implements AccessLog { Modified: tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java?rev=1240108&r1=1240107&r2=1240108&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java Fri Feb 3 12:10:32 2012 @@ -57,7 +57,6 @@ import org.apache.catalina.InstanceListe import org.apache.catalina.LifecycleException; import org.apache.catalina.LifecycleState; import org.apache.catalina.Wrapper; -import org.apache.catalina.mbeans.MBeanUtils; import org.apache.catalina.security.SecurityUtil; import org.apache.catalina.util.InstanceSupport; import org.apache.juli.logging.Log; @@ -1042,8 +1041,7 @@ public class StandardWrapper extends Con } if (isJspServlet) { -StringBuilder oname = -new StringBuilder(MBeanUtils.getDomain(getParent())); +StringBuilder oname = new StringBuilder(getDomain()); oname.append(":type=JspMonitor,name="); oname.append(getName()); Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java?rev=1240108&r1=1240107&r2=1240108&view=diff =
svn commit: r1240109 - /tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java
Author: markt Date: Fri Feb 3 12:11:12 2012 New Revision: 1240109 URL: http://svn.apache.org/viewvc?rev=1240109&view=rev Log: Deprecate code to be removed Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java?rev=1240109&r1=1240108&r2=1240109&view=diff == --- tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java (original) +++ tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Fri Feb 3 12:11:12 2012 @@ -1536,7 +1536,12 @@ public class MBeanUtils { * Container. * * @param container + * + * @deprecated To be removed since to creates a circular dependency. Will + * be replaced in Tomcat 8 by a new method on {@link + * Container}. */ +@Deprecated public static String getDomain(Container container) { String domain = null; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1240110 - /tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java
Author: markt Date: Fri Feb 3 12:11:49 2012 New Revision: 1240110 URL: http://svn.apache.org/viewvc?rev=1240110&view=rev Log: Remove deprecated code Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java?rev=1240110&r1=1240109&r2=1240110&view=diff == --- tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java (original) +++ tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Fri Feb 3 12:11:49 2012 @@ -1529,33 +1529,4 @@ public class MBeanUtils { // No service name, use null return domain; } - - -/** - * Determine the name of the domain to register MBeans for from a given - * Container. - * - * @param container - * - * @deprecated To be removed since to creates a circular dependency. Will - * be replaced in Tomcat 8 by a new method on {@link - * Container}. - */ -@Deprecated -public static String getDomain(Container container) { - -String domain = null; - -Container c = container; - -while (!(c instanceof Engine) && c != null) { -c = c.getParent(); -} - -if (c != null) { -domain = c.getName(); -} - -return domain; -} } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1240111 - in /tomcat/trunk/java/org/apache/catalina: Service.java connector/Connector.java core/StandardServer.java core/StandardService.java
Author: markt Date: Fri Feb 3 12:12:35 2012 New Revision: 1240111 URL: http://svn.apache.org/viewvc?rev=1240111&view=rev Log: More refactoring to remove some cyclic dependencies Modified: tomcat/trunk/java/org/apache/catalina/Service.java tomcat/trunk/java/org/apache/catalina/connector/Connector.java tomcat/trunk/java/org/apache/catalina/core/StandardServer.java tomcat/trunk/java/org/apache/catalina/core/StandardService.java Modified: tomcat/trunk/java/org/apache/catalina/Service.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Service.java?rev=1240111&r1=1240110&r2=1240111&view=diff == --- tomcat/trunk/java/org/apache/catalina/Service.java (original) +++ tomcat/trunk/java/org/apache/catalina/Service.java Fri Feb 3 12:12:35 2012 @@ -91,9 +91,15 @@ public interface Service extends Lifecyc */ public void setParentClassLoader(ClassLoader parent); -// - Public Methods +/** + * Obtain the domain under which this container will be / has been + * registered. + */ +public String getDomain(); +// - Public Methods + /** * Add a new Connector to the set of defined Connectors, and associate it * with this Service's Container. Modified: tomcat/trunk/java/org/apache/catalina/connector/Connector.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Connector.java?rev=1240111&r1=1240110&r2=1240111&view=diff == --- tomcat/trunk/java/org/apache/catalina/connector/Connector.java (original) +++ tomcat/trunk/java/org/apache/catalina/connector/Connector.java Fri Feb 3 12:12:35 2012 @@ -27,7 +27,6 @@ import org.apache.catalina.LifecycleExce import org.apache.catalina.LifecycleState; import org.apache.catalina.Service; import org.apache.catalina.core.AprLifecycleListener; -import org.apache.catalina.mbeans.MBeanUtils; import org.apache.catalina.util.LifecycleMBeanBase; import org.apache.coyote.Adapter; import org.apache.coyote.ProtocolHandler; @@ -1049,7 +1048,12 @@ public class Connector extends Lifecycle @Override protected String getDomainInternal() { -return MBeanUtils.getDomain(getService()); +Service s = getService(); +if (s == null) { +return null; +} else { +return service.getDomain(); +} } @Override Modified: tomcat/trunk/java/org/apache/catalina/core/StandardServer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardServer.java?rev=1240111&r1=1240110&r2=1240111&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/StandardServer.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardServer.java Fri Feb 3 12:12:35 2012 @@ -36,7 +36,6 @@ import org.apache.catalina.Server; import org.apache.catalina.Service; import org.apache.catalina.deploy.NamingResources; import org.apache.catalina.mbeans.MBeanFactory; -import org.apache.catalina.mbeans.MBeanUtils; import org.apache.catalina.startup.Catalina; import org.apache.catalina.util.LifecycleMBeanBase; import org.apache.catalina.util.ServerInfo; @@ -859,7 +858,7 @@ public final class StandardServer extend if (services.length > 0) { Service service = services[0]; if (service != null) { -domain = MBeanUtils.getDomain(service); +domain = service.getDomain(); } } return domain; Modified: tomcat/trunk/java/org/apache/catalina/core/StandardService.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardService.java?rev=1240111&r1=1240110&r2=1240111&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/StandardService.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardService.java Fri Feb 3 12:12:35 2012 @@ -14,8 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - package org.apache.catalina.core; @@ -33,7 +31,6 @@ import org.apache.catalina.LifecycleStat import org.apache.catalina.Server; import org.apache.catalina.Service; import org.apache.catalina.connector.Connector; -import org.apache.catalina.mbeans.MBeanUtils; import org.apache.catalina.util.LifecycleMBeanBase; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; @@ -598,10 +595,25 @@ public class StandardService extends Lif support.firePropertyChange("parentClassLoader", oldParentClassLoader, this.par
svn commit: r1240112 - /tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java
Author: markt Date: Fri Feb 3 12:13:13 2012 New Revision: 1240112 URL: http://svn.apache.org/viewvc?rev=1240112&view=rev Log: Deprecate method that will be removed Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java?rev=1240112&r1=1240111&r2=1240112&view=diff == --- tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java (original) +++ tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Fri Feb 3 12:13:13 2012 @@ -1504,7 +1504,12 @@ public class MBeanUtils { * Service. * * @param service + * + * @deprecated To be removed since to creates a circular dependency. Will + * be replaced in Tomcat 8 by a new method on {@link + * Service}. */ +@Deprecated public static String getDomain(Service service) { // Null service -> return null - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1240113 - /tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java
Author: markt Date: Fri Feb 3 12:13:50 2012 New Revision: 1240113 URL: http://svn.apache.org/viewvc?rev=1240113&view=rev Log: Remove deprecated methods Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java?rev=1240113&r1=1240112&r2=1240113&view=diff == --- tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java (original) +++ tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Fri Feb 3 12:13:50 2012 @@ -1497,41 +1497,4 @@ public class MBeanUtils { } } - - -/** - * Determine the name of the domain to register MBeans for from a given - * Service. - * - * @param service - * - * @deprecated To be removed since to creates a circular dependency. Will - * be replaced in Tomcat 8 by a new method on {@link - * Service}. - */ -@Deprecated -public static String getDomain(Service service) { - -// Null service -> return null -if (service == null) { -return null; -} - -String domain = null; - -Container engine = service.getContainer(); - -// Use the engine name first -if (engine != null) { -domain = engine.getName(); -} - -// No engine or no engine name, use the service name -if (domain == null) { -domain = service.getName(); -} - -// No service name, use null -return domain; -} } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1240114 - /tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java
Author: markt Date: Fri Feb 3 12:14:27 2012 New Revision: 1240114 URL: http://svn.apache.org/viewvc?rev=1240114&view=rev Log: Deprecate unused methods Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java?rev=1240114&r1=1240113&r2=1240114&view=diff == --- tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java (original) +++ tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Fri Feb 3 12:14:27 2012 @@ -1117,7 +1117,10 @@ public class MBeanUtils { * @param engine The Engine to be managed * * @exception Exception if an MBean cannot be deregistered + * + * @deprecated Unused. Will be removed in Tomcat 8.0.x */ +@Deprecated static void destroyMBean(Engine engine) throws Exception { String domain = engine.getName(); @@ -1163,7 +1166,9 @@ public class MBeanUtils { * @param host The Host to be managed * * @exception Exception if an MBean cannot be deregistered + * @deprecated Unused. Will be removed in Tomcat 8.0.x */ +@Deprecated static void destroyMBean(Host host) throws Exception { @@ -1184,7 +1189,9 @@ public class MBeanUtils { * @param loader The Loader to be managed * * @exception Exception if an MBean cannot be deregistered + * @deprecated Unused. Will be removed in Tomcat 8.0.x */ +@Deprecated static void destroyMBean(Loader loader) throws Exception { @@ -1210,7 +1217,9 @@ public class MBeanUtils { * @param manager The Manager to be managed * * @exception Exception if an MBean cannot be deregistered + * @deprecated Unused. Will be removed in Tomcat 8.0.x */ +@Deprecated static void destroyMBean(Manager manager) throws Exception { @@ -1236,7 +1245,9 @@ public class MBeanUtils { * @param resources The NamingResources to be managed * * @exception Exception if an MBean cannot be deregistered + * @deprecated Unused. Will be removed in Tomcat 8.0.x */ +@Deprecated static void destroyMBean(NamingResources resources) throws Exception { @@ -1262,7 +1273,9 @@ public class MBeanUtils { * @param realm The Realm to be managed * * @exception Exception if an MBean cannot be deregistered + * @deprecated Unused. Will be removed in Tomcat 8.0.x */ +@Deprecated static void destroyMBean(Realm realm) throws Exception { @@ -1314,7 +1327,9 @@ public class MBeanUtils { * @param server The Server to be managed * * @exception Exception if an MBean cannot be deregistered + * @deprecated Unused. Will be removed in Tomcat 8.0.x */ +@Deprecated static void destroyMBean(Server server) throws Exception { @@ -1350,7 +1365,9 @@ public class MBeanUtils { * @param service The Service to be managed * * @exception Exception if an MBean cannot be deregistered + * @deprecated Unused. Will be removed in Tomcat 8.0.x */ +@Deprecated static void destroyMBean(Service service) throws Exception { @@ -1402,7 +1419,9 @@ public class MBeanUtils { * @param userDatabase The UserDatabase to be managed * * @exception Exception if an MBean cannot be deregistered + * @deprecated Unused. Will be removed in Tomcat 8.0.x */ +@Deprecated static void destroyMBean(UserDatabase userDatabase) throws Exception { @@ -1473,7 +1492,9 @@ public class MBeanUtils { * @param valve The Valve to be managed * * @exception Exception if an MBean cannot be deregistered + * @deprecated Unused. Will be removed in Tomcat 8.0.x */ +@Deprecated static void destroyMBean(Valve valve, Container container) throws Exception { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1240116 - /tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java
Author: markt Date: Fri Feb 3 12:15:03 2012 New Revision: 1240116 URL: http://svn.apache.org/viewvc?rev=1240116&view=rev Log: More deprecation Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java?rev=1240116&r1=1240115&r2=1240116&view=diff == --- tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java (original) +++ tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Fri Feb 3 12:15:03 2012 @@ -971,7 +971,9 @@ public class MBeanUtils { * @param connector The Connector to be managed * * @exception Exception if an MBean cannot be deregistered + * @deprecated Unused. Will be removed in Tomcat 8.0.x */ +@Deprecated static void destroyMBean(Connector connector, Service service) throws Exception { @@ -1013,7 +1015,9 @@ public class MBeanUtils { * @param context The Context to be managed * * @exception Exception if an MBean cannot be deregistered + * @deprecated Unused. Will be removed in Tomcat 8.0.x */ +@Deprecated static void destroyMBean(Context context) throws Exception { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1240117 - /tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java
Author: markt Date: Fri Feb 3 12:15:42 2012 New Revision: 1240117 URL: http://svn.apache.org/viewvc?rev=1240117&view=rev Log: Remove deprecated code Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java?rev=1240117&r1=1240116&r2=1240117&view=diff == --- tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java (original) +++ tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Fri Feb 3 12:15:42 2012 @@ -49,13 +49,6 @@ import org.apache.catalina.deploy.Contex import org.apache.catalina.deploy.NamingResources; import org.apache.catalina.util.ContextName; import org.apache.catalina.valves.ValveBase; -import org.apache.coyote.ProtocolHandler; -import org.apache.coyote.ajp.AjpAprProtocol; -import org.apache.coyote.ajp.AjpProtocol; -import org.apache.coyote.http11.Http11AprProtocol; -import org.apache.coyote.http11.Http11NioProtocol; -import org.apache.coyote.http11.Http11Protocol; -import org.apache.tomcat.util.ExceptionUtils; import org.apache.tomcat.util.IntrospectionUtils; import org.apache.tomcat.util.modeler.ManagedBean; import org.apache.tomcat.util.modeler.Registry; @@ -966,73 +959,6 @@ public class MBeanUtils { /** * Deregister the MBean for this - * Connector object. - * - * @param connector The Connector to be managed - * - * @exception Exception if an MBean cannot be deregistered - * @deprecated Unused. Will be removed in Tomcat 8.0.x - */ -@Deprecated -static void destroyMBean(Connector connector, Service service) -throws Exception { - -// domain is engine name -String domain = service.getContainer().getName(); -if (domain == null) -domain = mserver.getDefaultDomain(); -ObjectName oname = createObjectName(domain, connector); -if( mserver.isRegistered( oname )) { -mserver.unregisterMBean(oname); -} -// Unregister associated request processor -String worker = null; -ProtocolHandler handler = connector.getProtocolHandler(); -if (handler instanceof Http11Protocol) { -worker = ((Http11Protocol)handler).getName(); -} else if (handler instanceof Http11NioProtocol) { -worker = ((Http11NioProtocol)handler).getName(); -} else if (handler instanceof Http11AprProtocol) { -worker = ((Http11AprProtocol)handler).getName(); -} else if (handler instanceof AjpProtocol) { -worker = ((AjpProtocol)handler).getName(); -} else if (handler instanceof AjpAprProtocol) { -worker = ((AjpAprProtocol)handler).getName(); -} -ObjectName query = new ObjectName( -domain + ":type=RequestProcessor,worker=" + worker + ",*"); -Set results = mserver.queryNames(query, null); -for(ObjectName result : results) { -mserver.unregisterMBean(result); -} -} - - -/** - * Deregister the MBean for this - * Context object. - * - * @param context The Context to be managed - * - * @exception Exception if an MBean cannot be deregistered - * @deprecated Unused. Will be removed in Tomcat 8.0.x - */ -@Deprecated -static void destroyMBean(Context context) -throws Exception { - -String domain = context.getParent().getParent().getName(); -if (domain == null) -domain = mserver.getDefaultDomain(); -ObjectName oname = createObjectName(domain, context); -if( mserver.isRegistered(oname) ) -mserver.unregisterMBean(oname); - -} - - -/** - * Deregister the MBean for this * ContextEnvironment object. * * @param environment The ContextEnvironment to be managed @@ -1116,29 +1042,6 @@ public class MBeanUtils { /** * Deregister the MBean for this - * Engine object. - * - * @param engine The Engine to be managed - * - * @exception Exception if an MBean cannot be deregistered - * - * @deprecated Unused. Will be removed in Tomcat 8.0.x - */ -@Deprecated -static void destroyMBean(Engine engine) -throws Exception { -String domain = engine.getName(); -if (domain == null) -domain = mserver.getDefaultDomain(); -ObjectName oname = createObjectName(domain, engine); -if( mserver.isRegistered(oname) ) -mserver.unregisterMBean(oname); - -} - - -/** - * Deregister the MBean for this * Group object. * * @param group The Group to be managed @@ -1165,141 +1068,6 @@ public class MBeanUtils { /** * Deregister the MBean for this - * Host object. - * - * @param host The Host to be ma
svn commit: r1240118 - /tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java
Author: markt Date: Fri Feb 3 12:16:19 2012 New Revision: 1240118 URL: http://svn.apache.org/viewvc?rev=1240118&view=rev Log: Deprecate unused code Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java?rev=1240118&r1=1240117&r2=1240118&view=diff == --- tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java (original) +++ tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Fri Feb 3 12:16:19 2012 @@ -345,7 +345,9 @@ public class MBeanUtils { * @param connector The Connector to be named * * @exception MalformedObjectNameException if a name cannot be created + * @deprecated Unused. Will be removed in Tomcat 8.0.x */ +@Deprecated static ObjectName createObjectName(String domain, Connector connector) throws MalformedObjectNameException { @@ -387,7 +389,9 @@ public class MBeanUtils { * @param context The Context to be named * * @exception MalformedObjectNameException if a name cannot be created + * @deprecated Unused. Will be removed in Tomcat 8.0.x */ +@Deprecated static ObjectName createObjectName(String domain, Context context) throws MalformedObjectNameException { @@ -519,7 +523,9 @@ public class MBeanUtils { * @param engine The Engine to be named * * @exception MalformedObjectNameException if a name cannot be created + * @deprecated Unused. Will be removed in Tomcat 8.0.x */ +@Deprecated static ObjectName createObjectName(String domain, Engine engine) throws MalformedObjectNameException { @@ -560,7 +566,9 @@ public class MBeanUtils { * @param host The Host to be named * * @exception MalformedObjectNameException if a name cannot be created + * @deprecated Unused. Will be removed in Tomcat 8.0.x */ +@Deprecated static ObjectName createObjectName(String domain, Host host) throws MalformedObjectNameException { @@ -615,7 +623,9 @@ public class MBeanUtils { * @param manager The Manager to be named * * @exception MalformedObjectNameException if a name cannot be created + * @deprecated Unused. Will be removed in Tomcat 8.0.x */ +@Deprecated static ObjectName createObjectName(String domain, Manager manager) throws MalformedObjectNameException { @@ -649,7 +659,9 @@ public class MBeanUtils { * @param resources The NamingResources to be named * * @exception MalformedObjectNameException if a name cannot be created + * @deprecated Unused. Will be removed in Tomcat 8.0.x */ +@Deprecated static ObjectName createObjectName(String domain, NamingResources resources) throws MalformedObjectNameException { @@ -681,7 +693,9 @@ public class MBeanUtils { * @param factory The MBeanFactory to be named * * @exception MalformedObjectNameException if a name cannot be created + * @deprecated Unused. Will be removed in Tomcat 8.0.x */ +@Deprecated static ObjectName createObjectName(String domain, MBeanFactory factory) throws MalformedObjectNameException { @@ -700,7 +714,9 @@ public class MBeanUtils { * @param realm The Realm to be named * * @exception MalformedObjectNameException if a name cannot be created + * @deprecated Unused. Will be removed in Tomcat 8.0.x */ +@Deprecated static ObjectName createObjectName(String domain, Realm realm) throws MalformedObjectNameException { @@ -756,7 +772,9 @@ public class MBeanUtils { * @param server The Server to be named * * @exception MalformedObjectNameException if a name cannot be created + * @deprecated Unused. Will be removed in Tomcat 8.0.x */ +@Deprecated static ObjectName createObjectName(String domain, Server server) throws MalformedObjectNameException { @@ -775,7 +793,9 @@ public class MBeanUtils { * @param service The Service to be named * * @exception MalformedObjectNameException if a name cannot be created + * @deprecated Unused. Will be removed in Tomcat 8.0.x */ +@Deprecated static ObjectName createObjectName(String domain, Service service) throws MalformedObjectNameException { @@ -839,7 +859,9 @@ public class MBeanUtils { * @param valve The Valve to be named * * @exception MalformedObjectNameException i
svn commit: r1240120 - /tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java
Author: markt Date: Fri Feb 3 12:16:56 2012 New Revision: 1240120 URL: http://svn.apache.org/viewvc?rev=1240120&view=rev Log: Remove unused code Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java?rev=1240120&r1=1240119&r2=1240120&view=diff == --- tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java (original) +++ tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Fri Feb 3 12:16:56 2012 @@ -27,29 +27,20 @@ import javax.management.MBeanServer; import javax.management.MalformedObjectNameException; import javax.management.ObjectName; -import org.apache.catalina.Contained; import org.apache.catalina.Container; import org.apache.catalina.Context; import org.apache.catalina.Engine; import org.apache.catalina.Group; import org.apache.catalina.Host; import org.apache.catalina.Loader; -import org.apache.catalina.Manager; -import org.apache.catalina.Realm; import org.apache.catalina.Role; import org.apache.catalina.Server; -import org.apache.catalina.Service; import org.apache.catalina.User; import org.apache.catalina.UserDatabase; -import org.apache.catalina.Valve; -import org.apache.catalina.connector.Connector; import org.apache.catalina.deploy.ContextEnvironment; import org.apache.catalina.deploy.ContextResource; import org.apache.catalina.deploy.ContextResourceLink; -import org.apache.catalina.deploy.NamingResources; import org.apache.catalina.util.ContextName; -import org.apache.catalina.valves.ValveBase; -import org.apache.tomcat.util.IntrospectionUtils; import org.apache.tomcat.util.modeler.ManagedBean; import org.apache.tomcat.util.modeler.Registry; @@ -339,77 +330,6 @@ public class MBeanUtils { /** * Create an ObjectName for this - * Connector object. - * - * @param domain Domain in which this name is to be created - * @param connector The Connector to be named - * - * @exception MalformedObjectNameException if a name cannot be created - * @deprecated Unused. Will be removed in Tomcat 8.0.x - */ -@Deprecated -static ObjectName createObjectName(String domain, -Connector connector) -throws MalformedObjectNameException { - -ObjectName name = null; -try { -Object addressObj = IntrospectionUtils.getProperty(connector, "address"); -Integer port = (Integer) -IntrospectionUtils.getProperty(connector, "port"); - -StringBuilder sb = new StringBuilder(domain); -sb.append(":type=Connector"); -sb.append(",port="); -sb.append(port); -if (addressObj != null) { -String address = addressObj.toString(); -if (address.length() > 0) { -sb.append(",address="); -sb.append(ObjectName.quote(address)); -} -} -name = new ObjectName(sb.toString()); -return (name); -} catch (Exception e) { -MalformedObjectNameException mone = -new MalformedObjectNameException -("Cannot create object name for " + connector); -mone.initCause(e); -throw mone; -} -} - - -/** - * Create an ObjectName for this - * Context object. - * - * @param domain Domain in which this name is to be created - * @param context The Context to be named - * - * @exception MalformedObjectNameException if a name cannot be created - * @deprecated Unused. Will be removed in Tomcat 8.0.x - */ -@Deprecated -static ObjectName createObjectName(String domain, - Context context) -throws MalformedObjectNameException { - -ObjectName name = null; -Host host = (Host)context.getParent(); -ContextName cn = new ContextName(context.getName()); -name = new ObjectName(domain + ":j2eeType=WebModule,name=//" + - host.getName()+ cn.getDisplayName() + - ",J2EEApplication=none,J2EEServer=none"); - -return (name); - -} - - -/** - * Create an ObjectName for this * Service object. * * @param domain Domain in which this name is to be created @@ -517,27 +437,6 @@ public class MBeanUtils { /** * Create an ObjectName for this - * Engine object. - * - * @param domain Domain in which this name is to be created - * @param engine The Engine to be named - * - * @exception MalformedObjectNameException if a name cannot be created - * @deprecated Unused. Will be removed in Tomcat 8.0.x - */ -@Deprecated -s
svn commit: r1240121 - /tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java
Author: markt Date: Fri Feb 3 12:17:33 2012 New Revision: 1240121 URL: http://svn.apache.org/viewvc?rev=1240121&view=rev Log: Deprecate unused code Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java?rev=1240121&r1=1240120&r2=1240121&view=diff == --- tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java (original) +++ tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Fri Feb 3 12:17:33 2012 @@ -555,8 +555,15 @@ public class MBeanUtils { } - +/* + * @deprecated Unused. Will be removed in Tomcat 8.0.x + */ +@Deprecated static final Hashtable seq = new Hashtable(); +/* + * @deprecated Unused. Will be removed in Tomcat 8.0.x + */ +@Deprecated static int getSeq( String key ) { int i[]=seq.get( key ); if (i == null ) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1240122 - /tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java
Author: markt Date: Fri Feb 3 12:18:10 2012 New Revision: 1240122 URL: http://svn.apache.org/viewvc?rev=1240122&view=rev Log: Remove deprecated code Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java?rev=1240122&r1=1240121&r2=1240122&view=diff == --- tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java (original) +++ tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Fri Feb 3 12:18:10 2012 @@ -14,11 +14,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.catalina.mbeans; - -import java.util.Hashtable; import java.util.Set; import javax.management.DynamicMBean; @@ -555,27 +552,6 @@ public class MBeanUtils { } -/* - * @deprecated Unused. Will be removed in Tomcat 8.0.x - */ -@Deprecated -static final Hashtable seq = new Hashtable(); -/* - * @deprecated Unused. Will be removed in Tomcat 8.0.x - */ -@Deprecated -static int getSeq( String key ) { -int i[]=seq.get( key ); -if (i == null ) { -i=new int[1]; -i[0]=0; -seq.put( key, i); -} else { -i[0]++; -} -return i[0]; -} - /** * Create and configure (if necessary) and return the registry of * managed object descriptions. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1240124 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/mbeans/MBeanUtils.java
Author: markt Date: Fri Feb 3 12:19:42 2012 New Revision: 1240124 URL: http://svn.apache.org/viewvc?rev=1240124&view=rev Log: Deprecate unused code Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Propchange: tomcat/tc7.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Feb 3 12:19:42 2012 @@ -1 +1 @@ -/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096 ,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174975,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175798,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187 381,1187753,1187755,1187775,1187801,1187806,1187809,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279,1190339,1190371,1190388-1190389,1190474,1190481,1194915,1195222-1195223,1195531,1195899,1195905,1195943,1195949,1195953,1195955,1195965,1195968,1196175,1196212,1196223,1196304-1196305,1196735,1196825,1196827,1197158,1197261,1197263,1197299-1197300,1197305,1197339-1197340,1197343,1197382,1197386-1197387,1197480,1197578,1198497,1198528,1198552,1198602,1198604,1198607,1198622,1198640,1198696,1198707,1199418,1199432,1199436,1199513,1199529,1199980,116,1200056,1200089,1200106-1200107,1200263,1200316,1200320,1200398-1200399,1200445-1200446,1200555,1200627,1200696,1200725,1200937,1200941,1201069,1201087,1201180,1201235-1201237,1201508,1201521,1201542,1201545-1201546,1201548,1201555-1201556,1201568,1201576,1201608,1201921-1201922,1 201931,1202035,1202039,1202271,1202565,1202578,1202705,1202828,1202860,1203047-1203052,1203078,1203091,1203253,1203278,1204182,1204856,1204867,1204936,1204938,1204982,1205033,1205065,1205082,1205097,1205112,1206200,1207692,1208046,1208073,1208096,1208114,1208145,1208772,1209194,1209277-1209278,1209686-1209731,1210894,1212091,1212095,1212099,1212118,1213469,1213906,1214853,1214855,1214864,1215115,1215118-1215119,1215121,1220293,1220295,1221038,1221842,1222189,101,176,1222300,1222690,1222850,1222852,1222855,1224607,1224617,1224648-1224652,1224657,1224662-1224663,1224682,1224801,1224910,1225000,1225219,1225343,1225465,1225627,1225629,1225634,1226069,1226158-1226159,1226177,1226196,1226214-1226215,1226385,1226394,1226500,1226537-1226538,1226546,1226551,1226975,1228196,1228360,1228376,1228724,1228908,1228918,1228920,1228922,1228929,1228969,1229307,1229536,1229549,1229724,1229726-1229731,1229997,1230539,1230711,1230729,1230762-1230763,1230765,1230955,1230957,1231285,123129 0,1231308,1231310,1231337,1231460-1231461,1231542-1231543,1231546-1231547,1231620-1231621,1231624-1231625,1231630,1231654-1231655,1231738,1231740,1231762-1231763,1231856,1231886,1231923,1231947,1232345,1232368,1232380,1232447,1232760,1232813,1232842-1232843,1232869,1233413,1233423,1233426,1234143,1234567,1235207,1236906-1236907,1236914,1237146,1237154-1237156,1237332,1237334,1237425,1237427,1237604,1237975,1237981,1237985,1238070,1238073,1239024,1239048,1239050,1239060,1239135,1239483,1239485 +/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1
Re: svn commit: r1240105 - in /tomcat/trunk/java/org/apache/catalina: Container.java core/ContainerBase.java core/StandardHost.java deploy/NamingResources.java mbeans/MBeanUtils.java realm/RealmBase.j
2012/2/3 : > Author: markt > Date: Fri Feb 3 12:08:09 2012 > New Revision: 1240105 > > URL: http://svn.apache.org/viewvc?rev=1240105&view=rev > Log: > Refactor to remove some circular dependencies > > Modified: > tomcat/trunk/java/org/apache/catalina/Container.java > tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java > tomcat/trunk/java/org/apache/catalina/core/StandardHost.java > tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java > tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java > tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java > tomcat/trunk/java/org/apache/catalina/startup/FailedContext.java > tomcat/trunk/java/org/apache/catalina/valves/ValveBase.java > > Modified: tomcat/trunk/java/org/apache/catalina/Container.java > URL: > http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Container.java?rev=1240105&r1=1240104&r2=1240105&view=diff > == > --- tomcat/trunk/java/org/apache/catalina/Container.java (original) > +++ tomcat/trunk/java/org/apache/catalina/Container.java Fri Feb 3 12:08:09 > 2012 > @@ -159,6 +159,17 @@ public interface Container extends Lifec > */ > public ObjectName getObjectName(); > > + > + /** > + * Calculate the key properties string to be added to an object's > + * {@link ObjectName} to indicate that it is associated with this > container. > + * > + * @return A string suitable for appending to the ObjectName > + * > + */ > + public String getMBeanKeyProperties(); > + > + > /** > * Return the Pipeline object that manages the Valves associated with > * this Container. > > Modified: tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java > URL: > http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java?rev=1240105&r1=1240104&r2=1240105&view=diff > == > --- tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java (original) > +++ tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java Fri Feb 3 > 12:08:09 2012 > @@ -45,7 +45,10 @@ import org.apache.catalina.Cluster; > import org.apache.catalina.Container; > import org.apache.catalina.ContainerEvent; > import org.apache.catalina.ContainerListener; > +import org.apache.catalina.Context; > +import org.apache.catalina.Engine; > import org.apache.catalina.Globals; > +import org.apache.catalina.Host; > import org.apache.catalina.Lifecycle; > import org.apache.catalina.LifecycleException; > import org.apache.catalina.LifecycleState; > @@ -54,9 +57,11 @@ import org.apache.catalina.Manager; > import org.apache.catalina.Pipeline; > import org.apache.catalina.Realm; > import org.apache.catalina.Valve; > +import org.apache.catalina.Wrapper; > import org.apache.catalina.connector.Request; > import org.apache.catalina.connector.Response; > import org.apache.catalina.mbeans.MBeanUtils; > +import org.apache.catalina.util.ContextName; > import org.apache.catalina.util.LifecycleMBeanBase; > import org.apache.juli.logging.Log; > import org.apache.juli.logging.LogFactory; > @@ -1405,6 +1410,44 @@ public abstract class ContainerBase exte > return MBeanUtils.getDomain(this); > } > > + > + @Override > + public String getMBeanKeyProperties() { > + Container c = this; > + StringBuilder keyProperties = new StringBuilder(); > + int containerCount = 0; > + > + // Work up container hierarchy, add a component to the name for > + // each container > + while (!(c instanceof Engine)) { > + if (c instanceof Wrapper) { > + keyProperties.append(",servlet="); > + keyProperties.append(c.getName()); I think that the names should be wrapped by ObjectName.quote(). Here and in similar method implemented in another class below. I do not think that there is a restriction that forbids ,;:= in a servlet name. > + } else if (c instanceof Context) { > + keyProperties.append(",context="); > + ContextName cn = new ContextName(c.getName()); > + keyProperties.append(cn.getDisplayName()); > + } else if (c instanceof Host) { > + keyProperties.append(",host="); > + keyProperties.append(c.getName()); > + } else if (c == null) { > + // May happen in unit testing and/or some embedding scenarios > + keyProperties.append(",container"); > + keyProperties.append(containerCount++); > + keyProperties.append("=null"); > + break; > + } else { > + // Should never happen... > + keyProperties.append(",container"); > + keyProperties.append(containerCount++); > + keyProperties.append('=
Re: svn commit: r1240105 - in /tomcat/trunk/java/org/apache/catalina: Container.java core/ContainerBase.java core/StandardHost.java deploy/NamingResources.java mbeans/MBeanUtils.java realm/RealmBase.j
On 03/02/2012 12:19, Konstantin Kolinko wrote: > 2012/2/3 : >> +@Override >> +public String getMBeanKeyProperties() { >> +Container c = this; >> +StringBuilder keyProperties = new StringBuilder(); >> +int containerCount = 0; >> + >> +// Work up container hierarchy, add a component to the name for >> +// each container >> +while (!(c instanceof Engine)) { >> +if (c instanceof Wrapper) { >> +keyProperties.append(",servlet="); >> +keyProperties.append(c.getName()); > > I think that the names should be wrapped by ObjectName.quote(). > Here and in similar method implemented in another class below. > I do not think that there is a restriction that forbids ,;:= in a servlet > name. That is going to change the name Servlets are registered under. That sort of change has caused problems for folks in the past. I recall someone (rjung?) fixed a similar issue in the connectors but I can't remember where or how off-hand. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot failure in ASF Buildbot on tomcat-7-trunk
The Buildbot has detected a new failure on builder tomcat-7-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-7-trunk/builds/369 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1240124 Blamelist: markt BUILD FAILED: failed compile sincerely, -The Buildbot
Re: svn commit: r1240105 - in /tomcat/trunk/java/org/apache/catalina: Container.java core/ContainerBase.java core/StandardHost.java deploy/NamingResources.java mbeans/MBeanUtils.java realm/RealmBase.j
2012/2/3 Mark Thomas : > On 03/02/2012 12:19, Konstantin Kolinko wrote: >> 2012/2/3 : >>> + @Override >>> + public String getMBeanKeyProperties() { >>> + Container c = this; >>> + StringBuilder keyProperties = new StringBuilder(); >>> + int containerCount = 0; >>> + >>> + // Work up container hierarchy, add a component to the name for >>> + // each container >>> + while (!(c instanceof Engine)) { >>> + if (c instanceof Wrapper) { >>> + keyProperties.append(",servlet="); >>> + keyProperties.append(c.getName()); >> >> I think that the names should be wrapped by ObjectName.quote(). >> Here and in similar method implemented in another class below. >> I do not think that there is a restriction that forbids ,;:= in a servlet >> name. > > That is going to change the name Servlets are registered under. That > sort of change has caused problems for folks in the past. I recall > someone (rjung?) fixed a similar issue in the connectors but I can't > remember where or how off-hand. Connectors use address in their names. The problem was that if address is IP6 IP that has ':'s then it cannot be used unquoted. That is why ObjectName.quote() was needed there. -> MBeanUtils#createObjectName(String domain, Connector connector) A recent bug with connector names was with a change that removed quotes to use better connector names in log messages and as thread names. Quotes are needed in JMX names only, but not in human-readable names such as Container.getName(). So there was some work to separate the two usages. (That is what I remember. I might be a bit biased though). Javadoc for Container.getName() says that that name is for humans. It says nothing about it being suitable for JMX. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1240105 - in /tomcat/trunk/java/org/apache/catalina: Container.java core/ContainerBase.java core/StandardHost.java deploy/NamingResources.java mbeans/MBeanUtils.java realm/RealmBase.j
On 03.02.2012 13:24, Mark Thomas wrote: On 03/02/2012 12:19, Konstantin Kolinko wrote: 2012/2/3: +@Override +public String getMBeanKeyProperties() { +Container c = this; +StringBuilder keyProperties = new StringBuilder(); +int containerCount = 0; + +// Work up container hierarchy, add a component to the name for +// each container +while (!(c instanceof Engine)) { +if (c instanceof Wrapper) { +keyProperties.append(",servlet="); +keyProperties.append(c.getName()); I think that the names should be wrapped by ObjectName.quote(). Here and in similar method implemented in another class below. I do not think that there is a restriction that forbids ,;:= in a servlet name. That is going to change the name Servlets are registered under. That sort of change has caused problems for folks in the past. I recall someone (rjung?) fixed a similar issue in the connectors but I can't remember where or how off-hand. I changed the name of threads or requestprocessors, because they had a quote sign in the middle of the name by accident. I think my first "fix" was wrong, but a subsequent fix was right. So yes, I changed the name of some mbeans, but the previous names seemed obviously broken. So my final change is part of releases since a few months and noone seemed to have complained. Not sure what this tells us about servlet mbean names though. At least I wouldn't see a problem of changing/fixing for TC 8. Regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
catalina.home, catalina.base properties in Tomcat 8
Hi! Recent commits in trunk changed how Tomcat home and base directories are set up and how they are accessed by Tomcat components. Tomcat components no longer need catalina.home and catalina.base system properties, but the StandardServer class stores the values and there is convenient access method in ContainerBase.getCatalinaBase(). The values are stored as File objects instead of Strings. Unless I missed something, the change to startup code is that it no longer updates the system properties. It just calls Server#setCatalinaBase() and #setCatalinaHome() If it is not just a bug and the intention is to get rid of those two System properties, then I have questions. The problem is that system properties may be used in different configuration files and in 3-rd party code. Recent code changes: http://svn.apache.org/viewvc?rev=1239522&view=rev (Tomcat class, +followup fixes in r1239784, r1240048) http://svn.apache.org/viewvc?rev=1239527&view=rev (Bootstrap, Catalina) When Tomcat is run with startup scripts the ${catalina.home} and ${catalina.base} must be set by the script. So the problems are not apparent. Even so, there are several differences with Tomcat 7: 1) Old bootstrap code converted the paths to canonical form. New code does not update the properties. (To be precise I should say that it converted only non-absolute paths as discussed in Re:r1239522 thread, but that is just a little detail.) 2) Both properties were initialized, even if only "catalina.home" was set. I will list some usages below. (1) conf/catalina.policy (2) conf/logging.properties (3) various *.xml files read by Tomcat (4) lib/log4j.properties (5) WEB-INF/classes/logging.properties in web applications (6) WEB-INF/classes/log4j.properties in web applications (7) 3-rd party code Regarding (1) I think it is processed early by JRE and uses the values set by scripts. JRE itself should convert those paths to canonical form. Regarding (2) it is processed only if scripts have configured logging, and I think it uses the values updated by Bootstrap. (Logging is accessed later than Bootstrap). Regarding (3) I think that there might be PropertySource implementation that provides the values of those properties. though I wonder how 3rd party implementations of PropertySource would look like. (For reference: see "org.apache.tomcat.util.digester.PROPERTY_SOURCE" in config/systemprops.html) Regarding (5) and (3) for some time I am pondering an idea that there might be some mechanism to provide property names that depends on context. E.g. implement ${catalina.context.name} to use in logging configuration - maybe through ((WebappClassLoader)Thread.getContextClassLoader()).getContext()/getContextName(). So it is possible to consider the fix along with implementation of this new feature (to be discussed separately). Regarding (4)(6)(7) - log4j and various 3-rd party code - I do not know what to do. A possible workaround is to add a new to server.xml that will set those two system properties when Tomcat starts. That is relevant only if we go on with removing those properties. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1240168 - /tomcat/tc7.0.x/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java
Author: markt Date: Fri Feb 3 13:49:58 2012 New Revision: 1240168 URL: http://svn.apache.org/viewvc?rev=1240168&view=rev Log: Fix merge error Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java?rev=1240168&r1=1240167&r2=1240168&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Fri Feb 3 13:49:58 2012 @@ -961,10 +961,6 @@ public class MBeanUtils { } -/* - * @deprecated Unused. Will be removed in Tomcat 8.0.x - */ -@Deprecated /** * Create an ObjectName for this * Valve object. @@ -1036,6 +1032,10 @@ public class MBeanUtils { } +/* + * @deprecated Unused. Will be removed in Tomcat 8.0.x + */ +@Deprecated static Hashtable seq = new Hashtable(); /* * @deprecated Unused. Will be removed in Tomcat 8.0.x - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot success in ASF Buildbot on tomcat-7-trunk
The Buildbot has detected a restored build on builder tomcat-7-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-7-trunk/builds/370 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1240168 Blamelist: markt Build succeeded! sincerely, -The Buildbot
Re: catalina.home, catalina.base properties in Tomcat 8
On 03/02/2012 13:35, Konstantin Kolinko wrote: > Hi! > > Recent commits in trunk changed how Tomcat home and base directories are set > up > and how they are accessed by Tomcat components. > > Tomcat components no longer need catalina.home and catalina.base > system properties, but the StandardServer class stores the values and > there is convenient access method in ContainerBase.getCatalinaBase(). > The values are stored as File objects instead of Strings. > > Unless I missed something, the change to startup code is that it no > longer updates the system properties. > It just calls Server#setCatalinaBase() and #setCatalinaHome() Correct. > If it is not just a bug and the intention is to get rid of those two > System properties, then I have questions. The intention is not to get rid of them, but to make the manner in which they are used and the HOME and BASE directories used by the various components to be consistent. It was a deliberate decision not to set them on the grounds that they should be read during start-up and cached - therefore setting them offers no benefits. > The problem is that system properties may be used in different > configuration files and in 3-rd party code. Which may make the case for adding the setters back in - with appropriate documentation as to the intended use. > When Tomcat is run with startup scripts the ${catalina.home} and > ${catalina.base} must be set by the script. So the problems are not > apparent. The only other supported way to start Tomcat is via the Tomcat class and it has separate handling for this. > Even so, there are several differences with Tomcat 7: > > 1) Old bootstrap code converted the paths to canonical form. New code > does not update the properties. s/paths/paths defined by the properties/ > (To be precise I should say that it converted only non-absolute paths > as discussed in Re:r1239522 thread, but that is just a little detail.) > > 2) Both properties were initialized, even if only "catalina.home" was set. > > > I will list some usages below. > > (1) conf/catalina.policy > (2) conf/logging.properties > (3) various *.xml files read by Tomcat > (4) lib/log4j.properties > (5) WEB-INF/classes/logging.properties in web applications > (6) WEB-INF/classes/log4j.properties in web applications > (7) 3-rd party code > > > Regarding (1) I think it is processed early by JRE and uses the values > set by scripts. JRE itself should convert those paths to canonical > form. > > Regarding (2) it is processed only if scripts have configured logging, > and I think it uses the values updated by Bootstrap. (Logging is > accessed later than Bootstrap). It accesses the system properties directly so it would have seen the (no longer) updated values. > Regarding (3) I think that there might be PropertySource > implementation that provides the values of those properties. though I > wonder how 3rd party implementations of PropertySource would look > like. > > (For reference: see "org.apache.tomcat.util.digester.PROPERTY_SOURCE" > in config/systemprops.html) The default implementation uses system properties. > Regarding (5) and (3) for some time I am pondering an idea that there > might be some mechanism to provide property names that depends on > context. E.g. implement ${catalina.context.name} to use in logging > configuration - maybe through > ((WebappClassLoader)Thread.getContextClassLoader()).getContext()/getContextName(). > So it is possible to consider the fix along with implementation of > this new feature (to be discussed separately). > > > Regarding (4)(6)(7) - log4j and various 3-rd party code - I do not > know what to do. > > A possible workaround is to add a new to server.xml that > will set those two system properties when Tomcat starts. > > That is relevant only if we go on with removing those properties. The simplest solution is looking very much like restoring the update of these two system properties after the (now consistent) processing. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: catalina.home, catalina.base properties in Tomcat 8
2012/2/3 Mark Thomas : >> >> That is relevant only if we go on with removing those properties. > > The simplest solution is looking very much like restoring the update of > these two system properties after the (now consistent) processing. > +1. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52591] New: UnsupportedOperationException logged when fetching BasicDataSource 'loginTimeout'
https://issues.apache.org/bugzilla/show_bug.cgi?id=52591 Bug #: 52591 Summary: UnsupportedOperationException logged when fetching BasicDataSource 'loginTimeout' Product: Tomcat 7 Version: 7.0.25 Platform: PC OS/Version: Mac OS X 10.4 Status: NEW Severity: minor Priority: P2 Component: Manager AssignedTo: dev@tomcat.apache.org ReportedBy: ch...@christopherschultz.net Classification: Unclassified With a BasicDataSource configured (using a ), simply list the available MBeans and this exception will be emitted to stdout: SEVERE: Error getting attribute Catalina:type=DataSource,context=/context,host=localhost,class=javax.sql.DataSource,name="jdbc/myDataSource" loginTimeout javax.management.RuntimeOperationsException: Exception invoking method loginTimeout at org.apache.tomcat.util.modeler.BaseModelMBean.getAttribute(BaseModelMBean.java:197) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:666) at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:638) at org.apache.catalina.mbeans.MBeanDumper.dumpBeans(MBeanDumper.java:81) at org.apache.catalina.manager.JMXProxyServlet.listBeans(JMXProxyServlet.java:166) at org.apache.catalina.manager.JMXProxyServlet.doGet(JMXProxyServlet.java:121) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) [...] Caused by: java.lang.UnsupportedOperationException: Not supported by BasicDataSource at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getLoginTimeout(BasicDataSource.java:1083) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) This exception does not cause the request to fail, but definitely puts an ugly stack trace in catalina.out. It might be better to catch UnsupportedOperationException and emit a one-line error message -- one that isn't SEVERE. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52591] UnsupportedOperationException logged when fetching BasicDataSource 'loginTimeout'
https://issues.apache.org/bugzilla/show_bug.cgi?id=52591 --- Comment #1 from Christopher Schultz 2012-02-03 14:45:07 UTC --- There are other, similar errors for other MBeans: SEVERE: Error getting attribute java.lang:type=MemoryPool,name=Par Eden Space Us ageThreshold javax.management.RuntimeMBeanException: java.lang.UnsupportedOperationException: Usage threshold is not supported Looks like RuntimeMBeanException is probably the exception to catch... possibly even checking to see if the root cause is UnsupportedOperationException. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52500] Improve client certificate authentication
https://issues.apache.org/bugzilla/show_bug.cgi?id=52500 --- Comment #18 from Christopher Schultz 2012-02-03 14:48:40 UTC --- (In reply to comment #17) > 1)I do not like the place that I use now to call to > createUserIdentifierRetriever method > I want to call it when Realm is instantiated and all properties are set. > I need method like afterPropertiesSet of Spring or like > javax.annotation.PostConstruct. > Do you have something like this for Realm? RealmBase (which you should be using) implements the Lifecycle interface which gets all kinds of notifications about lifecycle events. Read the javadoc for that interface to see what event is most appropriate in your estimation. > 2) > >In the future, please provide more democratic documentation. For instance, > >plain-text or OpenDocument format. Plain text is better because it does not > >require a viewer external to the we browser. > > How can I provide a plain text together with pictures? Multiple attachments? > Do you know a tool for conversion from MS-Word documents to OpenDocument > format? OpenOffice.org, LibreOffice, or just about any software that can read Microsoft file formats and write-out OpenDocument. They are pretty much all completely free to download and use. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Closed] (MTOMCAT-118) tomcat7:run wont accept additionalClasspathDir arguments
[ https://issues.apache.org/jira/browse/MTOMCAT-118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Olivier Lamy closed MTOMCAT-118. Resolution: Fixed > tomcat7:run wont accept additionalClasspathDir arguments > > > Key: MTOMCAT-118 > URL: https://issues.apache.org/jira/browse/MTOMCAT-118 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: tomcat7 >Affects Versions: 2.0-beta-1, 2.0 > Environment: Apache Maven 3.0 (r1004208; 2010-10-04 12:50:56+0100) > Java version: 1.6.0_24 > Java home: C:\dev\java\java\jre > Default locale: en_GB, platform encoding: Cp1252 > OS name: "windows 7" version: "6.1" arch: "amd64" Family: "windows" >Reporter: Dave Lund >Assignee: Olivier Lamy > Fix For: 2.0 > > > Using the below configuration, the following error is given: > [ERROR] Failed to execute goal > org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:run (default-cli) > on project XXX: A type incompatibility occured while executing > org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:run: > java.lang.String cannot be cast to java.io.File > Example taken from docs site > http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/run-mojo-features.html > > org.apache.tomcat.maven > tomcat7-maven-plugin > 2.0-SNAPSHOT > > > 9090 > / > false > > src/sandbox/tomcat/sandbox-context.xml > > > src/test/resources > > > > > mysql > mysql-connector-java > ${mysql.mysql-connector-java} > > > ch.qos.logback > logback-classic > 0.9.15 > > > -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1240234 - in /tomcat/maven-plugin/trunk: tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/RunMojo.java tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/
Author: olamy Date: Fri Feb 3 16:27:41 2012 New Revision: 1240234 URL: http://svn.apache.org/viewvc?rev=1240234&view=rev Log: [MTOMCAT-118] tomcat7:run wont accept additionalClasspathDir arguments before 3.0.3 maven doesn't support mojo fields Collections other than String Modified: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/RunMojo.java tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java Modified: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/RunMojo.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/RunMojo.java?rev=1240234&r1=1240233&r2=1240234&view=diff == --- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/RunMojo.java (original) +++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/RunMojo.java Fri Feb 3 16:27:41 2012 @@ -122,9 +122,9 @@ public class RunMojo * Additional optional directories to add to the embedded tomcat classpath. * * @parameter alias = "additionalClassesDirs" - * @since 2.0 + * @since 2.0-beta-1 */ -private List additionalClasspathDirs; +private List additionalClasspathDirs; private File temporaryContextFile = null; @@ -202,11 +202,14 @@ public class RunMojo } if ( additionalClasspathDirs != null && !additionalClasspathDirs.isEmpty() ) { -for ( File additionalClasspathDir : additionalClasspathDirs ) +for ( String additionalClasspathDir : additionalClasspathDirs ) { -if ( additionalClasspathDir.exists() ) +File file = new File( additionalClasspathDir ); +if ( file.exists() ) { -loader.addRepository( additionalClasspathDir.toURI().toString() ); +String fileUri = file.toURI().toString(); +getLog().debug( "add file:" + fileUri + " as a additionalClasspathDir" ); +loader.addRepository( fileUri ); } } } Modified: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java?rev=1240234&r1=1240233&r2=1240234&view=diff == --- tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java (original) +++ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java Fri Feb 3 16:27:41 2012 @@ -120,7 +120,7 @@ public class RunMojo * @parameter alias = "additionalClassesDirs" * @since 2.0 */ -private List additionalClasspathDirs; +private List additionalClasspathDirs; private File temporaryContextFile = null; @@ -263,11 +263,14 @@ public class RunMojo if ( additionalClasspathDirs != null && !additionalClasspathDirs.isEmpty() ) { -for ( File additionalClasspathDir : additionalClasspathDirs ) +for ( String additionalClasspathDir : additionalClasspathDirs ) { -if ( additionalClasspathDir.exists() ) +File file = new File( additionalClasspathDir ); +if ( file.exists() ) { -loader.addRepository( additionalClasspathDir.toURI().toString() ); +String fileUri = file.toURI().toString(); +getLog().debug( "add file:" + fileUri + " as a additionalClasspathDir" ); +loader.addRepository( fileUri ); } } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1240235 - in /tomcat/maven-plugin/trunk: tomcat6-maven-plugin/src/site/ tomcat6-maven-plugin/src/site/apt/ tomcat7-maven-plugin/src/site/ tomcat7-maven-plugin/src/site/apt/
Author: olamy Date: Fri Feb 3 16:27:56 2012 New Revision: 1240235 URL: http://svn.apache.org/viewvc?rev=1240235&view=rev Log: add an index page in tomcat7 with link to all maven goals Added: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/site/apt/ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/site/apt/index.apt - copied, changed from r1240234, tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/site/apt/index.apt tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/site/apt/usage.apt.vm (with props) Modified: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/site/apt/index.apt tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/site/site.xml tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/site/site.xml Modified: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/site/apt/index.apt URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/site/apt/index.apt?rev=1240235&r1=1240234&r2=1240235&view=diff == --- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/site/apt/index.apt (original) +++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/site/apt/index.apt Fri Feb 3 16:27:56 2012 @@ -29,7 +29,7 @@ Tomcat Maven Plugin - The Tomcat Maven Plugin provides goals to manipulate WAR projects within the {{{http://tomcat.apache.org/}Tomcat}} servlet container. + The Tomcat6 Maven Plugin provides goals to manipulate WAR projects within the {{{http://tomcat.apache.org/}Tomcat}} servlet container version 6.x . * Goals Overview @@ -41,7 +41,7 @@ Tomcat Maven Plugin * Usage - Instructions on how to use the Tomcat Maven Plugin can be found on the {{{usage.html}usage page}}. + Instructions on how to use the Tomcat Maven Plugin can be found on the {{{./usage.html}usage page}}. * Examples Modified: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/site/site.xml URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/site/site.xml?rev=1240235&r1=1240234&r2=1240235&view=diff == --- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/site/site.xml (original) +++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/site/site.xml Fri Feb 3 16:27:56 2012 @@ -34,7 +34,6 @@ - Copied: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/site/apt/index.apt (from r1240234, tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/site/apt/index.apt) URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/site/apt/index.apt?p2=tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/site/apt/index.apt&p1=tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/site/apt/index.apt&r1=1240234&r2=1240235&rev=1240235&view=diff == --- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/site/apt/index.apt (original) +++ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/site/apt/index.apt Fri Feb 3 16:27:56 2012 @@ -1,10 +1,9 @@ --- Introduction --- - Mark Hobson - + Olivier Lamy --- - 2010-02-15 + 2012-02-03 --- ~~ Licensed to the Apache Software Foundation (ASF) under one @@ -29,25 +28,12 @@ Tomcat Maven Plugin - The Tomcat Maven Plugin provides goals to manipulate WAR projects within the {{{http://tomcat.apache.org/}Tomcat}} servlet container. + The Tomcat7 Maven Plugin provides goals to manipulate WAR projects within the {{{http://tomcat.apache.org/}Tomcat}} servlet container version 7.x * Goals Overview - The goals for this plugin come in two categories: - - * {{{./context-goals.html}Goals to manipulate deployed projects within Tomcat}} - - * {{{./container-goals.html}Goals to obtain information from Tomcat}} + The goals for this plugin are available here {{{./plugin-info.html}goals page}}. * Usage - Instructions on how to use the Tomcat Maven Plugin can be found on the {{{usage.html}usage page}}. - -* Examples - - To provide you with better understanding of some usages of the Tomcat Maven Plugin, - you can take a look into the following examples: - - * {{{./examples/add-system-properties.html}Adding System Properties}} - - * {{{./examples/deployment.html}How to deploy projects to Tomcat}} + Instructions on how to use the Tomcat Maven Plugin can be found on the {{{./usage.html}usage page}}. Added: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/site/apt/usage.apt.vm URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/site/apt/usage.apt.vm?rev=1240235&view=auto == --- tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/site/apt/usage.apt.vm (added) +++ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/site/apt/usage.apt.vm Fri Feb 3 16:27:56 2012 @@ -0,0 +1,182 @@ + --- + U
[jira] [Commented] (MTOMCAT-118) tomcat7:run wont accept additionalClasspathDir arguments
[ https://issues.apache.org/jira/browse/MTOMCAT-118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13199897#comment-13199897 ] Hudson commented on MTOMCAT-118: Integrated in TomcatMavenPlugin-mvn3.x #112 (See [https://builds.apache.org/job/TomcatMavenPlugin-mvn3.x/112/]) [MTOMCAT-118] tomcat7:run wont accept additionalClasspathDir arguments before 3.0.3 maven doesn't support mojo fields Collections other than String olamy : http://svn.apache.org/viewvc/?view=rev&rev=1240234 Files : * /tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/RunMojo.java * /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/RunMojo.java > tomcat7:run wont accept additionalClasspathDir arguments > > > Key: MTOMCAT-118 > URL: https://issues.apache.org/jira/browse/MTOMCAT-118 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: tomcat7 >Affects Versions: 2.0-beta-1, 2.0 > Environment: Apache Maven 3.0 (r1004208; 2010-10-04 12:50:56+0100) > Java version: 1.6.0_24 > Java home: C:\dev\java\java\jre > Default locale: en_GB, platform encoding: Cp1252 > OS name: "windows 7" version: "6.1" arch: "amd64" Family: "windows" >Reporter: Dave Lund >Assignee: Olivier Lamy > Fix For: 2.0 > > > Using the below configuration, the following error is given: > [ERROR] Failed to execute goal > org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:run (default-cli) > on project XXX: A type incompatibility occured while executing > org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-SNAPSHOT:run: > java.lang.String cannot be cast to java.io.File > Example taken from docs site > http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/run-mojo-features.html > > org.apache.tomcat.maven > tomcat7-maven-plugin > 2.0-SNAPSHOT > > > 9090 > / > false > > src/sandbox/tomcat/sandbox-context.xml > > > src/test/resources > > > > > mysql > mysql-connector-java > ${mysql.mysql-connector-java} > > > ch.qos.logback > logback-classic > 0.9.15 > > > -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52593] New: incorrect byeswritten log after completed async request under http1.0
https://issues.apache.org/bugzilla/show_bug.cgi?id=52593 Bug #: 52593 Summary: incorrect byeswritten log after completed async request under http1.0 Product: Tomcat 7 Version: 7.0.25 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Connectors AssignedTo: dev@tomcat.apache.org ReportedBy: david...@msn.com Depends on: 52547 Classification: Unclassified +++ This bug was initially created as a clone of Bug #52547 +++ The originally described bug #52547 is fixed. But there is a related bug described in my 2nd comment https://issues.apache.org/bugzilla/show_bug.cgi?id=52547#c2 - copy below Additionally, I think there is a "bug" in that the recycle() happens immediatley after the nextRequest() even when keepalive is true (I can see from an iptables log that the socket is not closed for another default 20 seconds). See the event(...), asyncDispatch(...) and service(...) methods in http://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Basically response.recycle() (when called because not dealing with async part of the request) calls outputBuffer.recycle() immediatley response processing is finished rather than just before the socket is actually closed. So in an http/1.1 multi request-response (without a socket close) you still get both outputBuffer.nextRequest() and outputBuffer.recycle() called consecutvely at the end of each completed response process. I can see that nextRequest(), recycle() should both exist, but only if recycle() really only happens at socket close as it's descriptive comment says. Otherwise it would be a (very minor) optimization to remove the (nearlly always present) duplicate calls. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52547] incorrect byeswritten log after completed async request under http1.0
https://issues.apache.org/bugzilla/show_bug.cgi?id=52547 David changed: What|Removed |Added Blocks||52593 -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52593] outputbuffer.recycle() is called immediately after response instead of at socket close
https://issues.apache.org/bugzilla/show_bug.cgi?id=52593 David changed: What|Removed |Added Summary|incorrect byeswritten log |outputbuffer.recycle() is |after completed async |called immediately after |request under http1.0 |response instead of at ||socket close -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1240290 - in /tomcat/trunk/java/org/apache/catalina/startup: Bootstrap.java Tomcat.java
Author: markt Date: Fri Feb 3 18:48:52 2012 New Revision: 1240290 URL: http://svn.apache.org/viewvc?rev=1240290&view=rev Log: Restoring updating / setting of home/base system properties after they have been processed in case other components depend on the updated values. Modified: tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Modified: tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java?rev=1240290&r1=1240289&r2=1240290&view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java Fri Feb 3 18:48:52 2012 @@ -116,6 +116,8 @@ public final class Bootstrap { } catalinaHomeFile = homeFile; +System.setProperty( +Globals.CATALINA_HOME_PROP, catalinaHomeFile.getPath()); // Then base String base = System.getProperty(Globals.CATALINA_BASE_PROP); @@ -130,6 +132,8 @@ public final class Bootstrap { } catalinaBaseFile = baseFile; } +System.setProperty( +Globals.CATALINA_BASE_PROP, catalinaBaseFile.getPath()); } // -- Variables Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java?rev=1240290&r1=1240289&r2=1240290&view=diff == --- tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Fri Feb 3 18:48:52 2012 @@ -600,6 +600,7 @@ public class Tomcat { baseFile = baseFile.getAbsoluteFile(); } server.setCatalinaBase(baseFile); +System.setProperty(Globals.CATALINA_BASE_PROP, baseFile.getPath()); basedir = baseFile.getPath(); if (catalinaHome == null) { @@ -614,6 +615,8 @@ public class Tomcat { } server.setCatalinaHome(homeFile); } +System.setProperty(Globals.CATALINA_HOME_PROP, +server.getCatalinaHome().getPath()); } static final String[] silences = new String[] { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1240329 - /tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java
Author: markt Date: Fri Feb 3 20:09:07 2012 New Revision: 1240329 URL: http://svn.apache.org/viewvc?rev=1240329&view=rev Log: Replace specific createXxx() methods with generic createValve. Has several benefits: Automatically supports new Valves as they are added, provides support for all current valves, removes some circular dependencies. Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java?rev=1240329&r1=1240328&r2=1240329&view=diff == --- tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java (original) +++ tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java Fri Feb 3 20:09:07 2012 @@ -22,6 +22,7 @@ import java.io.File; import javax.management.MBeanServer; import javax.management.ObjectName; +import org.apache.catalina.Container; import org.apache.catalina.Context; import org.apache.catalina.Engine; import org.apache.catalina.Host; @@ -44,6 +45,7 @@ import org.apache.catalina.realm.UserDat import org.apache.catalina.session.StandardManager; import org.apache.catalina.startup.ContextConfig; import org.apache.catalina.startup.HostConfig; +import org.apache.catalina.util.LifecycleMBeanBase; import org.apache.catalina.valves.AccessLogValve; import org.apache.catalina.valves.RemoteAddrValve; import org.apache.catalina.valves.RemoteHostValve; @@ -235,7 +237,11 @@ public class MBeanFactory { * @param parent MBean Name of the associated parent component * * @exception Exception if an MBean cannot be created or registered + * + * @deprecated Will be removed in Tomcat 8.0.x. Replaced by {@link + * #createValve(String, String)}. */ +@Deprecated public String createAccessLoggerValve(String parent) throws Exception { @@ -467,7 +473,11 @@ public class MBeanFactory { * @param parent MBean Name of the associated parent component * * @exception Exception if an MBean cannot be created or registered + * + * @deprecated Will be removed in Tomcat 8.0.x. Replaced by {@link + * #createValve(String, String)}. */ +@Deprecated public String createRemoteAddrValve(String parent) throws Exception { @@ -490,7 +500,11 @@ public class MBeanFactory { * @param parent MBean Name of the associated parent component * * @exception Exception if an MBean cannot be created or registered + * + * @deprecated Will be removed in Tomcat 8.0.x. Replaced by {@link + * #createValve(String, String)}. */ +@Deprecated public String createRemoteHostValve(String parent) throws Exception { @@ -513,7 +527,12 @@ public class MBeanFactory { * @param parent MBean Name of the associated parent component * * @exception Exception if an MBean cannot be created or registered + * + * @deprecated Will be removed in Tomcat 8.0.x. Replaced by {@link + * #createValve(String, String)}. */ +@Deprecated + public String createSingleSignOn(String parent) throws Exception { @@ -759,6 +778,42 @@ public class MBeanFactory { /** + * Create a new Valve and associate it with a {@link Container}. + * + * @param className The fully qualified class name of the {@link Valve} to + * create + * @param parentThe MBean name of the associated parent + * {@link Container}. + * + * @return The MBean name of the {@link Valve} that was created or + * null if the {@link Valve} does not implement + * {@link LifecycleMBeanBase}. + */ +public String createValve(String className, String parent) +throws Exception { + +// Look for the parent +ObjectName parentName = new ObjectName(parent); +Container container = getParentContainerFromParent(parentName); + +if (container == null) { +// TODO +throw new IllegalArgumentException(); +} + +Valve valve = (Valve) Class.forName(className).newInstance(); + +container.getPipeline().addValve(valve); + +if (valve instanceof LifecycleMBeanBase) { +return ((LifecycleMBeanBase) valve).getObjectName().toString(); +} else { +return null; +} +} + + +/** * Create a new Web Application Loader. * * @param parent MBean Name of the associated parent component - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1240330 - in /tomcat/trunk/java/org/apache/catalina: JmxEnabled.java mbeans/MBeanFactory.java util/LifecycleMBeanBase.java
Author: markt Date: Fri Feb 3 20:09:51 2012 New Revision: 1240330 URL: http://svn.apache.org/viewvc?rev=1240330&view=rev Log: Add new interface to indicate JMX support and start to use it Added: tomcat/trunk/java/org/apache/catalina/JmxEnabled.java Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java tomcat/trunk/java/org/apache/catalina/util/LifecycleMBeanBase.java Added: tomcat/trunk/java/org/apache/catalina/JmxEnabled.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/JmxEnabled.java?rev=1240330&view=auto == --- tomcat/trunk/java/org/apache/catalina/JmxEnabled.java (added) +++ tomcat/trunk/java/org/apache/catalina/JmxEnabled.java Fri Feb 3 20:09:51 2012 @@ -0,0 +1,49 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.catalina; + +import javax.management.MBeanRegistration; +import javax.management.ObjectName; + +/** + * This interface is implemented by components that will be registered with an + * MBean server when they are created and unregistered when they are destroyed. + * It is primarily intended to be implemented by components that implement + * {@link Lifecycle} but is not exclusively for them. + */ +public interface JmxEnabled extends MBeanRegistration { + +/** + * Obtain the domain under which this component will be / has been + * registered. + */ +String getDomain(); + + +/** + * Specify the domain under which this component should be registered. Used + * with components that cannot (easily) navigate the component hierarchy to + * determine the correct domain to use. + */ +void setDomain(String domain); + + +/** + * Obtain the name under which this component has been registered with JMX. + */ +ObjectName getObjectName(); +} Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java?rev=1240330&r1=1240329&r2=1240330&view=diff == --- tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java (original) +++ tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java Fri Feb 3 20:09:51 2012 @@ -26,10 +26,10 @@ import org.apache.catalina.Container; import org.apache.catalina.Context; import org.apache.catalina.Engine; import org.apache.catalina.Host; +import org.apache.catalina.JmxEnabled; import org.apache.catalina.Server; import org.apache.catalina.Service; import org.apache.catalina.Valve; -import org.apache.catalina.authenticator.SingleSignOn; import org.apache.catalina.connector.Connector; import org.apache.catalina.core.ContainerBase; import org.apache.catalina.core.StandardContext; @@ -46,10 +46,6 @@ import org.apache.catalina.session.Stand import org.apache.catalina.startup.ContextConfig; import org.apache.catalina.startup.HostConfig; import org.apache.catalina.util.LifecycleMBeanBase; -import org.apache.catalina.valves.AccessLogValve; -import org.apache.catalina.valves.RemoteAddrValve; -import org.apache.catalina.valves.RemoteHostValve; -import org.apache.catalina.valves.ValveBase; /** @@ -232,32 +228,6 @@ public class MBeanFactory { /** - * Create a new AccessLoggerValve. - * - * @param parent MBean Name of the associated parent component - * - * @exception Exception if an MBean cannot be created or registered - * - * @deprecated Will be removed in Tomcat 8.0.x. Replaced by {@link - * #createValve(String, String)}. - */ -@Deprecated -public String createAccessLoggerValve(String parent) -throws Exception { - -ObjectName pname = new ObjectName(parent); -// Create a new AccessLogValve instance -AccessLogValve accessLogger = new AccessLogValve(); -ContainerBase containerBase = getParentContainerFromParent(pname); -// Add the new instance to its parent component -containerBase.getPipeline().addValve(accessLogger); -ObjectName oname = accessLogger.getObjectName(); -return (o
svn commit: r1240332 - /tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java
Author: markt Date: Fri Feb 3 20:10:29 2012 New Revision: 1240332 URL: http://svn.apache.org/viewvc?rev=1240332&view=rev Log: No need to use ContainerBase internally Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java?rev=1240332&r1=1240331&r2=1240332&view=diff == --- tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java (original) +++ tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java Fri Feb 3 20:10:29 2012 @@ -31,7 +31,6 @@ import org.apache.catalina.Server; import org.apache.catalina.Service; import org.apache.catalina.Valve; import org.apache.catalina.connector.Connector; -import org.apache.catalina.core.ContainerBase; import org.apache.catalina.core.StandardContext; import org.apache.catalina.core.StandardEngine; import org.apache.catalina.core.StandardHost; @@ -138,10 +137,10 @@ public class MBeanFactory { } /** - * Get Parent ContainerBase to add its child component + * Get Parent Container to add its child component * from parent's ObjectName */ -private ContainerBase getParentContainerFromParent(ObjectName pname) +private Container getParentContainerFromParent(ObjectName pname) throws Exception { String type = pname.getKeyProperty("type"); @@ -154,16 +153,16 @@ public class MBeanFactory { int i = name.indexOf("/"); String hostName = name.substring(0,i); String path = name.substring(i); -Host host = (Host) engine.findChild(hostName); +Container host = engine.findChild(hostName); String pathStr = getPathStr(path); -StandardContext context = (StandardContext)host.findChild(pathStr); +Container context = host.findChild(pathStr); return context; } else if (type != null) { if (type.equals("Engine")) { return engine; } else if (type.equals("Host")) { String hostName = pname.getKeyProperty("host"); -StandardHost host = (StandardHost) engine.findChild(hostName); +Container host = engine.findChild(hostName); return host; } } @@ -176,25 +175,25 @@ public class MBeanFactory { * Get Parent ContainerBase to add its child component * from child component's ObjectName as a String */ -private ContainerBase getParentContainerFromChild(ObjectName oname) +private Container getParentContainerFromChild(ObjectName oname) throws Exception { String hostName = oname.getKeyProperty("host"); String path = oname.getKeyProperty("path"); Service service = getService(oname); -StandardEngine engine = (StandardEngine) service.getContainer(); +Container engine = service.getContainer(); if (hostName == null) { // child's container is Engine return engine; } else if (path == null) { // child's container is Host -StandardHost host = (StandardHost) engine.findChild(hostName); +Container host = engine.findChild(hostName); return host; } else { // child's container is Context -StandardHost host = (StandardHost) engine.findChild(hostName); +Container host = engine.findChild(hostName); path = getPathStr(path); -StandardContext context = (StandardContext) host.findChild(path); +Container context = host.findChild(path); return context; } } @@ -264,9 +263,9 @@ public class MBeanFactory { // Add the new instance to its parent component ObjectName pname = new ObjectName(parent); -ContainerBase containerBase = getParentContainerFromParent(pname); +Container container = getParentContainerFromParent(pname); // Add the new instance to its parent component -containerBase.setRealm(realm); +container.setRealm(realm); // Return the corresponding MBean name ObjectName oname = realm.getObjectName(); if (oname != null) { @@ -362,9 +361,9 @@ public class MBeanFactory { // Add the new instance to its parent component ObjectName pname = new ObjectName(parent); -ContainerBase containerBase = getParentContainerFromParent(pname); +Container container = getParentContainerFromParent(pname); // Add the new instance to its parent component -containerBase.setRealm(realm); +container.setRealm(realm); // Return the corresponding MBean name ObjectName oname = realm.getObjectName(); @@ -392,9 +391,9 @@ public class MBe
svn commit: r1240333 - in /tomcat/trunk/java/org/apache/catalina: core/StandardService.java deploy/NamingResources.java mbeans/ContainerMBean.java mbeans/MBeanFactory.java
Author: markt Date: Fri Feb 3 20:11:19 2012 New Revision: 1240333 URL: http://svn.apache.org/viewvc?rev=1240333&view=rev Log: Use new interface where appropriate Modified: tomcat/trunk/java/org/apache/catalina/core/StandardService.java tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java Modified: tomcat/trunk/java/org/apache/catalina/core/StandardService.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardService.java?rev=1240333&r1=1240332&r2=1240333&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/StandardService.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardService.java Fri Feb 3 20:11:19 2012 @@ -26,6 +26,7 @@ import javax.management.ObjectName; import org.apache.catalina.Container; import org.apache.catalina.Engine; import org.apache.catalina.Executor; +import org.apache.catalina.JmxEnabled; import org.apache.catalina.LifecycleException; import org.apache.catalina.LifecycleState; import org.apache.catalina.Server; @@ -520,8 +521,8 @@ public class StandardService extends Lif // Initialize any Executors for (Executor executor : findExecutors()) { -if (executor instanceof LifecycleMBeanBase) { -((LifecycleMBeanBase) executor).setDomain(getDomain()); +if (executor instanceof JmxEnabled) { +((JmxEnabled) executor).setDomain(getDomain()); } executor.init(); } Modified: tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java?rev=1240333&r1=1240332&r2=1240333&view=diff == --- tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java (original) +++ tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java Fri Feb 3 20:11:19 2012 @@ -32,6 +32,7 @@ import javax.naming.NamingException; import org.apache.catalina.Container; import org.apache.catalina.Context; import org.apache.catalina.Engine; +import org.apache.catalina.JmxEnabled; import org.apache.catalina.LifecycleException; import org.apache.catalina.LifecycleState; import org.apache.catalina.Server; @@ -1075,8 +1076,8 @@ public class NamingResources extends Lif // Use the same domain as our associated container if we have one Object c = getContainer(); -if (c instanceof LifecycleMBeanBase) { -return ((LifecycleMBeanBase) c).getDomain(); +if (c instanceof JmxEnabled) { +return ((JmxEnabled) c).getDomain(); } return null; Modified: tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java?rev=1240333&r1=1240332&r2=1240333&view=diff == --- tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java (original) +++ tomcat/trunk/java/org/apache/catalina/mbeans/ContainerMBean.java Fri Feb 3 20:11:19 2012 @@ -29,6 +29,7 @@ import javax.management.modelmbean.Inval import org.apache.catalina.Container; import org.apache.catalina.ContainerListener; +import org.apache.catalina.JmxEnabled; import org.apache.catalina.LifecycleException; import org.apache.catalina.LifecycleListener; import org.apache.catalina.Valve; @@ -37,7 +38,6 @@ import org.apache.catalina.core.Standard import org.apache.catalina.core.StandardHost; import org.apache.catalina.startup.ContextConfig; import org.apache.catalina.startup.HostConfig; -import org.apache.catalina.util.LifecycleMBeanBase; import org.apache.catalina.valves.ValveBase; import org.apache.tomcat.util.modeler.BaseModelMBean; @@ -170,7 +170,11 @@ public class ContainerMBean extends Base throw new MBeanException(e); } -return ((LifecycleMBeanBase)valve).getObjectName().toString(); +if (valve instanceof JmxEnabled) { +return ((JmxEnabled)valve).getObjectName().toString(); +} else { +return null; +} } /** Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java?rev=1240333&r1=1240332&r2=1240333&view=diff == --- tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java (original) +++ tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java Fri Feb 3 20:11:19 2012 @@ -44,7 +44,6 @@ import org.apache.catalina.realm.UserDat import org.apach
svn commit: r1240334 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/mbeans/MBeanFactory.java java/org/apache/catalina/mbeans/mbeans-descriptors.xml webapps/docs/changelog.xml
Author: markt Date: Fri Feb 3 20:17:37 2012 New Revision: 1240334 URL: http://svn.apache.org/viewvc?rev=1240334&view=rev Log: Add generic create Valve method Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/mbeans/mbeans-descriptors.xml tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Feb 3 20:17:37 2012 @@ -1 +1 @@ -/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096 ,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174975,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175798,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187 381,1187753,1187755,1187775,1187801,1187806,1187809,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279,1190339,1190371,1190388-1190389,1190474,1190481,1194915,1195222-1195223,1195531,1195899,1195905,1195943,1195949,1195953,1195955,1195965,1195968,1196175,1196212,1196223,1196304-1196305,1196735,1196825,1196827,1197158,1197261,1197263,1197299-1197300,1197305,1197339-1197340,1197343,1197382,1197386-1197387,1197480,1197578,1198497,1198528,1198552,1198602,1198604,1198607,1198622,1198640,1198696,1198707,1199418,1199432,1199436,1199513,1199529,1199980,116,1200056,1200089,1200106-1200107,1200263,1200316,1200320,1200398-1200399,1200445-1200446,1200555,1200627,1200696,1200725,1200937,1200941,1201069,1201087,1201180,1201235-1201237,1201508,1201521,1201542,1201545-1201546,1201548,1201555-1201556,1201568,1201576,1201608,1201921-1201922,1 201931,1202035,1202039,1202271,1202565,1202578,1202705,1202828,1202860,1203047-1203052,1203078,1203091,1203253,1203278,1204182,1204856,1204867,1204936,1204938,1204982,1205033,1205065,1205082,1205097,1205112,1206200,1207692,1208046,1208073,1208096,1208114,1208145,1208772,1209194,1209277-1209278,1209686-1209731,1210894,1212091,1212095,1212099,1212118,1213469,1213906,1214853,1214855,1214864,1215115,1215118-1215119,1215121,1220293,1220295,1221038,1221842,1222189,101,176,1222300,1222690,1222850,1222852,1222855,1224607,1224617,1224648-1224652,1224657,1224662-1224663,1224682,1224801,1224910,1225000,1225219,1225343,1225465,1225627,1225629,1225634,1226069,1226158-1226159,1226177,1226196,1226214-1226215,1226385,1226394,1226500,1226537-1226538,1226546,1226551,1226975,1228196,1228360,1228376,1228724,1228908,1228918,1228920,1228922,1228929,1228969,1229307,1229536,1229549,1229724,1229726-1229731,1229997,1230539,1230711,1230729,1230762-1230763,1230765,1230955,1230957,1231285,123129 0,1231308,1231310,1231337,1231460-1231461,1231542-1231543,1231546-1231547,1231620-1231621,1231624-1231625,1231630,1231654-1231655,1231738,1231740,1231762-1231763,1231856,1231886,1231923,1231947,1232345,1232368,1232380,1232447,1232760,1232813,1232842-1232843,1232869,1233413,1233423,1233426,1234143,1234567,1235207,1236906-1236907,1236914,1237146,1237154-1237156,1237332,1237334,1237425,1237427,1237604,1237975,
svn commit: r1240335 - /tomcat/trunk/java/org/apache/catalina/mbeans/mbeans-descriptors.xml
Author: markt Date: Fri Feb 3 20:20:40 2012 New Revision: 1240335 URL: http://svn.apache.org/viewvc?rev=1240335&view=rev Log: Update descriptor Modified: tomcat/trunk/java/org/apache/catalina/mbeans/mbeans-descriptors.xml Modified: tomcat/trunk/java/org/apache/catalina/mbeans/mbeans-descriptors.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/mbeans-descriptors.xml?rev=1240335&r1=1240334&r2=1240335&view=diff == --- tomcat/trunk/java/org/apache/catalina/mbeans/mbeans-descriptors.xml (original) +++ tomcat/trunk/java/org/apache/catalina/mbeans/mbeans-descriptors.xml Fri Feb 3 20:20:40 2012 @@ -27,15 +27,6 @@ - - - - - - - - - - - - - - - - + + + + +
Re: svn commit: r1240105 - in /tomcat/trunk/java/org/apache/catalina: Container.java core/ContainerBase.java core/StandardHost.java deploy/NamingResources.java mbeans/MBeanUtils.java realm/RealmBase.j
On 03.02.2012 13:44, Konstantin Kolinko wrote: 2012/2/3 Mark Thomas: On 03/02/2012 12:19, Konstantin Kolinko wrote: 2012/2/3: +@Override +public String getMBeanKeyProperties() { +Container c = this; +StringBuilder keyProperties = new StringBuilder(); +int containerCount = 0; + +// Work up container hierarchy, add a component to the name for +// each container +while (!(c instanceof Engine)) { +if (c instanceof Wrapper) { +keyProperties.append(",servlet="); +keyProperties.append(c.getName()); I think that the names should be wrapped by ObjectName.quote(). Here and in similar method implemented in another class below. I do not think that there is a restriction that forbids ,;:= in a servlet name. That is going to change the name Servlets are registered under. That sort of change has caused problems for folks in the past. I recall someone (rjung?) fixed a similar issue in the connectors but I can't remember where or how off-hand. Connectors use address in their names. The problem was that if address is IP6 IP that has ':'s then it cannot be used unquoted. That is why ObjectName.quote() was needed there. -> MBeanUtils#createObjectName(String domain, Connector connector) A recent bug with connector names was with a change that removed quotes to use better connector names in log messages and as thread names. Quotes are needed in JMX names only, but not in human-readable names such as Container.getName(). So there was some work to separate the two usages. (That is what I remember. I might be a bit biased though). Javadoc for Container.getName() says that that name is for humans. It says nothing about it being suitable for JMX. That's a better description of what happened than what I remembered. Thanks. Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1240330 - in /tomcat/trunk/java/org/apache/catalina: JmxEnabled.java mbeans/MBeanFactory.java util/LifecycleMBeanBase.java
2012/2/4 : > Author: markt > Date: Fri Feb 3 20:09:51 2012 > New Revision: 1240330 > > URL: http://svn.apache.org/viewvc?rev=1240330&view=rev > Log: > Add new interface to indicate JMX support and start to use it > > Added: > tomcat/trunk/java/org/apache/catalina/JmxEnabled.java svn:eol-style missing ! > Modified: > tomcat/trunk/java/org/apache/catalina/mbeans/MBeanFactory.java > tomcat/trunk/java/org/apache/catalina/util/LifecycleMBeanBase.java > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 51181] Add support for Web Sockets
https://issues.apache.org/bugzilla/show_bug.cgi?id=51181 Johno Crawford changed: What|Removed |Added CC||jo...@sulake.com -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52579] Tomcat5.5.35+Java1.5 cannot return proper value of a request parameter
https://issues.apache.org/bugzilla/show_bug.cgi?id=52579 --- Comment #5 from Konstantin Kolinko 2012-02-04 00:46:39 UTC --- (In reply to comment #3) > Created attachment 28257 [details] > new implementation of ByteChunk.toStringInternal() > -1. There are two errors: 1) "return new String(buff, start, end-start);" is just wrong. It converts bytes to String using OS default encoding. As far as I understand the "result.isUnderflow()" condition means that all input data has been processed. This "return new String" code just handles an unexpected state. I suggest to replace that code by "cr.throwException();". 2) "charset.newDecoder()" is expected to be an expensive operation. In scenario of CVE-2012-0022 I expect it to have notable impact on performance. Charset.decode() uses a ThreadLocal-based cache of decoders. Maybe we can implement something like that cache, or just use a simple ThreadLocal (or other way) to pass a Decoder instance around while processing the same request. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52579] Tomcat5.5.35+Java1.5 cannot return proper value of a request parameter
https://issues.apache.org/bugzilla/show_bug.cgi?id=52579 --- Comment #6 from Konstantin Kolinko 2012-02-04 01:29:57 UTC --- (In reply to comment #5) > Maybe we can > implement (...) just use a simple ThreadLocal > to pass a Decoder instance around while processing the same request. If a Decoder instance is obtained from a ThreadLocal a quick way to test it against required charset is to compare it with decoder.charset(). 3) For large input data the current implementation that calls Charset.decode() is better than the proposed one, because it allocates less memory. The difference is between (size * averageCharsPerByte()) and (size * maxCharsPerByte()). I think threshold can be around 10 bytes. The Java bug #6196991 occurs when the value of (input size * decoder.averageCharsPerByte()) coerced to integer is 0. In this case in Java 5 the CharsetDecoder#decode(ByteBuffer) method erroneously treats it as if no input data were available. If input is > 10 bytes it should not trigger the bug #6196991. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 51181] Add support for Web Sockets
https://issues.apache.org/bugzilla/show_bug.cgi?id=51181 --- Comment #29 from Johno Crawford 2012-02-04 01:48:20 UTC --- Created attachment 28264 --> https://issues.apache.org/bugzilla/attachment.cgi?id=28264 Origin and protocol client handshake TODOs Thought it might be helpful to try implementing a few TODOs, please let me know whether or not you agree with the approach for origin and protocol. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GUMP@vmgump]: Project tomcat-trunk-validate (in module tomcat-trunk) failed
To whom it may engage... This is an automated request, but not an unsolicited one. For more information please visit http://gump.apache.org/nagged.html, and/or contact the folk at gene...@gump.apache.org. Project tomcat-trunk-validate has an issue affecting its community integration. This issue affects 1 projects, and has been outstanding for 27 runs. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - tomcat-trunk-validate : Tomcat 8.x, a web server implementing Java Servlet 3.1, ... Full details are available at: http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-validate/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Dependency on checkstyle exists, no need to add for property checkstyle.jar. -INFO- Failed with reason build failed The following work was performed: http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-validate/gump_work/build_tomcat-trunk_tomcat-trunk-validate.html Work Name: build_tomcat-trunk_tomcat-trunk-validate (Type: Build) Work ended in a state of : Failed Elapsed: 27 secs Command Line: /usr/lib/jvm/java-6-openjdk/bin/java -Djava.awt.headless=true -Dbuild.sysclasspath=only org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml -Dcheckstyle.jar=/srv/gump/public/workspace/checkstyle/target/checkstyle-5.6-SNAPSHOT.jar -Dexecute.validate=true validate [Working Directory: /srv/gump/public/workspace/tomcat-trunk] CLASSPATH: /usr/lib/jvm/java-6-openjdk/lib/tools.jar:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/checkstyle/target/checkstyle-5.6-SNAPSHOT.jar:/srv/gump/public/workspace/apache-commons/beanutils/dist/commons-beanutils-04022012.jar:/srv/gump/public/workspace/apache-commons/cli/target/commons-cli-1.3-SNAPSHOT.jar:/srv/gump/public/workspace/apache-commons/exec/target/commons-exec-1.1.1-SNAPSHOT.jar:/srv/gump/public/workspace/apache-commons/validator/dist/commons-validator-04022012.jar:/srv/gump/public/workspace/junit/dist/junit-04022012.jar:/srv/gump /public/workspace/junit/dist/junit-dep-04022012.jar:/srv/gump/public/workspace/google-guava/build/dist/guava-04022012/guava-04022012.jar:/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-04022012.jar:/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-api-04022012.jar:/srv/gump/public/workspace/commons-collections-3.x/target/commons-collections-3.3-SNAPSHOT.jar:/srv/gump/packages/antlr/antlr-3.1.3.jar:/srv/gump/public/workspace/jdom/build/jdom.jar:/srv/gump/public/workspace/velocity-engine/bin/velocity-04022012.jar:/srv/gump/public/workspace/velocity-engine/bin/velocity-04022012-dep.jar:/srv/gump/packages/javamail-1.4/mail.jar:/srv/gump/packages/javamail-1.4/lib/mailapi.jar:/srv/gump/packages/jaf-1.1ea/activation.jar - Buildfile: /srv/gump/public/workspace/tomcat-trunk/build.xml download-validate: proxyflags: setproxy: testexist: [echo] Testing for /srv/gump/public/workspace/checkstyle/target/checkstyle-5.6-SNAPSHOT.jar downloadzip: validate: [mkdir] Created dir: /srv/gump/public/workspace/tomcat-trunk/output/res/checkstyle [checkstyle] Running Checkstyle 5.6-SNAPSHOT on 2202 files [checkstyle] /srv/gump/public/workspace/tomcat-trunk/java/org/apache/catalina/mbeans/mbeans-descriptors.xml:234: Line matches the illegal pattern '\s+$'. BUILD FAILED /srv/gump/public/workspace/tomcat-trunk/build.xml:447: Got 1 errors and 0 warnings. Total time: 27 seconds - To subscribe to this information via syndicated feeds: - RSS: http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-validate/rss.xml - Atom: http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-validate/atom.xml == Gump Tracking Only === Produced by Apache Gump(TM) version 2.3. Gump Run 1104022012, vmgump.apache.org:vmgump:1104022012 Gump E-mail Identifier (unique within run) #21. -- Apache Gump http://gump.apache.org/ [Instance: vmgump] - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org