User: starksm 
  Date: 01/11/27 22:10:46

  Modified:    src/main/org/jboss/security/plugins Tag: Branch_2_4
                        JaasSecurityManager.java
  Log:
  Complete switch to org.jboss.logging.Logger
  Add support for package version manifest headers
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.7.2.9   +10 -12    
jbosssx/src/main/org/jboss/security/plugins/JaasSecurityManager.java
  
  Index: JaasSecurityManager.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbosssx/src/main/org/jboss/security/plugins/JaasSecurityManager.java,v
  retrieving revision 1.7.2.8
  retrieving revision 1.7.2.9
  diff -u -r1.7.2.8 -r1.7.2.9
  --- JaasSecurityManager.java  2001/11/09 10:24:51     1.7.2.8
  +++ JaasSecurityManager.java  2001/11/28 06:10:46     1.7.2.9
  @@ -29,9 +29,7 @@
   import javax.security.auth.callback.PasswordCallback;
   import javax.security.auth.callback.UnsupportedCallbackException;
   
  -import org.apache.log4j.Category;
  -
  -import org.jboss.logging.log4j.TracePriority;
  +import org.jboss.logging.Logger;
   import org.jboss.security.AppPolicy;
   import org.jboss.security.AuthenticationInfo;
   import org.jboss.security.RealmMapping;
  @@ -55,7 +53,7 @@
    
    @author <a href="[EMAIL PROTECTED]">Oleg Nitz</a>
    @author [EMAIL PROTECTED]
  - @version $Revision: 1.7.2.8 $
  + @version $Revision: 1.7.2.9 $
   */
   public class JaasSecurityManager implements SubjectSecurityManager, RealmMapping
   {
  @@ -90,7 +88,7 @@
      private SecurityAssociationHandler handler = new SecurityAssociationHandler();
      /** The log4j category for the security manager domain
       */
  -   protected Category log;
  +   protected Logger log;
   
      /** Get the currently authenticated Subject in securityDomain.
       @return The Subject for securityDomain if one exists, false otherwise.
  @@ -143,8 +141,8 @@
      public JaasSecurityManager(String securityDomain)
      {
         this.securityDomain = securityDomain;
  -      String categoryName = getClass().getName()+"#"+securityDomain;
  -      this.log = Category.getInstance(categoryName);
  +      String categoryName = getClass().getName()+'.'+securityDomain;
  +      this.log = Logger.getLogger(categoryName);
         try
         {   // Try to get the SecurityPolicy from the JAAS Policy class
            securityPolicy = (SecurityPolicy) Policy.getPolicy();
  @@ -374,7 +372,7 @@
         catch(LoginException e)
         {
            // Don't log anonymous user failures unless trace level logging is on
  -         if( principal != null && principal.getName() != null || 
log.isEnabledFor(TracePriority.TRACE) )
  +         if( principal != null && principal.getName() != null || 
log.isTraceEnabled() )
               log.debug("Login failure", e);
         }
   
  @@ -401,8 +399,8 @@
       */
      private boolean validateCache(DomainInfo info, Object credential)
      {
  -      if( log.isEnabledFor(TracePriority.TRACE) )
  -         log.log(TracePriority.TRACE, "validateCache, info="+info);
  +      if( log.isTraceEnabled() )
  +         log.trace("validateCache, info="+info);
   
         Object subjectCredential = info.credential;
         boolean isValid = false;
  @@ -461,8 +459,8 @@
         info.subject = subject;
         info.credential = credential;
         
  -      if( log.isEnabledFor(TracePriority.TRACE) )
  -         log.log(TracePriority.TRACE, "updateCache, subject="+subject);
  +      if( log.isTraceEnabled() )
  +         log.trace("updateCache, subject="+subject);
        /* If we don't have a cache policy create a default timed cache
         that has an 1800 sec lifetime, is thread-safe, and a resolution
         of 60 seconds.
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to