This guide describes how to use the MC4J JMX Console to administrate a JOnAS server. In order to use MC4J, the JOnAS server must be configured to use MX4J as JMX implementation for its Jmx service. See the JMX service configuration instructions in the Configuring JOnAS services documentation chapter.
Note that JOnAS delivery contains the MX4J jar files, but you have to download MC4J from the SourceForge site.
In order to administrate a JOnAS server with MC4J, you must create a connection to the JMX server launched by the Jmx service at JOnAS starting time.
Here after is described how to create a connection to the JMX server. Once the connection created, you can browse the MBeans registered in the JMX server, view their exposed attributes and invoke the administration operations supported by them.
jonas.services
property contains jmx
in the services list.
org.objectweb.jonas.jmx.mx4j.Mx4jJmxServiceImpl
RMIConnector_
jonas-server-name
jonas.name
property is jonas.properties
file.
jndi.properties
filejndi.properties
)
Let's suppose you compiled and installed the JOnAS provided example samples and you
launched a JOnAS server in $JONAS_ROOT/examples/src/sb/
.
When browsing the jonas folder, you can see the followings:
sb.jar
eb.jar
sample. Use the MBean corresponding to
the EJB Container service: name=ejbContainer,type=service
. Choose the
createContainer
operation from the Operations
list and run the action.
You must provide one parameter (param1
): the name of the file to load
(eb.jar
).
MBeanDescrition
classes for the MBeans. Note also that MX4J
includes a jar for the XDoclet tool allowing for generate source code of MBean interfaces
and descriptions. This jar is not included in the current JOnAS delivery.