站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 3.2.7 server API Documentation 英文版文档

EJBConnector (JBoss Server API) - JBoss 3.2.7 server API Documentation 英文版文档


org.jboss.jmx.connector.ejb
Class EJBConnector

java.lang.Object
  extended byorg.jboss.jmx.connector.rmi.RMIConnectorImpl
      extended byorg.jboss.jmx.connector.ejb.EJBConnector
All Implemented Interfaces:
EJBConnectorMBean, javax.management.MBeanServer, javax.management.MBeanServerConnection, RemoteMBeanServer, RMIConnectorImplMBean

public class EJBConnector
extends RMIConnectorImpl
implements RemoteMBeanServer, EJBConnectorMBean

This is the equivalent to the RMI Connector but uses the EJB Adaptor. The only advantage of using EJB-Adaptor is that you can utilize the security.

ATTENTION: Note that for the event transport (or in the JMX Notations: Notification) the server must be able to load the RMI Stubs and the Remote Listener classes. Therefore you must make them available to the JMX Server and the EJB-Adaptor (meaning the EJB-Container).

Translates RemoteExceptions into MBeanExceptions where declared and RuntimeMBeanExceptions when not declared. RuntimeMBeanException contain NestedRuntimeException containg the root RemoteException due to RuntimeMBeanException taking a RuntimeException and not a Throwable for detail.

Version:
$Revision: 1.10 $
Author:
Andreas Schaefer (andreas.schaefer@madplanet.com), Jason Dillon

Field Summary
protected  String mJNDIName
           
protected  String mJNDIServer
           
 
Fields inherited from class org.jboss.jmx.connector.rmi.RMIConnectorImpl
log, mEventType, mListeners, mOptions, mRandom, mRemoteAdaptor, mServer
 
Fields inherited from interface org.jboss.jmx.connector.RemoteMBeanServer
NOTIFICATION_TYPE_JMS, NOTIFICATION_TYPE_POLLING, NOTIFICATION_TYPE_RMI
 
Constructor Summary
EJBConnector(AdaptorHome pAdaptorHome)
          AS For evaluation purposes Creates a Connector based on an already found Adaptor
EJBConnector(int pType, String[] pOptions)
          Creates an Client Connector using the EJB-Adaptor to access the remote JMX Server.
EJBConnector(int pType, String[] pOptions, String pJNDIName)
          Creates an Client Connector using the EJB-Adaptor to access the remote JMX Server.
EJBConnector(int pType, String[] pOptions, String pJNDIName, String pJNDIServer)
          Creates an Client Connector using the EJB-Adaptor to access the remote JMX Server.
 
Method Summary
protected  Adaptor getAdaptorBean(String pJNDIName)
           
 String getServerDescription()
          jmx:managed-operation
 void start(Object pServer)
          jmx:managed-operation
 
Methods inherited from class org.jboss.jmx.connector.rmi.RMIConnectorImpl
addNotificationListener, addNotificationListener, createMBean, createMBean, createMBean, createMBean, deserialize, deserialize, deserialize, getAttribute, getAttributes, getClassLoader, getClassLoaderFor, getClassLoaderRepository, getDefaultDomain, getDomains, getMBeanCount, getMBeanInfo, getObjectInstance, instantiate, instantiate, instantiate, instantiate, invoke, isAlive, isInstanceOf, isRegistered, queryMBeans, queryNames, registerMBean, removeNotificationListener, removeNotificationListener, removeNotificationListener, removeNotificationListener, setAttribute, setAttributes, stop, unregisterMBean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.management.MBeanServer
addNotificationListener, addNotificationListener, createMBean, createMBean, createMBean, createMBean, deserialize, deserialize, deserialize, getAttribute, getAttributes, getClassLoader, getClassLoaderFor, getClassLoaderRepository, getDefaultDomain, getDomains, getMBeanCount, getMBeanInfo, getObjectInstance, instantiate, instantiate, instantiate, instantiate, invoke, isInstanceOf, isRegistered, queryMBeans, queryNames, registerMBean, removeNotificationListener, removeNotificationListener, removeNotificationListener, removeNotificationListener, setAttribute, setAttributes, unregisterMBean
 

Field Detail

mJNDIServer

protected String mJNDIServer

mJNDIName

protected String mJNDIName
Constructor Detail

EJBConnector

public EJBConnector(AdaptorHome pAdaptorHome)
             throws javax.ejb.CreateException,
                    RemoteException
AS For evaluation purposes Creates a Connector based on an already found Adaptor


EJBConnector

public EJBConnector(int pType,
                    String[] pOptions)
             throws Exception
Creates an Client Connector using the EJB-Adaptor to access the remote JMX Server.

Parameters:
pType - Defines the type of event transport. Please have a look at the constants with the prefix NOTIFICATION_TYPE which protocols are supported
pOptions - List of options used for the event transport. Right now only for event type JMS there is the JMS Queue- Factory JNDI Name supported.

EJBConnector

public EJBConnector(int pType,
                    String[] pOptions,
                    String pJNDIName)
             throws Exception
Creates an Client Connector using the EJB-Adaptor to access the remote JMX Server.

Parameters:
pType - Defines the type of event transport. Please have a look at the constants with the prefix NOTIFICATION_TYPE which protocols are supported
pOptions - List of options used for the event transport. Right now only for event type JMS there is the JMS Queue- Factory JNDI Name supported.
pJNDIName - JNDI Name of the EJB-Adaptor to lookup its Home interface and if null then "ejb/jmx/ejb/Adaptor" is used as default

EJBConnector

public EJBConnector(int pType,
                    String[] pOptions,
                    String pJNDIName,
                    String pJNDIServer)
             throws Exception
Creates an Client Connector using the EJB-Adaptor to access the remote JMX Server.

Parameters:
pType - Defines the type of event transport. Please have a look at the constants with the prefix NOTIFICATION_TYPE which protocols are supported
pOptions - List of options used for the event transport. Right now only for event type JMS there is the JMS Queue- Factory JNDI Name supported.
pJNDIName - JNDI Name of the EJB-Adaptor to lookup its Home interface and if null then "ejb/jmx/ejb/Adaptor" is used as default
pJNDIServer - Server name of the JNDI server to look up the EJB-Adaptor and QueueFactory if JMS is used for the event transport. If null then the default specified in the "jndi.properties" will be used.
Method Detail

getAdaptorBean

protected Adaptor getAdaptorBean(String pJNDIName)
                          throws NamingException,
                                 RemoteException,
                                 javax.ejb.CreateException
Throws:
NamingException
RemoteException
javax.ejb.CreateException

start

public void start(Object pServer)
           throws Exception
jmx:managed-operation

Specified by:
start in interface EJBConnectorMBean
Overrides:
start in class RMIConnectorImpl
Throws:
Exception

getServerDescription

public String getServerDescription()
jmx:managed-operation

Overrides:
getServerDescription in class RMIConnectorImpl


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.