User: starksm 
  Date: 01/09/11 11:35:03

  Modified:    src/main/org/jboss/security/plugins/samples
                        CacheRealmMapping.java
                        CacheRealmMappingService.java
                        DatabaseRealmMapping.java
                        DatabaseRealmMappingService.java
                        DatabaseSecurityManagerService.java
                        EJBSecurityManagerDatabaseImpl.java
                        EJBSecurityManagerDefaultImpl.java
                        EJBSecurityManagerService.java
                        SimpleRealmMapping.java
                        SimpleRealmMappingService.java
  Log:
  Convert all logging to org.jboss.logging.Logger which is a subclass of
  org.apache.log4j.Category.
  
  Revision  Changes    Path
  1.4       +0 -1      
jboss/src/main/org/jboss/security/plugins/samples/CacheRealmMapping.java
  
  Index: CacheRealmMapping.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/security/plugins/samples/CacheRealmMapping.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CacheRealmMapping.java    2001/08/30 03:33:23     1.3
  +++ CacheRealmMapping.java    2001/09/11 18:35:03     1.4
  @@ -25,7 +25,6 @@
   import javax.management.MBeanServer;
   import javax.management.ObjectName;
   
  -import org.jboss.logging.Log;
   import org.jboss.system.ServiceMBeanSupport;
   
   import org.jboss.security.RealmMapping;
  
  
  
  1.4       +35 -36    
jboss/src/main/org/jboss/security/plugins/samples/CacheRealmMappingService.java
  
  Index: CacheRealmMappingService.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/security/plugins/samples/CacheRealmMappingService.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CacheRealmMappingService.java     2001/08/30 03:33:23     1.3
  +++ CacheRealmMappingService.java     2001/09/11 18:35:03     1.4
  @@ -26,7 +26,6 @@
   import javax.management.ObjectName;
   
   
  -import org.jboss.logging.Log;
   import org.jboss.system.ServiceMBeanSupport;
   
   /**
  @@ -37,17 +36,17 @@
    *   @author Daniel O'Connor [EMAIL PROTECTED]
    */
   public class CacheRealmMappingService
  -   extends ServiceMBeanSupport
  -   implements CacheRealmMappingServiceMBean, ObjectFactory
  +extends ServiceMBeanSupport
  +implements CacheRealmMappingServiceMBean, ObjectFactory
   {
      // Constants -----------------------------------------------------
      public static String JNDI_NAME = "java:/CacheRealmMapping";
  -    
  +   
      // Attributes ----------------------------------------------------
  -     MBeanServer server;
  +   MBeanServer server;
      
      // Static --------------------------------------------------------
  -
  +   
      // ServiceMBeanSupport overrides ---------------------------------
      public String getName()
      {
  @@ -55,47 +54,47 @@
      }
      
      protected ObjectName getObjectName(MBeanServer server, ObjectName name)
  -      throws javax.management.MalformedObjectNameException
  +   throws javax.management.MalformedObjectNameException
      {
  -     this.server = server;
  +      this.server = server;
         return new ObjectName(OBJECT_NAME);
      }
  -     
  +   
      protected void initService()
  -      throws Exception
  +   throws Exception
      {
      }
  -     
  +   
      protected void startService()
  -      throws Exception
  +   throws Exception
      {
  -             
  -        // Bind reference to JNDI
  -        Reference ref = new Reference(CacheRealmMapping.class.toString(), 
getClass().getName(), null);
  -        new InitialContext().bind(JNDI_NAME, ref);
  +      
  +      // Bind reference to JNDI
  +      Reference ref = new Reference(CacheRealmMapping.class.toString(), 
getClass().getName(), null);
  +      new InitialContext().bind(JNDI_NAME, ref);
      }
      
      protected void stopService()
  +   {
  +      try
  +      {
  +         // Remove mapping from JNDI
  +         new InitialContext().unbind(JNDI_NAME);
  +      } catch (Exception e)
  +      {
  +         log.error("unbind failed", e);
  +      }
  +   }
  +   
  +   // ObjectFactory implementation ----------------------------------
  +   public Object getObjectInstance(Object obj,
  +      Name name,
  +      Context nameCtx,
  +      Hashtable environment)
  +      throws Exception
      {
  -             try
  -             {
  -                     // Remove mapping from JNDI
  -                     new InitialContext().unbind(JNDI_NAME);
  -             } catch (Exception e)
  -             {
  -                     log.exception(e);
  -             }
  -   }
  -     
  -     // ObjectFactory implementation ----------------------------------
  -     public Object getObjectInstance(Object obj,
  -                                Name name,
  -                                Context nameCtx,
  -                                Hashtable environment)
  -                         throws Exception
  -     {
  -             // Return the cache realm mapping manager
  -             return new CacheRealmMapping();
  -     }
  +      // Return the cache realm mapping manager
  +      return new CacheRealmMapping();
  +   }
   }
   
  
  
  
  1.4       +0 -2      
