tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hgo...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common JkMX.java
Date Thu, 16 Oct 2003 10:58:15 GMT
hgomez      2003/10/16 03:58:15

  Modified:    jk/java/org/apache/jk/common JkMX.java
  Log:
  When adding jrmp support I added a sac of ...
  
  I win the Jaja D'Or contest this time
  
  Revision  Changes    Path
  1.14      +9 -7      jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JkMX.java
  
  Index: JkMX.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JkMX.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- JkMX.java	25 Sep 2003 15:24:44 -0000	1.13
  +++ JkMX.java	16 Oct 2003 10:58:15 -0000	1.14
  @@ -179,12 +179,12 @@
               }
           }
   
  -        if (classExists("mx4j.tools.naming.NamingService")) {
  +        if (! adapterLoaded && classExists("mx4j.tools.naming.NamingService"))
{
               try {
  -                ObjectName serverName2 = new ObjectName("Naming:name=rmiregistry");
  -                mserver.createMBean("mx4j.tools.naming.NamingService", serverName2, null);
  -                mserver.invoke(serverName2, "start", null, null);
  -                log.info( "Creating " + serverName2 );
  +                serverName = new ObjectName("Naming:name=rmiregistry");
  +                mserver.createMBean("mx4j.tools.naming.NamingService", serverName, null);
  +                mserver.invoke(serverName, "start", null, null);
  +                log.info( "Creating " + serverName );
   
                   // Create the JRMP adaptor
                   ObjectName adaptor = new ObjectName("Adaptor:protocol=jrmp");
  @@ -218,11 +218,12 @@
                   adapterLoaded = true;
   
               } catch( Exception ex ) {
  -                log.info( "MX4j RMI adapter not loaded: " + ex.toString());
  +				serverName = null;
  +                log.error( "MX4j RMI adapter not loaded: " + ex.toString());
               }
           }
   
  -        if (classExists("com.sun.jdmk.comm.HtmlAdaptorServer")) {
  +        if (! adapterLoaded && classExists("com.sun.jdmk.comm.HtmlAdaptorServer"))
{
               try {
                   Class c=Class.forName( "com.sun.jdmk.comm.HtmlAdaptorServer" );
                   Object o=c.newInstance();
  @@ -237,6 +238,7 @@
   
                   adapterLoaded = true;
               } catch( Throwable t ) {
  +				serverName = null;
                   log.error( "Can't load the JMX_RI http adapter " + t.toString()  );
               }
           }
  
  
  

---------------------------------------------------------------------
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