tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session DeltaManager.java DeltaRequest.java
Date Wed, 17 Aug 2005 08:13:12 GMT
pero        2005/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  Changes    Path
  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 -0000	1.51
  +++ DeltaManager.java	17 Aug 2005 08:13:12 -0000	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 -0000	1.13
  +++ DeltaRequest.java	17 Aug 2005 08:13:12 -0000	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: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message