org.mc4j.ems.impl.jmx.connection.support.providers
Class Oc4jConnectionProvider

java.lang.Object
  extended by org.mc4j.ems.impl.jmx.connection.support.providers.AbstractConnectionProvider
      extended by org.mc4j.ems.impl.jmx.connection.support.providers.Oc4jConnectionProvider

public class Oc4jConnectionProvider
extends AbstractConnectionProvider

This Node acts as a connection to an OC4J MBean Server via a MEJB. The MEJB connection is ontained using a J2EE ApplicationClient. This involves a workaround which requires a META-INF/application-client.xml to be present in one of the JAR files which the client is loading. The application-client.xml file can be completely empty, it just needs to be present.

Accordingly, an empty application-client.xml has been added to the src/etc directory and is included in the mc4j_core.jar file when it is created.

Version:
1.0
Author:
Steve Button(sbutton@users.sourceforge.net), March 2004

Field Summary
protected  javax.management.MBeanServer mbeanServer
           
protected  Management mejb
           
 
Fields inherited from class org.mc4j.ems.impl.jmx.connection.support.providers.AbstractConnectionProvider
connectionFailure, connectionListeners, connectionRoundTrips, connectionSettings, existingConnection
 
Constructor Summary
Oc4jConnectionProvider()
           
 
Method Summary
protected  void doConnect()
          Connect to the OC4J ManagementEJB.
 void doDisconnect()
           
 java.lang.String getConstant(java.lang.Class clazz, java.lang.String name)
           
 javax.management.MBeanServer getMBeanServer()
           
 Management getMEJB()
           
 
Methods inherited from class org.mc4j.ems.impl.jmx.connection.support.providers.AbstractConnectionProvider
addConnectionListener, compareTo, connect, disconnect, getConnectionSettings, getExistingConnection, getFailures, getRoundTrips, getStatsProxy, initialize, isConnected, removeConnectionListener, setConnected, setStatsProxy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mbeanServer

protected javax.management.MBeanServer mbeanServer

mejb

protected Management mejb
Constructor Detail

Oc4jConnectionProvider

public Oc4jConnectionProvider()
Method Detail

doConnect

protected void doConnect()
                  throws java.lang.Exception
Connect to the OC4J ManagementEJB. This should only be used while the JSR160 interface is not available.

Specified by:
doConnect in class AbstractConnectionProvider
Throws:
java.lang.Exception

getConstant

public java.lang.String getConstant(java.lang.Class clazz,
                                    java.lang.String name)
                             throws java.lang.Exception
Throws:
java.lang.Exception

doDisconnect

public void doDisconnect()
Overrides:
doDisconnect in class AbstractConnectionProvider

getMEJB

public Management getMEJB()
Overrides:
getMEJB in class AbstractConnectionProvider

getMBeanServer

public javax.management.MBeanServer getMBeanServer()
Specified by:
getMBeanServer in class AbstractConnectionProvider