You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2011/10/22 23:08:26 UTC

svn commit: r1187786 [2/2] - in /tomcat/trunk/java/org/apache/catalina/ha: ./ authenticator/ backend/ context/ deploy/ jmx/ session/ tcp/ util/

Modified: tomcat/trunk/java/org/apache/catalina/ha/session/DeltaRequest.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/DeltaRequest.java?rev=1187786&r1=1187785&r2=1187786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/session/DeltaRequest.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/session/DeltaRequest.java Sat Oct 22 21:08:24 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,7 +20,7 @@ package org.apache.catalina.ha.session;
 
 /**
  * This class is used to track the series of actions that happens when
- * a request is executed. These actions will then translate into invocations of methods 
+ * a request is executed. These actions will then translate into invocations of methods
  * on the actual session.
  * This class is NOT thread safe. One DeltaRequest per session
  * @author <a href="mailto:fhanik@apache.org">Filip Hanik</a>
@@ -67,13 +67,13 @@ public class DeltaRequest implements Ext
     private LinkedList<AttributeInfo> actions = new LinkedList<AttributeInfo>();
     private LinkedList<AttributeInfo> actionPool =
         new LinkedList<AttributeInfo>();
-    
+
     private boolean recordAllActions = false;
 
     public DeltaRequest() {
-        
+
     }
-    
+
     public DeltaRequest(String sessionId, boolean recordAllActions) {
         this.recordAllActions=recordAllActions;
         if(sessionId != null)
@@ -95,7 +95,7 @@ public class DeltaRequest implements Ext
         int action = ACTION_SET;
         addAction(TYPE_MAXINTERVAL,action,NAME_MAXINTERVAL,Integer.valueOf(interval));
     }
-    
+
     /**
      * convert principal at SerializablePrincipal for backup nodes.
      * Only support principals from type {@link GenericPrincipal GenericPrincipal}
@@ -154,7 +154,7 @@ public class DeltaRequest implements Ext
         //add the action
         actions.addLast(info);
     }
-    
+
     public void execute(DeltaSession session, boolean notifyListeners) {
         if ( !this.sessionId.equals( session.getId() ) )
             throw new java.lang.IllegalArgumentException("Session id mismatch, not executing the delta request");
@@ -170,7 +170,7 @@ public class DeltaRequest implements Ext
                         if ( log.isTraceEnabled() ) log.trace("Session.removeAttribute('"+info.getName()+"')");
                         session.removeAttribute(info.getName(),notifyListeners,false);
                     }
-                        
+
                     break;
                 }//case
                 case TYPE_ISNEW: {
@@ -219,7 +219,7 @@ public class DeltaRequest implements Ext
         }
         actions.clear();
     }
-    
+
     public String getSessionId() {
         return sessionId;
     }
@@ -232,12 +232,12 @@ public class DeltaRequest implements Ext
     public int getSize() {
         return actions.size();
     }
-    
+
     public void clear() {
         actions.clear();
         actionPool.clear();
     }
-    
+
     @Override
     public void readExternal(java.io.ObjectInput in) throws IOException,ClassNotFoundException {
         //sessionId - String
@@ -285,11 +285,11 @@ public class DeltaRequest implements Ext
             info.writeExternal(out);
         }
     }
-    
+
     /**
      * serialize DeltaRequest
      * @see DeltaRequest#writeExternal(java.io.ObjectOutput)
-     * 
+     *
      * @return serialized delta request
      * @throws IOException
      */
@@ -301,7 +301,7 @@ public class DeltaRequest implements Ext
         oos.close();
         return bos.toByteArray();
     }
