tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common JkMX.java
Date Wed, 30 Oct 2002 22:22:46 GMT
costin      2002/10/30 14:22:46

  Modified:    jk/java/org/apache/jk/common JkMX.java
  Log:
  Added support for starting the mx4j RMI connector. This is
  obviously disabled by default.
  
  Revision  Changes    Path
  1.7       +33 -0     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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- JkMX.java	9 Aug 2002 20:53:21 -0000	1.6
  +++ JkMX.java	30 Oct 2002 22:22:46 -0000	1.7
  @@ -119,6 +119,39 @@
                   mserver.setAttribute(serverName, new Attribute("Host", host));
               mserver.setAttribute(serverName, new Attribute("Port", new Integer(port)));
               
  +            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 );
  +            
  +            // Create the JRMP adaptor
  +            ObjectName adaptor = new ObjectName("Adaptor:protocol=jrmp");
  +            mserver.createMBean("mx4j.adaptor.rmi.jrmp.JRMPAdaptor", adaptor, null);
  +            
  +            //    mx4j.adaptor.rmi.jrmp.JRMPAdaptorMBean mbean = (mx4j.adaptor.rmi.jrmp.JRMPAdaptorMBean)mx4j.util.StandardMBeanProxy.
  +            //        create(mx4j.adaptor.rmi.jrmp.JRMPAdaptorMBean.class, mserver, adaptor);
  +
  +            mserver.setAttribute(adaptor, new Attribute("JNDIName", "jrmp"));
  +
  +            mserver.invoke( adaptor, "putNamingProperty",
  +                            new Object[] {
  +                javax.naming.Context.INITIAL_CONTEXT_FACTORY,
  +                    "com.sun.jndi.rmi.registry.RegistryContextFactory"},
  +                            new String[] { "java.lang.Object", "java.lang.Object" });
  +
  +            mserver.invoke( adaptor, "putNamingProperty",
  +                            new Object[] {
  +                javax.naming.Context.PROVIDER_URL,
  +                    "rmi://localhost:1099"},
  +                            new String[] { "java.lang.Object", "java.lang.Object" });
  +            
  +            //mbean.putNamingProperty(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.registry.RegistryContextFactory");
  +            //mbean.putNamingProperty(javax.naming.Context.PROVIDER_URL, "rmi://localhost:1099");
  +            // Registers the JRMP adaptor in JNDI and starts it
  +            mserver.invoke(adaptor, "start", null, null);
  +            //   mbean.start();
  +            log.info( "Creating " + adaptor );
  +      
               ObjectName processorName = new ObjectName("Http:name=XSLTProcessor");
               mserver.createMBean("mx4j.adaptor.http.XSLTProcessor", processorName, null);
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message