jboss/src/main/org/jboss/security/plugins/samples/DatabaseRealmMapping.java
  
  Index: DatabaseRealmMapping.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/security/plugins/samples/DatabaseRealmMapping.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DatabaseRealmMapping.java 2001/08/30 03:33:23     1.3
  +++ DatabaseRealmMapping.java 2001/09/11 18:35:03     1.4
  @@ -30,9 +30,7 @@
   import javax.management.MBeanServer;
   import javax.management.ObjectName;
   
  -import org.jboss.logging.Log;
   import org.jboss.system.ServiceMBeanSupport;
  -
   import org.jboss.security.RealmMapping;
   
   /**
  
  
  
  1.4       +37 -38    
jboss/src/main/org/jboss/security/plugins/samples/DatabaseRealmMappingService.java
  
  Index: DatabaseRealmMappingService.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/security/plugins/samples/DatabaseRealmMappingService.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DatabaseRealmMappingService.java  2001/08/30 03:33:23     1.3
  +++ DatabaseRealmMappingService.java  2001/09/11 18:35:03     1.4
  @@ -26,29 +26,28 @@
   import javax.management.ObjectName;
   
   
  -import org.jboss.logging.Log;
   import org.jboss.system.ServiceMBeanSupport;
   
   /**
    *   This is a JMX service which manages access to security realms for a bean.
    *     The service creates it and binds a Reference to it into JNDI.
  - *      
  + *
    *   @see EJBSecurityManager
    *   @author Daniel O'Connor [EMAIL PROTECTED]
    */
   public class DatabaseRealmMappingService
  -   extends ServiceMBeanSupport
  -   implements DatabaseRealmMappingServiceMBean, ObjectFactory
  +extends ServiceMBeanSupport
  +implements DatabaseRealmMappingServiceMBean, ObjectFactory
   {
      // Constants -----------------------------------------------------
      public static String JNDI_NAME = "java:/DatabaseRealmMapping";
      private static DatabaseRealmMapping drm;
  -    
  +   
      // Attributes ----------------------------------------------------
  -     MBeanServer server;
  +   MBeanServer server;
      
      // Static --------------------------------------------------------
  -
  +   
      // ServiceMBeanSupport overrides ---------------------------------
      public String getName()
      {
  @@ -56,48 +55,48 @@
      }
      
      protected ObjectName getObjectName(MBeanServer server, ObjectName name)
  -      throws javax.management.MalformedObjectNameException
  +   throws javax.management.MalformedObjectNameException
      {
  -     this.server = server;
  +      this.server = server;
         return new ObjectName(OBJECT_NAME);
      }
  -     
  +   
      protected void initService()
  -      throws Exception
  +   throws Exception
      {
  -        // Create a new SM
  -        drm = new DatabaseRealmMapping();
  -        // Bind reference to JNDI
  -        Reference ref = new Reference(DatabaseRealmMapping.class.toString(), 
getClass().getName(), null);
  -        new InitialContext().bind(JNDI_NAME, ref);
  +      // Create a new SM
  +      drm = new DatabaseRealmMapping();
  +      // Bind reference to JNDI
  +      Reference ref = new Reference(DatabaseRealmMapping.class.toString(), 
getClass().getName(), null);
  +      new InitialContext().bind(JNDI_NAME, ref);
      }
  -
  +   
      protected void startService()
  -      throws Exception
  +   throws Exception
      {
      }
      
      protected void stopService()
      {
  -             try
  -             {
  -                     // Remove mapping from JNDI
  -                     new InitialContext().unbind(JNDI_NAME);
  -             } catch (Exception e)
  -             {
  -                     log.exception(e);
  -             }
  -   }
  -     
  -     // ObjectFactory implementation ----------------------------------
  -     public Object getObjectInstance(Object obj,
  -                                Name name,
  -                                Context nameCtx,
  -                                Hashtable environment)
  -                         throws Exception
  -     {
  -             // Return the database realm mapping manager
  -             return drm;
  -     }
  +      try
  +      {
  +         // Remove mapping from JNDI
  +         new InitialContext().unbind(JNDI_NAME);
  +      } catch (Exception e)
  +      {
  +         log.error("unbind failed", e);
  +      }
  +   }
  +   
  +   // ObjectFactory implementation ----------------------------------
  +   public Object getObjectInstance(Object obj,
  +   Name name,
  +   Context nameCtx,
  +   Hashtable environment)
  +   throws Exception
  +   {
  +      // Return the database realm mapping manager
  +      return drm;
  +   }
   }
   
  
  
  
  1.4       +1 -2      
