Show TOC Start of Content Area

Procedure documentation Acquiring a Reference to the MBean Server  Locate the document in its SAP Library structure

Procedure

...

       1.      Acquire a reference to the MBean server:

InitialContext initialCtx = new InitialContext();

MBeanServer mbs = (MBeanServer)initialCtx.lookup("jmx");

For more information about how to connect to the MBean Server, see Connecting to an MBeanServer.

       2.      Add a reference from the application to the JMX library.

This is done in the application-j2ee-engine.xml situated in the /META-INF folder of the EAR. In this xml you need to add the following code:

  <reference reference-type="weak">

    <reference-target target-type="library">

      tc~jmx

    </reference-target>

  </reference>

 

Next, see Building ObjectName(s) for the Resource MBean(s)

 

End of Content Area