cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session DeltaSession.java
pero2005/09/14 08:28:14 Modified:modules/cluster/src/share/org/apache/catalina/cluster/session DeltaSession.java Log: fix: attribute and notes sync at DeltaSession,recycle() Revision ChangesPath 1.37 +7 -3 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java Index: DeltaSession.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- DeltaSession.java 14 Sep 2005 12:46:56 - 1.36 +++ DeltaSession.java 14 Sep 2005 15:28:13 - 1.37 @@ -789,7 +789,9 @@ public void recycle() { // Reset the instance variables associated with this Session -attributes.clear(); +synchronized (attributes) { +attributes.clear(); +} setAuthType(null); creationTime = 0L; expiring = false; @@ -797,7 +799,9 @@ lastAccessedTime = 0L; maxInactiveInterval = -1; accessCount = 0; -notes.clear(); +synchronized (notes) { +notes.clear(); +} setPrincipal(null); isNew = false; isValid = false; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml monitoring.xml
pero2005/09/14 08:05:50 Modified:webapps/docs changelog.xml monitoring.xml Log: Add JMX Remote create and unregister ant tasks Revision ChangesPath 1.373 +3 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.372 retrieving revision 1.373 diff -u -r1.372 -r1.373 --- changelog.xml 14 Sep 2005 13:25:22 - 1.372 +++ changelog.xml 14 Sep 2005 15:05:49 - 1.373 @@ -40,6 +40,9 @@ + +Add JMX Remote create and unregister ant tasks (pero) + 36343: Only normalize out backslash on Windows platforms. (billbarker) 1.5 +126 -0jakarta-tomcat-catalina/webapps/docs/monitoring.xml Index: monitoring.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/monitoring.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- monitoring.xml21 Jul 2005 08:49:32 - 1.4 +++ monitoring.xml14 Sep 2005 15:05:49 - 1.5 @@ -762,6 +762,132 @@ + + + + +List of Attributes + + + +Attribute +Description +Default value + + + +name +Full qualified JMX ObjectName -- Catalina:type=MBeanFactory + + + + + +className +Existing MBean full qualified classname (see Tomcat mbean description above) + + + + + +classLoader +ObjectName of server or web application classloader +( Catalina:type=ServerClassLoader,name=[server,common,shared] or + Catalina:type=WebappClassLoader,path=/myapps,host=localhost) + + + + + +ref +JMX Connection reference + +jmx.server + + + +echo +Echo command usage (access and result) + +false + + + + + +Example to create remote mbean + +<jmx:create + ref="${jmx.reference}" + name="Catalina:type=MBeanFactory" + className="org.apache.commons.modeler.BaseModelMBean" + classLoader="Catalina:type=ServerClassLoader,name=server"> + <Arg value="org.apache.catalina.mbeans.MBeanFactory" /> +</jmx:create> + + + +Warning: A lot of tomcat mbeans can't be really create and connect with +the parent. The valve, cluster or realm Mbeans are not autconnect with there parent. +Use MBeanFacrory create operation instead. + + + + + + + + +List of Attributes + + + +Attribute +Description +Default value + + + +name +Full qualified JMX ObjectName -- Catalina:type=MBeanFactory + + + + + +ref +JMX Connection reference + +jmx.server + + + +echo +Echo command usage (access and result) + +false + + + + + +Example to unregister remote mbean + +<jmx:unregister +name="Catalina:type=MBeanFactory" +/> + + + +Warning: A lot of tomcat mbeans can't be really unregister. +The Mbeans are not deregister from parent. Use MBeanFacrory +remove operation instead. + + + + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx JMXAccessorCreateTask.java JMXAccessorUnregisterTask.java JMXAccessorQueryTask.java JMXAccessorSetTask.java JMXAccessorTask.java antlib.xml jmxaccessor.tasks
pero2005/09/14 06:28:29 Modified:catalina/src/share/org/apache/catalina/ant/jmx JMXAccessorQueryTask.java JMXAccessorSetTask.java JMXAccessorTask.java antlib.xml jmxaccessor.tasks Added: catalina/src/share/org/apache/catalina/ant/jmx JMXAccessorCreateTask.java JMXAccessorUnregisterTask.java Log: Add create remote Mbeans and unregister tasks fix some small typos! Revision ChangesPath 1.6 +2 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorQueryTask.java Index: JMXAccessorQueryTask.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorQueryTask.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- JMXAccessorQueryTask.java 27 Jul 2005 15:11:17 - 1.5 +++ JMXAccessorQueryTask.java 14 Sep 2005 13:28:29 - 1.6 @@ -106,7 +106,7 @@ * input stream will be closed upon completion of this task, whether it was * executed successfully or not. * - * @exception BuildException + * @exception Exception *if an error occurs */ public String jmxExecute(MBeanServerConnection jmxServerConnection) 1.5 +2 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorSetTask.java Index: JMXAccessorSetTask.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorSetTask.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- JMXAccessorSetTask.java 27 Jul 2005 15:11:17 - 1.4 +++ JMXAccessorSetTask.java 14 Sep 2005 13:28:29 - 1.5 @@ -152,7 +152,7 @@ * input stream will be closed upon completion of this task, whether it was * executed successfully or not. * - * @exception BuildException + * @exception Exception *if an error occurs */ public String jmxExecute(MBeanServerConnection jmxServerConnection) 1.13 +2 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorTask.java Index: JMXAccessorTask.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorTask.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- JMXAccessorTask.java 27 Jul 2005 15:11:18 - 1.12 +++ JMXAccessorTask.java 14 Sep 2005 13:28:29 - 1.13 @@ -491,7 +491,7 @@ * input stream will be closed upon completion of this task, whether it was * executed successfully or not. * - * @exception BuildException + * @exception Exception *if an error occurs */ public String jmxExecute(MBeanServerConnection jmxServerConnection) 1.3 +6 -0 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/antlib.xml Index: antlib.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/antlib.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- antlib.xml30 Jun 2005 13:01:27 - 1.2 +++ antlib.xml14 Sep 2005 13:28:29 - 1.3 @@ -16,6 +16,12 @@ name="query" classname="org.apache.catalina.ant.jmx.JMXAccessorQueryTask" /> + + 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.ant.jmx; import java.util.ArrayList; import java.util.List; import javax.management.MBeanServerConnection; import javax.management.ObjectName; import org.apache.tools.ant.BuildException; /** * Create new MBean at JMX JSR 160 MBeans Server. * * Create Mbeans * Create Mbeans with parameter * Create remote Mbeans with different classloader * * * Examples: * * create a new Mbean at jmx.server connection * * <jmx:create * ref="jmx.server" * name="Catalina:type=MBeanFactory" *
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
pero2005/09/14 06:25:22 Modified:webapps/docs changelog.xml Log: add: Sync all session attribute access (read and write) at DeltaSession Revision ChangesPath 1.372 +3 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.371 retrieving revision 1.372 diff -u -r1.371 -r1.372 --- changelog.xml 8 Sep 2005 15:41:11 - 1.371 +++ changelog.xml 14 Sep 2005 13:25:22 - 1.372 @@ -90,6 +90,9 @@ +36541: Sync all session attribute access (read and write) at DeltaSession (pero) + + 36518: Classname typos for senders, submitted by Christoph Bachhuber-Haller (remm) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session DeltaSession.java
pero2005/09/14 05:46:56 Modified:modules/cluster/src/share/org/apache/catalina/cluster/session DeltaSession.java Log: Fix mutli threading issue at session write attributes S. Bug: 36541 Revision ChangesPath 1.36 +12 -6 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java Index: DeltaSession.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- DeltaSession.java 26 Jun 2005 21:21:49 - 1.35 +++ DeltaSession.java 14 Sep 2005 12:46:56 - 1.36 @@ -1003,9 +1003,10 @@ .getString("standardSession.getAttributeNames.ise")); synchronized (attributes) { -return (new Enumerator(attributes.keySet(), true)); +// create a copy from orginal attribute keySet, otherwise internal HaspMap datastructure +// can be inconsistence by other threads. +return (new Enumerator(new ArrayList(attributes.keySet()), true)); } - } /** @@ -1253,8 +1254,10 @@ } // Replace or add this attribute -Object unbound = attributes.put(name, value); - +Object unbound = null ; +synchronized (attributes) { +unbound = attributes.put(name, value); +} // Call the valueUnbound() method if necessary if ((unbound != null) && notify && (unbound instanceof HttpSessionBindingListener)) { @@ -1577,7 +1580,10 @@ boolean addDeltaRequest) { // Remove this attribute from our collection -Object value = attributes.remove(name); +Object value = null; +synchronized (attributes) { +value = attributes.remove(name); +} if (value == null) return; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
pero2005/08/22 02:14:58 Modified:webapps/docs changelog.xml Log: doc my cluster and coyote changes Revision ChangesPath 1.361 +10 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.360 retrieving revision 1.361 diff -u -r1.360 -r1.361 --- changelog.xml 19 Aug 2005 08:00:37 - 1.360 +++ changelog.xml 22 Aug 2005 09:14:58 - 1.361 @@ -132,6 +132,9 @@ Disable HTTP compression when sendfile is used for a resource (remm) + +AJP secret attribute report only at trace level. (pero) + @@ -146,6 +149,13 @@ + +Fix NPE when cluster stops (pero) + + +36218: MemoryRealm now support also GenericPrincipal, but +JAASRealm with cluster replication still has a problem, detected by Dirk Dekok (pero) + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session DeltaRequest.java LocalStrings.properties
pero2005/08/17 03:41:50 Modified:modules/cluster/src/share/org/apache/catalina/cluster/session DeltaRequest.java LocalStrings.properties Log: Only support GenericPrincipals for backup nodes Revision ChangesPath 1.15 +18 -4 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaRequest.java Index: DeltaRequest.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaRequest.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- DeltaRequest.java 17 Aug 2005 08:13:12 - 1.14 +++ DeltaRequest.java 17 Aug 2005 10:41:50 - 1.15 @@ -30,8 +30,8 @@ import java.security.Principal; import java.util.LinkedList; -import org.apache.catalina.Realm; import org.apache.catalina.realm.GenericPrincipal; +import org.apache.catalina.util.StringManager; public class DeltaRequest implements Externalizable { @@ -39,6 +39,12 @@ public static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog( DeltaRequest.class ); +/** + * The string manager for this package. + */ +protected static StringManager sm = StringManager +.getManager(Constants.Package); + public static final int TYPE_ATTRIBUTE = 0; public static final int TYPE_PRINCIPAL = 1; public static final int TYPE_ISNEW = 2; @@ -83,14 +89,22 @@ addAction(TYPE_MAXINTERVAL,action,NAME_MAXINTERVAL,new Integer(interval)); } +/** + * convert principal at SerializablePrincipal for backup nodes. + * Only support principals from type [EMAIL PROTECTED] GenericPrincipal GenericPrincipal} + * @param p Session principal + * @see GenericPrincipal + */ public void setPrincipal(Principal p) { int action = (p==null)?ACTION_REMOVE:ACTION_SET; SerializablePrincipal sp = null; if ( p != null ) { -if(p instanceof GenericPrincipal) +if(p instanceof GenericPrincipal) { sp = SerializablePrincipal.createPrincipal((GenericPrincipal)p); -else -log.error("Only principal class GenericPrincipal currently supported use MemoryRealm" ); +if(log.isDebugEnabled()) +log.debug(sm.getString("deltaRequest.showPrincipal", p.getName() , getSessionId())); +} else + log.error(sm.getString("deltaRequest.wrongPrincipalClass",p.getClass().getName())); } addAction(TYPE_PRINCIPAL,action,NAME_PRINCIPAL,sp); } 1.11 +2 -0 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings.properties Index: LocalStrings.properties === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings.properties,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- LocalStrings.properties 1 Jul 2005 16:47:10 - 1.10 +++ LocalStrings.properties 17 Aug 2005 10:41:50 - 1.11 @@ -41,6 +41,8 @@ deltaManager.stopped=Manager [{0}] is stopping deltaManager.unloading.ioe=IOException while saving persisted sessions: {0} deltaManager.waitForSessionState=Manager [{0}], requesting session state from {1}. This operation will timeout if no session state has been received within 60 seconds. +deltaRequest.showPrincipal=Principal [{0}] is set to session {1} +deltaRequest.wrongPrincipalClass=DeltaManager only support GenericPrincipal. Your realm used principal class {0}. deltaSession.notifying=Notifying cluster of expiration primary={0} sessionId [{1}] deltaSession.valueBound.ex=Session bound listener throw an exception deltaSession.valueBinding.ex=Session binding listener throw an exception - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm UserDatabaseRealm.java
pero2005/08/17 03:40:37 Modified:catalina/src/share/org/apache/catalina/realm UserDatabaseRealm.java Log: Create GenericPrincipal instead MemoryUser to eaisier cluster replication handling and compatibilty with all other standard implementation. MemoryUser can be found at userPrincipal. Revision ChangesPath 1.13 +27 -3 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/UserDatabaseRealm.java Index: UserDatabaseRealm.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/UserDatabaseRealm.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- UserDatabaseRealm.java23 Feb 2005 19:27:56 - 1.12 +++ UserDatabaseRealm.java17 Aug 2005 10:40:33 - 1.13 @@ -19,7 +19,9 @@ import java.security.Principal; +import java.util.ArrayList; import java.util.Iterator; +import java.util.List; import javax.naming.Context; @@ -30,6 +32,7 @@ import org.apache.catalina.User; import org.apache.catalina.UserDatabase; import org.apache.catalina.core.StandardServer; +import org.apache.catalina.users.MemoryUser; import org.apache.catalina.util.StringManager; @@ -200,8 +203,29 @@ */ protected Principal getPrincipal(String username) { -return (database.findUser(username)); - +Principal principal = database.findUser(username); +if(principal instanceof GenericPrincipal) +return principal ; + +List roles = new ArrayList(); +if(principal instanceof MemoryUser) { +MemoryUser user = (MemoryUser)principal; +Iterator uroles = user.getRoles(); +while(uroles.hasNext()) { +Role role = (Role)uroles.next(); +roles.add(role.getName()); +} +Iterator groups = user.getGroups(); +while(groups.hasNext()) { +Group group = (Group)groups.next(); +uroles = user.getRoles(); +while(uroles.hasNext()) { +Role role = (Role)uroles.next(); +roles.add(role.getName()); +} +} +} +return new GenericPrincipal(this, username, getPassword(username), roles, principal); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common HandlerRequest.java
pero2005/08/17 01:14:29 Modified:jk/java/org/apache/jk/common HandlerRequest.java Log: Reports request secret only at trace level! Revision ChangesPath 1.49 +2 -2 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java Index: HandlerRequest.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- HandlerRequest.java 16 Jul 2005 20:54:05 - 1.48 +++ HandlerRequest.java 17 Aug 2005 08:14:29 - 1.49 @@ -519,8 +519,8 @@ case AjpConstants.SC_A_SECRET : msg.getBytes(tmpMB); String secret=tmpMB.toString(); -if(log.isInfoEnabled()) -log.info("Secret: " + secret ); +if(log.isTraceEnabled()) +log.trace("Secret: " + secret ); // endpoint note ep.setNote( secretNote, secret ); break; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session DeltaManager.java DeltaRequest.java
pero2005/08/17 01:13:12 Modified:modules/cluster/src/share/org/apache/catalina/cluster/session DeltaManager.java DeltaRequest.java Log: Only replicated GenericPrincipals. Please don't use UserDatabaseRelam for clustered applications... (I hope we can fix it...) Revision ChangesPath 1.52 +8 -7 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java Index: DeltaManager.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- DeltaManager.java 27 Jul 2005 15:11:38 - 1.51 +++ DeltaManager.java 17 Aug 2005 08:13:12 - 1.52 @@ -624,10 +624,12 @@ * @param msg Session message */ protected void send(SessionMessage msg) { -if(isSendClusterDomainOnly()) -cluster.sendClusterDomain(msg); -else -cluster.send(msg); +if(cluster != null) { +if(isSendClusterDomainOnly()) +cluster.sendClusterDomain(msg); +else +cluster.send(msg); +} } /** @@ -1128,7 +1130,6 @@ if (log.isDebugEnabled()) log.debug(sm.getString("deltaManager.stopped", getName())); -getCluster().removeManager(getName(),this); // Validate and update our current component state if (!started) @@ -1154,7 +1155,7 @@ // Require a new random number generator if we are restarted this.random = null; - +getCluster().removeManager(getName(),this); if (initialized) { destroy(); } 1.14 +8 -3 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaRequest.java Index: DeltaRequest.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaRequest.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- DeltaRequest.java 27 Apr 2005 15:45:55 - 1.13 +++ DeltaRequest.java 17 Aug 2005 08:13:12 - 1.14 @@ -26,9 +26,11 @@ * @version 1.0 */ -import java.util.LinkedList; import java.io.Externalizable; import java.security.Principal; +import java.util.LinkedList; + +import org.apache.catalina.Realm; import org.apache.catalina.realm.GenericPrincipal; @@ -80,12 +82,15 @@ int action = ACTION_SET; addAction(TYPE_MAXINTERVAL,action,NAME_MAXINTERVAL,new Integer(interval)); } - + public void setPrincipal(Principal p) { int action = (p==null)?ACTION_REMOVE:ACTION_SET; SerializablePrincipal sp = null; if ( p != null ) { -sp = SerializablePrincipal.createPrincipal((GenericPrincipal)p); +if(p instanceof GenericPrincipal) +sp = SerializablePrincipal.createPrincipal((GenericPrincipal)p); +else +log.error("Only principal class GenericPrincipal currently supported use MemoryRealm" ); } addAction(TYPE_PRINCIPAL,action,NAME_PRINCIPAL,sp); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster to-do.txt
pero2005/08/17 01:10:37 Modified:modules/cluster to-do.txt Log: Add replicated principal problem :-( Revision ChangesPath 1.19 +6 -3 jakarta-tomcat-catalina/modules/cluster/to-do.txt Index: to-do.txt === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/to-do.txt,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- to-do.txt 16 Jul 2005 21:06:34 - 1.18 +++ to-do.txt 17 Aug 2005 08:10:37 - 1.19 @@ -101,10 +101,13 @@ problems - + +- MemoryUser principal from UserDatabaseRealm not handled to replicated + - look inside DeltaRequest.setPrincipal(Principal,boolean) + detected by Dirk de Kok (tomdev 16.8.2005) + - only GenericPrincipal from all other realms are handled well. - We not set SimpleTcpCluster Properties when element exists inside config. - Element must have all properties!! - Note inside docs!! - + Element must have all properties!! - Note inside docs!! - How we can stop the request traffic when restart an application? currently the jk 1.2.10 can only disable the complete loadbalancer, but this detect only the new session request desicion. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx JMXAccessorGetTask.java JMXAccessorInvokeTask.java JMXAccessorQueryTask.java JMXAccessorSetTask.java JMXAccessorTask.java
pero2005/07/22 04:39:08 Modified:catalina/src/share/org/apache/catalina/ant/jmx JMXAccessorGetTask.java JMXAccessorInvokeTask.java JMXAccessorQueryTask.java JMXAccessorSetTask.java JMXAccessorTask.java Log: Make Tasks also usefull outside ant script projects. handle empty project attribute properties can save also as local map. Revision ChangesPath 1.3 +2 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorGetTask.java Index: JMXAccessorGetTask.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorGetTask.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- JMXAccessorGetTask.java 30 Jun 2005 13:01:27 - 1.2 +++ JMXAccessorGetTask.java 22 Jul 2005 11:39:08 - 1.3 @@ -107,7 +107,7 @@ * @exception BuildException *if an error occurs */ -protected String jmxExecute(MBeanServerConnection jmxServerConnection) +public String jmxExecute(MBeanServerConnection jmxServerConnection) throws Exception { if (getName() == null) { 1.3 +2 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorInvokeTask.java Index: JMXAccessorInvokeTask.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorInvokeTask.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- JMXAccessorInvokeTask.java30 Jun 2005 13:01:27 - 1.2 +++ JMXAccessorInvokeTask.java22 Jul 2005 11:39:08 - 1.3 @@ -158,7 +158,7 @@ * @exception BuildException *if an error occurs */ -protected String jmxExecute(MBeanServerConnection jmxServerConnection) +public String jmxExecute(MBeanServerConnection jmxServerConnection) throws Exception { if (getName() == null) { 1.4 +2 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorQueryTask.java Index: JMXAccessorQueryTask.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorQueryTask.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- JMXAccessorQueryTask.java 8 Jul 2005 20:54:40 - 1.3 +++ JMXAccessorQueryTask.java 22 Jul 2005 11:39:08 - 1.4 @@ -109,7 +109,7 @@ * @exception BuildException *if an error occurs */ -protected String jmxExecute(MBeanServerConnection jmxServerConnection) +public String jmxExecute(MBeanServerConnection jmxServerConnection) throws Exception { if (getName() == null) { 1.3 +2 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorSetTask.java Index: JMXAccessorSetTask.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorSetTask.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- JMXAccessorSetTask.java 30 Jun 2005 13:01:27 - 1.2 +++ JMXAccessorSetTask.java 22 Jul 2005 11:39:08 - 1.3 @@ -155,7 +155,7 @@ * @exception BuildException *if an error occurs */ -protected String jmxExecute(MBeanServerConnection jmxServerConnection) +public String jmxExecute(MBeanServerConnection jmxServerConnection) throws Exception { if (getName() == null) { 1.10 +231 -160 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorTask.java Index: JMXAccessorTask.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorTask.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- JMXAccessorTask.java 21 Jul 2005 10:45:45 - 1.9 +++ JMXAccessorTask.java 22 Jul 2005 11:39:08 - 1.10 @@ -14,10 +14,8 @@ * limitations under the License. */ - package org.apache.catalina.ant.jmx; - import java.io.IOException; import java.lang.reflect.Array; import java.net.InetAddress; @@ -27,6 +25,7 @@ import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Properties; import
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx JMXAccessorTask.java
pero2005/07/21 03:45:46 Modified:catalina/src/share/org/apache/catalina/ant/jmx JMXAccessorTask.java Log: remove useless array cast Revision ChangesPath 1.9 +1 -3 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorTask.java Index: JMXAccessorTask.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorTask.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- JMXAccessorTask.java 21 Jul 2005 07:19:12 - 1.8 +++ JMXAccessorTask.java 21 Jul 2005 10:45:45 - 1.9 @@ -553,7 +553,6 @@ protected void echoResult(String name,Object result ) { if(isEcho()) { if (result.getClass().isArray()) { -Object array[] = (Object[]) result; for (int i = 0; i < Array.getLength(result); i++) { handleOutput(name + "." + i + "=" + Array.get(result, i)); } @@ -617,7 +616,6 @@ } } else if (result.getClass().isArray()) { if (isSeparatearrayresults()) { -Object array[] = (Object[]) result; int size = 0 ; for (int i = 0; i < Array.getLength(result); i++) { if(setProperty(propertyPrefix + "." + size , Array.get(result, i))) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs monitoring.xml
pero2005/07/21 01:49:33 Modified:webapps/docs monitoring.xml Log: Add a note for JSR 160 Connector from Sun and local firewall problems!! Revision ChangesPath 1.4 +5 -3 jakarta-tomcat-catalina/webapps/docs/monitoring.xml Index: monitoring.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/monitoring.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- monitoring.xml1 Jul 2005 16:52:19 - 1.3 +++ monitoring.xml21 Jul 2005 08:49:32 - 1.4 @@ -61,6 +61,8 @@ other user! Remove all other users under windows to access this file. +Note:The JSR 160 JMX-Adaptor opens a second data protocol port. That is a problem +when you have installed a local firewall. Activate JMX MX4J Http Adaptor with Java 1.4: @@ -425,12 +427,12 @@ failonerror="false" name="Catalina:type=Cluster,host=${tomcat.application.host}" resultproperty="cluster" -/> +/> <jmx:get name="Catalina:type=IDataSender,host=${tomcat.application.host},senderAddress=${cluster.backup.address},senderPort=${cluster.backup.port}" attribute="connected" resultproperty="datasender.connected" -if="cluster.0.name" /> +if="cluster.0.name" /> @@ -608,7 +610,7 @@ operation="getSessionAttribute" resultproperty="hello"> <arg value="${sessionid.0}"/> - <arg value="Hello"/> + <arg value="Hello" /> </jmx:invoke> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx JMXAccessorTask.java
pero2005/07/21 00:19:12 Modified:catalina/src/share/org/apache/catalina/ant/jmx JMXAccessorTask.java Log: Fix get Array Length Revision ChangesPath 1.8 +3 -3 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorTask.java Index: JMXAccessorTask.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorTask.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- JMXAccessorTask.java 19 Jul 2005 08:38:27 - 1.7 +++ JMXAccessorTask.java 21 Jul 2005 07:19:12 - 1.8 @@ -554,7 +554,7 @@ if(isEcho()) { if (result.getClass().isArray()) { Object array[] = (Object[]) result; -for (int i = 0; i < array.length; i++) { +for (int i = 0; i < Array.getLength(result); i++) { handleOutput(name + "." + i + "=" + Array.get(result, i)); } } else @@ -619,7 +619,7 @@ if (isSeparatearrayresults()) { Object array[] = (Object[]) result; int size = 0 ; -for (int i = 0; i < array.length; i++) { +for (int i = 0; i < Array.getLength(result); i++) { if(setProperty(propertyPrefix + "." + size , Array.get(result, i))) { size++; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx JMXAccessorTask.java
pero2005/07/19 01:38:48 Modified:catalina/src/share/org/apache/catalina/ant/jmx JMXAccessorTask.java Log: Fix use primitiv datatypes as arrays - submitted by Wolfgang Miller-Reichling Revision ChangesPath 1.7 +4 -3 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorTask.java Index: JMXAccessorTask.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorTask.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- JMXAccessorTask.java 16 Jul 2005 21:09:21 - 1.6 +++ JMXAccessorTask.java 19 Jul 2005 08:38:27 - 1.7 @@ -19,6 +19,7 @@ import java.io.IOException; +import java.lang.reflect.Array; import java.net.InetAddress; import java.net.MalformedURLException; import java.net.UnknownHostException; @@ -554,7 +555,7 @@ if (result.getClass().isArray()) { Object array[] = (Object[]) result; for (int i = 0; i < array.length; i++) { -handleOutput(name + "." + i + "=" + array[i]); +handleOutput(name + "." + i + "=" + Array.get(result, i)); } } else handleOutput(name + "=" + result); @@ -619,7 +620,7 @@ Object array[] = (Object[]) result; int size = 0 ; for (int i = 0; i < array.length; i++) { -if(setProperty(propertyPrefix + "." + size , array[i])) { +if(setProperty(propertyPrefix + "." + size , Array.get(result, i))) { size++; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx JMXAccessorTask.java
pero2005/07/16 14:09:21 Modified:catalina/src/share/org/apache/catalina/ant/jmx JMXAccessorTask.java Log: Support JMX OpenTypes as createProperties Revision ChangesPath 1.6 +33 -5 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorTask.java Index: JMXAccessorTask.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorTask.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- JMXAccessorTask.java 8 Jul 2005 20:54:40 - 1.5 +++ JMXAccessorTask.java 16 Jul 2005 21:09:21 - 1.6 @@ -24,6 +24,7 @@ import java.net.UnknownHostException; import java.util.HashMap; import java.util.Iterator; +import java.util.List; import java.util.Map; import java.util.Set; import java.util.StringTokenizer; @@ -31,7 +32,12 @@ import javax.management.MBeanServerConnection; import javax.management.MalformedObjectNameException; import javax.management.ObjectName; +import javax.management.openmbean.CompositeData; import javax.management.openmbean.CompositeDataSupport; +import javax.management.openmbean.CompositeType; +import javax.management.openmbean.OpenType; +import javax.management.openmbean.SimpleType; +import javax.management.openmbean.TabularDataSupport; import javax.management.remote.JMXConnector; import javax.management.remote.JMXConnectorFactory; import javax.management.remote.JMXServiceURL; @@ -105,7 +111,7 @@ /** * Descriptive information describing this implementation. */ -private static final String info = "org.apache.catalina.ant.JMXAccessorTask/1.0"; +private static final String info = "org.apache.catalina.ant.JMXAccessorTask/1.1"; /** * Return descriptive information about this implementation and the @@ -580,12 +586,34 @@ propertyPrefix = ""; if (result instanceof CompositeDataSupport) { CompositeDataSupport data = (CompositeDataSupport) result ; -Set keys = data.getCompositeType().keySet() ; +CompositeType compositeType = data.getCompositeType(); +Set keys = compositeType.keySet() ; for (Iterator iter = keys.iterator(); iter.hasNext();) { String key = (String) iter.next(); Object value = data.get(key); -setProperty(propertyPrefix + "." + key , value); -} +OpenType type = compositeType.getType(key); +if(type instanceof SimpleType ) { +setProperty(propertyPrefix + "." + key , value); +} else { +createProperty(propertyPrefix + "." + key, value ); +} +} +} else if (result instanceof TabularDataSupport) { +TabularDataSupport data = (TabularDataSupport) result ; +for (Iterator iter = data.keySet().iterator(); iter.hasNext();) { +Object key = iter.next(); +for(Iterator iter1 = ((List)key).iterator(); iter1.hasNext();) { +Object key1= iter1.next(); +CompositeData valuedata = data.get(new Object[] { key1 } ); +Object value = valuedata.get("value"); +OpenType type = valuedata.getCompositeType().getType("value"); +if(type instanceof SimpleType ) { +setProperty(propertyPrefix + "." + key1 , value); +} else { +createProperty(propertyPrefix + "." + key1, value ); +} +} +} } else if (result.getClass().isArray()) { if (isSeparatearrayresults()) { Object array[] = (Object[]) result; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster to-do.txt
pero2005/07/16 14:06:34 Modified:modules/cluster to-do.txt Log: Document new todo Close some todo's Revision ChangesPath 1.18 +32 -5 jakarta-tomcat-catalina/modules/cluster/to-do.txt Index: to-do.txt === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/to-do.txt,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- to-do.txt 1 Jul 2005 18:40:25 - 1.17 +++ to-do.txt 16 Jul 2005 21:06:34 - 1.18 @@ -2,8 +2,6 @@ Next actions == -- add mapping sender mapping properties file - - let people eaiser extend sender mode - Add MbeanFactory to generate dynamic cluster at runtime. Problem: How we can start those central services? - StandardEngine support load Mbean from external file. @@ -18,6 +16,25 @@ long queues detect long wait acks Idea: Wrote a ant script with the new jmx tasks! +Optimzied information access: + Create a MBean.attribute that store the complete cluster state + information inside one attribute from type TabularData and CompositeData! + Implement as SimpleTcpCluster operation + Cluster + -- Attributes + -- ClusterMembership + -- Attributes + -- Members + -- Attributes + -- ClusterReceiver + -- Attributes + -- ClusterSender + -- Attributes + -- DataSenders + -- Sender + -- Attributes + -- (optional)Queue Stats + -- Attributes - add cluster setup template (src) - documentation wrote a complete new how-to @@ -85,6 +102,9 @@ problems +- We not set SimpleTcpCluster Properties when element exists inside config. + Element must have all properties!! - Note inside docs!! + - How we can stop the request traffic when restart an application? currently the jk 1.2.10 can only disable the complete loadbalancer, but this detect only the new session request desicion. @@ -180,9 +200,16 @@ - Add single sign on support == -COMPLETED (pero) +COMPLETED == -5.5.10 +5.5.10 (pero) +- add mapping sender mapping properties file (IDataSenderFactory) + - let advanced people eaiser implemented there own sender mode +- We register different application with same name from different host? + SimpleTcpManager register manager with app name + hostname when Cluster is configured as Engine element. +- Configured DeltaManager inside context + - SimpleTcpCluster setProperty and transferproperty reflect changes only to defaultMode managers +- Look inside SimpleTcpCluster.addManager and DeltaManager.start? - Session serialization eat memory but now we can send session messages with blocks... When all sessions serialze after GET_ALL_SESSION is received following works - find all sessions @@ -272,7 +299,7 @@ - Add new SocketReplicationListener - Add Stats to DeltaManager -5.5.9 +5.5.9 (pero) - JMX friendly pero: Add some MBeanSupport to SimpleTCPCluster, ReplicationTransmitter and Senders - Add Keep Alive and WaitForAck at async mode implementation. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster build.xml
pero2005/07/16 14:05:54 Modified:modules/cluster build.xml Log: Made cluster modes configurable! Setup your own DataSender at server classpath DataSenders.properties Revision ChangesPath 1.18 +2 -0 jakarta-tomcat-catalina/modules/cluster/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/build.xml,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- build.xml 9 Jun 2005 20:37:33 - 1.17 +++ build.xml 16 Jul 2005 21:05:54 - 1.18 @@ -89,6 +89,8 @@ tofile="${catalina.build}/classes/org/apache/catalina/cluster/session/LocalStrings.properties"/> +
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp SimpleTcpCluster.java
pero2005/07/16 14:04:37 Modified:modules/cluster/src/share/org/apache/catalina/cluster/tcp SimpleTcpCluster.java Log: Open Cluster APi that Context can have its own Cluster Manager config. Revision ChangesPath 1.71 +56 -12 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java Index: SimpleTcpCluster.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java,v retrieving revision 1.70 retrieving revision 1.71 diff -u -r1.70 -r1.71 --- SimpleTcpCluster.java 8 Jul 2005 20:50:30 - 1.70 +++ SimpleTcpCluster.java 16 Jul 2005 21:04:37 - 1.71 @@ -32,6 +32,9 @@ import javax.management.modelmbean.ModelMBean; import org.apache.catalina.Container; +import org.apache.catalina.Context; +import org.apache.catalina.Engine; +import org.apache.catalina.Host; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; import org.apache.catalina.LifecycleException; @@ -335,11 +338,20 @@ this.membershipService = membershipService; } +/** + * Add cluster valve + * Cluster Valves are only add to container when cluster is started! + * @param new cluster Valve. + */ public void addValve(Valve valve) { if (valve instanceof ClusterValve) valves.add(valve); } +/** + * get all cluster valves + * @return current cluster valves + */ public Valve[] getValves() { return (Valve[]) valves.toArray(new Valve[valves.size()]); } @@ -392,6 +404,10 @@ this.clusterDeployer = clusterDeployer; } +/** + * Get all current cluster members + * @return all members or empty array + */ public Member[] getMembers() { Member[] members = membershipService.getMembers(); if(members != null) { @@ -437,12 +453,17 @@ properties.put(name, value); if(started) { +// FIXME Hmm, is that correct when some DeltaManagers are direct configured inside Context? +// Why we not support it for other elements, like sender, receiver or membership? +// Must we restart element after change? if (name.startsWith("manager")) { String key = name.substring("manager".length() + 1); String pvalue = value.toString(); for (Iterator iter = managers.values().iterator(); iter.hasNext();) { Manager manager = (Manager) iter.next(); -IntrospectionUtils.setProperty(manager, key, pvalue ); +if(manager instanceof DeltaManager && ((ClusterManager) manager).isDefaultMode()) { +IntrospectionUtils.setProperty(manager, key, pvalue ); +} } } } @@ -529,8 +550,10 @@ if(manager != null) { manager.setDistributable(true); if (manager instanceof ClusterManager) { -((ClusterManager) manager).setName(name); -((ClusterManager) manager).setCluster(this); +ClusterManager cmanager = (ClusterManager) manager ; +cmanager.setDefaultMode(true); +cmanager.setName(getManagerName(name,manager)); +cmanager.setCluster(this); } } } @@ -540,15 +563,14 @@ /** * remove an application form cluster replication bus * - * @see org.apache.catalina.cluster.CatalinaCluster#removeManager(java.lang.String) + * @see org.apache.catalina.cluster.CatalinaCluster#removeManager(java.lang.String,Manager) */ -public void removeManager(String name) { -Manager manager = getManager(name); +public void removeManager(String name,Manager manager) { if (manager != null) { // Notify our interested LifecycleListeners lifecycle.fireLifecycleEvent(BEFORE_MANAGERUNREGISTER_EVENT, manager); -managers.remove(name); +managers.remove(getManagerName(name,manager)); if (manager instanceof ClusterManager) ((ClusterManager) manager).setCluster(null); // Notify our interested LifecycleListeners @@ -575,16 +597,37 @@ } // Notify our interested LifecycleListeners lifecycle.fireLifecycleEvent(BEFORE_MANAGERREGISTER_EVENT, manager); +String clusterName = getManagerName(name, manager);
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp DataSenders.properties DataSender.java IDataSender.java IDataSenderFactory.java LocalStrings.properties
pero2005/07/16 14:02:30 Modified:modules/cluster/src/share/org/apache/catalina/cluster/tcp DataSender.java IDataSender.java IDataSenderFactory.java LocalStrings.properties Added: modules/cluster/src/share/org/apache/catalina/cluster/tcp DataSenders.properties Log: Made cluster modes configurable! Setup your own DataSender at server classpath DataSenders.properties Revision ChangesPath 1.15 +17 -2 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java Index: DataSender.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- DataSender.java 8 Jul 2005 20:50:30 - 1.14 +++ DataSender.java 16 Jul 2005 21:02:17 - 1.15 @@ -211,7 +211,7 @@ // - Constructor - + public DataSender(String domain,InetAddress host, int port) { this.address = host; this.port = port; @@ -396,10 +396,25 @@ return dataFailureCounter; } +/** + * @param address The address to set. + */ +public void setAddress(InetAddress address) { +this.address = address; +} + public InetAddress getAddress() { return address; } + +/** + * @param port The port to set. + */ +public void setPort(int port) { +this.port = port; +} + public int getPort() { return port; } 1.11 +3 -1 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/IDataSender.java Index: IDataSender.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/IDataSender.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- IDataSender.java 26 Jun 2005 21:21:50 - 1.10 +++ IDataSender.java 16 Jul 2005 21:02:17 - 1.11 @@ -18,13 +18,15 @@ /** * @author Peter Rossbach - * @version 1.0 + * @version $Revision$ $Date$ * @since 5.5.7 */ public interface IDataSender { +public void setAddress(java.net.InetAddress address); public java.net.InetAddress getAddress(); +public void setPort(int port); public int getPort(); public void connect() throws java.io.IOException; public void disconnect(); 1.6 +150 -25 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/IDataSenderFactory.java Index: IDataSenderFactory.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/IDataSenderFactory.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- IDataSenderFactory.java 9 Jun 2005 20:37:33 - 1.5 +++ IDataSenderFactory.java 16 Jul 2005 21:02:17 - 1.6 @@ -15,46 +15,171 @@ */ package org.apache.catalina.cluster.tcp; -import org.apache.catalina.cluster.Member; + +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.Constructor; import java.net.InetAddress; +import java.util.Iterator; +import java.util.Properties; + +import org.apache.catalina.cluster.Member; +import org.apache.catalina.util.StringManager; /** + * Create DataSender for different modes. DataSender factory load mode list from + * org/apache/catalina/cluster/tcp/DataSenders.properties resource. + * * @author Peter Rossbach - * @version 1.0 + * @version $Revision$ $Date$ * @since 5.5.7 */ public class IDataSenderFactory { + +private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory +.getLog(IDataSenderFactory.class); + +private static final String DATASENDERS_PROPERTIES = "org/apache/catalina/cluster/tcp/DataSenders.properties"; +public static final String SYNC_MODE = "synchronous"; +public static final String ASYNC_MODE = "asynchronous"; +public static final String POOLED_SYNC_MODE = "pooled"; +public static final String FAST_ASYNC_QUEUE_MODE = "fastasyncqueue"; + +/** + * The string manager for this package. + */ +protected static StringManager sm = StringManager +.getManager(Constants.Package); + +// ---
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session DeltaManager.java SimpleTcpReplicationManager.java
pero2005/07/16 14:00:12 Modified:modules/cluster/src/share/org/apache/catalina/cluster CatalinaCluster.java ClusterManager.java modules/cluster/src/share/org/apache/catalina/cluster/session DeltaManager.java SimpleTcpReplicationManager.java Log: Open Cluster APi that Context can have its own Cluster Manager config. Revision ChangesPath 1.13 +3 -4 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/CatalinaCluster.java Index: CatalinaCluster.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/CatalinaCluster.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- CatalinaCluster.java 9 Jun 2005 20:37:33 - 1.12 +++ CatalinaCluster.java 16 Jul 2005 21:00:12 - 1.13 @@ -19,11 +19,10 @@ import java.util.Map; import org.apache.catalina.Cluster; -import org.apache.catalina.cluster.io.ListenCallback; import org.apache.catalina.LifecycleException; +import org.apache.catalina.Manager; import org.apache.catalina.Valve; import org.apache.commons.logging.Log; -import org.apache.catalina.Manager; /** * A CatalinaCluster interface allows to plug in and out the @@ -124,7 +123,7 @@ */ public Map getManagers(); public Manager getManager(String name); -public void removeManager(String name); +public void removeManager(String name,Manager manager); public void addManager(String name,Manager manager); public Valve[] getValves(); 1.10 +27 -2 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/ClusterManager.java Index: ClusterManager.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/ClusterManager.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- ClusterManager.java 9 Jun 2005 20:37:33 - 1.9 +++ ClusterManager.java 16 Jul 2005 21:00:12 - 1.10 @@ -59,17 +59,42 @@ public String[] getInvalidatedSessions(); /** -* Return the name of the manager, typically the context name such as /replicator +* Return the name of the manager, at host /context name and at engine hostname+/context * @return String +* @since 5.5.10 */ public String getName(); + /** +* Set the name of the manager, at host /context name and at engine hostname+/context +* @param name +* @since 5.5.10 +*/ public void setName(String name); public CatalinaCluster getCluster(); public void setCluster(CatalinaCluster cluster); + + /** +* @return Manager send only to same cluster domain +* @since 5.5.10 +*/ public boolean isSendClusterDomainOnly() ; + /** +* @param boolean +* @since 5.5.10 +*/ public void setSendClusterDomainOnly(boolean sendClusterDomainOnly) ; - + /** +* @param mode +* @since 5.5.10 +*/ + public void setDefaultMode(boolean mode) ; + /** +* @param overwrite properties from SimpleTcpCluster +* @since 5.5.10 +*/ + public boolean isDefaultMode() ; + } \ No newline at end of file 1.50 +18 -2 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java Index: DeltaManager.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- DeltaManager.java 1 Jul 2005 16:47:10 - 1.49 +++ DeltaManager.java 16 Jul 2005 21:00:12 - 1.50 @@ -100,6 +100,8 @@ protected String name = null; +protected boolean defaultMode = false; + private CatalinaCluster cluster = null; /** @@ -497,6 +499,20 @@ this.notifyListenersOnReplication = notifyListenersOnReplication; } + +/** + * @return Returns the defaultMode. + */ +public boolean isDefaultMode() { +return defaultMode; +} +/** + * @param defaultMode The defaultMode to set. + */ +public void setDefaultMode(boolean defaultMode) { +this.defaultMode = defaultMode; +} + public CatalinaCluster getCluster() { return cluster; } @@ -1112,7 +1128,7 @@ if (log.isDebugEnabled()) log.debug(sm.getString
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx JMXAccessorQueryTask.java JMXAccessorTask.java
pero2005/07/08 13:54:40 Modified:catalina/src/share/org/apache/catalina/ant/jmx JMXAccessorQueryTask.java JMXAccessorTask.java Log: more support for MXBean data better property binding support Revision ChangesPath 1.3 +54 -60 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorQueryTask.java Index: JMXAccessorQueryTask.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorQueryTask.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- JMXAccessorQueryTask.java 30 Jun 2005 13:01:27 - 1.2 +++ JMXAccessorQueryTask.java 8 Jul 2005 20:54:40 - 1.3 @@ -135,31 +135,29 @@ String resultproperty = getResultproperty(); try { names = jmxServerConnection.queryNames(new ObjectName(qry), null); -if (resultproperty != null) -getProject().setNewProperty(resultproperty + ".length", -Integer.toString(names.size())); +if (resultproperty != null) { +setProperty(resultproperty + ".Length",Integer.toString(names.size())); +} } catch (Exception e) { if (isEcho()) handleErrorOutput(e.getMessage()); return "Can't query mbeans " + qry; } -Iterator it = names.iterator(); -int oindex = 0; -String pname = null; -while (it.hasNext()) { -ObjectName oname = (ObjectName) it.next(); -pname = resultproperty + "." + Integer.toString(oindex) + "."; -oindex++; -if (isEcho()) -handleOutput(pname + "name=" + oname.toString()); -if (resultproperty != null) { -getProject().setNewProperty(pname + "name", -oname.toString()); -} -if (isAttributebinding()) { -bindAttributes(jmxServerConnection, resultproperty, pname, oname); -} +if (resultproperty != null) { +Iterator it = names.iterator(); +int oindex = 0; +String pname = null; +while (it.hasNext()) { +ObjectName oname = (ObjectName) it.next(); +pname = resultproperty + "." + Integer.toString(oindex) + "."; +oindex++; +setProperty(pname + "Name", oname.toString()); +if (isAttributebinding()) { +bindAttributes(jmxServerConnection, resultproperty, pname, oname); + +} +} } return isError; } @@ -171,50 +169,46 @@ * @param oname */ protected void bindAttributes(MBeanServerConnection jmxServerConnection, String resultproperty, String pname, ObjectName oname) { -try { -MBeanInfo minfo = jmxServerConnection.getMBeanInfo(oname); -String code = minfo.getClassName(); -if ("org.apache.commons.modeler.BaseModelMBean" -.equals(code)) { -code = (String) jmxServerConnection.getAttribute(oname, -"modelerType"); -} -MBeanAttributeInfo attrs[] = minfo.getAttributes(); -Object value = null; - -for (int i = 0; i < attrs.length; i++) { -if (!attrs[i].isReadable()) -continue; -String attName = attrs[i].getName(); -if (attName.indexOf("=") >= 0 -|| attName.indexOf(":") >= 0 -|| attName.indexOf(" ") >= 0) { -continue; +if (jmxServerConnection != null && resultproperty != null +&& pname != null && oname != null ) { +try { +MBeanInfo minfo = jmxServerConnection.getMBeanInfo(oname); +String code = minfo.getClassName(); +if ("org.apache.commons.modeler.BaseModelMBean".equals(code)) { +code = (String) jmxServerConnection.getAttribute(oname, +"modelerType"); } +MBeanAttributeInfo attrs[] = minfo.getAttributes(); +Object value = null; -try { -value = jmxServerConnection.getAttribute(oname, -attName); -
cvs commit: jakarta-tomcat-catalina/webapps/docs cluster-howto.xml
pero2005/07/08 13:52:50 Modified:webapps/docs cluster-howto.xml Log: document new resend flag small other changes Revision ChangesPath 1.11 +43 -18jakarta-tomcat-catalina/webapps/docs/cluster-howto.xml Index: cluster-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/cluster-howto.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- cluster-howto.xml 1 Jul 2005 18:35:03 - 1.10 +++ cluster-howto.xml 8 Jul 2005 20:52:50 - 1.11 @@ -342,8 +342,7 @@ resourceName="UserDatabase" /> <Host name="localhost" appBase="webapps"> - <Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster" -defaultMode="true" /> + <Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"/> </Host> </Engine> </Service> @@ -353,7 +352,8 @@ The default mode configuration setup a fastasyncmode cluster configuration with following parameters: -Open Membership receiver at 228.0.0.4 and send to multicast udp port 8012. +Open Membership receiver at 228.0.0.4 and send to multicast udp port 8012 +Send membership every 1 sec and drop member after 30sec. Open message receiver at default ip interface at first free port between 8015 and 8019. Receiver message with SocketReplicationListener Configure a ReplicationTransmitter with fastasyncmode sender mode. @@ -372,8 +372,7 @@ <Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster" service.mcastBindAddress="127.0.0.1" receiver.tcpListenPort="9070" - receiver.tcpListenMaxPort="9075" - defaultMode="true" /> + receiver.tcpListenMaxPort="9075" /> WARNING: When you add you sub elements, there overwrite the defaults complete. @@ -383,8 +382,7 @@ <Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster" service.mcastBindAddress="127.0.0.1" receiver.tcpListenPort="9070" - receiver.tcpListenMaxPort="9075" - defaultMode="true" > + receiver.tcpListenMaxPort="9075" > <ClusterListener className="org.apache.catalina.cluster.session.ClusterSessionListener" /> <ClusterListener className="org.apache.catalina.cluster.session.JvmRouteSessionIDBinderListener" /> <Valve className="org.apache.catalina.cluster.tcp.ReplicationValve" @@ -423,8 +421,7 @@ jvmRoute="node1"> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase" /> -<Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster" -defaultMode="true" /> +<Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"/> <Host name="localhost" appBase="webapps"/> </Engine> @@ -474,7 +471,7 @@ manager.expireSessionsOnShutdown="false" manager.notifyListenersOnReplication="false" manager.notifySessionListenersOnReplication="false" - manager.sendAllSessions="false" +manager.sendAllSessions="false" manager.sendAllSessionsSize="500" manager.sendAllSessionsWaitTime="20"> <Membership @@ -483,8 +480,8 @@ mcastBindAddress="127.0.0.1" mcastClusterDomain="d10" mcastPort="45564" - mcastFrequency="500" - mcastDropTime="3000"/> + mcastFrequency="1000" + mcastDropTime="3"/> <Receiver className="org.apache.catalina.cluster.tcp.ReplicationListener"
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp ClusterReceiverBase.java DataSender.java LocalStrings.properties PooledSocketSender.java ReplicationListener.java ReplicationTransmitter.java SendMessageData.java SimpleTcpCluster.java SocketReplicationListener.java SocketReplicationThread.java TcpReplicationThread.java mbeans-descriptors.xml
pero2005/07/08 13:51:48 Modified:modules/cluster/src/share/org/apache/catalina/cluster/io ListenCallback.java SocketObjectReader.java modules/cluster/src/share/org/apache/catalina/cluster/tcp ClusterReceiverBase.java DataSender.java LocalStrings.properties PooledSocketSender.java ReplicationListener.java ReplicationTransmitter.java SendMessageData.java SimpleTcpCluster.java SocketReplicationListener.java SocketReplicationThread.java TcpReplicationThread.java mbeans-descriptors.xml Log: send ack before message is handled default is now that no wait ack is default. Revision ChangesPath 1.4 +11 -4 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io/ListenCallback.java Index: ListenCallback.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io/ListenCallback.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ListenCallback.java 26 Jun 2005 21:21:49 - 1.3 +++ ListenCallback.java 8 Jul 2005 20:50:30 - 1.4 @@ -26,8 +26,6 @@ * @author Peter Rossbach * @version $Revision$, $Date$ */ - - public interface ListenCallback { /** @@ -35,6 +33,15 @@ * been received from one of the cluster nodes. * @param data - the message bytes received from the cluster/replication system */ - // public void messageDataReceived(byte[] data); public void messageDataReceived(ClusterData data); + +/** receiver must be send ack + */ + public boolean isSendAck() ; + + /** send ack + * + */ + public void sendAck() throws java.io.IOException ; + } \ No newline at end of file 1.4 +3 -1 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io/SocketObjectReader.java Index: SocketObjectReader.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io/SocketObjectReader.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- SocketObjectReader.java 26 Jun 2005 21:21:49 - 1.3 +++ SocketObjectReader.java 8 Jul 2005 20:50:30 - 1.4 @@ -74,6 +74,8 @@ int pkgCnt = 0; while ( pkgExists ) { ClusterData cdata = buffer.extractPackage(true); +if(callback.isSendAck()) +callback.sendAck() ; callback.messageDataReceived(cdata); pkgCnt++; pkgExists = buffer.doesPackageExist(); 1.9 +9 -1 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java Index: ClusterReceiverBase.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ClusterReceiverBase.java 1 Jul 2005 18:35:54 - 1.8 +++ ClusterReceiverBase.java 8 Jul 2005 20:50:30 - 1.9 @@ -505,4 +505,12 @@ } } } + +/* (non-Javadoc) + * @see org.apache.catalina.cluster.io.ListenCallback#sendAck() + */ +public void sendAck() throws IOException { +// do nothing +} + } 1.14 +36 -3 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java Index: DataSender.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- DataSender.java 26 Jun 2005 21:21:50 - 1.13 +++ DataSender.java 8 Jul 2005 20:50:30 - 1.14 @@ -120,6 +120,11 @@ protected long dataResendCounter = 0; /** + * number of data failure sends + */ +protected long dataFailureCounter = 0; + +/** * doProcessingStats */ protected boolean doProcessingStats = false; @@ -182,7 +187,7 @@ /** * wait for receiver Ack */ -private boolean waitForAck = true; +private boolean waitForAck = false; /** * number of socket close @@ -199,6 +204,12 @@ */ private
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx JMXAccessorCondition.java JMXAccessorTask.java
pero2005/07/01 11:54:14 Modified:catalina/src/share/org/apache/catalina/ant/jmx JMXAccessorCondition.java JMXAccessorTask.java Log: Fix doc Revision ChangesPath 1.3 +3 -3 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorCondition.java Index: JMXAccessorCondition.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorCondition.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- JMXAccessorCondition.java 1 Jul 2005 11:46:51 - 1.2 +++ JMXAccessorCondition.java 1 Jul 2005 18:54:13 - 1.3 @@ -249,7 +249,7 @@ return ifCondition; } /** - * Only fail if a property of the given name exists in the current project. + * Only execute if a property of the given name exists in the current project. * @param c property name */ public void setIf(String c) { @@ -263,7 +263,7 @@ } /** - * Only fail if a property of the given name does not + * Only execute if a property of the given name does not * exist in the current project. * @param c property name */ 1.4 +3 -3 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorTask.java Index: JMXAccessorTask.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorTask.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- JMXAccessorTask.java 1 Jul 2005 11:46:51 - 1.3 +++ JMXAccessorTask.java 1 Jul 2005 18:54:13 - 1.4 @@ -273,7 +273,7 @@ return ifCondition; } /** - * Only fail if a property of the given name exists in the current project. + * Only execute if a property of the given name exists in the current project. * @param c property name */ public void setIf(String c) { @@ -287,7 +287,7 @@ } /** - * Only fail if a property of the given name does not + * Only execute if a property of the given name does not * exist in the current project. * @param c property name */ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster to-do.txt
pero2005/07/01 11:40:25 Modified:modules/cluster to-do.txt Log: More todo... Revision ChangesPath 1.17 +4 -0 jakarta-tomcat-catalina/modules/cluster/to-do.txt Index: to-do.txt === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/to-do.txt,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- to-do.txt 26 Jun 2005 21:21:50 - 1.16 +++ to-do.txt 1 Jul 2005 18:40:25 - 1.17 @@ -4,6 +4,9 @@ - add mapping sender mapping properties file - let people eaiser extend sender mode +- Add MbeanFactory to generate dynamic cluster at runtime. +Problem: How we can start those central services? +- StandardEngine support load Mbean from external file. - when a lot of messages expire it comes to burst of messages - all 60 Sec when ManagerBase#processExpires is called a lot of messages are send! - Better is to transfer a spezial epxire message with an array of expired session messages. @@ -14,6 +17,7 @@ different active sessions long queues detect long wait acks +Idea: Wrote a ant script with the new jmx tasks! - add cluster setup template (src) - documentation wrote a complete new how-to - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp ClusterReceiverBase.java LocalStrings.properties SocketReplicationListener.java mbeans-descriptors.xml
pero2005/07/01 11:35:54 Modified:modules/cluster/src/share/org/apache/catalina/cluster/tcp ClusterReceiverBase.java LocalStrings.properties SocketReplicationListener.java mbeans-descriptors.xml Log: Fix timeout handling! Revision ChangesPath 1.8 +2 -2 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java Index: ClusterReceiverBase.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ClusterReceiverBase.java 1 Jul 2005 14:26:02 - 1.7 +++ ClusterReceiverBase.java 1 Jul 2005 18:35:54 - 1.8 @@ -303,7 +303,7 @@ Thread t = new Thread(this, "ClusterReceiver"); t.setDaemon(true); t.start(); - } catch (Exception x) { +} catch (Exception x) { log.fatal("Unable to start cluster receiver", x); } registerReceiverMBean(); 1.13 +1 -1 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties Index: LocalStrings.properties === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- LocalStrings.properties 1 Jul 2005 14:26:02 - 1.12 +++ LocalStrings.properties 1 Jul 2005 18:35:54 - 1.13 @@ -55,5 +55,5 @@ SocketReplictionListener.openclose.failure=ServerSocket [{0}:{1}] - Exception to open or close server socket SocketReplictionListener.portbusy=Port busy at [{0}:{i}] - reason [{2}] SocketReplictionListener.serverSocket.notExists=Fatal error: Receiver socket not bound address={0} port={1} maxport={2} -SocketReplictionListener.timeout=Receiver ServerSocket no started [{0}:{1}] - timeout +SocketReplictionListener.timeout=Receiver ServerSocket no started [{0}:{1}] - reason: timeout={2} or listen={3} SocketReplictionListener.unlockSocket.failure=UnLocksocket failure at ServerSocket [{0:{1}] 1.5 +5 -4 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SocketReplicationListener.java Index: SocketReplicationListener.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SocketReplicationListener.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- SocketReplicationListener.java1 Jul 2005 14:26:02 - 1.4 +++ SocketReplicationListener.java1 Jul 2005 18:35:54 - 1.5 @@ -111,7 +111,7 @@ super.start(); long reqStart = System.currentTimeMillis(); long reqNow = 0 ; -boolean isTimeout = true ; +boolean isTimeout = false ; do { try { Thread.sleep(50); @@ -119,10 +119,11 @@ } reqNow = System.currentTimeMillis(); isTimeout = ((reqNow - reqStart) > (1000 * getTcpListenTimeout())); -} while (doListen && (!isTimeout)); +} while (!doListen && (!isTimeout)); if (isTimeout || (!doListen)) { log.error(sm.getString("SocketReplictionListener.timeout", - getTcpListenAddress(),Integer.toString(getTcpListenPort(; + getTcpListenAddress(),Integer.toString(getTcpListenPort()), +Long.toString(reqNow - reqStart), Boolean.toString(doListen))); } } 1.14 +3 -0 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/mbeans-descriptors.xml Index: mbeans-descriptors.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/mbeans-descriptors.xml,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- mbeans-descriptors.xml1 Jul 2005 16:51:14 - 1.13 +++ mbeans-descriptors.xml1 Jul 2005 18:35:54 - 1.14 @@ -197,6 +197,9 @@ +
cvs commit: jakarta-tomcat-catalina/webapps/docs cluster-howto.xml
pero2005/07/01 11:35:03 Modified:webapps/docs cluster-howto.xml Log: Update docs at engine cluster mode Revision ChangesPath 1.10 +123 -30 jakarta-tomcat-catalina/webapps/docs/cluster-howto.xml Index: cluster-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/cluster-howto.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- cluster-howto.xml 26 Jun 2005 21:23:36 - 1.9 +++ cluster-howto.xml 1 Jul 2005 18:35:03 - 1.10 @@ -218,6 +218,8 @@ Service | Engine + | \ + | --- Cluster --* | Host | @@ -229,27 +231,47 @@ | \ | -- DeltaManager | - --- - || | \ - Sender Receiver Membership \ - -- Valve - | \ - | -- ReplicationValve - | -- JvmRouteBinderValve - | - -- LifecycleListener - | - -- ClusterListener - | \ - | -- ClusterSessionListener - | -- JvmRouteSessionIDBinderListener - | - -- Deployer -\ - -- FarmWarDeployer + - + | | | \ + ReceiverSender Membership \ + \ -- Valve + -- SocketReplicationListener| \ + -- ReplicationListener | -- ReplicationValve + | -- JvmRouteBinderValve + | + -- LifecycleListener + | + -- ClusterListener + | \ + | -- ClusterSessionListener + | -- JvmRouteSessionIDBinderListener + | + -- Deployer +\ + -- FarmWarDeployer + + Sender +\ +-- ReplicationTransmitter + | + - + \ + IDataSender + \ + | + --- (sync) + | \ + | -- PooledSocketSender (pooled) + | -- SockerSender (synchronous) + | + --- (async) + \ + -- AsyncSocketSender (synchronous) + -- FastAsyncSocketSender (fastasyncqueue) + @@ -375,6 +397,45 @@ + + +Simple one line engine configuration + + <Server port="8011" + shutdown="SHUTDOWN" > +<GlobalNamingResources> +<Resource name="UserDatabase" auth="Container" + type="org.apache.catalina.UserDatabase" +description="User database that can be updated and saved" + factory="org.apache.catalina.users.MemoryUserDatabaseFactory" +pathname="conf/tomcat-users.xml" /> + </GlobalNamingResources> +<Service name="Catalina"> +<Connectorport="9012" + protocol="AJP/1.3" +<Connector port="9013" + maxThreads="10" +minSpareThreads="4" +maxSpareThreads="4" +/> +<Enginename="Catalina" + defaultHost="localhost" +jvmRoute="node1"> +<Realm className="org.apache.catalina.realm.UserDatabaseRealm" + resourceName=&q
cvs commit: jakarta-tomcat-catalina/webapps/docs monitoring.xml
pero2005/07/01 09:52:19 Modified:webapps/docs monitoring.xml Log: Add docs for JmxAccessorCondition class update docs Revision ChangesPath 1.3 +203 -7jakarta-tomcat-catalina/webapps/docs/monitoring.xml Index: monitoring.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/monitoring.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- monitoring.xml24 Jun 2005 11:55:02 - 1.2 +++ monitoring.xml1 Jul 2005 16:52:19 - 1.3 @@ -41,9 +41,9 @@ When you think authorisation is a good, add and change this : --Dcom.sun.management.jmxremote.authenticate=true --Dcom.sun.management.jmxremote.password.file=..\conf\jmxremote.password --Dcom.sun.management.jmxremote.access.file=..\conf\jmxremote.access +-Dcom.sun.management.jmxremote.authenticate=true \ +-Dcom.sun.management.jmxremote.password.file=../conf/jmxremote.password \ +-Dcom.sun.management.jmxremote.access.file=../conf/jmxremote.access \ edit the access allow file $CATALINA_BASE/conf/jmxremote.access : @@ -80,6 +80,8 @@ Tipp: With ${AJP.PORT}=0 no ajp connection where started. + Note: MX4J JSR 160 RMI Adaptor to support JDK 1.4 currently not integrated. + Start your tomcat and look with a browser at http://${JMX.HOST}:${JMX.PORT} With the mx connector parameter mx.authMode="basic" mx.authUser="tomcat" mx.authPassword="strange" @@ -194,9 +196,9 @@ import: Import the JMX Accessor Projekt with - <import file="${CATALINA.HOME}/bin/jxmaccessor.xml" /> and + <import file="${CATALINA.HOME}/bin/jmxaccessor-tasks.xml" /> and reference the tasks with jmxOpen, jmxSet, jmxGet, -jmxQuery, jmxInvoke and jmxEquals. +jmxQuery, jmxInvoke,jmxEquals and jmxCondition. @@ -264,10 +266,24 @@ false + +if +Only execute if a property of the given name exists in the current project. + + + + + +unless +Only execute if a property of the given name not exists in the current project. + + + + -Example of open a new jmx connection +Example to open a new jmx connection <jmx:open host="${jmx.server.name}" @@ -276,7 +292,7 @@ -Example of open a jmx connection from url, with authorisation and +Example to open a jmx connection from url, with authorisation and store at other reference <jmx:open @@ -287,6 +303,26 @@ /> + + +Example to open a jmx connection from url, with authorisation and +store at other reference, but only when property jmx.if exists and +jmx.unless not exists + +<jmx:open +url="service:jmx:rmi:///jndi/rmi://localhost:9024/jmxrmi"; +ref="jmx.server.9024" +username="controlRole" +password="tomcat" +if="jmx.if" +unless="jmx.unless" +/> + + +Note: All properties from jmxOpen task also exists at all +other tasks and conditions. + + + + + +List of Attributes + + + +Attribute +Description +Default value + + + +url +Set jmx connection url - service:jmx:rmi:///jndi/rmi://localhost:8050/jmxrmi + + + + + +host +Set the host, shortcut the very long url syntax. + +localhost + + + +port +Set the remote connection port + +8050 + + + +username +remote jmx connection user name. + + + + + +password +remote jmx connection password. + + + + + +ref +Name of the internal connection reference. With this attribute you can +configure more the one connection inside the same ant projekt. + +jmx.server + + + +name +Full qualified JMX ObjectName -- Catalina:type=Server + + + + + +echo +Echo condition usage (access and result) + +false + + + +if +Only execute if a property of the given name exists in the current project. + + + + + +unless +Only execute if a property of the given name not exists in the current project. + + + + + +value (requiered) +Second arg for operation + + + + + +type +Value type to express operation (support long and double) + +long + + + +
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp SimpleTcpCluster.java mbeans-descriptors.xml
pero2005/07/01 09:51:14 Modified:modules/cluster/src/share/org/apache/catalina/cluster/tcp SimpleTcpCluster.java mbeans-descriptors.xml Log: Fix that some elements receiver, sender, membership are empty Add sendClusterDomain as jmx operation add docs Revision ChangesPath 1.69 +76 -59 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java Index: SimpleTcpCluster.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java,v retrieving revision 1.68 retrieving revision 1.69 diff -u -r1.68 -r1.69 --- SimpleTcpCluster.java 30 Jun 2005 13:03:34 - 1.68 +++ SimpleTcpCluster.java 1 Jul 2005 16:51:14 - 1.69 @@ -68,8 +68,7 @@ * receiver/sender. * * FIXME remove install/remove/start/stop context dummys - * - * FIXME wrote testcases FIXME Propertychange support + * FIXME wrote testcases * * @author Filip Hanik * @author Remy Maucherat @@ -678,7 +677,6 @@ getClusterLog(); // Notify our interested LifecycleListeners lifecycle.fireLifecycleEvent(BEFORE_START_EVENT, this); - try { if(isDefaultMode() && valves.size() == 0) { createDefaultClusterValves() ; @@ -698,36 +696,39 @@ createDefaultClusterSender(); } // start the receiver. -clusterReceiver.setSendAck(clusterSender.isWaitForAck()); -clusterReceiver.setCompress(clusterSender.isCompress()); -clusterReceiver.setCatalinaCluster(this); -clusterReceiver.start(); +if(clusterReceiver != null) { +clusterReceiver.setSendAck(clusterSender.isWaitForAck()); +clusterReceiver.setCompress(clusterSender.isCompress()); +clusterReceiver.setCatalinaCluster(this); +clusterReceiver.start(); +} else // start the sender. -clusterSender.setCatalinaCluster(this); -clusterSender.start(); +if(clusterSender != null && clusterReceiver != null) { +clusterSender.setCatalinaCluster(this); +clusterSender.start(); +} // start the membership service. if(isDefaultMode() && membershipService == null) { createDefaultMembershipService(); } -membershipService.setLocalMemberProperties(clusterReceiver -.getHost(), clusterReceiver.getPort()); -membershipService.addMembershipListener(this); -membershipService.setCatalinaCluster(this); -membershipService.start(); -// start the deployer. -try { -if (clusterDeployer != null) { -clusterDeployer.setCluster(this); -clusterDeployer.start(); +if(membershipService != null && clusterReceiver != null) { +membershipService.setLocalMemberProperties(clusterReceiver +.getHost(), clusterReceiver.getPort()); +membershipService.addMembershipListener(this); +membershipService.setCatalinaCluster(this); +membershipService.start(); +// start the deployer. +try { +if (clusterDeployer != null) { +clusterDeployer.setCluster(this); +clusterDeployer.start(); +} +} catch (Throwable x) { +log.fatal("Unable to retrieve the container deployer. Cluster deployment disabled.",x); } -} catch (Throwable x) { -log -.fatal( -"Unable to retrieve the container deployer. Cluster deployment disabled.", -x); } this.started = true; // Notify our interested LifecycleListeners @@ -739,13 +740,15 @@ } /** - * + * Create default membership service: + * * <Membership * className="org.apache.catalina.cluster.mcast.McastService" * mcastAddr="228.0.0.4" * mcastPort="8012" * mcastFrequency="500" * mcastDropTime="3000"/> + * */ protected void createDefaultMembershipService() { i
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session DeltaManager.java LocalStrings.properties
pero2005/07/01 09:47:11 Modified:modules/cluster/src/share/org/apache/catalina/cluster/session DeltaManager.java LocalStrings.properties Log: Fix docs at register message to container host or engine Revision ChangesPath 1.49 +13 -2 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java Index: DeltaManager.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- DeltaManager.java 26 Jun 2005 21:21:49 - 1.48 +++ DeltaManager.java 1 Jul 2005 16:47:10 - 1.49 @@ -919,7 +919,7 @@ if(engine != null && engine instanceof Engine) { cluster = engine.getCluster(); if(cluster != null && cluster instanceof CatalinaCluster) { - setCluster((CatalinaCluster) cluster) ; + setCluster((CatalinaCluster) cluster) ; } } else { cluster = null ; @@ -931,6 +931,17 @@ if (cluster == null) { log.error(sm.getString("deltaManager.noCluster", getName())); return; +} else { +if (log.isInfoEnabled()) { +String type = "unknown" ; +if( cluster.getContainer() instanceof Host){ +type = "Host" ; +} else if( cluster.getContainer() instanceof Engine){ +type = "Engine" ; +} +log.info(sm +.getString("deltaManager.registerCluster", getName(), type, cluster.getClusterName())); +} } if (log.isInfoEnabled()) log.info(sm 1.10 +1 -0 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings.properties Index: LocalStrings.properties === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings.properties,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- LocalStrings.properties 26 Jun 2005 21:21:49 - 1.9 +++ LocalStrings.properties 1 Jul 2005 16:47:10 - 1.10 @@ -34,6 +34,7 @@ deltaManager.receiveMessage.allSessionDataAfter=Manager [{0}]: session state deserialized deltaManager.receiveMessage.allSessionDataBegin=Manager [{0}]: received session state data deltaManager.receiveMessage.fromWrongDomain=Manager [{0}]: Received wrong SessionMessage of type=({1}) from [{2}] with domain [{3}] (localdomain [{4}] +deltaManager.registerCluster=Register manager {0} to cluster element {1} with name {2} deltaManager.sessionReceived=Manager [{0}]; session state send at {1} received in {2} ms. deltaManager.sessionTimeout=Invalid session timeout setting {0} deltaManager.startClustering=Starting clustering manager at {0} - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp ClusterReceiverBase.java LocalStrings.properties SocketReplicationListener.java
pero2005/07/01 07:26:02 Modified:modules/cluster/src/share/org/apache/catalina/cluster/tcp ClusterReceiverBase.java LocalStrings.properties SocketReplicationListener.java Log: Fix wait that Recevier Port is bind Add i18n message support Revision ChangesPath 1.7 +2 -2 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java Index: ClusterReceiverBase.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ClusterReceiverBase.java 30 Jun 2005 13:03:34 - 1.6 +++ ClusterReceiverBase.java 1 Jul 2005 14:26:02 - 1.7 @@ -303,7 +303,7 @@ Thread t = new Thread(this, "ClusterReceiver"); t.setDaemon(true); t.start(); -} catch (Exception x) { + } catch (Exception x) { log.fatal("Unable to start cluster receiver", x); } registerReceiverMBean(); 1.12 +8 -0 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties Index: LocalStrings.properties === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- LocalStrings.properties 26 Jun 2005 21:21:50 - 1.11 +++ LocalStrings.properties 1 Jul 2005 14:26:02 - 1.12 @@ -49,3 +49,11 @@ SimpleTcpCluster.log.receive=RECEIVE {0,date}:{0,time} {1,number} {2}:{3,number,integer} {4} {5} SimpleTcpCluster.log.send=SEND {0,date}:{0,time} {1,number} {2}:{3,number,integer} {4} SimpleTcpCluster.log.send.all=SEND {0,date}:{0,time} {1,number} - {2} +SocketReplictionListener.allreadyExists=ServerSocket [{0}:{1}] allready started! +SocketReplictionListener.accept.failure=ServerSocket [{0}:{1}] - Exception to start thread or accept server socket +SocketReplictionListener.open=Open Socket at [{0}:{1}] +SocketReplictionListener.openclose.failure=ServerSocket [{0}:{1}] - Exception to open or close server socket +SocketReplictionListener.portbusy=Port busy at [{0}:{i}] - reason [{2}] +SocketReplictionListener.serverSocket.notExists=Fatal error: Receiver socket not bound address={0} port={1} maxport={2} +SocketReplictionListener.timeout=Receiver ServerSocket no started [{0}:{1}] - timeout +SocketReplictionListener.unlockSocket.failure=UnLocksocket failure at ServerSocket [{0:{1}] 1.4 +90 -13 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SocketReplicationListener.java Index: SocketReplicationListener.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SocketReplicationListener.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- SocketReplicationListener.java26 Jun 2005 21:21:50 - 1.3 +++ SocketReplicationListener.java1 Jul 2005 14:26:02 - 1.4 @@ -22,33 +22,55 @@ import java.net.Socket; import org.apache.catalina.cluster.io.SocketObjectReader; +import org.apache.catalina.util.StringManager; /** * @author Peter Rossbach * @version $Revision$, $Date$ */ public class SocketReplicationListener extends ClusterReceiverBase { + +// Statics + +public static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory +.getLog(SocketReplicationListener.class); + +/** + * The string manager for this package. + */ +protected static StringManager sm = StringManager +.getManager(Constants.Package); + /** * The descriptive information about this implementation. */ private static final String info = "SocketReplicationListener/1.2"; +// Properties private ServerSocket serverSocket = null; private int tcpListenMaxPort ; +/** + * + * One second timeout to wait that socket started + */ +private int tcpListenTimeout = 1 ; + +// Constructor + public SocketReplicationListener() { } +// Properties + /** * Return
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx JMXAccessorCondition.java JMXAccessorTask.java
pero2005/07/01 04:46:51 Modified:catalina/src/share/org/apache/catalina/ant/jmx JMXAccessorCondition.java JMXAccessorTask.java Log: Add if and unless Fix docs Revision ChangesPath 1.2 +103 -37 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorCondition.java Index: JMXAccessorCondition.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorCondition.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- JMXAccessorCondition.java 30 Jun 2005 13:01:27 - 1.1 +++ JMXAccessorCondition.java 1 Jul 2005 11:46:51 - 1.2 @@ -88,7 +88,9 @@ private String operation = "==" ; private String type = "long" ; private String ref = "jmx.server"; - +private String unlessCondition; +private String ifCondition; + // - Instance Info /** @@ -240,7 +242,41 @@ public void setRef(String refId) { this.ref = refId; } - +/** + * @return Returns the ifCondition. + */ +public String getIf() { +return ifCondition; +} +/** + * Only fail if a property of the given name exists in the current project. + * @param c property name + */ +public void setIf(String c) { +ifCondition = c; +} + /** + * @return Returns the unlessCondition. + */ +public String getUnless() { +return unlessCondition; +} + +/** + * Only fail if a property of the given name does not + * exist in the current project. + * @param c property name + */ +public void setUnless(String c) { +unlessCondition = c; +} + +/** + * Get JMXConnection (default look at jmx.server project reference from jmxOpen Task) + * @return active JMXConnection + * @throws MalformedURLException + * @throws IOException + */ protected MBeanServerConnection getJMXConnection() throws MalformedURLException, IOException { return JMXAccessorTask.accessJMXConnection( @@ -250,6 +286,7 @@ } /** + * Get value from MBeans attribute * @return */ protected String accessJMXValue() { @@ -264,7 +301,34 @@ return null; } -// This method evaluates the condition +/** + * test the if condition + * @return true if there is no if condition, or the named property exists + */ +protected boolean testIfCondition() { +if (ifCondition == null || "".equals(ifCondition)) { +return true; +} +return getProject().getProperty(ifCondition) != null; +} + +/** + * test the unless condition + * @return true if there is no unless condition, + * or there is a named property but it doesn't exist + */ +protected boolean testUnlessCondition() { +if (unlessCondition == null || "".equals(unlessCondition)) { +return true; +} +return getProject().getProperty(unlessCondition) == null; +} + +/** + * This method evaluates the condition + * It support for operation ">,>=,<,<=" the types long and double. + * @return expression jmxValue operation value + */ public boolean eval() { if (operation == null) { throw new BuildException("operation attribute is not set"); @@ -276,43 +340,45 @@ throw new BuildException( "Must specify a 'attribute', name for equals condition"); } -//FIXME check url or host/parameter -String jmxValue = accessJMXValue(); -String op = getOperation() ; -if(jmxValue != null) { -if("==".equals(op)) { -return jmxValue.equals(value); -} else if("!=".equals(op)) { -return !jmxValue.equals(value); -} else { -if("long".equals(type)) { -long jvalue = Long.parseLong(jmxValue); -long lvalue = Long.parseLong(value); -if(">".equals(op)) { -return jvalue > lvalue ; -} else if(">=".equals(op)) { -return jvalue >= lvalue ; -} else if("<".equals(op))
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx JMXAccessorEqualsCondition.java
pero2005/06/30 06:15:14 Modified:catalina/src/share/org/apache/catalina/ant/jmx JMXAccessorEqualsCondition.java Log: Add correct super class to support connect by reference Revision ChangesPath 1.3 +3 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorEqualsCondition.java Index: JMXAccessorEqualsCondition.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorEqualsCondition.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- JMXAccessorEqualsCondition.java 30 Jun 2005 13:01:27 - 1.2 +++ JMXAccessorEqualsCondition.java 30 Jun 2005 13:15:13 - 1.3 @@ -7,6 +7,7 @@ import javax.management.ObjectName; import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.ProjectComponent; import org.apache.tools.ant.taskdefs.condition.Condition; /** @@ -51,7 +52,7 @@ * @since 5.5.10 * */ -public class JMXAccessorEqualsCondition implements Condition { +public class JMXAccessorEqualsCondition extends ProjectComponent implements Condition { // - Instance Variables - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
pero2005/06/30 06:08:14 Modified:webapps/docs changelog.xml Log: Support Cluster as Engine Element Revision ChangesPath 1.319 +5 -1 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.318 retrieving revision 1.319 diff -u -r1.318 -r1.319 --- changelog.xml 27 Jun 2005 21:54:35 - 1.318 +++ changelog.xml 30 Jun 2005 13:08:14 - 1.319 @@ -59,6 +59,7 @@ Refactoring, redesign and extend the cluster module + - Cluster can be configured as subelement from Engine and Host. - Optimized performance and reduce memory usage - Better JMX support - add a lot of JMX stats attribute for better monitoring @@ -235,7 +236,10 @@ -Add single cluster default configuration element - discussed at JAX 2005 conference Cluster Workshop (pero) +Add that cluster can configure as Engine and Host element. (pero) + + +Add single cluster default configuration element - discussed at JAX 2005 conference Cluster Workshop. (pero) Fix resend GET_ALL_SESSIONS when wait ACK failed at receiver side (pero) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup Catalina.java EngineRuleSet.java
pero2005/06/30 06:04:46 Modified:catalina/src/share/org/apache/catalina/startup Catalina.java EngineRuleSet.java Log: Support Cluster as Engine Element Revision ChangesPath 1.37 +6 -3 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Catalina.java Index: Catalina.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Catalina.java,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- Catalina.java 30 Mar 2005 17:04:08 - 1.36 +++ Catalina.java 30 Jun 2005 13:04:34 - 1.37 @@ -329,6 +329,7 @@ // When the 'engine' is found, set the parentClassLoader. digester.addRule("Server/Service/Engine", new SetParentClassLoaderRule(parentClassLoader)); +digester.addRuleSet(new ClusterRuleSet("Server/Service/Engine/Cluster/")); long t2=System.currentTimeMillis(); if (log.isDebugEnabled()) @@ -495,7 +496,8 @@ } long t2 = System.currentTimeMillis(); -log.info("Initialization processed in " + (t2 - t1) + " ms"); +if(log.isInfoEnabled()) +log.info("Initialization processed in " + (t2 - t1) + " ms"); } @@ -542,7 +544,8 @@ } long t2 = System.currentTimeMillis(); -log.info("Server startup in " + (t2 - t1) + " ms"); +if(log.isInfoEnabled()) +log.info("Server startup in " + (t2 - t1) + " ms"); try { // Register shutdown hook 1.6 +11 -1 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/EngineRuleSet.java Index: EngineRuleSet.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/EngineRuleSet.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- EngineRuleSet.java26 Jun 2004 17:41:31 - 1.5 +++ EngineRuleSet.java30 Jun 2005 13:04:38 - 1.6 @@ -101,6 +101,16 @@ "setContainer", "org.apache.catalina.Container"); +//Cluster configuration start +digester.addObjectCreate(prefix + "Engine/Cluster", + null, // MUST be specified in the element + "className"); +digester.addSetProperties(prefix + "Engine/Cluster"); +digester.addSetNext(prefix + "Engine/Cluster", +"setCluster", +"org.apache.catalina.Cluster"); +//Cluster configuration end + digester.addObjectCreate(prefix + "Engine/Listener", null, // MUST be specified in the element "className"); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp ClusterReceiverBase.java ReplicationTransmitter.java ReplicationValve.java SimpleTcpCluster.java
pero2005/06/30 06:03:35 Modified:modules/cluster/src/share/org/apache/catalina/cluster/mcast McastService.java McastServiceImpl.java modules/cluster/src/share/org/apache/catalina/cluster/session JvmRouteBinderValve.java JvmRouteSessionIDBinderLifecycleListener.java modules/cluster/src/share/org/apache/catalina/cluster/tcp ClusterReceiverBase.java ReplicationTransmitter.java ReplicationValve.java SimpleTcpCluster.java Log: Support Cluster as Engine Element Revision ChangesPath 1.16 +10 -7 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastService.java Index: McastService.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastService.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- McastService.java 26 Jun 2005 21:21:49 - 1.15 +++ McastService.java 30 Jun 2005 13:03:02 - 1.16 @@ -22,10 +22,12 @@ import javax.management.ObjectName; import org.apache.catalina.Cluster; +import org.apache.catalina.Container; import org.apache.catalina.cluster.Member; import org.apache.catalina.cluster.MembershipListener; import org.apache.catalina.cluster.MembershipService; import org.apache.catalina.cluster.tcp.SimpleTcpCluster; +import org.apache.catalina.core.StandardHost; import org.apache.catalina.util.StringManager; import org.apache.commons.modeler.Registry; @@ -351,15 +353,16 @@ try { MBeanServer mserver = cluster.getMBeanServer(); initMBeans(); -ObjectName mcastName = new ObjectName(clusterName -.getDomain() -+ ":type=ClusterMembership,host=" -+ clusterName.getKeyProperty("host")); +Container container = cluster.getContainer(); +String name = clusterName.getDomain() + ":type=ClusterMembership"; +if (container instanceof StandardHost) { +name += ",host=" + clusterName.getKeyProperty("host"); +} +ObjectName mcastName = new ObjectName(name); if (mserver.isRegistered(mcastName)) { if (log.isWarnEnabled()) log.warn(sm.getString( -"cluster.mbean.register.allready", -mcastName)); +"cluster.mbean.register.allready", mcastName)); return; } setObjectName(mcastName); 1.16 +7 -2 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java Index: McastServiceImpl.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- McastServiceImpl.java 9 Jun 2005 20:37:33 - 1.15 +++ McastServiceImpl.java 30 Jun 2005 13:03:02 - 1.16 @@ -210,11 +210,16 @@ if(log.isDebugEnabled()) log.debug("Mcast receive ping from member " + m); if ( membership.memberAlive(m) ) { +if(log.isDebugEnabled()) +log.debug("Mcast add member " + m); service.memberAdded(m); } McastMember[] expired = membership.expire(timeToExpiration); -for ( int i=0; i + * FIXME add Engine support * @deprecated * @author Peter Rossbach */ 1.6 +9 -5 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java Index: ClusterReceiverBase.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ClusterReceiverBase.java 26 Jun 2005 21:21:50 - 1.5 +++ ClusterReceiverBase.java 30 Jun 2005 13:03:34 - 1.6 @@ -25,12 +25,14 @@ import javax.management.MBeanServer; import javax.management.ObjectName; +import org.apache.catalina.Container; import org.apache.catalina.cluster.CatalinaCluster; import org.apache.catalin
cvs commit: jakarta-tomcat-catalina/catalina/src/bin jmxaccessor-tasks.xml
pero2005/06/30 06:02:08 Modified:catalina/src/bin jmxaccessor-tasks.xml Log: Add more usefull Ant Condition that support reference jmx connection Fix typos Revision ChangesPath 1.2 +13 -3 jakarta-tomcat-catalina/catalina/src/bin/jmxaccessor-tasks.xml Index: jmxaccessor-tasks.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/bin/jmxaccessor-tasks.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- jmxaccessor-tasks.xml 24 Jun 2005 11:53:42 - 1.1 +++ jmxaccessor-tasks.xml 30 Jun 2005 13:02:08 - 1.2 @@ -1,6 +1,6 @@ @@ -15,10 +15,20 @@ +name="jmxEquals" +classname="org.apache.catalina.ant.jmx.JMXAccessorEqualsCondition"> + + + + + + + + \ No newline at end of file - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx JMXAccessorCondition.java JMXAccessorEqualsCondition.java JMXAccessorGetTask.java JMXAccessorInvokeTask.java JMXAccessorQueryTask.java JMXAccessorSetTask.java JMXAccessorTask.java antlib.xml jmxaccessor.tasks
pero2005/06/30 06:01:27 Modified:catalina/src/share/org/apache/catalina/ant/jmx JMXAccessorEqualsCondition.java JMXAccessorGetTask.java JMXAccessorInvokeTask.java JMXAccessorQueryTask.java JMXAccessorSetTask.java JMXAccessorTask.java antlib.xml jmxaccessor.tasks Added: catalina/src/share/org/apache/catalina/ant/jmx JMXAccessorCondition.java Log: Add support for if and unless Add more usefull Ant Condition that support reference jmx connection Fix some docs Revision ChangesPath 1.2 +31 -16 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorEqualsCondition.java Index: JMXAccessorEqualsCondition.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorEqualsCondition.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- JMXAccessorEqualsCondition.java 24 Jun 2005 11:52:51 - 1.1 +++ JMXAccessorEqualsCondition.java 30 Jun 2005 13:01:27 - 1.2 @@ -12,22 +12,22 @@ /** * * Definition - * - * - * - * - * - * - * + * + * <path id="catalina_ant"> + * <fileset dir="${catalina.home}/server/lib"> + * <include name="catalina-ant.jar"/> + * <include name="catalina-ant-jmx.jar"/> + * </fileset> + * </path> * - * - * + * * * usage: Wait for start backup node - * + * * <target name="wait"> *<waitfor maxwait="${maxwait}" maxwaitunit="second" timeoutproperty="server.timeout" > * <and> @@ -44,7 +44,7 @@ * <echo message="Server ${url} alive" /> * </target> * - * + * * * @author Peter Rossbach * @version $Revision$ $Date$ @@ -63,13 +63,13 @@ private String name = null; private String attribute; private String value; - +private String ref = "jmx.server" ; // - Instance Info /** * Descriptive information describing this implementation. */ -private static final String info = "org.apache.catalina.ant.JMXAccessorEqualsCondition/1.0"; +private static final String info = "org.apache.catalina.ant.JMXAccessorEqualsCondition/1.1"; /** * Return descriptive information about this implementation and the @@ -178,10 +178,25 @@ this.value = value; } +/** + * @return Returns the ref. + */ +public String getRef() { +return ref; +} +/** + * @param ref The ref to set. + */ +public void setRef(String refId) { +this.ref = refId; +} + protected MBeanServerConnection getJMXConnection() throws MalformedURLException, IOException { -return JMXAccessorTask.createJMXConnection(getUrl(), getHost(), -getPort(), getUsername(), getPassword()); +return JMXAccessorTask.accessJMXConnection( +getProject(), +getUrl(), getHost(), +getPort(), getUsername(), getPassword(), ref); } /** 1.2 +4 -4 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorGetTask.java Index: JMXAccessorGetTask.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorGetTask.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- JMXAccessorGetTask.java 24 Jun 2005 11:52:51 - 1.1 +++ JMXAccessorGetTask.java 30 Jun 2005 13:01:27 - 1.2 @@ -33,9 +33,9 @@ * * * Examples: - * + * * Get a Mbean IDataSender attribute nrOfRequests and create a new ant property IDataSender.9025.nrOfRequests - * + * * <jmx:get * ref="jmx.server" * name="Catalina:type=IDataSender,host=localhost,senderAddress=192.168.1.2,senderPort=9025" @@ -43,7 +43,7 @@ * resultproperty="IDataSender.9025.nrOfRequests" * echo="false"> * /> - * + * * * * First call to a remote MBeanserver save the JMXConnection a referenz jmx.server 1.2 +3 -3 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx/JMXAccessorInvokeTask.j
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml cluster-howto.xml
pero2005/06/26 14:23:36 Modified:webapps/docs changelog.xml cluster-howto.xml Log: add standalone cluster config support better GET_ALLSESSION support config resend and compress from message creator update cluster howto Revision ChangesPath 1.317 +25 -4 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.316 retrieving revision 1.317 diff -u -r1.316 -r1.317 --- changelog.xml 24 Jun 2005 11:55:02 - 1.316 +++ changelog.xml 26 Jun 2005 21:23:35 - 1.317 @@ -62,12 +62,13 @@ - Optimized performance and reduce memory usage - Better JMX support - add a lot of JMX stats attribute for better monitoring + - add a single element default cluster configuration - more config options LifecycleListener ClusterListener - more than one Cluster Valves + more than one cluster valves - better subclass support - - change a lot of existing Cluster API's (pero) + - change a lot of existing cluster API's (pero) Add Apache Portable Runtime JNI wrapper and helper API (mturk) @@ -230,6 +231,26 @@ +Add single cluster default configuration element - discussed at JAX 2005 conference Cluster Workshop (pero) + + +Fix resend GET_ALL_SESSIONS when wait ACK failed at receiver side (pero) + + +ClusterValve now remove from container element when cluster stops and added with next start again. (pero) + + +Set timestamp only at first time inside SessionMessageImpl (pero) + + + Set timestamp from findsessions method call, when handling GET_ALL_SESSION + to all SEND_SESSION_DATA and TRANSFER complete messages. (pero> + + + Drop all received message inside GET_ALL_SESSION message queue before state + transfer message timestamp. (pero) + + Cluster ping now transfer cluster domain information and DeltaManager only send and receive message from same domain members (pero) @@ -321,7 +342,7 @@ Also extract ClusterReceiverBase superclass for SocketReplicationListener and ReplicationListener (pero) -Add and update some API documentation (pero) +Add and update some API and the cluster howto documentation (pero) Refactor ReplicationValve for better understanding and small optimization (pero) @@ -333,7 +354,7 @@ Fix ant build.xml to direct compile at cluster module directory (pero) -Fix some I18N messages (pero) +Fix some I18N messages, but a lot of work is waiting for fix (pero) Add ReplicationValve Mbeans stats attribute getter and resetStatistics operation (pero) 1.9 +210 -26 jakarta-tomcat-catalina/webapps/docs/cluster-howto.xml Index: cluster-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/cluster-howto.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- cluster-howto.xml 9 Jun 2005 20:42:55 - 1.8 +++ cluster-howto.xml 26 Jun 2005 21:23:36 - 1.9 @@ -17,7 +17,7 @@ -To run session replication in your Tomcat 5 container, the following steps +To run session replication in your Tomcat 5.5 container, the following steps should be completed: All your session attributes must implement java.io.Serializable @@ -28,6 +28,7 @@ Make sure your web.xml has the <distributable/> element or set at your <Context distributable="true" /> Make sure that jvmRoute attribute is set at your Engine <Engine name="Catalina" jvmRoute="node1" > +Make sure that all nodes have the same time and sync with NTP service! Load balancing can be achieved through many techniques, as seen in the Load Balancing chapter. @@ -51,7 +52,7 @@ This is an algorithm that is only efficient when the clusters are small. For large clusters, the next release will support a primary-secondary session replication where the session will only be stored at one or maybe two backup servers. - Currently you can use the domain worker attribute (mod:_jk > 1.2.8) to build cluster partitions + Currently you can use the domain worker attribute (mod_jk > 1.2.8) to build cluster partitions with the p
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp ClusterData.java
pero2005/06/26 14:22:45 Added: modules/cluster/src/share/org/apache/catalina/cluster/tcp ClusterData.java Log: config resend and compress from message creator Revision ChangesPath 1.1 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterData.java Index: ClusterData.java === /* * Copyright 1999,2005 The Apache Software Foundation. * * Licensed 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.cluster.tcp; import org.apache.catalina.cluster.ClusterMessage; /** * @author Peter Rossbach * @version $Revision: 1.1 $ $Date: 2005/06/26 21:22:45 $ * @since 5.5.10 */ public class ClusterData { private int resend = ClusterMessage.FLAG_DEFAULT ; private int compress = ClusterMessage.FLAG_DEFAULT ; private byte[] message ; private long timestamp ; private String uniqueId ; private String type ; public ClusterData() {} /** * @param type message type (class) * @param uniqueId unique message id * @param message message data * @param timestamp message creation date */ public ClusterData(String type, String uniqueId, byte[] message, long timestamp ) { this.uniqueId = uniqueId; this.message = message; this.timestamp = timestamp; } /** * @return Returns the type. */ public String getType() { return type; } /** * @param type The type to set. */ public void setType(String type) { this.type = type; } /** * @return Returns the message. */ public byte[] getMessage() { return message; } /** * @param message The message to set. */ public void setMessage(byte[] message) { this.message = message; } /** * @return Returns the timestamp. */ public long getTimestamp() { return timestamp; } /** * @param timestamp The timestamp to set. */ public void setTimestamp(long timestamp) { this.timestamp = timestamp; } /** * @return Returns the uniqueId. */ public String getUniqueId() { return uniqueId; } /** * @param uniqueId The uniqueId to set. */ public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } /** * @return Returns the compress. */ public int getCompress() { return compress; } /** * @param compress The compress to set. */ public void setCompress(int compress) { this.compress = compress; } /** * @return Returns the resend. */ public int getResend() { return resend; } /** * @param resend The resend to set. */ public void setResend(int resend) { this.resend = resend; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster to-do.txt
pero2005/06/26 14:21:50 Modified:modules/cluster/src/share/org/apache/catalina/cluster ClusterMessage.java MembershipService.java modules/cluster/src/share/org/apache/catalina/cluster/deploy FileMessage.java UndeployMessage.java modules/cluster/src/share/org/apache/catalina/cluster/io ListenCallback.java ObjectReader.java SocketObjectReader.java XByteBuffer.java modules/cluster/src/share/org/apache/catalina/cluster/mcast McastService.java modules/cluster/src/share/org/apache/catalina/cluster/session DeltaManager.java DeltaSession.java JvmRouteBinderValve.java JvmRouteSessionIDBinderLifecycleListener.java LocalStrings.properties SessionIDMessage.java SessionMessageImpl.java SimpleTcpReplicationManager.java modules/cluster/src/share/org/apache/catalina/cluster/tcp AsyncSocketSender.java ClusterReceiverBase.java DataSender.java FastAsyncSocketSender.java IDataSender.java LocalStrings.properties PooledSocketSender.java ReplicationTransmitter.java SimpleTcpCluster.java SocketReplicationListener.java mbeans-descriptors.xml modules/cluster/test/src/share/org/apache/catalina/cluster/io XByteBufferTest.java modules/cluster/test/src/share/org/apache/catalina/cluster/tcp DataSenderTest.java ReplicationTransmitterTest.java modules/cluster to-do.txt Log: add standalone cluster config support better GET_ALLSESSION support config resend and compress from message creator Revision ChangesPath 1.2 +36 -0 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/ClusterMessage.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/ClusterMessage.java.diff?r1=1.1&r2=1.2 1.7 +11 -1 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/MembershipService.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/MembershipService.java.diff?r1=1.6&r2=1.7 1.3 +30 -1 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/deploy/FileMessage.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/deploy/FileMessage.java.diff?r1=1.2&r2=1.3 1.2 +32 -1 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/deploy/UndeployMessage.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/deploy/UndeployMessage.java.diff?r1=1.1&r2=1.2 1.3 +6 -2 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io/ListenCallback.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io/ListenCallback.java.diff?r1=1.2&r2=1.3 1.9 +6 -4 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io/ObjectReader.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io/ObjectReader.java.diff?r1=1.8&r2=1.9 1.3 +8 -6 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io/SocketObjectReader.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io/SocketObjectReader.java.diff?r1=1.2&r2=1.3 1.15 +29 -18 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io/XByteBuffer.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io/XByteBuffer.java.diff?r1=1.14&r2=1.15 1.15 +13 -1 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastService.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/mcast/McastService.java.diff?r1=1.14&r2=1.15 1.48 +103 -74 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java.diff?r1=1.47&r2=1.48 1.35 +9 -1 jakarta-tomca
cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util IntrospectionUtils.java
pero2005/06/26 14:19:28 Modified:util/java/org/apache/tomcat/util IntrospectionUtils.java Log: add boolean is support to getProperty Revision ChangesPath 1.15 +4 -0 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/IntrospectionUtils.java Index: IntrospectionUtils.java === RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/IntrospectionUtils.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- IntrospectionUtils.java 16 Dec 2004 03:51:41 - 1.14 +++ IntrospectionUtils.java 26 Jun 2005 21:19:28 - 1.15 @@ -370,6 +370,7 @@ public static Object getProperty(Object o, String name) { String getter = "get" + capitalize(name); +String isGetter = "is" + capitalize(name); try { Method methods[] = findMethods(o.getClass()); @@ -381,6 +382,9 @@ if (getter.equals(methods[i].getName()) && paramT.length == 0) { return methods[i].invoke(o, (Object[]) null); } +if (isGetter.equals(methods[i].getName()) && paramT.length == 0) { +return methods[i].invoke(o, (Object[]) null); +} if ("getProperty".equals(methods[i].getName())) { getPropertyMethod = methods[i]; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml developers.xml monitoring.xml
pero2005/06/24 04:55:02 Modified:webapps/docs changelog.xml developers.xml monitoring.xml Log: Add new jmx remote ant support - documentation Revision ChangesPath 1.316 +10 -1 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.315 retrieving revision 1.316 diff -u -r1.315 -r1.316 --- changelog.xml 9 Jun 2005 20:38:30 - 1.315 +++ changelog.xml 24 Jun 2005 11:55:02 - 1.316 @@ -29,6 +29,15 @@ + + Add JMX remote ant task to control tomcat MBeanserver via ant scripts. + Ant lib is included at "server/lib/catalina-ant-jmx.jar" and documentation + is added to Monitoring and Managing Tomcat How-To (pero) + + +34361: Integrate better antlib and import support for +catalina manager tasks [Modified patch from Daniel Santos] (pero) + StoreConfig save now the Connector.sslProtocol attribute. (pero) @@ -58,7 +67,7 @@ ClusterListener more than one Cluster Valves - better subclass support - - change a lot of existing API's (pero) + - change a lot of existing Cluster API's (pero) Add Apache Portable Runtime JNI wrapper and helper API (mturk) 1.8 +1 -1 jakarta-tomcat-catalina/webapps/docs/developers.xml Index: developers.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/developers.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- developers.xml22 Nov 2004 15:50:57 - 1.7 +++ developers.xml24 Jun 2005 11:55:02 - 1.8 @@ -40,7 +40,7 @@ Jean-Frederic Clere (jfclere): Connectors Kin-Man Chung (kinman): Jasper Mladen Turk (mturk): Connectors - Peter Rossbach (pero): Catalina, Clustering + Peter Rossbach (pero): Catalina, Clustering, JMX Remy Maucherat (remm): Catalina, Connectors, Docs Tim Funk (funkman): Catalina, Docs Yoav Shapira (yoavs): Docs, JMX, Catalina, balancer, Release Manager 1.2 +779 -10 jakarta-tomcat-catalina/webapps/docs/monitoring.xml Index: monitoring.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/monitoring.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- monitoring.xml7 Oct 2004 18:16:05 - 1.1 +++ monitoring.xml24 Jun 2005 11:55:02 - 1.2 @@ -7,6 +7,7 @@ &project; +Peter Rossbach Remy Maucherat Monitoring and Managing Tomcat @@ -15,30 +16,798 @@ - - + Monitoring is a very important question today. Looking inside the running +server, grab some statistic data or reconfigure some aspects are +daliy adminstration tasks. + - The Sun website includes the list of options and how to configure JMX Remote on Java 5: +The Sun website includes the list of options and how to configure JMX Remote on Java 5: http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html";> http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html. - + +For quick installation you find here a short installation guide: +Add the following parameters to your tomcat startup script: + +set CATALINA_OPTS="-Dcom.sun.management.jmxremote \ +-Dcom.sun.management.jmxremote.port=%my.jmx.port% \ +-Dcom.sun.management.jmxremote.ssl=false \ +-Dcom.sun.management.jmxremote.authenticate=false" + + + + +When you think authorisation is a good, add and change this : + +-Dcom.sun.management.jmxremote.authenticate=true +-Dcom.sun.management.jmxremote.password.file=..\conf\jmxremote.password +-Dcom.sun.management.jmxremote.access.file=..\conf\jmxremote.access + + +edit the access allow file $CATALINA_BASE/conf/jmxremote.access : + +monitorRole readonly +controlRole readwrite + + +edit the password file $CATALINA_BASE/conf/jmxremote.password : + +monitorRole tomcat +controlRole tomcat + +Tipp: Password File must be readonly and not accessable from every +other user! Remove all other users under windows to access this file. + + + +Activate JMX MX4J Http Adaptor with Java 1.4: + + Install the tomcat compat package + Install the mx4
cvs commit: jakarta-tomcat-catalina/catalina build.xml
pero2005/06/24 04:54:21 Modified:catalina build.xml Log: Add new jmx remote ant support new catalina-ant-jmx.jar build Revision ChangesPath 1.81 +19 -3 jakarta-tomcat-catalina/catalina/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/build.xml,v retrieving revision 1.80 retrieving revision 1.81 diff -u -r1.80 -r1.81 --- build.xml 18 Jan 2005 00:52:39 - 1.80 +++ build.xml 24 Jun 2005 11:54:21 - 1.81 @@ -542,7 +542,7 @@ - + @@ -640,6 +640,9 @@ + + + - + @@ -1028,7 +1031,20 @@ - + + + + + + + + + + + + + + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/bin catalina-tasks.xml jmxaccessor-tasks.xml
pero2005/06/24 04:53:42 Added: catalina/src/bin catalina-tasks.xml jmxaccessor-tasks.xml Log: Add new jmx remote ant support Revision ChangesPath 1.1 jakarta-tomcat-catalina/catalina/src/bin/catalina-tasks.xml Index: catalina-tasks.xml === Catalina Ant Manager and JSPC Tasks 1.1 jakarta-tomcat-catalina/catalina/src/bin/jmxaccessor-tasks.xml Index: jmxaccessor-tasks.xml === Catalina Ant JMX Accessor Tasks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx - New directory
pero2005/06/24 04:51:37 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/jmx - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs cluster-howto.xml
pero2005/06/09 13:42:55 Modified:webapps/docs cluster-howto.xml Log: Fix! Revision ChangesPath 1.8 +3 -3 jakarta-tomcat-catalina/webapps/docs/cluster-howto.xml Index: cluster-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/cluster-howto.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- cluster-howto.xml 9 Jun 2005 20:38:30 - 1.7 +++ cluster-howto.xml 9 Jun 2005 20:42:55 - 1.8 @@ -730,19 +730,19 @@ ClusterSender -Configuration and stats of the sender infrastractur +Configuration and stats of the sender infrastructure type=ClusterSender,host=${HOST} ClusterReceiver -Configuration and stats of the recevier infrastractur +Configuration and stats of the recevier infrastructure type=ClusterReceiver,host=${HOST} ClusterMembership -Configuration and stats of the membership infrastractur +Configuration and stats of the membership infrastructure type=ClusterMembership,host=${HOST} - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml cluster-howto.xml
pero2005/06/09 13:38:30 Modified:webapps/docs changelog.xml cluster-howto.xml Log: - Cluster ping now transfer cluster domain information and DeltaManager only send and receive message from same domain members - JMX Support for McastService (Membership) Revision ChangesPath 1.315 +7 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.314 retrieving revision 1.315 diff -u -r1.314 -r1.315 --- changelog.xml 6 Jun 2005 21:31:19 - 1.314 +++ changelog.xml 9 Jun 2005 20:38:30 - 1.315 @@ -221,6 +221,13 @@ +Cluster ping now transfer cluster domain information and DeltaManager only +send and receive message from same domain members (pero) + + +JMX Support for McastService (Membership) (pero) + + Redesign SimpleTcpCluster message receiving to ClusterReceiverBase (pero) 1.7 +149 -15 jakarta-tomcat-catalina/webapps/docs/cluster-howto.xml Index: cluster-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/cluster-howto.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- cluster-howto.xml 29 Apr 2005 20:14:58 - 1.6 +++ cluster-howto.xml 9 Jun 2005 20:38:30 - 1.7 @@ -212,17 +212,42 @@ Component Levels: -Server - | -Service - | -Engine - / \ - Cluster ReplicationValve - | - Manager - | - Session + Server + | + Service + | + Engine + | + Host + | + -- +/ \ + ClusterContext(1-N) +| \ +| -- Manager +| \ +| -- DeltaManager +| + --- + || | \ + Sender Receiver Membership \ + -- Valve + | \ + | -- ReplicationValve + | -- JvmRouteBinderValve + | + -- LifecycleListener + | + -- ClusterListener + | \ + | -- ClusterSessionListener + | -- JvmRouteSessionIDBinderListener + | + -- Deployer +\ + -- FarmWarDeployer + + @@ -287,7 +312,9 @@ processSenderFrequency - +Control the sender keepalive status and drop sender socket connection after timeout is reached. +Check every processSenderFrequency value engine background ticks. + 2 @@ -573,8 +600,95 @@ + + +List of Attributes + + + +Attribute +Description +Default value + + + +expireSessionsOnShutdown +When server stopped, expire all sessions also at backup nodes (only for testing) +false + + + +maxActiveSessions +Number of active sessions. (Default is no limit) +-1 + + + +notifyListenersOnReplication +Notify application session listener to session creation +and expiring events at backup nodes +true + + + +notifySessionListenersOnReplication +Notify application session listener to attribute changes at backup nodes +true + + + +stateTransferTimeout +Timeout that session state transfer is complete +60 + + + +sendAllSessions +Flag to send sessions as splited blocks +true + + + +sendAllSessionsSize +Number of serialize sessions inside a send session message. +1000 + + + +sendAllSessionsWaitTime +wait time between to session send blocks. +2000 + + + +sendClusterDomainOnly +Send all session messages only to member inside same cluster domain +(value od Membership attribute mcastClusterDomain). Also don't receive +session messages from other domains. +true + + + + + + + +Example send all sessions at b
cvs commit: jakarta-tomcat-catalina/modules/cluster/clusterbase/webapps/myapps/WEB-INF - New directory
pero2005/06/09 13:31:19 jakarta-tomcat-catalina/modules/cluster/clusterbase/webapps/myapps/WEB-INF - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/clusterbase/webapps/myapps/WEB-INF/classes/mypackage - New directory
pero2005/06/09 13:31:30 jakarta-tomcat-catalina/modules/cluster/clusterbase/webapps/myapps/WEB-INF/classes/mypackage - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/test/src/share/org/apache/catalina/cluster/mcast - New directory
pero2005/06/09 13:31:36 jakarta-tomcat-catalina/modules/cluster/test/src/share/org/apache/catalina/cluster/mcast - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/clusterbase/webapps/myapps/WEB-INF/classes - New directory
pero2005/06/09 13:31:25 jakarta-tomcat-catalina/modules/cluster/clusterbase/webapps/myapps/WEB-INF/classes - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/clusterbase/webapps - New directory
pero2005/06/09 13:31:09 jakarta-tomcat-catalina/modules/cluster/clusterbase/webapps - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/clusterbase/webapps/myapps - New directory
pero2005/06/09 13:31:14 jakarta-tomcat-catalina/modules/cluster/clusterbase/webapps/myapps - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/clusterbase - New directory
pero2005/06/09 13:31:03 jakarta-tomcat-catalina/modules/cluster/clusterbase - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs/config http.xml
pero2005/06/09 13:25:31 Modified:webapps/docs/config http.xml Log: Fix Typo! Revision ChangesPath 1.26 +1 -1 jakarta-tomcat-catalina/webapps/docs/config/http.xml Index: http.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/config/http.xml,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- http.xml 4 Jun 2005 17:34:23 - 1.25 +++ http.xml 9 Jun 2005 20:25:31 - 1.26 @@ -169,7 +169,7 @@ Set this attribute to true to cause Tomcat to advertise - support for the Srevlet specification using the header recommended in the + support for the Servlet specification using the header recommended in the specification. The default value is false. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector Connector.java
pero2005/06/09 13:24:25 Modified:catalina/src/share/org/apache/catalina/connector Connector.java Log: Fix duplicate createObjectName from Mapper Revision ChangesPath 1.25 +2 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Connector.java Index: Connector.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Connector.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- Connector.java6 Jun 2005 21:31:19 - 1.24 +++ Connector.java9 Jun 2005 20:24:25 - 1.25 @@ -1113,7 +1113,7 @@ log.debug(sm.getString( "coyoteConnector.MapperRegistration", mapperOname)); Registry.getRegistry(null, null).registerComponent -(mapper, createObjectName(this.domain,"Mapper"), "Mapper"); +(mapper, mapperOname, "Mapper"); } catch (Exception ex) { log.error(sm.getString ("coyoteConnector.protocolRegistrationFailed"), ex); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig StandardContextSF.java
pero2005/06/04 05:44:35 Modified:modules/storeconfig/src/share/org/apache/catalina/storeconfig StandardContextSF.java Log: Fix that don't save WEB-INF/web.xml Revision ChangesPath 1.3 +8 -4 jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/StandardContextSF.java Index: StandardContextSF.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/StandardContextSF.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- StandardContextSF.java13 Jan 2005 13:08:20 - 1.2 +++ StandardContextSF.java4 Jun 2005 12:44:35 - 1.3 @@ -315,9 +315,10 @@ * @param wresources * @return * @throws IOException - * TODO relative watchedresource TODO absolute handling - * configFile TODO Filename case handling for Windows? TODO - * digester variable subsitution $catalina.base, $catalina.home + * TODO relative watchedresource + * TODO absolute handling configFile + * TODO Filename case handling for Windows? + * TODO digester variable subsitution $catalina.base, $catalina.home */ protected String[] filterWatchedResources(StandardContext context, String[] wresources) throws IOException { @@ -327,7 +328,8 @@ String confHostDefault = new File(configBase, "context.xml.default") .getCanonicalPath(); String configFile = context.getConfigFile(); - +String webxml = "WEB-INF/web.xml" ; + List resource = new ArrayList(); for (int i = 0; i < wresources.length; i++) { @@ -337,6 +339,8 @@ continue; if (wresources[i].equals(configFile)) continue; +if (wresources[i].equals(webxml)) +continue; resource.add(wresources[i]); } return (String[]) resource.toArray(new String[resource.size()]); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs/config ajp.xml http.xml
pero2005/06/04 05:33:38 Modified:catalina/src/share/org/apache/catalina/connector Connector.java webapps/docs changelog.xml webapps/docs/config ajp.xml http.xml Log: Support Host Alias matching with Connector attribute allowedAliasMatches Submitted by George Sexton Revision ChangesPath 1.22 +8 -2 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Connector.java Index: Connector.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Connector.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- Connector.java22 May 2005 17:18:28 - 1.21 +++ Connector.java4 Jun 2005 12:33:38 - 1.22 @@ -42,6 +42,8 @@ import org.apache.tomcat.util.IntrospectionUtils; import org.apache.tomcat.util.http.mapper.Mapper; +import com.sun.org.apache.bcel.internal.generic.ALOAD; + /** * Implementation of a Coyote connector for Tomcat 5.x. @@ -1104,6 +1106,10 @@ } if( this.domain != null ) { +Object allowedAliasMatches = getProperty("allowedAliasMatches") ; +if(allowedAliasMatches != null && allowedAliasMatches instanceof String ) +IntrospectionUtils.setProperty(mapper, "allowedAliasMatches", +(String)allowedAliasMatches); mapperListener.setDomain( domain ); //mapperListener.setEngine( service.getContainer().getName() ); mapperListener.init(); @@ -1113,7 +1119,7 @@ log.debug(sm.getString( "coyoteConnector.MapperRegistration", mapperOname)); Registry.getRegistry(null, null).registerComponent -(mapper, createObjectName(this.domain,"Mapper"), "Mapper"); +(mapper, mapperOname, "Mapper"); } catch (Exception ex) { log.error(sm.getString ("coyoteConnector.protocolRegistrationFailed"), ex); 1.312 +5 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.311 retrieving revision 1.312 diff -u -r1.311 -r1.312 --- changelog.xml 16 May 2005 18:34:51 - 1.311 +++ changelog.xml 4 Jun 2005 12:33:38 - 1.312 @@ -72,6 +72,11 @@ + +Support Host Alias matching with Connector attribute allowedAliasMatches="max alias". +So we can easier integrate subdomain as host alias <Alias>*.mydomain.net"</Alias>. +Submitted by George Sexton (pero) + 20380: Access log timestamps now take account of Daylight Saving Time (DST). (markt) 1.16 +7 -0 jakarta-tomcat-catalina/webapps/docs/config/ajp.xml Index: ajp.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/config/ajp.xml,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- ajp.xml 22 May 2005 17:18:28 - 1.15 +++ ajp.xml 4 Jun 2005 12:33:38 - 1.16 @@ -52,6 +52,13 @@ + + Set this attribute to max subdomain alias matches 16. + Is this attribute >0 the host alias element support Alias Matches + (<Alias>*.mydomain.net"</Alias> ). + The default value is 0 no host alias matches support. + + A boolean value which can be used to enable or disable the TRACE HTTP method. If not specified, this attribute is set to false. 1.24 +9 -1 jakarta-tomcat-catalina/webapps/docs/config/http.xml Index: http.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/config/http.xml,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- http.xml 22 May 2005 17:18:28 - 1.23 +++ http.xml 4 Jun 2005 12:33:38 - 1.24 @@ -56,7 +56,14 @@ support the following attributes: - + + + Set this attribute to max subdomain alias matches 16. + Is this attribute >0 the host alias element support Alias Matches + (<Alias>*.mydomain.net"</Alias> ). + The default value is 0 no host alias matches support. + + A boolean value which can be used to enabl
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
pero2005/05/16 11:34:51 Modified:webapps/docs changelog.xml Log: Fix Https sslProtocol Bug ( find by Ankit Shah) Revision ChangesPath 1.311 +4 -1 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.310 retrieving revision 1.311 diff -u -r1.310 -r1.311 --- changelog.xml 15 May 2005 22:21:55 - 1.310 +++ changelog.xml 16 May 2005 18:34:51 - 1.311 @@ -29,8 +29,11 @@ + +StoreConfig save now the Connector.sslProtocol attribute. (pero) + -change log dir at service.bat to "$CATALINA_BASE/logs" for better multi instance support (pero) +Change log dir at service.bat to "$CATALINA_BASE/logs" for better multi instance support. (pero) 33522: Update jasper-howto to reflect use of javac switch. (yoavs) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/storeconfig/test/src/share/org/apache/catalina/storeconfig ConnectorSFTest.java StandardHostSFTest.java
pero2005/05/16 11:34:31 Modified:modules/storeconfig build.xml modules/storeconfig/src/share/org/apache/catalina/storeconfig CatalinaClusterSF.java ConnectorStoreAppender.java modules/storeconfig/test build.xml modules/storeconfig/test/src/share/org/apache/catalina/storeconfig ConnectorSFTest.java StandardHostSFTest.java Log: Fix Https sslProtocol Bug ( find by Ankit Shah) fix build.xml Fix cluster testcase after refactoring Revision ChangesPath 1.4 +1 -1 jakarta-tomcat-catalina/modules/storeconfig/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/storeconfig/build.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- build.xml 10 Apr 2005 16:22:15 - 1.3 +++ build.xml 16 May 2005 18:34:31 - 1.4 @@ -120,7 +120,7 @@ - + 1.4 +0 -2 jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/CatalinaClusterSF.java Index: CatalinaClusterSF.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/CatalinaClusterSF.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- CatalinaClusterSF.java10 Apr 2005 16:22:15 - 1.3 +++ CatalinaClusterSF.java16 May 2005 18:34:31 - 1.4 @@ -18,9 +18,7 @@ import java.io.PrintWriter; -import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleListener; -import org.apache.catalina.Pipeline; import org.apache.catalina.Valve; import org.apache.catalina.cluster.CatalinaCluster; import org.apache.catalina.cluster.ClusterDeployer; 1.3 +5 -6 jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/ConnectorStoreAppender.java Index: ConnectorStoreAppender.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/ConnectorStoreAppender.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ConnectorStoreAppender.java 15 Feb 2005 09:35:22 - 1.2 +++ ConnectorStoreAppender.java 16 May 2005 18:34:31 - 1.3 @@ -27,10 +27,7 @@ import java.util.Iterator; import java.util.List; -import org.apache.catalina.Container; import org.apache.catalina.connector.Connector; -import org.apache.catalina.core.StandardContext; -import org.apache.catalina.core.StandardHost; import org.apache.coyote.ProtocolHandler; import org.apache.tomcat.util.IntrospectionUtils; @@ -97,6 +94,9 @@ for (Iterator propertyIterator = propertyKeys.iterator(); propertyIterator .hasNext();) { String key = (String) propertyIterator.next(); +if (replacements.get(key) != null) { +key = (String) replacements.get(key); +} Object value = (Object) IntrospectionUtils.getProperty(bean, key); if (desc.isTransientAttribute(key)) { @@ -230,9 +230,8 @@ } /* - * Print Context Values. Spezial handling to default workDir. - * Don't save path at external context.xml Don't - * generate docBase for host.appBase webapps + * Print Connector Values. Spezial handling to default jkHome. + * Don't save catalina.base path at server.xml * * @see org.apache.catalina.config.StoreAppender#isPrintValue(java.lang.Object, * java.lang.Object, java.lang.String, 1.2 +1 -1 jakarta-tomcat-catalina/modules/storeconfig/test/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/storeconfig/test/build.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- build.xml 8 Jan 2005 11:14:07 - 1.1 +++ build.xml 16 May 2005 18:34:31 - 1.2 @@ -70,7 +70,7 @@ - + 1.2 +25 -12 jakarta-tomcat-catalina/modules/storeconfig/test/src/share/org/apache/catalina/storeconfig/ConnectorSFTest.java Index: ConnectorSFTest.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/storeconfig/test/src/share/org/apache/catalina/storeconfig/Connect
cvs commit: jakarta-tomcat-connectors/jk/native/common jk_lb_worker.c
pero2005/05/05 12:48:03 Modified:jk/native/common jk_lb_worker.c Log: Fix the sepcial only one worker case with stopped flag. When disabled is true also new session can be created!! Revision ChangesPath 1.82 +2 -2 jakarta-tomcat-connectors/jk/native/common/jk_lb_worker.c Index: jk_lb_worker.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_lb_worker.c,v retrieving revision 1.81 retrieving revision 1.82 diff -u -r1.81 -r1.82 --- jk_lb_worker.c5 May 2005 15:40:17 - 1.81 +++ jk_lb_worker.c5 May 2005 19:48:03 - 1.82 @@ -442,7 +442,7 @@ retry_worker(&p->lb_workers[0], p->s->recover_wait_time, l); } /* Check if worker is marked for retry */ -if (!p->lb_workers[0].s->in_error_state) { +if(!p->lb_workers[0].s->in_error_state && !p->lb_workers[0].s->is_stopped) { p->lb_workers[0].r = &(p->lb_workers[0].s->name[0]); JK_TRACE_EXIT(l); return &p->lb_workers[0]; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
pero2005/05/05 09:27:30 Modified:webapps/docs changelog.xml Log: Doc service.bat change log dir to $CATALINA_BASE/logs Revision ChangesPath 1.304 +3 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.303 retrieving revision 1.304 diff -u -r1.303 -r1.304 --- changelog.xml 3 May 2005 14:29:25 - 1.303 +++ changelog.xml 5 May 2005 16:27:30 - 1.304 @@ -30,6 +30,9 @@ +change log dir at service.bat to "$CATALINA_BASE/logs" for better multi instance support (pero) + + 33522: Update jasper-howto to reflect use of javac switch. (yoavs) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/bin service.bat
pero2005/05/05 09:24:38 Modified:catalina/src/bin service.bat Log: change log dir to catalina.base for better support multiinstances at one server. Revision ChangesPath 1.12 +4 -3 jakarta-tomcat-catalina/catalina/src/bin/service.bat Index: service.bat === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/bin/service.bat,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- service.bat 13 Nov 2004 19:03:26 - 1.11 +++ service.bat 5 May 2005 16:24:38 - 1.12 @@ -68,6 +68,7 @@ rem Install the service echo Installing the service '%SERVICE_NAME%' ... echo Using CATALINA_HOME:%CATALINA_HOME% +echo Using CATALINA_BASE:%CATALINA_BASE% echo Using JAVA_HOME:%JAVA_HOME% rem Use the environment variables as an exaple @@ -75,7 +76,7 @@ set PR_DESCRIPTION=Apache Tomcat Server - http://jakarta.apache.org/tomcat set PR_INSTALL=%EXECUTABLE% -set PR_LOGPATH=%CATALINA_HOME%\logs +set PR_LOGPATH=%CATALINA_BASE%\logs set PR_CLASSPATH=%CATALINA_HOME%\bin\bootstrap.jar rem Set the server jvm from JAVA_HOME set PR_JVM=%JAVA_HOME%\jre\bin\server\jvm.dll @@ -101,7 +102,7 @@ rem Set extra parameters "%EXECUTABLE%" //US//%SERVICE_NAME% --JvmOptions "-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed" --StartMode jvm --StopMode jvm rem More extra parameters -set PR_LOGPATH=%CATALINA_HOME%\logs +set PR_LOGPATH=%CATALINA_BASE%\logs set PR_STDOUTPUT=auto set PR_STDERROR=auto "%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp" --JvmMs 128 --JvmMx 256 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/xdocs/config workers.xml
pero2005/05/05 08:59:10 Modified:jk/xdocs changelog.xml jk/xdocs/config workers.xml Log: Add doc of my stopped change and the very fine new secret default lb worker attribute - thanks mladen. Revision ChangesPath 1.28 +13 -0 jakarta-tomcat-connectors/jk/xdocs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/xdocs/changelog.xml,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- changelog.xml 29 Apr 2005 20:08:53 - 1.27 +++ changelog.xml 5 May 2005 15:59:10 - 1.28 @@ -21,6 +21,19 @@ new documentation project for JK has been started. + + + + + Fix that worker not used, when stopped flag is true. (pero) + + + Add loadbalance default worker secret attribute to the documentation (pero) + + + + + 1.16 +9 -0 jakarta-tomcat-connectors/jk/xdocs/config/workers.xml Index: workers.xml === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/xdocs/config/workers.xml,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- workers.xml 29 Apr 2005 20:08:53 - 1.15 +++ workers.xml 5 May 2005 15:59:10 - 1.16 @@ -270,6 +270,15 @@ This feature has been added in jk 1.2.9. + + +Set a default secret word for all defined workers. +See worker secret attribute description for more info. + +This feature has been added in jk 1.2.12. + + + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native/common jk_lb_worker.c
pero2005/05/05 08:40:17 Modified:jk/native/common jk_lb_worker.c Log: Don't use work when is stopped! Revision ChangesPath 1.81 +2 -2 jakarta-tomcat-connectors/jk/native/common/jk_lb_worker.c Index: jk_lb_worker.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_lb_worker.c,v retrieving revision 1.80 retrieving revision 1.81 diff -u -r1.80 -r1.81 --- jk_lb_worker.c5 May 2005 12:48:35 - 1.80 +++ jk_lb_worker.c5 May 2005 15:40:17 - 1.81 @@ -368,7 +368,7 @@ uses_domain = 1; candidate = find_best_bydomain(p, candidate->s->domain, l); } -if (candidate && candidate->s->in_error_state) +if (candidate && (candidate->s->in_error_state || candidate->s->is_stopped)) candidate = NULL; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs cluster-howto.xml
pero2005/04/29 13:14:58 Modified:webapps/docs cluster-howto.xml Log: Not ready, but add some important information about current cluster modul implementation details. Revision ChangesPath 1.6 +428 -7jakarta-tomcat-catalina/webapps/docs/cluster-howto.xml Index: cluster-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/cluster-howto.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- cluster-howto.xml 5 Feb 2004 16:05:31 - 1.5 +++ cluster-howto.xml 29 Apr 2005 20:14:58 - 1.6 @@ -8,6 +8,7 @@ Filip Hanik +Peter Rossbach Clustering/Session Replication HOW-TO @@ -24,7 +25,9 @@ Uncomment the Valve(ReplicationValve) element in server.xml If your Tomcat instances are running on the same machine, make sure the tcpListenPort attribute is unique for each instance. -Make sure your web.xml has the <distributable/> element +Make sure your web.xml has the <distributable/> element +or set at your <Context distributable="true" /> +Make sure that jvmRoute attribute is set at your Engine <Engine name="Catalina" jvmRoute="node1" > Load balancing can be achieved through many techniques, as seen in the Load Balancing chapter. @@ -38,8 +41,8 @@ To enable session replication in Tomcat, three different paths can be followed to achieve the exact same thing: - Using session persistence, and saving the session to a shared file system (PersistenceManager) - Using session persistence, and saving the session to a shared database (JDBCManager) + Using session persistence, and saving the session to a shared file system (PersistenceManager + FileStore) + Using session persistence, and saving the session to a shared database (PersistenceManager + JDBCStore) Using in-memory-replication, using the SimpleTcpCluster that ships with Tomcat 5 (server/lib/catalina-cluster.jar) @@ -47,7 +50,9 @@ This is an algorithm that is only efficient when the clusters are small. For large clusters, the next release will support a primary-secondary session replication where the session will only be stored at one - or maybe two backup servers. + or maybe two backup servers. + Currently you can use the domain worker attribute (mod:_jk > 1.2.8) to build cluster partitions + with the potential of very scaleable cluster solution. In order to keep the network traffic down in an all-to-all environment, you can split your cluster into smaller groups. This can be easily achieved by using different multicast addresses for the different groups. A very simple setup would look like this: @@ -66,7 +71,7 @@ What is important to mention here, is that session replication is only the beginning of clustering. Another popular concept used to implement clusters is farming, ie, you deploy your apps only to one server, and the cluster will distribute the deployments across the entire cluster. - This is all capabilities that can go into the next release. + This is all capabilities that can go into with the FarmWarDeployer (s. cluster example at server.xml) In the next section will go deeper into how session replication works and how to configure it. @@ -259,20 +264,436 @@ request times, and synchronous replication guarantees the session to be replicated before the request returns. -The parameter "replicationMode" has three different settings: "pooled", "synchronous" and "asynchronous" +The parameter "replicationMode" has four different settings: "pooled", "synchronous", "asynchronous" and "fastasyncqueue" + + + +List of Attributes + + + +Attribute +Description +Default value + + + +replicationMode +replication mode (synchronous,pooled.asynchronous,fastasyncqueue) + +pooled + + + +processSenderFrequency + +2 + + + +compress +compress bytes before sending (consume memory, but reduce network traffic - GZIP) +false + + + +ackTimeout +acknowledge timeout +15000 + + + +waitForAck +Wait for ack after data send +true + + + +autoConnect +is sender disabled, fork a new socket +false + + + +doTransmitterProcessingStats +create processing time stats +false + + + + +Example to get statistic information and transfer is compressed + +<Sender + className="org.apache.catalina.cluster.tcp.ReplicationTransmitter" +
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp mbeans-descriptors.xml
pero2005/04/29 13:13:40 Modified:modules/cluster/src/share/org/apache/catalina/cluster/tcp mbeans-descriptors.xml Log: Update Descriptor Revision ChangesPath 1.11 +2 -2 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/mbeans-descriptors.xml Index: mbeans-descriptors.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/mbeans-descriptors.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- mbeans-descriptors.xml22 Apr 2005 20:33:45 - 1.10 +++ mbeans-descriptors.xml29 Apr 2005 20:13:40 - 1.11 @@ -239,13 +239,13 @@ type="java.lang.String" writeable="false"/>
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session JvmRouteBinderValve.java
pero2005/04/29 13:12:16 Modified:modules/cluster/src/share/org/apache/catalina/cluster/session JvmRouteBinderValve.java Log: Only log check message at debug log level. Revision ChangesPath 1.8 +4 -4 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/JvmRouteBinderValve.java Index: JvmRouteBinderValve.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/JvmRouteBinderValve.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- JvmRouteBinderValve.java 22 Apr 2005 20:33:45 - 1.7 +++ JvmRouteBinderValve.java 29 Apr 2005 20:12:16 - 1.8 @@ -225,10 +225,10 @@ } else { handleJvmRoute( request, response,session.getIdInternal(), jvmRoute); } -if (log.isInfoEnabled()) { +if (log.isDebugEnabled()) { long t2 = System.currentTimeMillis(); long time = t2 - t1; -log.info(sm.getString("jvmRoute.turnoverInfo", new Long(time))); +log.debug(sm.getString("jvmRoute.turnoverInfo", new Long(time))); } } } @@ -256,7 +256,7 @@ Manager manager = request.getContext().getManager(); if (log.isDebugEnabled()) { if(manager != null) -log.debug(sm.getString("jvmRoute.foundManager", manager, request.getContext().getName())); +log.debug(sm.getString("jvmRoute.foundManager", manager, request.getContext().getName())); else log.debug(sm.getString("jvmRoute.notFoundManager", manager, request.getContext().getName())); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session DeltaManager.java
pero2005/04/29 13:11:26 Modified:modules/cluster/src/share/org/apache/catalina/cluster/session DeltaManager.java Log: fIX that application can start/stop and start again. Revision ChangesPath 1.46 +20 -2 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java Index: DeltaManager.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- DeltaManager.java 22 Apr 2005 20:33:45 - 1.45 +++ DeltaManager.java 29 Apr 2005 20:11:26 - 1.46 @@ -29,8 +29,10 @@ import java.util.Date; import java.util.Iterator; +import org.apache.catalina.Cluster; import org.apache.catalina.Container; import org.apache.catalina.Context; +import org.apache.catalina.Host; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleException; import org.apache.catalina.LifecycleListener; @@ -896,6 +898,22 @@ // Load unloaded sessions, if any try { //the channel is already running +Cluster cluster = getCluster() ; +// stop remove cluster binding +if(cluster == null) { +Container context = getContainer() ; +if(context != null && context instanceof Context) { + Container host = context.getParent() ; + if(host != null && host instanceof Host) { + cluster = host.getCluster(); + if(cluster != null && cluster instanceof CatalinaCluster) { + setCluster((CatalinaCluster) cluster) ; + } else { + cluster = null ; + } + } +} +} if (cluster == null) { log.error(sm.getString("deltaManager.noCluster", getName())); return; @@ -905,7 +923,7 @@ .getString("deltaManager.startClustering", getName())); //to survice context reloads, as only a stop/start is called, not // createManager -getCluster().addManager(getName(), this); +((CatalinaCluster)cluster).addManager(getName(), this); getAllClusterSessions(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/xdocs/config workers.xml
pero2005/04/29 13:08:53 Modified:jk/xdocs changelog.xml jk/xdocs/config workers.xml Log: Document the worker secret attribute. I hope we can update the site. Revision ChangesPath 1.27 +5 -1 jakarta-tomcat-connectors/jk/xdocs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/xdocs/changelog.xml,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- changelog.xml 27 Apr 2005 14:06:17 - 1.26 +++ changelog.xml 29 Apr 2005 20:08:53 - 1.27 @@ -31,8 +31,12 @@ Added missing SEARCH and ACL http methods. (mturk) + Add worker secret attribute to the documentation (pero) + + Add a stopped flag to worker configuration. Set flag True and - complete traffic to worker is stopped. + complete traffic to worker is stopped. + Also update the Ant JkStatusUpdateTask at Tomcat 5.5.10 release. Only usefull in a replicated session cluster.(pero) Added worker maintain function that will maintain all 1.15 +6 -0 jakarta-tomcat-connectors/jk/xdocs/config/workers.xml Index: workers.xml === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/xdocs/config/workers.xml,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- workers.xml 26 Apr 2005 15:30:59 - 1.14 +++ workers.xml 29 Apr 2005 20:08:53 - 1.15 @@ -378,6 +378,12 @@ + +If set to AJP Connector secret keyword, only request with this keyword are successfull responding. +Use request.useSecret="true" and request.secret="secret key word" at your tomcat ajp +Connector configuration. + + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant JKStatusUpdateTask.java
pero2005/04/26 10:42:16 Modified:catalina/src/share/org/apache/catalina/ant JKStatusUpdateTask.java Log: Update for new stopped flag at jk 1.2.11 Revision ChangesPath 1.3 +39 -9 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/JKStatusUpdateTask.java Index: JKStatusUpdateTask.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/JKStatusUpdateTask.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- JKStatusUpdateTask.java 14 Mar 2005 20:42:22 - 1.2 +++ JKStatusUpdateTask.java 26 Apr 2005 17:42:16 - 1.3 @@ -53,6 +53,8 @@ private Boolean workerDisabled = Boolean.FALSE; +private Boolean workerStopped = Boolean.FALSE; + private boolean isLBMode = true; private String workerLb; @@ -216,6 +218,20 @@ } /** + * @return Returns the workerStopped. + */ +public Boolean getWorkerStopped() { +return workerStopped; +} + +/** + * @param workerStopped The workerStopped to set. + */ +public void setWorkerStopped(Boolean workerStopped) { +this.workerStopped = workerStopped; +} + +/** * @return Returns the workerLoadFactor. */ public Integer getWorkerLoadFactor() { @@ -266,7 +282,7 @@ * load balance example: * http://localhost/status?cmd=update&mime=txt&w=lb&lf=false&ls=true * worker example: - * http://localhost/status?cmd=update&mime=txt&w=node1&l=lb&wf=1&wd=false + * http://localhost/status?cmd=update&mime=txt&w=node1&l=lb&wf=1&wd=false&ws=false * * * @@ -299,7 +315,7 @@ sb.append(lbForceSession); } } else { - //http://localhost/status?cmd=update&mime=txt&w=node1&l=lb&wf=1&wd=false + //http://localhost/status?cmd=update&mime=txt&w=node1&l=lb&wf=1&wd=false&ws=false if ((workerLb != null)) { // must be configured sb.append("&l="); sb.append(URLEncoder.encode(workerLb, getCharset())); @@ -312,6 +328,10 @@ sb.append("&wd="); sb.append(workerDisabled); } +if ((workerStopped != null)) { +sb.append("&ws="); +sb.append(workerStopped); +} if ((workerRedirect != null)) { // other worker conrecte lb's sb.append("&wr="); } @@ -363,18 +383,28 @@ throw new BuildException( "Must specify at a node worker 'workerDisabled' attribute"); } -if (workerLoadFactor == null && workerClusterDomain == null -&& workerRedirect == null) { +if (workerStopped == null) { +throw new BuildException( +"Must specify at a node worker 'workerStopped' attribute"); +} +if (workerLoadFactor == null ) { +throw new BuildException( +"Must specify at a node worker 'workerLoadFactor' attribute"); +} +if (workerClusterDomain == null) { +throw new BuildException( +"Must specify at a node worker 'workerClusterDomain' attribute"); +} +if (workerRedirect == null) { throw new BuildException( -"Must specify at a node worker either 'workerClusterDomain'," -+ "'workerRedirect' or 'workerLoadFactor' attribute"); +"Must specify at a node worker 'workerRedirect' attribute"); } if (workerLb == null) { throw new BuildException("Must specify 'workerLb' attribute"); } -if (null != workerLoadFactor && 1 < workerLoadFactor.intValue()) { +if (workerLoadFactor.intValue() < 1) { throw new BuildException( -"The 'workerLoadFactor' must be greater than 1"); +"The 'workerLoadFactor' must be greater or equal 1"); } isLBMode = false; } else { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/xdocs/config workers.xml
pero2005/04/26 08:30:59 Modified:jk/xdocs changelog.xml jk/xdocs/config workers.xml Log: Add stopped flag for better cluster support to worker. Many thanks to Mladen :-> Revision ChangesPath 1.24 +5 -0 jakarta-tomcat-connectors/jk/xdocs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/xdocs/changelog.xml,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- changelog.xml 24 Apr 2005 10:15:02 - 1.23 +++ changelog.xml 26 Apr 2005 15:30:59 - 1.24 @@ -25,6 +25,11 @@ + + Add a stopped flag to worker configuration. Set flag True and + complete traffic to worker is stopped. + Only usefull in a replicated session cluster.(pero) + Added worker maintain function that will maintain all the workers instead just the current one. This enables to recycle the connections on all workers. (mturk) 1.14 +10 -0 jakarta-tomcat-connectors/jk/xdocs/config/workers.xml Index: workers.xml === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/xdocs/config/workers.xml,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- workers.xml 25 Apr 2005 06:53:25 - 1.13 +++ workers.xml 26 Apr 2005 15:30:59 - 1.14 @@ -368,6 +368,16 @@ + +If set to True or 1 the worker will be stopped if member +of load balancer. The flag is needed for stop complete traffic of a sticky session +worker. It is only usefull, when you have a cluster that replicated the sessions. +This flag can be changed at runtime using status worker. + +This feature has been added in jk 1.2.11. + + + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native/common jk_lb_worker.c jk_shm.h jk_status.c jk_uri_worker_map.h jk_util.c jk_util.h
pero2005/04/26 08:28:18 Modified:jk/native/common jk_lb_worker.c jk_shm.h jk_status.c jk_uri_worker_map.h jk_util.c jk_util.h Log: Add stopped flag for better cluster support to worker. Many thanks to Mladen :-> Revision ChangesPath 1.79 +11 -9 jakarta-tomcat-connectors/jk/native/common/jk_lb_worker.c Index: jk_lb_worker.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_lb_worker.c,v retrieving revision 1.78 retrieving revision 1.79 diff -u -r1.78 -r1.79 --- jk_lb_worker.c24 Apr 2005 09:54:47 - 1.78 +++ jk_lb_worker.c26 Apr 2005 15:28:18 - 1.79 @@ -40,8 +40,8 @@ /* * Time to wait before retry... */ -#define JK_WORKER_IN_ERROR(w) ((w)->in_error_state && !(w)->is_disabled && !(w)->is_busy) -#define JK_WORKER_USABLE(w) (!(w)->in_error_state && !(w)->is_disabled && !(w)->is_busy) +#define JK_WORKER_IN_ERROR(w) ((w)->in_error_state && !(w)->is_disabled && !(w)->is_busy) +#define JK_WORKER_USABLE(w) (!(w)->in_error_state && !(w)->is_stopped && !(w)->is_disabled && !(w)->is_busy) struct lb_endpoint { @@ -235,7 +235,7 @@ strcmp(p->lb_workers[i].s->domain, domain)) continue; /* Take into calculation only the workers that are - * not in error state or not disabled. + * not in error state, stopped or not disabled. */ if (JK_WORKER_USABLE(p->lb_workers[i].s)) { if (p->lbmethod == JK_LB_BYREQUESTS) { @@ -252,7 +252,7 @@ curmin = mytraffic; } } -} +} } if (candidate) { @@ -284,7 +284,7 @@ retry_worker(&p->lb_workers[i], p->s->recover_wait_time, l); } /* Take into calculation only the workers that are - * not in error state or not disabled. + * not in error state, stopped or not disabled. */ if (JK_WORKER_USABLE(p->lb_workers[i].s)) { p->lb_workers[i].s->lb_value += p->lb_workers[i].s->lb_factor; @@ -319,7 +319,7 @@ retry_worker(&p->lb_workers[i], p->s->recover_wait_time, l); } /* Take into calculation only the workers that are - * not in error state or not disabled. + * not in error state, stopped or not disabled. */ if (JK_WORKER_USABLE(p->lb_workers[i].s)) { mytraffic = (p->lb_workers[i].s->transferred/p->lb_workers[i].s->lb_factor) + @@ -351,8 +351,8 @@ if (JK_WORKER_IN_ERROR(candidate->s)) { retry_worker(candidate, p->s->recover_wait_time, l); } -if (candidate->s->in_error_state) { -/* We have a worker that is error state. +if (candidate->s->in_error_state || candidate->s->is_stopped ) { +/* We have a worker that is error state or stopped. * If it has a redirection set use that redirection worker. * This enables to safely remove the member from the * balancer. Of course you will need a some kind of @@ -780,6 +780,8 @@ p->lb_workers[i].s->error_time = 0; /* Worker can be initaly disabled as hot standby */ p->lb_workers[i].s->is_disabled = jk_get_is_worker_disabled(props, worker_names[i]); +/* Worker can be initaly deactive as cold standby */ +p->lb_workers[i].s->is_stopped = jk_get_is_worker_stopped(props, worker_names[i]); if (!wc_create_worker(p->lb_workers[i].s->name, props, &(p->lb_workers[i].w), 1.19 +2 -1 jakarta-tomcat-connectors/jk/native/common/jk_shm.h Index: jk_shm.h === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_shm.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- jk_shm.h 11 Apr 2005 06:36:02 - 1.18 +++ jk_shm.h 26 Apr 2005 15:28:18 - 1.19 @@ -64,6 +64,7 @@ charredirect[JK_SHM_STR_SIZ+1]; /* current status of the worker */ volatile int is_disabled; +volatile int is_stopped; volatile int is_busy; /* Current lb factor */ volatile int lb_factor; 1.38 +17 -6 jakarta-tomcat-connectors/jk/native/common/jk_status.c Index: jk_status.c =
cvs commit: jakarta-tomcat-catalina/modules/cluster to-do.txt
pero2005/04/24 02:45:52 Modified:modules/cluster to-do.txt Log: add my detected cluster problems when restarting applications or complete nodes Revision ChangesPath 1.14 +43 -1 jakarta-tomcat-catalina/modules/cluster/to-do.txt Index: to-do.txt === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/to-do.txt,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- to-do.txt 22 Apr 2005 20:33:45 - 1.13 +++ to-do.txt 24 Apr 2005 09:45:52 - 1.14 @@ -64,7 +64,49 @@ via XML documents and http - display stats as xml - operation via JMX (MX4J adaptor) - + + +problems + +- How we can stop the request traffic when restart an application? +currently the jk 1.2.10 can only disable the complete loadbalancer, +but this detect only the new session request desicion. +Request with sessions marks send to tomcat. + +- Can't stop message replication for a spezial member and application + - this need a spezial cluster message and send filter at SimpleTcpCluster + +- Don't generate cluster message when no member is at cluster! + - Register DeltaManager as Cluster LifecycleListener and stop cresting and sending + - Reduce memory consume when only one node is active + +- WaitForAck mode and resend probleme + - When session serialzisation needs more time then wait ack timeout, + the sender send GETALLSESSIONS again!! + Bad for performance and memory, sometimes it drop both nodes very quickly! + => Some message need a flag that resend is not allowed! + proposed transfer protocol and api change between Transmitter/Senders and ObjectReader/Receiver +not used byte[] instead a better transfer message format + header [TC]2 bytes + type= reserved 1 byte + compress = true/false 1 byte 1 true 0 false + resendAllowed = true/false 1 byte + isResendPackage = true/false 1 byte + splitpackage=true/false1 byte + packagenumber= int 2 bytes + lastpackagenumber= int 2 bytes + length 4 bytes + orignalLength 4 bytes + byte[] length + + orignalLength != length when compress = true, for better default byte allocation at receiver) + + see "Nice to have" also + +- the resending is also a problem with FarmDeployer. + when last package received and starting the application needs time > wait-ack timeout + => the last war file packge are resend + == Nice to have: == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster build.xml
pero2005/04/23 05:20:59 Modified:modules/cluster build.xml Log: revert change for compile with java 1.4 Revision ChangesPath 1.16 +0 -1 jakarta-tomcat-catalina/modules/cluster/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/build.xml,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- build.xml 22 Apr 2005 20:33:44 - 1.15 +++ build.xml 23 Apr 2005 12:20:59 - 1.16 @@ -81,7 +81,6 @@ optimize="${compile.optimize}" excludes="**/CVS/**" > -
cvs commit: jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager JMXProxyServlet.java
pero2005/04/22 13:29:31 Modified:webapps/manager/WEB-INF/classes/org/apache/catalina/manager JMXProxyServlet.java Log: add jmx get single attribute Revision ChangesPath 1.8 +16 -1 jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/JMXProxyServlet.java Index: JMXProxyServlet.java === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/JMXProxyServlet.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- JMXProxyServlet.java 23 Sep 2004 07:03:27 - 1.7 +++ JMXProxyServlet.java 22 Apr 2005 20:29:31 - 1.8 @@ -92,7 +92,12 @@ setAttribute( writer, qry, name, val ); return; } - +qry=request.getParameter("get"); +if( qry!= null ) { +String name=request.getParameter("att"); +getAttribute( writer, qry, name ); +return; +} qry=request.getParameter("qry"); if( qry == null ) { qry = "*:*"; @@ -102,6 +107,16 @@ } +public void getAttribute(PrintWriter writer, String onameStr, String att) { +try { +ObjectName oname = new ObjectName(onameStr); +Object value = mBeanServer.getAttribute(oname, att); +writer.println("OK - Attribute get '" + onameStr + "' - " + att + "= " + value.toString() ); +} catch (Exception ex) { +writer.println("Error - " + ex.toString()); +} +} + public void setAttribute( PrintWriter writer, String onameStr, String att, String val ) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
pero2005/04/22 13:38:38 Modified:webapps/docs changelog.xml Log: redesign DeltaManager restart under load Revision ChangesPath 1.291 +3 -1 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.290 retrieving revision 1.291 diff -u -r1.290 -r1.291 --- changelog.xml 15 Apr 2005 20:15:17 - 1.290 +++ changelog.xml 22 Apr 2005 20:38:38 - 1.291 @@ -146,7 +146,9 @@ Refactor DeltaManager: - createSession call now ManagerBase super class method - - extract some long methods (pero) + - extract some long methods + - send GET_ALL_SESSION with session blocks + - don't sync sessions map when send all sessions (pero) Add developer actions at to-do.txt (Proposal of changes) (pero) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant JMXGetTask.java
pero2005/04/22 13:30:31 Added: catalina/src/share/org/apache/catalina/ant JMXGetTask.java Log: add jmx get single attribute with ant task Revision ChangesPath 1.1 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/JMXGetTask.java Index: JMXGetTask.java === /* * Copyright 2002,2004 The Apache Software Foundation. * * Licensed 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.ant; import org.apache.tools.ant.BuildException; /** * Ant task that implements the JMX Get command (/jmxproxy/?get) * supported by the Tomcat manager application. * * @author Peter Rossbach * @version $Revision: 1.1 $ */ public class JMXGetTask extends AbstractCatalinaTask { // Properties /** * The full bean name */ protected String bean = null; /** * The attribute you wish to alter */ protected String attribute = null; // Public Methods /** * Get method for the bean name * @return Bean name */ public String getBean () { return this.bean; } /** * Set method for the bean name * @param bean Bean name */ public void setBean (String bean) { this.bean = bean; } /** * Get method for the attribute name * @return Attribute name */ public String getAttribute () { return this.attribute; } /** * Set method for the attribute name * @param attribute Attribute name */ public void setAttribute (String attribute) { this.attribute = attribute; } /** * Execute the requested operation. * * @exception BuildException if an error occurs */ public void execute() throws BuildException { super.execute(); if (bean == null || attribute == null) { throw new BuildException ("Must specify 'bean' and 'attribute' attributes"); } log("Getting attribute " + attribute + " in bean " + bean ); execute("/jmxproxy/?get=" + bean + "&att=" + attribute ); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/test/src/share/org/apache/catalina/cluster/tcp SimpleTcpClusterTest.java
pero2005/04/18 11:55:38 Added: modules/cluster/test/src/share/org/apache/catalina/cluster/tcp SimpleTcpClusterTest.java Log: Test auto ClusterSessionListener creation as no other ClusterListener is configured! Revision ChangesPath 1.1 jakarta-tomcat-catalina/modules/cluster/test/src/share/org/apache/catalina/cluster/tcp/SimpleTcpClusterTest.java Index: SimpleTcpClusterTest.java === /* * Copyright 1999,2004 The Apache Software Foundation. * * Licensed 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.cluster.tcp; import junit.framework.TestCase; import org.apache.catalina.LifecycleException; import org.apache.catalina.cluster.deploy.FarmWarDeployer; import org.apache.catalina.cluster.mcast.McastService; import org.apache.catalina.cluster.session.ClusterSessionListener; /* * @author Peter Rossbach * @version $Revision: 1.1 $ $Date: 2005/04/18 18:55:38 $ */ public class SimpleTcpClusterTest extends TestCase { public void testCreateClusterSessionListenerAtStart() throws LifecycleException { SimpleTcpCluster cluster = new SimpleTcpCluster() ; cluster.setMembershipService( new McastService() { public void start() {} }); cluster.setClusterDeployer(new FarmWarDeployer() { public void start() {}}); SocketReplicationListener receiver = new SocketReplicationListener(){ public void start() {}}; receiver.setTcpListenAddress("localhost"); receiver.setTcpListenPort(45660); cluster.setClusterReceiver(receiver); cluster.setClusterSender(new ReplicationTransmitter(){ public void start() {}}); cluster.start(); assertEquals(1,cluster.clusterListeners.size()); assertTrue( cluster.clusterListeners.get(0) instanceof ClusterSessionListener); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/test/src/share/org/apache/catalina/cluster/tcp ReplicationTransmitterTest.java
pero2005/04/17 09:17:16 Modified:modules/cluster/test/src/share/org/apache/catalina/cluster/tcp ReplicationTransmitterTest.java Log: correct name change Revision ChangesPath 1.2 +2 -2 jakarta-tomcat-catalina/modules/cluster/test/src/share/org/apache/catalina/cluster/tcp/ReplicationTransmitterTest.java Index: ReplicationTransmitterTest.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/test/src/share/org/apache/catalina/cluster/tcp/ReplicationTransmitterTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ReplicationTransmitterTest.java 12 Apr 2005 18:56:07 - 1.1 +++ ReplicationTransmitterTest.java 17 Apr 2005 16:17:16 - 1.2 @@ -36,7 +36,7 @@ transmitter.setCompress(true); SessionMessageImpl message= new SessionMessageImpl(); message.setUniqueId("test"); -byte [] data = transmitter.createMessageData(message); +byte [] data = transmitter.serialze(message); assertTrue(200 < data.length); Object myobj = getGZPObject(data); assertTrue(myobj instanceof SessionMessageImpl); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp LocalStrings.properties SimpleTcpCluster.java
pero2005/04/16 01:10:48 Modified:modules/cluster/src/share/org/apache/catalina/cluster/tcp LocalStrings.properties SimpleTcpCluster.java Log: i18n message change Revision ChangesPath 1.8 +1 -0 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties Index: LocalStrings.properties === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- LocalStrings.properties 15 Apr 2005 20:14:13 - 1.7 +++ LocalStrings.properties 16 Apr 2005 08:10:48 - 1.8 @@ -36,3 +36,4 @@ SimpleTcpCluster.event.log=Cluster receive listener event {0} with data {1} SimpleTcpCluster.getProperty=get property {0} SimpleTcpCluster.setProperty=set property {0}: {1} old value {2} +SimpleTcpCluster.auto.addClusterListener=Add ClusterSessionListener at cluster [{0}:{1,number,integer}] 1.64 +3 -2 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java Index: SimpleTcpCluster.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java,v retrieving revision 1.63 retrieving revision 1.64 diff -u -r1.63 -r1.64 --- SimpleTcpCluster.java 15 Apr 2005 20:14:14 - 1.63 +++ SimpleTcpCluster.java 16 Apr 2005 08:10:48 - 1.64 @@ -634,7 +634,8 @@ // setup the normal Cluster Session Listener (DeltaManager support) if(clusterListeners.size() == 0 ) { if(log.isInfoEnabled()) { - log.info("Add ClusterSessionListener "); + log.info(sm.getString("SimpleTcpCluster.auto.addClusterListener", + clusterReceiver.getHost(),new Integer(clusterReceiver.getPort(; } addClusterListener(new ClusterSessionListener()); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp ClusterReceiverBase.java
pero2005/04/16 00:23:05 Modified:modules/cluster/src/share/org/apache/catalina/cluster/tcp ClusterReceiverBase.java Log: Change method names Revision ChangesPath 1.3 +4 -4 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java Index: ClusterReceiverBase.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ClusterReceiverBase.java 15 Apr 2005 20:14:13 - 1.2 +++ ClusterReceiverBase.java 16 Apr 2005 07:23:05 - 1.3 @@ -402,7 +402,7 @@ timeSent = System.currentTimeMillis(); } try { -ClusterMessage message = createRecevierObject(data); +ClusterMessage message = deserialze(data); cluster.receive(message); } catch (Exception x) { log @@ -417,13 +417,13 @@ } /** - * create the receieve cluster message + * deserialze the receieve cluster message * @param data uncompress data * @return * @throws IOException * @throws ClassNotFoundException */ -protected ClusterMessage createRecevierObject(byte[] data) +protected ClusterMessage deserialze(byte[] data) throws IOException, ClassNotFoundException { Object message = null; if (data != null) { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp ReplicationTransmitter.java
pero2005/04/16 00:22:41 Modified:modules/cluster/src/share/org/apache/catalina/cluster/tcp ReplicationTransmitter.java Log: Change method names Revision ChangesPath 1.31 +6 -6 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ReplicationTransmitter.java Index: ReplicationTransmitter.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ReplicationTransmitter.java,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- ReplicationTransmitter.java 15 Apr 2005 20:14:14 - 1.30 +++ ReplicationTransmitter.java 16 Apr 2005 07:22:41 - 1.31 @@ -425,7 +425,7 @@ time = System.currentTimeMillis(); } try { -byte[] data = createMessageData(message); +byte[] data = serialze(message); String key = getKey(member); IDataSender sender = (IDataSender) map.get(key); sendMessageData(message.getUniqueId(), data, sender); @@ -447,7 +447,7 @@ time = System.currentTimeMillis(); } try { -byte[] data = createMessageData(message); +byte[] data = serialze(message); IDataSender[] senders = getSenders(); for (int i = 0; i < senders.length; i++) { @@ -751,13 +751,13 @@ } /** - * Send Message create Timestamp and generate message bytes form msg - * @see XByteBuffer#createDataPackage(byte[]) + * serialze message and add timestamp + * @see GZIPOutputStream * @param msg cluster message * @return cluster message as byte array * @throws IOException */ -protected byte[] createMessageData(ClusterMessage msg) throws IOException { +protected byte[] serialze(ClusterMessage msg) throws IOException { msg.setTimestamp(System.currentTimeMillis()); ByteArrayOutputStream outs = new ByteArrayOutputStream(); ObjectOutputStream out; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/test/src/share/org/apache/catalina/cluster/tcp DataSenderTest.java
pero2005/04/16 00:06:08 Modified:modules/cluster/test/src/share/org/apache/catalina/cluster/tcp DataSenderTest.java Log: Correct checkKeepAlive New WriteData send also the header Revision ChangesPath 1.3 +9 -9 jakarta-tomcat-catalina/modules/cluster/test/src/share/org/apache/catalina/cluster/tcp/DataSenderTest.java Index: DataSenderTest.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/test/src/share/org/apache/catalina/cluster/tcp/DataSenderTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- DataSenderTest.java 10 Apr 2005 16:20:46 - 1.2 +++ DataSenderTest.java 16 Apr 2005 07:06:08 - 1.3 @@ -132,7 +132,7 @@ DataSender sender = createMockDataSender(); sender.writeData(new byte[]{ 1,2,3 }) ; ByteArrayOutputStream stream = (ByteArrayOutputStream)sender.getSocket().getOutputStream(); -assertEquals(3,stream.size()); +assertEquals(21,stream.size()); ByteArrayInputStream istream = (ByteArrayInputStream)sender.getSocket().getInputStream(); assertEquals(-1,istream.read()); MockSocket socket =((MockSocket)sender.getSocket()); @@ -163,7 +163,7 @@ sender.openSocket(); sender.writeData(new byte[]{ 1,2,3 }) ; ByteArrayOutputStream stream = (ByteArrayOutputStream)sender.getSocket().getOutputStream(); -assertEquals(3,stream.size()); +assertEquals(21,stream.size()); ByteArrayInputStream istream = (ByteArrayInputStream)sender.getSocket().getInputStream(); assertEquals(3,TcpReplicationThread.ACK_COMMAND.length); assertEquals(TcpReplicationThread.ACK_COMMAND[0],istream.read()); @@ -175,23 +175,23 @@ * Check close socket fro keep alive handling is correct (number of request and timeout * @throws Exception */ -public void testCheckIfCloseSocket() throws Exception { +public void testcheckKeepAlive() throws Exception { DataSender sender = createMockDataSender() ; -assertFalse(sender.checkIfCloseSocket()) ; +assertFalse(sender.checkKeepAlive()) ; sender.setKeepAliveMaxRequestCount(1); sender.keepAliveCount = 1; -assertTrue(sender.checkIfCloseSocket()); +assertTrue(sender.checkKeepAlive()); assertEquals(1,sender.getSocketCloseCounter()); assertEquals(0,sender.getKeepAliveCount()); sender.openSocket(); assertEquals(0,sender.getKeepAliveCount()); sender.setKeepAliveMaxRequestCount(100); sender.keepAliveConnectTime = System.currentTimeMillis() - sender.getKeepAliveTimeout() ; -assertFalse(sender.checkIfCloseSocket()); +assertFalse(sender.checkKeepAlive()); assertTrue(sender.isConnected()); assertEquals(1,sender.getSocketCloseCounter()); sender.keepAliveConnectTime-- ; -assertTrue(sender.checkIfCloseSocket()); +assertTrue(sender.checkKeepAlive()); assertEquals(2,sender.getSocketCloseCounter()); } @@ -233,7 +233,7 @@ */ private void assertPushMessage(DataSender sender) throws IOException { ByteArrayOutputStream stream = pushMessage(sender); -assertEquals(3,stream.size()); +assertEquals(21,stream.size()); assertEquals(1,sender.getKeepAliveCount()); assertEquals(1,sender.getNrOfRequests()); assertEquals(0,sender.getProcessingTime()); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session ManagerBase.java
pero2005/04/15 13:15:45 Modified:catalina/src/share/org/apache/catalina Cluster.java catalina/src/share/org/apache/catalina/session ManagerBase.java Log: Refactoring and redesign cluster Revision ChangesPath 1.10 +6 -1 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Cluster.java Index: Cluster.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Cluster.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Cluster.java 5 Oct 2004 17:12:49 - 1.9 +++ Cluster.java 15 Apr 2005 20:15:45 - 1.10 @@ -78,6 +78,7 @@ * Set the protocol parameters. * * @param protocol The protocol used by the cluster + * @deprecated */ public void setProtocol(String protocol); @@ -85,6 +86,7 @@ * Get the protocol used by the cluster. * * @return The protocol + * @deprecated */ public String getProtocol(); @@ -123,6 +125,7 @@ * not identify a currently installed web application * @exception IOException if an input/output error occurs during * startup + * @deprecated */ public void startContext(String contextPath) throws IOException; @@ -151,6 +154,7 @@ * is malformed (it must be "" or start with a slash) * @exception IllegalStateException if the specified context path * is already attached to an existing web application + * @deprecated */ public void installContext(String contextPath, URL war); @@ -166,6 +170,7 @@ * not identify a currently installed web application * @exception IOException if an input/output error occurs while stopping * the web application + * @deprecated */ public void stop(String contextPath) throws IOException; 1.42 +12 -1 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/ManagerBase.java Index: ManagerBase.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/ManagerBase.java,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- ManagerBase.java 31 Mar 2005 10:31:53 - 1.41 +++ ManagerBase.java 15 Apr 2005 20:15:45 - 1.42 @@ -767,6 +767,17 @@ session.setMaxInactiveInterval(this.maxInactiveInterval); if (sessionId == null) { sessionId = generateSessionId(); +// FIXME WHy we need no duplication check? +/* + synchronized (sessions) { +while (sessions.get(sessionId) != null) { // Guarantee +// uniqueness +duplicates++; +sessionId = generateSessionId(); +} +} +*/ + // FIXME: Code to be used in case route replacement is needed /* } else { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
pero2005/04/15 13:15:17 Modified:webapps/docs changelog.xml Log: Refactoring and redesign cluster Revision ChangesPath 1.290 +29 -8 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.289 retrieving revision 1.290 diff -u -r1.289 -r1.290 --- changelog.xml 15 Apr 2005 08:58:46 - 1.289 +++ changelog.xml 15 Apr 2005 20:15:17 - 1.290 @@ -43,11 +43,20 @@ Update to JDT from Eclipse 3.1M6, which is now feature complete (remm) -Start refactoring, redesign and extend the cluster module (pero) - - -Add Apache Portable Runtime JNI wrapper and helper API (mturk) - +Refactoring, redesign and extend the cluster module + - Optimized performance and reduce memory usage + - Better JMX support + - add a lot of JMX stats attribute for better monitoring + - more config options + LifecycleListener + ClusterListener + more than one Cluster Valves + - better subclass support + - change a lot of existing API's (pero) + + + Add Apache Portable Runtime JNI wrapper and helper API (mturk) + @@ -127,20 +136,32 @@ + +Redesign SimpleTcpCluster message receiving to ClusterReceiverBase (pero) + + +Cluster transfer all attributes to the generate session manager at addManager. +Remove some unused attributes at SimpleTcpCluster and ReplicationTransmitter (pero) + + +Refactor DeltaManager: + - createSession call now ManagerBase super class method + - extract some long methods (pero) + -update to-do.txt (pero) +Add developer actions at to-do.txt (Proposal of changes) (pero) Small refactorings at FastAsyncSocketSender (pero) -Refactor cluster message sending to lesser cpu and memory usage. +Redesign cluster message sending to lesser cpu and memory usage. Set at ReplicationTransmitter#compress=false as default. Change API from ClusterSender, ReplicaitonTransmitter, DataSender, SimpleTcpCluster (pero) DeltaManager has now JMX expireAllLocalSessions and processExipre operation -for better cluster node shutdown handling (pero) +for better cluster node shutdown handling (usefull for testing only) (pero) DataSender doWaitAckStats for better understanding wait ack problems (pero) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/storeconfig/test/src/share/org/apache/catalina/storeconfig StandardHostSFTest.java StoreAppenderTest.java StoreLoaderTest.java
pero2005/04/15 13:14:46 Modified:modules/storeconfig/src/share/org/apache/catalina/storeconfig server-registry.xml modules/storeconfig/test/src/share/org/apache/catalina/storeconfig StandardHostSFTest.java StoreAppenderTest.java StoreLoaderTest.java Added: modules/storeconfig/src/share/org/apache/catalina/storeconfig IDynamicPropertyStoreAppender.java Removed: modules/storeconfig/src/share/org/apache/catalina/storeconfig ReplicationTransmitterStoreAppender.java Log: Refactoring and redesign cluster Revision ChangesPath 1.6 +3 -2 jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/server-registry.xml Index: server-registry.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/server-registry.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- server-registry.xml 10 Apr 2005 16:22:15 - 1.5 +++ server-registry.xml 15 Apr 2005 20:14:46 - 1.6 @@ -132,7 +132,8 @@ default="false" childs="true" tagClass="org.apache.catalina.cluster.CatalinaCluster" - storeFactoryClass="org.apache.catalina.storeconfig.CatalinaClusterSF"> +storeFactoryClass="org.apache.catalina.storeconfig.CatalinaClusterSF" + storeAppenderClass="org.apache.catalina.storeconfig.IDynamicPropertyStoreAppender"> + storeAppenderClass="org.apache.catalina.storeconfig.IDynamicPropertyStoreAppender"> 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.storeconfig; import java.beans.IndexedPropertyDescriptor; import java.beans.IntrospectionException; import java.beans.Introspector; import java.beans.PropertyDescriptor; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.apache.catalina.cluster.util.IDynamicProperty; import org.apache.tomcat.util.IntrospectionUtils; /** * Store the IDynamicProperty attributes. * * @author Peter Rossbach * */ public class IDynamicPropertyStoreAppender extends StoreAppender { /** * Store the relevant attributes of the specified JavaBean. * * @param writer *PrintWriter to which we are storing * @param include *Should we include a className attribute? * @param bean *Bean whose properties are to be rendered as attributes, * @param desc *RegistryDescrpitor from this bean * * @exception Exception *if an exception occurs while storing */ public void printAttributes(PrintWriter writer, int indent, boolean include, Object bean, StoreDescription desc) throws Exception { // Render the relevant properties of this bean String className = bean.getClass().getName(); // Render a className attribute if requested if (include && desc != null && !desc.isStandard()) { writer.print(" className=\""); writer.print(bean.getClass().getName()); writer.print("\""); } if (bean instanceof IDynamicProperty) { List propertyKeys = getPropertyKeys((IDynamicProperty) bean); // Create blank instance Object bean2 = defaultInstance(bean); for (Iterator propertyIterator = propertyKeys.iterator(); propertyIterator .hasNext();) { String key = (String) propertyIterator.next(); Object value = (Object) IntrospectionUtils.getProperty(bean, key); if (desc.isTransientAttribute(key)) { continue; // Skip the specified exceptions } if (value == null) { continue; // Null values are not persisted } if (!isPersistable(value.getClass())) { continue; } Object value2 = IntrospectionU
cvs commit: jakarta-tomcat-catalina/modules/cluster/test/src/share/org/apache/catalina/cluster/session DeltaManagerTest.java
pero2005/04/15 13:14:14 Modified:modules/cluster/src/share/org/apache/catalina/cluster CatalinaCluster.java ClusterManager.java modules/cluster/src/share/org/apache/catalina/cluster/io ObjectReader.java SocketObjectReader.java XByteBuffer.java modules/cluster/src/share/org/apache/catalina/cluster/session DeltaManager.java LocalStrings.properties SimpleTcpReplicationManager.java mbeans-descriptors.xml modules/cluster/src/share/org/apache/catalina/cluster/tcp ClusterReceiverBase.java DataSender.java IDataSender.java LocalStrings.properties ReplicationListener.java ReplicationTransmitter.java SimpleTcpCluster.java SocketReplicationListener.java mbeans-descriptors.xml modules/cluster/test/src/share/org/apache/catalina/cluster/io XByteBufferTest.java modules/cluster to-do.txt Added: modules/cluster/src/share/org/apache/catalina/cluster/util IDynamicProperty.java modules/cluster/test/src/share/org/apache/catalina/cluster/session DeltaManagerTest.java Log: Refactoring and redesign cluster Revision ChangesPath 1.11 +12 -8 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/CatalinaCluster.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/CatalinaCluster.java.diff?r1=1.10&r2=1.11 1.8 +8 -15 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/ClusterManager.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/ClusterManager.java.diff?r1=1.7&r2=1.8 1.8 +3 -3 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io/ObjectReader.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io/ObjectReader.java.diff?r1=1.7&r2=1.8 1.2 +7 -7 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io/SocketObjectReader.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io/SocketObjectReader.java.diff?r1=1.1&r2=1.2 1.14 +8 -54 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io/XByteBuffer.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io/XByteBuffer.java.diff?r1=1.13&r2=1.14 1.44 +172 -145 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java.diff?r1=1.43&r2=1.44 1.6 +3 -2 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings.properties http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/LocalStrings.properties.diff?r1=1.5&r2=1.6 1.38 +15 -3 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/SimpleTcpReplicationManager.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/SimpleTcpReplicationManager.java.diff?r1=1.37&r2=1.38 1.5 +43 -12 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/mbeans-descriptors.xml http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/mbeans-descriptors.xml.diff?r1=1.4&r2=1.5 1.2 +308 -7 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java.diff?r1=1.1&r2=1.2 1.11 +3 -3 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java.diff?r1=1.10&r2=1.11 1.8 +1 -0 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/IDataSender.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/clust
cvs commit: jakarta-tomcat-catalina/modules/cluster/test/src/share/org/apache/catalina/cluster/session - New directory
pero2005/04/15 13:12:49 jakarta-tomcat-catalina/modules/cluster/test/src/share/org/apache/catalina/cluster/session - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
pero2005/04/12 11:56:47 Modified:webapps/docs changelog.xml Log: Optimize cluster send message Refactor ReplicationTransmitter Revision ChangesPath 1.288 +14 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.287 retrieving revision 1.288 diff -u -r1.287 -r1.288 --- changelog.xml 11 Apr 2005 15:07:46 - 1.287 +++ changelog.xml 12 Apr 2005 18:56:47 - 1.288 @@ -42,6 +42,9 @@ Update to JDT from Eclipse 3.1M6, which is now feature complete (remm) + +Start refactoring, redesign and extend the cluster module (pero) + @@ -114,6 +117,17 @@ + +update to-do.txt (pero) + + +Small refactorings at FastAsyncSocketSender (pero) + + +Refactor cluster message sending to lesser cpu and memory usage. +Set at ReplicationTransmitter#compress=false as default. Change API from +ClusterSender, ReplicaitonTransmitter, DataSender, SimpleTcpCluster (pero) + DeltaManager has now JMX expireAllLocalSessions and processExipre operation for better cluster node shutdown handling (pero) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/test/src/share/org/apache/catalina/cluster/tcp ReplicationTransmitterTest.java
pero2005/04/12 11:56:07 Modified:modules/cluster/src/share/org/apache/catalina/cluster ClusterSender.java modules/cluster/src/share/org/apache/catalina/cluster/io XByteBuffer.java modules/cluster/src/share/org/apache/catalina/cluster/tcp DataSender.java FastAsyncSocketSender.java ReplicationTransmitter.java SimpleTcpCluster.java TcpReplicationThread.java mbeans-descriptors.xml modules/cluster to-do.txt Added: modules/cluster/test/src/share/org/apache/catalina/cluster/tcp ReplicationTransmitterTest.java Log: Optimize cluster send message add some usefull mbean attributes Refactor ReplicationTransmitter Revision ChangesPath 1.7 +2 -2 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/ClusterSender.java Index: ClusterSender.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/ClusterSender.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ClusterSender.java10 Apr 2005 16:20:45 - 1.6 +++ ClusterSender.java12 Apr 2005 18:56:07 - 1.7 @@ -39,9 +39,9 @@ public void backgroundProcess() ; -public void sendMessage(String messageId, byte[] indata, Member member) throws java.io.IOException; +public void sendMessage(ClusterMessage message, Member member) throws java.io.IOException; -public void sendMessage(String messageId, byte[] indata) throws java.io.IOException; +public void sendMessage(ClusterMessage message) throws java.io.IOException; public boolean isWaitForAck(); public void setWaitForAck(boolean isWaitForAck); 1.13 +2 -1 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io/XByteBuffer.java Index: XByteBuffer.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io/XByteBuffer.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- XByteBuffer.java 5 Apr 2005 18:05:52 - 1.12 +++ XByteBuffer.java 12 Apr 2005 18:56:07 - 1.13 @@ -366,6 +366,7 @@ * @param indata - the message data to be contained within the package * @param compress - compress message data or not * @return - a full package (header,size,data,footer) + * @deprecated since 5.5.10 */ public static byte[] createDataPackage(byte[] indata, boolean compress) throws java.io.IOException { 1.7 +18 -6 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java Index: DataSender.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/DataSender.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- DataSender.java 10 Apr 2005 16:20:46 - 1.6 +++ DataSender.java 12 Apr 2005 18:56:07 - 1.7 @@ -17,10 +17,12 @@ package org.apache.catalina.cluster.tcp; import java.io.IOException; +import java.io.OutputStream; import java.net.InetAddress; import java.net.Socket; import java.net.SocketException; +import org.apache.catalina.cluster.io.XByteBuffer; import org.apache.catalina.util.StringManager; /** @@ -47,7 +49,7 @@ /** * The descriptive information about this implementation. */ -private static final String info = "DataSender/1.4"; +private static final String info = "DataSender/2.0"; /** * receiver address @@ -227,6 +229,13 @@ } /** + * @return Returns the avg totalBytes/nrOfRequests. + */ +public double getAvgMessageSize() { +return ((double)totalBytes) / nrOfRequests; +} + +/** * @return Returns the avg processingTime/nrOfRequests. */ public double getAvgProcessingTime() { @@ -693,7 +702,7 @@ openSocket(); } try { -writeData(data); + writeData(data); } catch (java.io.IOException x) { // second try with fresh connection dataResendCounter++; @@ -724,8 +733,12 @@ * @throws IOException */ protected void writeData(byte[] data) throws IOException { -socket.getOutputStream().write(data); -socket.getOutputStream().flush(); +OutputStream out = so
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
pero2005/04/10 12:29:09 Modified:modules/cluster/src/share/org/apache/catalina/cluster/session DeltaManager.java mbeans-descriptors.xml webapps/docs changelog.xml Log: DeltaManager has now JMX expireAllLocalSessions and processExipre operation for better cluster node shutdown handling Revision ChangesPath 1.43 +32 -1 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java Index: DeltaManager.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- DeltaManager.java 10 Apr 2005 16:20:46 - 1.42 +++ DeltaManager.java 10 Apr 2005 19:29:09 - 1.43 @@ -1033,6 +1033,37 @@ } /** + * Exipre all find sessions. + */ +public void expireAllLocalSessions() +{ +long timeNow = System.currentTimeMillis(); +Session sessions[] = findSessions(); +int expireDirect = 0 ; +int expireIndirect = 0 ; + +if(log.isDebugEnabled()) +log.debug("Start expire all sessions " + getName() + " at " + timeNow + " sessioncount " + sessions.length); +for (int i = 0; i < sessions.length; i++) { +if (sessions[i] instanceof DeltaSession) { +DeltaSession session = (DeltaSession) sessions[i]; +if (session.isPrimarySession()) { +if (session.isValid()) { +session.expire(); +expireDirect++; +} else { +expireIndirect++; +} +} +} +} +long timeEnd = System.currentTimeMillis(); +if(log.isDebugEnabled()) + log.debug("End expire sessions " + getName() + " exipre processingTime " + (timeEnd - timeNow) + " expired direct sessions: " + expireDirect + " expired direct sessions: " + expireIndirect); + +} + +/** * When the manager expires session not tied to a request. The cluster will * periodically ask for a list of sessions that should expire and that * should be sent across the wire. 1.4 +12 -0 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/mbeans-descriptors.xml Index: mbeans-descriptors.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/mbeans-descriptors.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- mbeans-descriptors.xml10 Apr 2005 16:20:46 - 1.3 +++ mbeans-descriptors.xml10 Apr 2005 19:29:09 - 1.4 @@ -215,6 +215,18 @@ type="java.lang.String"/> + + + + + + +DeltaManager has now JMX expireAllLocalSessions and processExipre operation +for better cluster node shutdown handling (pero) + + DataSender doWaitAckStats for better understanding wait ack problems (pero) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp FastAsyncSocketSender.java
pero2005/04/10 09:54:06 Modified:modules/cluster/src/share/org/apache/catalina/cluster/tcp FastAsyncSocketSender.java Log: fix correct nr of queued bytes stats. missing sync Revision ChangesPath 1.4 +4 -4 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/FastAsyncSocketSender.java Index: FastAsyncSocketSender.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/FastAsyncSocketSender.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- FastAsyncSocketSender.java10 Apr 2005 16:20:46 - 1.3 +++ FastAsyncSocketSender.java10 Apr 2005 16:54:06 - 1.4 @@ -401,15 +401,15 @@ return queuedNrOfBytes ; } -protected void setQueuedNrOfBytes(long queuedNrOfBytes) { +protected synchronized void setQueuedNrOfBytes(long queuedNrOfBytes) { this.queuedNrOfBytes = queuedNrOfBytes; } -protected void incQueuedNrOfBytes(long size) { +protected synchronized void incQueuedNrOfBytes(long size) { queuedNrOfBytes += size; } -protected void decQueuedNrOfBytes(long size) { +protected synchronized void decQueuedNrOfBytes(long size) { queuedNrOfBytes -= size; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
pero2005/04/10 09:27:13 Modified:webapps/docs changelog.xml Log: Cluster refactor and redesign a lot and porting the cluster 5.5.9 fix pack result. s. bug report http://issues.apache.org/bugzilla/show_bug.cgi?id=34389 Revision ChangesPath 1.285 +42 -6 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.284 retrieving revision 1.285 diff -u -r1.284 -r1.285 --- changelog.xml 9 Apr 2005 19:30:37 - 1.284 +++ changelog.xml 10 Apr 2005 16:27:13 - 1.285 @@ -56,7 +56,8 @@ [Modified patch from Ralf Hauser] (yoavs) - Add MessageListener and LifecylceListener cluster saving to storeconfig module (pero) + Add MessageListener and LifecylceListener cluster saving to storeconfig module + (<Cluster ... ><ClusterListener className="org.apache.catalina.cluster.session.JvmRouteSessionIDBinderListener" >) (pero) 33743: Add additional synchronization in webapp classloader to avoid @@ -87,6 +88,9 @@ Add support for using "Smart Cards" as trust/keyStore. (billbarker) + +Add some Mbean attributes and operations to ChannelSocket (pero) + @@ -109,12 +113,42 @@ - + + +DataSender doWaitAckStats for better understanding wait ack problems (pero) + + +Refactor DeltaManager and add counter for cluster message send/receive message (pero) + + +34389:Porting Clustering fix pack to 5.5.10 code base. +Remove synchonized from DataSender.pushMessage(). Very offen the +complete cluster blocking after replicated a bulk of new session messages under heavy load. +All cluster node standing for a lot of time and made nothing. +Fix it for pooled, asynchronous and fastasyncqueue replication mode. Very bad thing, sorry! (pero) + + +Add notifySessionListenersOnReplication attribute to SimpleTcpCluster to stop notify +event to SessionListener at backup nodes from create and destroy replicated session (pero) + + +Add compress attribute to ClusterSender and ClusterReceiver interface. Now compress config +transfer from sender to receiver at SimpleTcpCluster. (pero) + + +Add ClusterValve interface and implement it as ReplicationValve and JvmRouteBinderValve. Now both +Valves can be directly configured at server.xml Host/Cluster/Valve subelements. +Also this configuration are correctly handled with the StoreConfig module. (pero) + + +Deactivate DataSender keepAliveMaxRequestCount change default to -1. +Cluster replication sockets are fast and very stable! (pero) + Setup JvmRouteBinderValve as host valve instead context valve. Refactor the API a little bit. (pero) -Don't increment open socket counter before socket is really open, counte socket open failures (pero) +Don't increment open socket counter before socket is really open. Add socket open failures counter (pero) Add MessageListener support to cluster server.xml element (ClusterListener) to @@ -130,9 +164,11 @@ at ReplicationTransmitter. Check frequency can be change with attribute processSenderFrequency (default 2). (pero) - -Jdk13ReplicationListener active threads closed, when stop called (pero) - + +Remove useless Jdk13ReplicationListener,Jdk13ObjectReader. +Add SocketReplicationListener and SocketObjectReader to have nativ socket ClusterReceiver. +Also extract ClusterReceiverBase superclass for SocketReplicationListener and ReplicationListener (pero) + Add and update some API documentation (pero) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk mbeans-descriptors.xml
pero2005/04/10 09:23:08 Modified:jk/java/org/apache/jk/common HandlerRequest.java jk/java/org/apache/jk mbeans-descriptors.xml Log: Add some JMX Attributes and operations. Revision ChangesPath 1.44 +4 -1 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java Index: HandlerRequest.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- HandlerRequest.java 29 Jan 2005 19:29:55 - 1.43 +++ HandlerRequest.java 10 Apr 2005 16:23:08 - 1.44 @@ -557,6 +557,8 @@ msg.getBytes( tmpMB ); String v=tmpMB.toString(); req.setAttribute(n, v ); +if(log.isTraceEnabled()) +log.trace("jk Attribute set " + n + "=" + v); } @@ -627,7 +629,8 @@ case SC_A_SECRET : msg.getBytes(tmpMB); String secret=tmpMB.toString(); -log.info("Secret: " + secret ); +if(log.isInfoEnabled()) +log.info("Secret: " + secret ); // endpoint note ep.setNote( secretNote, secret ); break; 1.4 +69 -3 jakarta-tomcat-connectors/jk/java/org/apache/jk/mbeans-descriptors.xml Index: mbeans-descriptors.xml === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/mbeans-descriptors.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- mbeans-descriptors.xml11 Apr 2003 20:21:39 - 1.3 +++ mbeans-descriptors.xml10 Apr 2005 16:23:08 - 1.4 @@ -15,9 +15,75 @@ group="Jk" type="org.apache.jk.common.ChannelSocket"> - + + + + + + + + + + + + + + + + + + + + + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig CatalinaClusterSF.java StandardHostSF.java server-registry.xml
pero2005/04/10 09:22:15 Modified:modules/storeconfig build.xml modules/storeconfig/src/share/org/apache/catalina/storeconfig CatalinaClusterSF.java StandardHostSF.java server-registry.xml Log: Add new Listener, ClusterListener and Valve Cluster subelement config options Revision ChangesPath 1.3 +11 -7 jakarta-tomcat-catalina/modules/storeconfig/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/storeconfig/build.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- build.xml 11 Feb 2005 19:46:01 - 1.2 +++ build.xml 10 Apr 2005 16:22:15 - 1.3 @@ -5,13 +5,13 @@ - - - - - + + + + + + + @@ -119,6 +119,10 @@ + + + + 1.3 +5 -20 jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/CatalinaClusterSF.java Index: CatalinaClusterSF.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/CatalinaClusterSF.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- CatalinaClusterSF.java3 Apr 2005 16:05:10 - 1.2 +++ CatalinaClusterSF.java10 Apr 2005 16:22:15 - 1.3 @@ -81,24 +81,10 @@ storeElement(aWriter, indent, deployer); } // Store nested element -// ReplicationValve are not store at Hosts element, see -// Host transient child list! -Valve valve = cluster.getValve(); -if (valve != null) { -IStoreFactory elementFactory = getRegistry().findStoreFactory( -valve.getClass()); -if (elementFactory != null) { -StoreDescription desc = getRegistry().findDescription( -valve.getClass()); -elementFactory.store(aWriter, indent, valve); -} -} -// Store nested pipeline elements -/* if (aCluster instanceof SimpleTcpCluster) { - Valve valves[] = ((Pipeline) ((SimpleTcpCluster)cluster).getValves(); - storeElementArray(aWriter, indent, valves); - } - */ +// ClusterValve are not store at Hosts element, see +Valve valves[] = cluster.getValves(); +storeElementArray(aWriter, indent, valves); + if (aCluster instanceof SimpleTcpCluster) { // Store nested elements LifecycleListener listeners[] = ((SimpleTcpCluster)cluster).findLifecycleListeners(); @@ -106,8 +92,7 @@ // Store nested elements MessageListener mlisteners[] = ((SimpleTcpCluster)cluster).findClusterListeners(); storeElementArray(aWriter, indent, mlisteners); -} - +} } } } \ No newline at end of file 1.2 +11 -1 jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/StandardHostSF.java Index: StandardHostSF.java === RCS file: /home/cvs/jakarta-tomcat-catalina/modules/storeconfig/src/share/org/apache/catalina/storeconfig/StandardHostSF.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- StandardHostSF.java 8 Jan 2005 11:14:07 - 1.1 +++ StandardHostSF.java 10 Apr 2005 16:22:15 - 1.2 @@ -17,6 +17,8 @@ package org.apache.catalina.storeconfig; import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.List; import org.apache.catalina.Cluster; import org.apache.catalina.Container; @@ -25,6 +27,7 @@ import org.apache.catalina.Pipeline; import org.apache.catalina.Realm; import org.apache.catalina.Valve; +import org.apache.catalina.cluster.ClusterValve; import org.apache.catalina.core.StandardHost; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -83,7 +86,14 @@ // Store nested elements if (host instanceof Pipeline) { Valve valves[] = ((Pipeline) host).getValves(); -storeElementArray(aWriter, indent, valves); +if(valves != null && valves.length > 0 ) { +List hostV
cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/io SocketObjectReader.java Jdk13ObjectReader.java
pero2005/04/10 09:20:46 Modified:modules/cluster/src/share/org/apache/catalina/cluster CatalinaCluster.java ClusterReceiver.java ClusterSender.java modules/cluster/src/share/org/apache/catalina/cluster/session DeltaManager.java JvmRouteBinderValve.java JvmRouteSessionIDBinderListener.java ReplicatedSession.java SessionIDMessage.java mbeans-descriptors.xml modules/cluster/src/share/org/apache/catalina/cluster/tcp AsyncSocketSender.java DataSender.java FastAsyncSocketSender.java LocalStrings.properties PooledSocketSender.java ReplicationListener.java ReplicationTransmitter.java ReplicationValve.java SendMessageData.java SimpleTcpCluster.java TcpReplicationThread.java WorkerThread.java mbeans-descriptors.xml modules/cluster/test/src/share/org/apache/catalina/cluster/tcp DataSenderTest.java modules/cluster to-do.txt Added: modules/cluster/src/share/org/apache/catalina/cluster ClusterValve.java modules/cluster/src/share/org/apache/catalina/cluster/session ClusterListener.java ClusterSessionListener.java modules/cluster/src/share/org/apache/catalina/cluster/tcp ClusterReceiverBase.java SocketReplicationListener.java SocketReplicationThread.java modules/cluster/src/share/org/apache/catalina/cluster/io SocketObjectReader.java Removed: modules/cluster/src/share/org/apache/catalina/cluster/tcp Jdk13ReplicationListener.java modules/cluster/src/share/org/apache/catalina/cluster/io Jdk13ObjectReader.java Log: Refactor and redesign a lot. s. changelog. Revision ChangesPath 1.10 +9 -2 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/CatalinaCluster.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/CatalinaCluster.java.diff?r1=1.9&r2=1.10 1.5 +4 -1 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/ClusterReceiver.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/ClusterReceiver.java.diff?r1=1.4&r2=1.5 1.6 +3 -0 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/ClusterSender.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/ClusterSender.java.diff?r1=1.5&r2=1.6 1.1 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/ClusterValve.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/ClusterValve.java?rev=1.1 1.42 +298 -123 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java.diff?r1=1.41&r2=1.42 1.6 +42 -18 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/JvmRouteBinderValve.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/JvmRouteBinderValve.java.diff?r1=1.5&r2=1.6 1.3 +7 -37 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/JvmRouteSessionIDBinderListener.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/JvmRouteSessionIDBinderListener.java.diff?r1=1.2&r2=1.3 1.17 +2 -3 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/ReplicatedSession.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/ReplicatedSession.java.diff?r1=1.16&r2=1.17 1.4 +1 -0 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/SessionIDMessage.java http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/SessionIDMessage.java.diff?r1=1.3&r2=1.4 1.3 +197 -2 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/mbeans-descriptors.xml