jboss/src/main/org/jboss/security/plugins/samples/DatabaseSecurityManagerService.java
  
  Index: DatabaseSecurityManagerService.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/security/plugins/samples/DatabaseSecurityManagerService.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DatabaseSecurityManagerService.java       2001/08/30 03:33:23     1.3
  +++ DatabaseSecurityManagerService.java       2001/09/11 18:35:03     1.4
  @@ -27,7 +27,6 @@
   import javax.management.ObjectName;
   
   
  -import org.jboss.logging.Log;
   import org.jboss.system.ServiceMBeanSupport;
   
   import org.jboss.security.EJBSecurityManager;
  @@ -96,7 +95,7 @@
           
          catch (Exception e)
          {
  -         log.exception(e);
  +         log.error("unbind failed", e);
          }
      }
       
  
  
  
  1.4       +0 -1      
jboss/src/main/org/jboss/security/plugins/samples/EJBSecurityManagerDatabaseImpl.java
  
  Index: EJBSecurityManagerDatabaseImpl.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/security/plugins/samples/EJBSecurityManagerDatabaseImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- EJBSecurityManagerDatabaseImpl.java       2001/08/30 03:33:23     1.3
  +++ EJBSecurityManagerDatabaseImpl.java       2001/09/11 18:35:03     1.4
  @@ -35,7 +35,6 @@
   import javax.sql.DataSource;
   
   
  -import org.jboss.logging.Log;
   import org.jboss.system.ServiceMBeanSupport;
   
   import org.jboss.security.EJBSecurityManager;
  
  
  
  1.4       +0 -1      
jboss/src/main/org/jboss/security/plugins/samples/EJBSecurityManagerDefaultImpl.java
  
  Index: EJBSecurityManagerDefaultImpl.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/security/plugins/samples/EJBSecurityManagerDefaultImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- EJBSecurityManagerDefaultImpl.java        2001/08/30 03:33:23     1.3
  +++ EJBSecurityManagerDefaultImpl.java        2001/09/11 18:35:03     1.4
  @@ -29,7 +29,6 @@
   
   import javax.transaction.TransactionManager;
   
  -import org.jboss.logging.Log;
   import org.jboss.system.ServiceMBeanSupport;
   
   import org.jboss.security.EJBSecurityManager;
  
  
  
  1.4       +1 -2      
jboss/src/main/org/jboss/security/plugins/samples/EJBSecurityManagerService.java
  
  Index: EJBSecurityManagerService.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/security/plugins/samples/EJBSecurityManagerService.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- EJBSecurityManagerService.java    2001/08/30 03:33:23     1.3
  +++ EJBSecurityManagerService.java    2001/09/11 18:35:03     1.4
  @@ -27,7 +27,6 @@
   import javax.management.ObjectName;
   
   
  -import org.jboss.logging.Log;
   import org.jboss.system.ServiceMBeanSupport;
   
   import org.jboss.security.EJBSecurityManager;
  @@ -95,7 +94,7 @@
           
          catch (Exception e)
          {
  -         log.exception(e);
  +         log.error("unbind failed", e);
          }
      }
       
  
  
  
  1.4       +0 -1      
jboss/src/main/org/jboss/security/plugins/samples/SimpleRealmMapping.java
  
  Index: SimpleRealmMapping.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/security/plugins/samples/SimpleRealmMapping.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SimpleRealmMapping.java   2001/08/30 03:33:23     1.3
  +++ SimpleRealmMapping.java   2001/09/11 18:35:03     1.4
  @@ -25,7 +25,6 @@
   import javax.management.MBeanServer;
   import javax.management.ObjectName;
   
  -import org.jboss.logging.Log;
   import org.jboss.system.ServiceMBeanSupport;
   
   import org.jboss.security.RealmMapping;
  
  
  
  1.4       +1 -2      
jboss/src/main/org/jboss/security/plugins/samples/SimpleRealmMappingService.java
  
  Index: SimpleRealmMappingService.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/security/plugins/samples/SimpleRealmMappingService.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SimpleRealmMappingService.java    2001/08/30 03:33:23     1.3
  +++ SimpleRealmMappingService.java    2001/09/11 18:35:03     1.4
  @@ -26,7 +26,6 @@
   import javax.management.ObjectName;
   
   
  -import org.jboss.logging.Log;
   import org.jboss.system.ServiceMBeanSupport;
   
   /**
  @@ -85,7 +84,7 @@
                        new InitialContext().unbind(JNDI_NAME);
                } catch (Exception e)
                {
  -                     log.exception(e);
  +                     log.error("unbind failed", e);
                }
      }
        
  
  
  

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

Reply via email to