org.rhq.plugins.jmx
Class JMXServerComponent

java.lang.Object
  extended by org.rhq.plugins.jmx.JMXServerComponent
All Implemented Interfaces:
AvailabilityFacet, ResourceComponent, JMXComponent

public class JMXServerComponent
extends Object
implements JMXComponent

The generic JMX server component used to create and cache a connection to a local or remote JMX MBeanServer. This component is responsible for building an isolated connection/classloader to the managed resource's JMX MBeanServer. Each connection is isolated from other connections created by other instances of this component. This allows for it to do things like manage multiple JBossAS servers that are running on the same box, even if they are of different JBossAS versions. The same holds true for Hibernate applications - multiple connections can be created to different versions of the Hibernate MBean and due to the isolation of each connection, there are no version incompatibility errors that will occur.

Author:
Greg Hinkle, John Mazzitelli

Field Summary
 
Fields inherited from interface org.rhq.plugins.jmx.JMXComponent
CREDENTIALS_CONFIG_PROP, PRINCIPAL_CONFIG_PROP
 
Constructor Summary
JMXServerComponent()
           
 
Method Summary
protected  void connectLocal(int vmid)
           
 List<Resource> discoverServices(ResourceType type, Configuration defaultPluginConfiguration)
           
 AvailabilityType getAvailability()
           
 org.mc4j.ems.connection.EmsConnection getEmsConnection()
           
protected  ResourceContext getResourceContext()
           
protected  void internalStart()
           
protected  void prepareConnection(org.mc4j.ems.connection.settings.ConnectionSettings settings)
           
 void start(ResourceContext context)
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMXServerComponent

public JMXServerComponent()
Method Detail

start

public void start(ResourceContext context)
           throws Exception
Specified by:
start in interface ResourceComponent
Throws:
Exception

internalStart

protected void internalStart()
                      throws Exception
Throws:
Exception

stop

public void stop()
Specified by:
stop in interface ResourceComponent

connectLocal

protected void connectLocal(int vmid)

prepareConnection

protected void prepareConnection(org.mc4j.ems.connection.settings.ConnectionSettings settings)

getEmsConnection

public org.mc4j.ems.connection.EmsConnection getEmsConnection()
Specified by:
getEmsConnection in interface JMXComponent

getAvailability

public AvailabilityType getAvailability()
Specified by:
getAvailability in interface AvailabilityFacet

getResourceContext

protected ResourceContext getResourceContext()

discoverServices

public List<Resource> discoverServices(ResourceType type,
                                       Configuration defaultPluginConfiguration)


Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.