public abstract class JMXServerPlatformBase extends ServerPlatformBase
This is the abstract superclass of all platforms for all servers that contain a subclass that implements the JMXEnabledPlatform interface. Each DatabaseSession contains an instance of the receiver, to help the DatabaseSession determine:
Subclasses already exist to provide configurations for Oc4J, WebLogic, JBoss, NetWeaver, GlassFish and WebSphere.
If the versioned platform subclass is JMX enabled by EclipseLink (registers MBeans) then that server platform must implement the JMXEnabledPlatform interface To provide some different behavior than the provided ServerPlatform(s), we recommend subclassing org.eclipse.persistence.platform.server.JMXServerPlatformBase (or a subclass), and overriding:
ServerPlatformBase
Modifier and Type | Field and Description |
---|---|
static int |
JMX_MBEANSERVER_INDEX_DEFAULT_FOR_MULTIPLE_SERVERS
The default indexed MBeanServer instance to use when multiple MBeanServer instances exist on the platform - usually only in JBoss
|
static java.lang.String |
JMX_REGISTRATION_PREFIX
This is the prefix for all MBeans that are registered with their specific session name appended
|
DEFAULT_SERVER_NAME_AND_VERSION, JMX_REGISTER_DEV_MBEAN_PROPERTY, JMX_REGISTER_RUN_MBEAN_PROPERTY
Constructor and Description |
---|
JMXServerPlatformBase(DatabaseSession newDatabaseSession)
INTERNAL: Default Constructor: Initialize so that runtime services and JTA are enabled.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getApplicationName()
INTERNAL: getApplicationName(): Answer the name of the module (EAR name) that this session is associated with.
|
javax.management.MBeanServer |
getMBeanServer()
INTERNAL: Return the MBeanServer to be used for MBean registration and deregistration.
|
java.lang.String |
getModuleName()
INTERNAL: getModuleName(): Answer the name of the context-root of the application that this session is associated with.
|
void |
serverSpecificRegisterMBean()
INTERNAL: serverSpecificRegisterMBean(): Server specific implementation of the creation and deployment of the JMX MBean to provide runtime services for my databaseSession.
|
void |
serverSpecificUnregisterMBean()
INTERNAL: serverSpecificUnregisterMBean(): Server specific implementation of the de-registration of the JMX MBean from its server during session logout.
|
void |
setApplicationName(java.lang.String aName)
INTERNAL:
|
clearStatementCache, configureProfiler, disableJTA, disableRuntimeServices, enableRuntimeServices, getDatabaseSession, getExternalTransactionControllerClass, getNewTempClassLoader, getServerLog, getServerNameAndVersion, getThreadPool, getThreadPoolSize, initializeExternalTransactionController, isCMP, isJTAEnabled, isRuntimeServicesEnabled, isRuntimeServicesEnabledDefault, launchContainerRunnable, registerMBean, setExternalTransactionControllerClass, setIsCMP, setThreadPool, setThreadPoolSize, shouldUseDriverManager, shutdown, unregisterMBean, unwrapConnection, wasFailureCommunicationBased
public static final java.lang.String JMX_REGISTRATION_PREFIX
public static final int JMX_MBEANSERVER_INDEX_DEFAULT_FOR_MULTIPLE_SERVERS
public JMXServerPlatformBase(DatabaseSession newDatabaseSession)
public javax.management.MBeanServer getMBeanServer()
1) MBeanServerFactory static function - working for 3 of 4 servers WebSphere, JBoss and Glassfish in a generic way
- JBoss returns 2 MBeanServers in the List - but one of them has a null domain - we don't use that one
- WebLogic may return 2 MBeanServers - in that case we want to register with the one containing the "com.bea" tree 2) ManagementFactory static function - what is the difference in using this one over the one returning a List of servers
3) JNDI lookup
4) Direct server specific native API
public void serverSpecificRegisterMBean()
public void serverSpecificUnregisterMBean()
serverSpecificUnregisterMBean
in class ServerPlatformBase
ServerPlatformBase.isRuntimeServicesEnabled()
, ServerPlatformBase.disableRuntimeServices()
public java.lang.String getModuleName()
getModuleName
in interface ServerPlatform
getModuleName
in class ServerPlatformBase
public java.lang.String getApplicationName()
JMXEnabledPlatform
public void setApplicationName(java.lang.String aName)
aName
-