User: starksm 
  Date: 01/11/20 01:42:53

  Modified:    src/main/org/jboss/jmx/server Tag: Branch_2_4
                        JMXAdaptorImpl.java JMXAdaptorService.java
                        RMIConnectorImpl.java RMIConnectorService.java
  Log:
  Change to the unified log4j based org.jboss.logging.Logger class.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.3.6.1   +1 -2      jboss/src/main/org/jboss/jmx/server/Attic/JMXAdaptorImpl.java
  
  Index: JMXAdaptorImpl.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/jmx/server/Attic/JMXAdaptorImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.3.6.1
  diff -u -r1.3 -r1.3.6.1
  --- JMXAdaptorImpl.java       2000/12/11 16:11:55     1.3
  +++ JMXAdaptorImpl.java       2001/11/20 09:42:53     1.3.6.1
  @@ -25,7 +25,6 @@
   import javax.management.MBeanServer;
   import javax.naming.InitialContext;
   
  -import org.jboss.logging.Log;
   import org.jboss.util.ServiceMBeanSupport;
   
   import org.jboss.jmx.interfaces.JMXAdaptor;
  @@ -35,7 +34,7 @@
   *      
   *   @see <related>
   *   @author Rickard �berg ([EMAIL PROTECTED])
  -*   @version $Revision: 1.3 $
  +*   @version $Revision: 1.3.6.1 $
   */
   public class JMXAdaptorImpl
      extends UnicastRemoteObject
  
  
  
  1.2.6.1   +26 -27    jboss/src/main/org/jboss/jmx/server/Attic/JMXAdaptorService.java
  
  Index: JMXAdaptorService.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/jmx/server/Attic/JMXAdaptorService.java,v
  retrieving revision 1.2
  retrieving revision 1.2.6.1
  diff -u -r1.2 -r1.2.6.1
  --- JMXAdaptorService.java    2000/12/07 15:44:56     1.2
  +++ JMXAdaptorService.java    2001/11/20 09:42:53     1.2.6.1
  @@ -4,7 +4,7 @@
    * Distributable under LGPL license.
    * See terms of license at gnu.org.
    */
  - 
  +
   package org.jboss.jmx.server;
   
   import java.io.File;
  @@ -27,66 +27,65 @@
   import javax.management.MBeanServer;
   import javax.naming.InitialContext;
   
  -import org.jboss.logging.Log;
   import org.jboss.util.ServiceMBeanSupport;
   
   /**
  - *   <description> 
  - *      
  + *   <description>
  + *
    *   @see <related>
    *   @author Rickard �berg ([EMAIL PROTECTED])
  - *   @version $Revision: 1.2 $
  + *   @version $Revision: 1.2.6.1 $
    */
   public class JMXAdaptorService
  -   extends ServiceMBeanSupport
  -   implements JMXAdaptorServiceMBean
  +extends ServiceMBeanSupport
  +implements JMXAdaptorServiceMBean
   {
      // Constants -----------------------------------------------------
  -     public static String JNDI_NAME = "jmx";
  -    
  +   public static String JNDI_NAME = "jmx";
  +   
      // Attributes ----------------------------------------------------
  -     MBeanServer server;
  -     JMXAdaptorImpl adaptor;
  +   MBeanServer server;
  +   JMXAdaptorImpl adaptor;
      
      // Static --------------------------------------------------------
  -
  +   
      // Constructors --------------------------------------------------
      
      // Public --------------------------------------------------------
      public 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);
      }
      
      public String getName()
      {
         return "JMX RMI Adaptor";
  -     }
  +   }
      
      // Protected -----------------------------------------------------
      protected void initService()
  -      throws Exception
  +   throws Exception
      {
  -     adaptor = new JMXAdaptorImpl(server);
  +      adaptor = new JMXAdaptorImpl(server);
      }
  -     
  +   
      protected void startService()
  -      throws Exception
  +   throws Exception
      {
  -             new InitialContext().bind(JNDI_NAME, adaptor);
  +      new InitialContext().bind(JNDI_NAME, adaptor);
      }
      
      protected void stopService()
      {
  -             try
  -             {
  -                     new InitialContext().unbind(JNDI_NAME);
  -             } catch (Exception e)
  -             {
  -                     log.exception(e);
  -             }
  +      try
  +      {
  +         new InitialContext().unbind(JNDI_NAME);
  +      } catch (Exception e)
  +      {
  +         log.error("unbind failure", e);
  +      }
      }
   }
   
  
  
  
  1.3.6.1   +0 -1      jboss/src/main/org/jboss/jmx/server/Attic/RMIConnectorImpl.java
  
  Index: RMIConnectorImpl.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/jmx/server/Attic/RMIConnectorImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.3.6.1
  diff -u -r1.3 -r1.3.6.1
  --- RMIConnectorImpl.java     2000/12/11 16:11:56     1.3
  +++ RMIConnectorImpl.java     2001/11/20 09:42:53     1.3.6.1
  @@ -43,7 +43,6 @@
   
   import javax.naming.InitialContext;
   
  -import org.jboss.logging.Log;
   import org.jboss.util.ServiceMBeanSupport;
   
   import org.jboss.jmx.interfaces.RMIConnector;
  
  
  
  1.4.4.1   +85 -76    
