geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject cvs commit: incubator-geronimo/modules/remoting/src/java/org/apache/geronimo/remoting/jmx RemoteMBeanServerFactory.java
Date Thu, 12 Feb 2004 08:15:29 GMT
djencks     2004/02/12 00:15:29

  Modified:    modules/remoting/src/java/org/apache/geronimo/remoting/jmx
                        RemoteMBeanServerFactory.java
  Log:
  remove dependence on core version of class
  
  Revision  Changes    Path
  1.4       +21 -10    incubator-geronimo/modules/remoting/src/java/org/apache/geronimo/remoting/jmx/RemoteMBeanServerFactory.java
  
  Index: RemoteMBeanServerFactory.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/remoting/src/java/org/apache/geronimo/remoting/jmx/RemoteMBeanServerFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- RemoteMBeanServerFactory.java	26 Nov 2003 20:54:29 -0000	1.3
  +++ RemoteMBeanServerFactory.java	12 Feb 2004 08:15:29 -0000	1.4
  @@ -1,9 +1,9 @@
   /*
    * ==================================================================== The
    * Apache Software License, Version 1.1
  - * 
  + *
    * Copyright (c) 2003 The Apache Software Foundation. All rights reserved.
  - * 
  + *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions are met:
    *  1. Redistributions of source code must retain the above copyright notice,
  @@ -23,7 +23,7 @@
    *  5. Products derived from this software may not be called "Apache", "Apache
    * Geronimo", nor may "Apache" appear in their name, without prior written
    * permission of the Apache Software Foundation.
  - * 
  + *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
    * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
    * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  @@ -35,11 +35,11 @@
    * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    * ====================================================================
  - * 
  + *
    * This software consists of voluntary contributions made by many individuals
    * on behalf of the Apache Software Foundation. For more information on the
    * Apache Software Foundation, please see <http://www.apache.org/> .
  - * 
  + *
    * ====================================================================
    */
   package org.apache.geronimo.remoting.jmx;
  @@ -49,15 +49,15 @@
   
   import javax.management.MBeanServer;
   
  +import org.apache.geronimo.core.service.Interceptor;
   import org.apache.geronimo.proxy.ProxyContainer;
   import org.apache.geronimo.remoting.MarshalingInterceptor;
   import org.apache.geronimo.remoting.transport.RemoteTransportInterceptor;
  -import org.apache.geronimo.core.service.Interceptor;
   
   /**
    * @version $Revision$ $Date$
    */
  -public class RemoteMBeanServerFactory extends org.apache.geronimo.enterprise.deploy.server.RemoteMBeanServerFactory
{
  +public class RemoteMBeanServerFactory {
   
       static public MBeanServer create(String host) throws IllegalArgumentException {
           return create(host, 3434);
  @@ -86,12 +86,23 @@
               new Class[] { MBeanServer.class });
       }
   
  +    //TODO figure out if and how to use this method with only this one class.
  +    private static RemoteMBeanServerFactory createRemoteMBeanServerFactory() {
  +        try {
  +            // Get the factory name via sys prop...
  +            // In case we EVER used a different factory than: org.apache.geronimo.remoting.jmx.RemoteMBeanServerFactory
  +            String factoryClass = System.getProperty("org.apache.geronimo.enterprise.deploy.server.RemoteMBeanServerFactory",
"org.apache.geronimo.remoting.jmx.RemoteMBeanServerFactory");
  +            return  (RemoteMBeanServerFactory) RemoteMBeanServerFactory.class.getClassLoader().loadClass(factoryClass).newInstance();
  +        } catch (Throwable e) {
  +            throw new RuntimeException("The RemoteMBeanServerFactory instance could not
be loaded:", e);
  +        }
  +    }
       /**
        * @see org.apache.geronimo.enterprise.deploy.server.RemoteMBeanServerFactory#factoryCreate(java.lang.String)
        */
       protected MBeanServer factoryCreate(String hostname) {
           return RemoteMBeanServerFactory.create(hostname);
       }
  -    
  -    
  +
  +
   }
  
  
  

Mime
View raw message