geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bordet, Simone" <>
Subject RE: anyone any idea how to get the RMI JMX connector running inside Geronimo?
Date Wed, 29 Oct 2003 09:26:18 GMT

> I can see how to use JSR 160 from Java code...
> I wonder is there any 'pure MBean' way to install a JSR 160 server 
> connector. e.g. an equivalent of the following for JSR 160?
>      <mbean code="" 
> name="Naming:type=rmiregistry">
>      </mbean>
>      <mbean code="mx4j.adaptor.rmi.jrmp.JRMPAdaptor" 
> name="Adaptor:protocol=JRMP">
>          <attribute name="JNDIName">jrmp</attribute>
>      </mbean>

This XML syntax is limited, unless you can pass objects as arguments to JSR 160 constructors.
Also, in JSR 160 you would use factories instead of constructors.

I am committing today a configuration file that is able to perform this; the format would

<?xml version="1.0" encoding="UTF-8" ?>
<configuration port="8872">
    <register objectname="connectors:protocol=rmi">
      <call method="newJMXConnectorServer" classname="">
        <arg type="">service:jmx:rmi://localhost</arg>
        <arg type="java.util.Map" />
        <arg type="" />
    <call objectname="connectors:protocol=rmi" operation="start" />
    <call objectname="connectors:protocol=rmi" operation="stop" />
    <unregister objectname="connectors:protocol=rmi" />

It should be extensible enough, but I'd love to hear comments about it.

> I had a quick look at CVS HEAD of mx4j and couldn't see any 
> obvious way 
> of doing this. Maybe we need a little MBean wrapper around 
> the Java API 
> (if there's not one already)?

Either the wrapper or an extended configuration file as above.
The wrapper can take a string instead of a JMXServiceURL, and hardcode the environment Map
so its constructor will be 
GeronimoRMIConnectorServer(String jmxServiceURL) which should be handy enough.


View raw message