jboss/src/main/org/jboss/jmx/server/Attic/RMIConnectorService.java
  
  Index: RMIConnectorService.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/jmx/server/Attic/RMIConnectorService.java,v
  retrieving revision 1.4
  retrieving revision 1.4.4.1
  diff -u -r1.4 -r1.4.4.1
  --- RMIConnectorService.java  2001/03/29 17:44:10     1.4
  +++ RMIConnectorService.java  2001/11/20 09:42:53     1.4.4.1
  @@ -28,85 +28,94 @@
   import javax.management.MBeanServer;
   import javax.naming.InitialContext;
   
  -import org.jboss.logging.Log;
   import org.jboss.util.ServiceMBeanSupport;
   
   /**
  -*   <description>
  -*
  -* @author Rickard �berg ([EMAIL PROTECTED])
  -* @author <A href="mailto:[EMAIL PROTECTED]";>Andreas &quot;Mad&quot; 
Schaefer</A>
  -**/
  + *   <description>
  + *
  + * @author Rickard �berg ([EMAIL PROTECTED])
  + * @author <A href="mailto:[EMAIL PROTECTED]";>Andreas &quot;Mad&quot; 
Schaefer</A>
  + **/
   public class RMIConnectorService
  -     extends ServiceMBeanSupport
  -     implements RMIConnectorServiceMBean
  +   extends ServiceMBeanSupport
  +   implements RMIConnectorServiceMBean
   {
  -     // Constants -----------------------------------------------------
  -     //AS I am not quite sure if this works but somehow the protocol should become
  -     //AS part of the JNDI name because there could be more than one protcol
  -     public static String JNDI_NAME = "jmx:rmi";
  -     public static String JMX_NAME = "jmx";
  -     public static String PROTOCOL_NAME = "rmi";
  -
  -     // Attributes ----------------------------------------------------
  -     private MBeanServer server;
  -     private RMIConnectorImpl adaptor;
  -     private String mHost;
  -    private String mName;
  -
  -     // Static --------------------------------------------------------
  -
  -     // Constructors --------------------------------------------------
  -    public RMIConnectorService() {
  -        mName = null;
  -    }
  -
  -    public RMIConnectorService(
  -        String name
  -    ) {
  -        mName = name;
  -    }
  -
  -     // Public --------------------------------------------------------
  -     public ObjectName getObjectName(
  -             MBeanServer server,
  -             ObjectName name
  -     ) throws javax.management.MalformedObjectNameException {
  -             this.server = server;
  -             return new ObjectName( OBJECT_NAME );
  -     }
  -
  -     public String getName() {
  -             return "JMX RMI Connector";
  -     }
  -
  -    public String getJNDIName() {
  -        if (mName != null)
  -        {
  -            return JMX_NAME + ":" + mHost + ":" + PROTOCOL_NAME + ":" + mName;
  -        }
  -        else
  -        {
  -            return JMX_NAME + ":" + mHost + ":" + PROTOCOL_NAME;
  -        }
  -    }
  -
  -     // Protected -----------------------------------------------------
  -     protected void initService() throws Exception {
  -             mHost = InetAddress.getLocalHost().getHostName();
  -             adaptor = new RMIConnectorImpl( server );
  -     }
  -
  -     protected void startService() throws Exception {
  -             new InitialContext().bind( getJNDIName(), adaptor );
  -     }
  -
  -     protected void stopService() {
  -             try {
  -                     new InitialContext().unbind( getJNDIName() );
  -             }
  -             catch( Exception e )    {
  -                     log.exception( e );
  -             }
  -     }
  +   // Constants -----------------------------------------------------
  +   //AS I am not quite sure if this works but somehow the protocol should become
  +   //AS part of the JNDI name because there could be more than one protcol
  +   public static String JNDI_NAME = "jmx:rmi";
  +   public static String JMX_NAME = "jmx";
  +   public static String PROTOCOL_NAME = "rmi";
  +   
  +   // Attributes ----------------------------------------------------
  +   private MBeanServer server;
  +   private RMIConnectorImpl adaptor;
  +   private String mHost;
  +   private String mName;
  +   
  +   // Static --------------------------------------------------------
  +   
  +   // Constructors --------------------------------------------------
  +   public RMIConnectorService()
  +   {
  +      mName = null;
  +   }
  +   
  +   public RMIConnectorService(
  +   String name
  +   )
  +   {
  +      mName = name;
  +   }
  +   
  +   // Public --------------------------------------------------------
  +   public ObjectName getObjectName(
  +   MBeanServer server,
  +   ObjectName name
  +   ) throws javax.management.MalformedObjectNameException
  +   {
  +      this.server = server;
  +      return new ObjectName( OBJECT_NAME );
  +   }
  +   
  +   public String getName()
  +   {
  +      return "JMX RMI Connector";
  +   }
  +   
  +   public String getJNDIName()
  +   {
  +      if (mName != null)
  +      {
  +         return JMX_NAME + ":" + mHost + ":" + PROTOCOL_NAME + ":" + mName;
  +      }
  +      else
  +      {
  +         return JMX_NAME + ":" + mHost + ":" + PROTOCOL_NAME;
  +      }
  +   }
  +   
  +   // Protected -----------------------------------------------------
  +   protected void initService() throws Exception
  +   {
  +      mHost = InetAddress.getLocalHost().getHostName();
  +      adaptor = new RMIConnectorImpl( server );
  +   }
  +   
  +   protected void startService() throws Exception
  +   {
  +      new InitialContext().bind( getJNDIName(), adaptor );
  +   }
  +   
  +   protected void stopService()
  +   {
  +      try
  +      {
  +         new InitialContext().unbind( getJNDIName() );
  +      }
  +      catch( Exception e )
  +      {
  +         log.error("unbind failure", e);
  +      }
  +   }
   }
  
  
  

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

Reply via email to