The content of this document is the following:
The target audience for this document is the management application developer or the administrator, intending to use standard JMX RMI connectors to access the MBean Server running in a JOnAS server.
Currently, JSR 160 has defined a mandatory connector based on RMI (that supports both RMI/JRMP and RMI/IIOP).
Support for JSR 160 connectors in JOnAS is based on the MX4J JMX implementation.
RMIConnector_jonasServerName'. It can be accessed using any of the communication protocols support by JOnAS (RMI/JRMP, RMI/IIOP, JEREMIE - see Choosing the Protocol).
JSR 160 support implies providing standard connector server objects. The JMX service
creates at start-up one or several such objects, depending on the JOnAS configuration
(in this case, depending on the content of
To create a client connector, the client side needs to know the URL of the connector
server. Below we present the URLs that can be used by the clients depending on the
protocol they choose.
Currently only 2 protocols can be used by JSR-160 connectors: RMI/JRMP and RMI/IIOP.
jrmpprotocol is set in the
The client has to construct a
JMXServiceURL using the following
String, possibly modified according to the JOnAS-specific configuration:
host is the host on which is running the JOnAS server to be managed.
port number is given in the
JMXConnector has to be created and connected to the connector server
using the JMX Remote API.
Hashtable environment = null; JMXServiceURL address = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://host:1099/jrmpconnector_jonas"); JMXConnector connector = JMXConnectorFactory.newJMXConnector(address, environment); connector.connect(environment);
iiopprotocol is set in the
The client code is similar to the JRMP case, but the
String to be used to construct the
must adhere to the following model:
Hashtable environment = null; JMXServiceURL address = new JMXServiceURL("service:jmx:iiop:///jndi/iiop://host:2001/iiopconnector_jonas"); JMXConnector connector = JMXConnectorFactory.newJMXConnector(address, environment); connector.connect(environment);