-    
+
     private static class AttributeInfo implements java.io.Externalizable {
         private String name = null;
         private Object value = null;
@@ -349,7 +349,7 @@ public class DeltaRequest implements Ext
         public String getName() {
             return name;
         }
-        
+
         public void recycle() {
             name = null;
             value = null;
@@ -363,7 +363,7 @@ public class DeltaRequest implements Ext
             AttributeInfo other =  (AttributeInfo)o;
             return other.getName().equals(this.getName());
         }
-        
+
         @Override
         public void readExternal(java.io.ObjectInput in ) throws IOException,ClassNotFoundException {
             //type - int
@@ -391,7 +391,7 @@ public class DeltaRequest implements Ext
             out.writeBoolean(getValue()!=null);
             if (getValue()!=null) out.writeObject(getValue());
         }
-        
+
         @Override
         public String toString() {
             StringBuilder buf = new StringBuilder("AttributeInfo[type=");

Modified: tomcat/trunk/java/org/apache/catalina/ha/session/DeltaSession.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/DeltaSession.java?rev=1187786&r1=1187785&r2=1187786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/session/DeltaSession.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/session/DeltaSession.java Sat Oct 22 21:08:24 2011
@@ -328,7 +328,7 @@ public class DeltaSession extends Standa
     }
 
     public void setPrincipal(Principal principal, boolean addDeltaRequest) {
-        try { 
+        try {
             lock();
             super.setPrincipal(principal);
             if (addDeltaRequest && (deltaRequest != null))
@@ -350,7 +350,7 @@ public class DeltaSession extends Standa
     }
 
     public void setAuthType(String authType, boolean addDeltaRequest) {
-        try { 
+        try {
             lock();
             super.setAuthType(authType);
             if (addDeltaRequest && (deltaRequest != null))
@@ -409,7 +409,7 @@ public class DeltaSession extends Standa
             ((DeltaManager)manager).registerSessionAtReplicationValve(this);
         }
     }
-    
+
     // ------------------------------------------------- Session Public Methods
 
     /**
@@ -444,8 +444,8 @@ public class DeltaSession extends Standa
         if (notifyCluster) {
             if (log.isDebugEnabled())
                 log.debug(sm.getString("deltaSession.notifying",
-                                       ((ClusterManager)manager).getName(), 
-                                       Boolean.valueOf(isPrimarySession()), 
+                                       ((ClusterManager)manager).getName(),
+                                       Boolean.valueOf(isPrimarySession()),
                                        expiredId));
             if ( manager instanceof DeltaManager ) {
                 ( (DeltaManager) manager).sessionExpired(expiredId);
@@ -770,7 +770,7 @@ public class DeltaSession extends Standa
     protected void writeObject(ObjectOutputStream stream) throws IOException {
         writeObject((ObjectOutput)stream);
     }
-    
+
     private void writeObject(ObjectOutput stream) throws IOException {
         // Write the scalar instance variables (except Manager)
         stream.writeObject(Long.valueOf(creationTime));

Modified: tomcat/trunk/java/org/apache/catalina/ha/session/JvmRouteSessionIDBinderListener.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/JvmRouteSessionIDBinderListener.java?rev=1187786&r1=1187785&r2=1187786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/session/JvmRouteSessionIDBinderListener.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/session/JvmRouteSessionIDBinderListener.java Sat Oct 22 21:08:24 2011
@@ -34,7 +34,7 @@ import org.apache.tomcat.util.res.String
 /**
  * Receive SessionID cluster change from other backup node after primary session
  * node is failed.
- * 
+ *
  * @author Peter Rossbach
  * @version $Id$
  */
@@ -42,7 +42,7 @@ public class JvmRouteSessionIDBinderList
 
     private static final Log log =
         LogFactory.getLog(JvmRouteSessionIDBinderListener.class);
-    
+
     private static final StringManager sm =
         StringManager.getManager(Constants.Package);
 
@@ -73,7 +73,7 @@ public class JvmRouteSessionIDBinderList
 
     /**
      * Add this Mover as Cluster Listener ( receiver)
-     * 
+     *
      * @throws LifecycleException
      */
     public void start() throws LifecycleException {
@@ -87,7 +87,7 @@ public class JvmRouteSessionIDBinderList
 
     /**
      * Remove this from Cluster Listener
-     * 
+     *
      * @throws LifecycleException
      */
     public void stop() throws LifecycleException {
@@ -100,7 +100,7 @@ public class JvmRouteSessionIDBinderList
     /**
      * Callback from the cluster, when a message is received, The cluster will
      * broadcast it invoking the messageReceived on the receiver.
-     * 
+     *
      * @param msg
      *            ClusterMessage - the message received from the cluster
      */
@@ -150,7 +150,7 @@ public class JvmRouteSessionIDBinderList
 
     /**
      * Accept only SessionIDMessages
-     * 
+     *
      * @param msg
      *            ClusterMessage
      * @return boolean - returns true to indicate that messageReceived should be

Modified: tomcat/trunk/java/org/apache/catalina/ha/session/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/LocalStrings.properties?rev=1187786&r1=1187785&r2=1187786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/session/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/session/LocalStrings.properties Sat Oct 22 21:08:24 2011
@@ -24,7 +24,7 @@ deltaManager.createMessage.unableCreateD
 deltaManager.dropMessage=Manager [{0}]: Drop message {1} inside GET_ALL_SESSIONS sync phase start date {2} message date {3}
 deltaManager.foundMasterMember=Found for context [{0}] the replication master member [{1}]
 deltaManager.loading.cnfe=ClassNotFoundException while loading persisted sessions: {0}
-deltaManager.loading.existing.session=overload existing session {0} 
+deltaManager.loading.existing.session=overload existing session {0}
 deltaManager.loading.ioe=IOException while loading persisted sessions: {0}
 deltaManager.loading.withContextClassLoader=Manager [{0}]: Loading the object data with a context class loader.
 deltaManager.loading.withoutClassLoader=Manager [{0}]: Loading the object data without a context class loader.
@@ -46,7 +46,7 @@ deltaManager.receiveMessage.unloadingAft
 deltaManager.receiveMessage.unloadingBegin=Manager [{0}]: start unloading sessions
 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.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.startClustering=Starting clustering manager at {0}

Modified: tomcat/trunk/java/org/apache/catalina/ha/session/LocalStrings_es.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/LocalStrings_es.properties?rev=1187786&r1=1187785&r2=1187786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/session/LocalStrings_es.properties (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/session/LocalStrings_es.properties Sat Oct 22 21:08:24 2011
@@ -45,7 +45,7 @@ deltaManager.receiveMessage.unloadingAft
 deltaManager.receiveMessage.unloadingBegin = Gestor [{0}]\: iniciada descarga de sesiones
 deltaManager.receiveMessage.allSessionDataAfter = Gestor [{0}]\: estado de sesi\u00F3n deserializado
 deltaManager.receiveMessage.allSessionDataBegin = Gestor [{0}]\: recibidos datos de estado de sesi\u00F3n
-deltaManager.receiveMessage.fromWrongDomain = Gestor [{0}]\: Recibido SessionMessage equivocado de tipo\=({1}) desde [{2}] con dominio [{3}] (dominio local [{4}] 
+deltaManager.receiveMessage.fromWrongDomain = Gestor [{0}]\: Recibido SessionMessage equivocado de tipo\=({1}) desde [{2}] con dominio [{3}] (dominio local [{4}]
 deltaManager.registerCluster = Registrar gestor {0} a elemento de cl\u00FAster {1} con nombre {2}
 deltaManager.sessionReceived = Gestor [{0}]; estado de sesi\u00F3n enviado a las {1} recibido en {2} ms.
 deltaManager.startClustering = Iniciando gestor de cl\u00FAster a las {0}

Modified: tomcat/trunk/java/org/apache/catalina/ha/session/SerializablePrincipal.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/SerializablePrincipal.java?rev=1187786&r1=1187785&r2=1187786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/session/SerializablePrincipal.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/session/SerializablePrincipal.java Sat Oct 22 21:08:24 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -46,7 +46,7 @@ public class SerializablePrincipal  impl
 
     private static final org.apache.juli.logging.Log log =
         org.apache.juli.logging.LogFactory.getLog(SerializablePrincipal.class);
-    
+
     /**
      * The string manager for this package.
      */
@@ -58,8 +58,8 @@ public class SerializablePrincipal  impl
     public SerializablePrincipal() {
         super();
     }
-    
-    
+
+
     /**
      * Construct a new Principal, associated with the specified Realm, for the
      * specified username and password.
@@ -88,7 +88,7 @@ public class SerializablePrincipal  impl
         this(name, password, roles, null);
     }
 
-    
+
     /**
      * Construct a new Principal, associated with the specified Realm, for the
      * specified username and password, with the specified role names
@@ -169,7 +169,7 @@ public class SerializablePrincipal  impl
      * The user principal, if present.
      */
     protected Principal userPrincipal = null;
-    
+
     // --------------------------------------------------------- Public Methods
 
 
@@ -202,7 +202,7 @@ public class SerializablePrincipal  impl
                 getRoles()!=null?Arrays.asList(getRoles()):null,
                 userPrincipal);
     }
-    
+
     public static GenericPrincipal readPrincipal(ObjectInput in)
             throws IOException, ClassNotFoundException {
         String name = in.readUTF();
@@ -226,7 +226,7 @@ public class SerializablePrincipal  impl
         return new GenericPrincipal(name,pwd,Arrays.asList(roles),
                 userPrincipal);
     }
-    
+
     public static void writePrincipal(GenericPrincipal p, ObjectOutput out)
             throws IOException {
         out.writeUTF(p.getName());

Modified: tomcat/trunk/java/org/apache/catalina/ha/session/SessionIDMessage.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/SessionIDMessage.java?rev=1187786&r1=1187785&r2=1187786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/session/SessionIDMessage.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/session/SessionIDMessage.java Sat Oct 22 21:08:24 2011
@@ -20,9 +20,9 @@ import org.apache.catalina.ha.ClusterMes
 
 /**
  * Session id change cluster message
- * 
+ *
  * @author Peter Rossbach
- * 
+ *
  * @version $Id$
  */
 public class SessionIDMessage extends ClusterMessageBase {
@@ -65,7 +65,7 @@ public class SessionIDMessage extends Cl
     public void setHost(String host) {
         this.host = host;
     }
-    
+
     /**
      * @return Returns the context name.
      */
@@ -93,7 +93,7 @@ public class SessionIDMessage extends Cl
         this.messageNumber = messageNumber;
     }
 
-    
+
     /**
      * @return Returns the backupSessionID.
      */

Modified: tomcat/trunk/java/org/apache/catalina/ha/session/SessionMessage.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/SessionMessage.java?rev=1187786&r1=1187785&r2=1187786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/session/SessionMessage.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/session/SessionMessage.java Sat Oct 22 21:08:24 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -70,7 +70,7 @@ public interface SessionMessage extends 
      * When a session state is transferred, this is the event.
      */
     public static final int EVT_ALL_SESSION_DATA = 12;
-    
+
     /**
      * When a session state is complete transferred, this is the event.
      */
@@ -81,16 +81,16 @@ public interface SessionMessage extends 
      */
     public static final int EVT_CHANGE_SESSION_ID = 15;
 
-    
+
     public String getContextName();
-    
+
     public String getEventTypeString();
-    
+
     /**
      * returns the event type
      * @return one of the event types EVT_XXXX
      */
-    public int getEventType(); 
+    public int getEventType();
     /**
      * @return the serialized data for the session
      */

Modified: tomcat/trunk/java/org/apache/catalina/ha/session/SessionMessageImpl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/SessionMessageImpl.java?rev=1187786&r1=1187785&r2=1187786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/session/SessionMessageImpl.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/session/SessionMessageImpl.java Sat Oct 22 21:08:24 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,21 +21,21 @@ import org.apache.catalina.ha.ClusterMes
 
 /**
  * Session cluster message
- * 
+ *
  * @author Filip Hanik
  * @author Peter Rossbach
- * 
+ *
  * @version $Id$
  */
 public class SessionMessageImpl extends ClusterMessageBase implements SessionMessage {
-    
+
     private static final long serialVersionUID = 1L;
 
 
     public SessionMessageImpl() {
     }
-    
-    
+
+
     /*
 
      * Private serializable variables to keep the messages state
@@ -117,7 +117,7 @@ public class SessionMessageImpl extends 
      */
     @Override
     public String getSessionID(){ return mSessionID; }
-    
+
     /**
      * set message send time but only the first setting works (one shot)
      */
@@ -130,12 +130,12 @@ public class SessionMessageImpl extends 
             }
         }
     }
-    
+
     @Override
     public long getTimestamp() { return serializationTimestamp;}
-    
+
     /**
-     * clear text event type name (for logging purpose only) 
+     * clear text event type name (for logging purpose only)
      * @return the event type in a string representation, useful for debugging
      */
     @Override
@@ -167,7 +167,7 @@ public class SessionMessageImpl extends 
     public void setUniqueId(String uniqueId) {
         this.uniqueId = uniqueId;
     }
-    
+
     @Override
     public String toString() {
         return getEventTypeString() + "#" + getContextName() + "#" + getSessionID() ;

Modified: tomcat/trunk/java/org/apache/catalina/ha/session/mbeans-descriptors.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/mbeans-descriptors.xml?rev=1187786&r1=1187785&r2=1187786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/session/mbeans-descriptors.xml (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/session/mbeans-descriptors.xml Sat Oct 22 21:08:24 2011
@@ -307,7 +307,7 @@
       name="stateTransfered"
       is="true"
       description="Is session state transfered complete? "
-      type="boolean"/>  
+      type="boolean"/>
     <attribute
       name="stateTransferTimeout"
       description="state transfer timeout in sec"
@@ -352,7 +352,7 @@
       description="Return the set of active Sessions associated with this Manager."
       impact="ACTION"
       returnType="[Lorg.apache.catalina.Session;">
-    </operation>  
+    </operation>
     <operation
       name="getAllClusterSessions"
       description="send to oldest cluster member that this node need all cluster sessions (resync member)"
@@ -367,7 +367,7 @@
         name="sessionId"
         description="The session id for the session "
         type="java.lang.String"/>
-    </operation>   
+    </operation>
     <operation
       name="getLastAccessedTime"
       description="Get the last access time. This one gets updated whenever a request finishes. "
@@ -377,7 +377,7 @@
         name="sessionId"
         description="Id of the session"
         type="java.lang.String"/>
-    </operation> 
+    </operation>
     <operation
       name="getSessionAttribute"
       description="Return a session attribute"
@@ -401,7 +401,7 @@
         name="sessionId"
         description="Id of the session"
         type="java.lang.String"/>
-    </operation> 
+    </operation>
     <operation
       name="listSessionIds"
       description="Return the list of active primary session ids"
@@ -568,7 +568,7 @@
       description="Return the set of active Sessions associated with this Manager."
       impact="ACTION"
       returnType="[Lorg.apache.catalina.Session;">
-    </operation>  
+    </operation>
     <operation
       name="getCreationTime"
       description="Return the creatio time for this session"
@@ -578,7 +578,7 @@
         name="sessionId"
         description="The session id for the session "
         type="java.lang.String"/>
-    </operation>   
+    </operation>
     <operation
       name="getLastAccessedTime"
       description="Get the last access time. This one gets updated whenever a request finishes. "
@@ -588,7 +588,7 @@
         name="sessionId"
         description="Id of the session"
         type="java.lang.String"/>
-    </operation> 
+    </operation>
     <operation
       name="getSessionAttribute"
       description="Return a session attribute"
@@ -612,7 +612,7 @@
         name="sessionId"
         description="Id of the session"
         type="java.lang.String"/>
-    </operation> 
+    </operation>
     <operation
       name="listSessionIds"
       description="Return the list of active primary session ids"

Modified: tomcat/trunk/java/org/apache/catalina/ha/tcp/Constants.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/tcp/Constants.java?rev=1187786&r1=1187785&r2=1187786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/tcp/Constants.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/tcp/Constants.java Sat Oct 22 21:08:24 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

Modified: tomcat/trunk/java/org/apache/catalina/ha/tcp/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/tcp/LocalStrings.properties?rev=1187786&r1=1187785&r2=1187786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/tcp/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/tcp/LocalStrings.properties Sat Oct 22 21:08:24 2011
@@ -37,5 +37,5 @@ SimpleTcpCluster.default.addClusterRecei
 SimpleTcpCluster.default.addClusterSender=Add Default ClusterSender at cluster {0}
 SimpleTcpCluster.default.addMembershipService=Add Default Membership Service at cluster {0}
 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=SEND {0,date}:{0,time} {1,number} {2}:{3,number,integer} {4}
 SimpleTcpCluster.log.send.all=SEND {0,date}:{0,time} {1,number} - {2}

Modified: tomcat/trunk/java/org/apache/catalina/ha/tcp/LocalStrings_es.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/tcp/LocalStrings_es.properties?rev=1187786&r1=1187785&r2=1187786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/tcp/LocalStrings_es.properties (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/tcp/LocalStrings_es.properties Sat Oct 22 21:08:24 2011
@@ -37,5 +37,5 @@ SimpleTcpCluster.default.addClusterRecei
 SimpleTcpCluster.default.addClusterSender = Add Default ClusterSender at cluster {0}
 SimpleTcpCluster.default.addMembershipService = Add Default Membership Service at cluster {0}
 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 = SEND {0,date}\:{0,time} {1,number} {2}\:{3,number,integer} {4}
 SimpleTcpCluster.log.send.all = SEND {0,date}\:{0,time} {1,number} - {2}

Modified: tomcat/trunk/java/org/apache/catalina/ha/tcp/SendMessageData.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/tcp/SendMessageData.java?rev=1187786&r1=1187785&r2=1187786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/tcp/SendMessageData.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/tcp/SendMessageData.java Sat Oct 22 21:08:24 2011
@@ -28,8 +28,8 @@ public class SendMessageData {
     private Object message ;
     private Member destination ;
     private Exception exception ;
-    
-    
+
+
     /**
      * @param message
      * @param destination
@@ -42,7 +42,7 @@ public class SendMessageData {
         this.destination = destination;
         this.exception = exception;
     }
-    
+
     /**
      * @return Returns the destination.
      */

Modified: tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java?rev=1187786&r1=1187785&r2=1187786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java Sat Oct 22 21:08:24 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -63,10 +63,10 @@ import org.apache.tomcat.util.res.String
  * A <b>Cluster </b> implementation using simple multicast. Responsible for
  * setting up a cluster and provides callers with a valid multicast
  * receiver/sender.
- * 
+ *
  * FIXME remove install/remove/start/stop context dummys
- * FIXME wrote testcases 
- * 
+ * FIXME wrote testcases
+ *
  * @author Filip Hanik
  * @author Remy Maucherat
  * @author Peter Rossbach
@@ -99,7 +99,7 @@ public class SimpleTcpCluster extends Li
     public static final String SEND_MESSAGE_FAILURE_EVENT = "send_message_failure";
 
     public static final String RECEIVE_MESSAGE_FAILURE_EVENT = "receive_message_failure";
-    
+
     /**
      * Group channel.
      */
@@ -126,7 +126,7 @@ public class SimpleTcpCluster extends Li
      * @see org.apache.catalina.tribes.group.GroupChannel#heartbeat()
      */
     protected boolean heartbeatBackgroundEnabled =false ;
-    
+
     /**
      * The Container associated with this Cluster.
      */
@@ -163,9 +163,9 @@ public class SimpleTcpCluster extends Li
      * dynamic sender <code>properties</code>
      */
     private Map<String, Object> properties = new HashMap<String, Object>();
-    
+
     private int channelSendOptions = Channel.SEND_OPTIONS_ASYNCHRONOUS;
-    
+
     private int channelStartOptions = Channel.DEFAULT;
 
     // ------------------------------------------------------------- Properties
@@ -193,7 +193,7 @@ public class SimpleTcpCluster extends Li
     /**
      * Set the name of the cluster to join, if no cluster with this name is
      * present create one.
-     * 
+     *
      * @param clusterName
      *            The clustername to join
      */
@@ -205,7 +205,7 @@ public class SimpleTcpCluster extends Li
     /**
      * Return the name of the cluster that this Server is currently configured
      * to operate within.
-     * 
+     *
      * @return The name of the cluster associated with this server
      */
     @Override
@@ -217,7 +217,7 @@ public class SimpleTcpCluster extends Li
 
     /**
      * Set the Container associated with our Cluster
-     * 
+     *
      * @param container
      *            The Container to use
      */
@@ -230,7 +230,7 @@ public class SimpleTcpCluster extends Li
 
     /**
      * Get the Container associated with our Cluster
-     * 
+     *
      * @return The Container associated with our Cluster
      */
     @Override
@@ -259,7 +259,7 @@ public class SimpleTcpCluster extends Li
     }
 
     /**
-     * Add cluster valve 
+     * Add cluster valve
      * Cluster Valves are only add to container when cluster is started!
      * @param valve The new cluster Valve.
      */
@@ -294,7 +294,7 @@ public class SimpleTcpCluster extends Li
 
     /**
      * Add cluster message listener and register cluster to this listener.
-     * 
+     *
      * @see org.apache.catalina.ha.CatalinaCluster#addClusterListener(org.apache.catalina.ha.ClusterListener)
      */
     @Override
@@ -307,7 +307,7 @@ public class SimpleTcpCluster extends Li
 
     /**
      * Remove message listener and deregister Cluster from listener.
-     * 
+     *
      * @see org.apache.catalina.ha.CatalinaCluster#removeClusterListener(org.apache.catalina.ha.ClusterListener)
      */
     @Override
@@ -356,10 +356,10 @@ public class SimpleTcpCluster extends Li
     public boolean hasMembers() {
         return hasMembers;
     }
-    
+
     /**
      * Get all current cluster members
-     * @return all members or empty array 
+     * @return all members or empty array
      */
     @Override
     public Member[] getMembers() {
@@ -368,7 +368,7 @@ public class SimpleTcpCluster extends Li
 
     /**
      * Return the member that represents this node.
-     * 
+     *
      * @return Member
      */
     @Override
@@ -381,7 +381,7 @@ public class SimpleTcpCluster extends Li
 
     /**
      * JMX hack to direct use at jconsole
-     * 
+     *
      * @param name
      * @param value
      */
@@ -391,7 +391,7 @@ public class SimpleTcpCluster extends Li
 
     /**
      * set config attributes with reflect and propagate to all managers
-     * 
+     *
      * @param name
      * @param value
      */
@@ -409,7 +409,7 @@ public class SimpleTcpCluster extends Li
 
     /**
      * get current config
-     * 
+     *
      * @param key
      * @return The property
      */
@@ -422,7 +422,7 @@ public class SimpleTcpCluster extends Li
 
     /**
      * Get all properties keys
-     * 
+     *
      * @return An iterator over the property names.
      */
     @Override
@@ -432,7 +432,7 @@ public class SimpleTcpCluster extends Li
 
     /**
      * remove a configured property.
-     * 
+     *
      * @param key
      */
     @Override
@@ -483,7 +483,7 @@ public class SimpleTcpCluster extends Li
 
     /**
      * Create new Manager without add to cluster (comes with start the manager)
-     * 
+     *
      * @param name
      *            Context Name of this manager
      * @see org.apache.catalina.Cluster#createManager(java.lang.String)
@@ -507,10 +507,10 @@ public class SimpleTcpCluster extends Li
         }
         return manager;
     }
-    
+
     @Override
     public void registerManager(Manager manager) {
-    
+
         if (! (manager instanceof ClusterManager)) {
             log.warn("Manager [ " + manager + "] does not implement ClusterManager, addition to cluster has been aborted.");
             return;
@@ -522,15 +522,15 @@ public class SimpleTcpCluster extends Li
         String clusterName = getManagerName(cmanager.getName(), manager);
         cmanager.setName(clusterName);
         cmanager.setCluster(this);
-    
+
         managers.put(clusterName, cmanager);
         // Notify our interested LifecycleListeners
-        fireLifecycleEvent(AFTER_MANAGERREGISTER_EVENT, manager);    
+        fireLifecycleEvent(AFTER_MANAGERREGISTER_EVENT, manager);
     }
 
     /**
      * Remove an application from cluster replication bus.
-     * 
+     *
      * @see org.apache.catalina.Cluster#removeManager(Manager)
      */
     @Override
@@ -559,7 +559,7 @@ public class SimpleTcpCluster extends Li
             Container context = manager.getContainer() ;
             if(context != null && context instanceof Context) {
                 Container host = ((Context)context).getParent();
-                if(host != null && host instanceof Host && clusterName!=null && 
+                if(host != null && host instanceof Host && clusterName!=null &&
                         !(clusterName.startsWith(host.getName() +"#"))) {
                     clusterName = host.getName() +"#" + clusterName ;
                 }
@@ -570,14 +570,14 @@ public class SimpleTcpCluster extends Li
 
     /*
      * Get Manager
-     * 
+     *
      * @see org.apache.catalina.ha.CatalinaCluster#getManager(java.lang.String)
      */
     @Override
     public Manager getManager(String name) {
         return managers.get(name);
     }
-    
+
     // ------------------------------------------------------ Lifecycle Methods
 
     /**
@@ -587,13 +587,13 @@ public class SimpleTcpCluster extends Li
      * @see org.apache.catalina.ha.deploy.FarmWarDeployer#backgroundProcess()
      * @see org.apache.catalina.tribes.group.GroupChannel#heartbeat()
      * @see org.apache.catalina.tribes.group.GroupChannel.HeartbeatThread#run()
-     * 
+     *
      */
     @Override
     public void backgroundProcess() {
         if (clusterDeployer != null) clusterDeployer.backgroundProcess();
-       
-        //send a heartbeat through the channel        
+
+        //send a heartbeat through the channel
         if ( isHeartbeatBackgroundEnabled() && channel !=null ) channel.heartbeat();
     }
 
@@ -601,7 +601,7 @@ public class SimpleTcpCluster extends Li
     /**
      * Use as base to handle start/stop/periodic Events from host. Currently
      * only log the messages as trace level.
-     * 
+     *
      * @see org.apache.catalina.LifecycleListener#lifecycleEvent(org.apache.catalina.LifecycleEvent)
      */
     @Override
@@ -616,8 +616,8 @@ public class SimpleTcpCluster extends Li
     protected void initInternal() {
         // NOOP
     }
-    
-    
+
+
     /**
      * Start Cluster and implement the requirements
      * of {@link LifecycleBase#startInternal()}.
@@ -644,13 +644,13 @@ public class SimpleTcpCluster extends Li
             log.error("Unable to start cluster.", x);
             throw new LifecycleException(x);
         }
-        
+
         setState(LifecycleState.STARTING);
     }
 
     protected void checkDefaults() {
         if ( clusterListeners.size() == 0 ) {
-            addClusterListener(new JvmRouteSessionIDBinderListener()); 
+            addClusterListener(new JvmRouteSessionIDBinderListener());
             addClusterListener(new ClusterSessionListener());
         }
         if ( valves.size() == 0 ) {
@@ -708,7 +708,7 @@ public class SimpleTcpCluster extends Li
         }
     }
 
-    
+
     /**
      * Stop Cluster and implement the requirements
      * of {@link LifecycleBase#startInternal()}.
@@ -737,13 +737,13 @@ public class SimpleTcpCluster extends Li
         }
     }
 
-    
+
     @Override
     protected void destroyInternal() {
         // NOOP
     }
 
-    
+
     /**
      * Return a String rendering of this object.
      */
@@ -759,22 +759,22 @@ public class SimpleTcpCluster extends Li
         sb.append(']');
         return sb.toString();
     }
-    
+
 
     /**
      * send message to all cluster members
      * @param msg message to transfer
-     * 
+     *
      * @see org.apache.catalina.ha.CatalinaCluster#send(org.apache.catalina.ha.ClusterMessage)
      */
     @Override
     public void send(ClusterMessage msg) {
         send(msg, null);
     }
-    
+
     /**
      * send a cluster message to one member
-     * 
+     *
      * @param msg message to transfer
      * @param dest Receiver member
      * @see org.apache.catalina.ha.CatalinaCluster#send(org.apache.catalina.ha.ClusterMessage,
@@ -793,7 +793,7 @@ public class SimpleTcpCluster extends Li
                 Member[] destmembers = channel.getMembers();
                 if (destmembers.length>0)
                     channel.send(destmembers,msg,channelSendOptions);
-                else if (log.isDebugEnabled()) 
+                else if (log.isDebugEnabled())
                     log.debug("No members in cluster, ignoring message:"+msg);
             }
         } catch (Exception x) {
@@ -803,7 +803,7 @@ public class SimpleTcpCluster extends Li
 
     /**
      * New cluster member is registered
-     * 
+     *
      * @see org.apache.catalina.tribes.MembershipListener#memberAdded(org.apache.catalina.tribes.Member)
      */
     @Override
@@ -823,13 +823,13 @@ public class SimpleTcpCluster extends Li
 
     /**
      * Cluster member is gone
-     * 
+     *
      * @see org.apache.catalina.tribes.MembershipListener#memberDisappeared(org.apache.catalina.tribes.Member)
      */
     @Override
     public void memberDisappeared(Member member) {
         try {
-            hasMembers = channel.hasMembers();            
+            hasMembers = channel.hasMembers();
             if (log.isInfoEnabled()) log.info("Received member disappeared:" + member);
             // Notify our interested LifecycleListeners
             fireLifecycleEvent(BEFORE_MEMBERUNREGISTER_EVENT, member);
@@ -846,7 +846,7 @@ public class SimpleTcpCluster extends Li
     /**
      * notify all listeners from receiving a new message is not ClusterMessage
      * emit Failure Event to LifecylceListener
-     * 
+     *
      * @param msg
      *            received Message
      */
@@ -854,8 +854,8 @@ public class SimpleTcpCluster extends Li
     public boolean accept(Serializable msg, Member sender) {
         return (msg instanceof ClusterMessage);
     }
-    
-    
+
+
     @Override
     public void messageReceived(Serializable message, Member sender) {
         ClusterMessage fwd = (ClusterMessage)message;
@@ -908,7 +908,7 @@ public class SimpleTcpCluster extends Li
     // ------------------------------------------------------------- deprecated
 
     /**
-     * 
+     *
      * @see org.apache.catalina.Cluster#setProtocol(java.lang.String)
      */
     @Override

Modified: tomcat/trunk/java/org/apache/catalina/ha/util/IDynamicProperty.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/util/IDynamicProperty.java?rev=1187786&r1=1187785&r2=1187786&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/util/IDynamicProperty.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/util/IDynamicProperty.java Sat Oct 22 21:08:24 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -28,7 +28,7 @@ public interface IDynamicProperty {
 
     /**
      * set config attributes with reflect
-     * 
+     *
      * @param name
      * @param value
      */
@@ -36,21 +36,21 @@ public interface IDynamicProperty {
 
     /**
      * get current config
-     * 
+     *
      * @param key
      * @return The property
      */
     public Object getProperty(String key) ;
     /**
      * Get all properties keys
-     * 
+     *
      * @return An iterator over the property names
      */
     public Iterator<String> getPropertyNames() ;
 
     /**
      * remove a configured property.
-     * 
+     *
      * @param key
      */
     public void removeProperty(String key) ;



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org