|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.persistence.platform.server.ServerPlatformBase
org.eclipse.persistence.platform.server.JMXServerPlatformBase
public abstract class JMXServerPlatformBase
PUBLIC: Subclass of org.eclipse.persistence.platform.server.ServerPlatformBase in support of the JMXEnabledPlatform interface
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
Field Summary | |
---|---|
protected static java.lang.String |
APP_SERVER_CLASSLOADER_APPLICATION_PU_SEARCH_STRING_POSTFIX
|
protected static java.lang.String |
APP_SERVER_CLASSLOADER_APPLICATION_PU_SEARCH_STRING_PREFIX
|
protected static java.lang.String |
APP_SERVER_CLASSLOADER_MODULE_EJB_SEARCH_STRING_PREFIX
Override by subclass: Search String in application server session for ejb modules |
protected static java.lang.String |
APP_SERVER_CLASSLOADER_MODULE_EJB_WAR_SEARCH_STRING_POSTFIX
|
protected static java.lang.String |
APP_SERVER_CLASSLOADER_MODULE_WAR_SEARCH_STRING_PREFIX
Override by subclass: Search String in application server session for war modules |
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 |
protected javax.management.MBeanServer |
mBeanServer
Cache the ServerPlatform MBeanServer for performance |
protected static java.lang.String |
OVERRIDE_JMX_APPLICATIONNAME_PROPERTY
This persistence.xml or sessions.xml property is used to override the applicationName |
protected static java.lang.String |
OVERRIDE_JMX_MODULENAME_PROPERTY
This persistence.xml or sessions.xml property is used to override the moduleName |
Fields inherited from class org.eclipse.persistence.platform.server.ServerPlatformBase |
---|
DEFAULT_SERVER_NAME_AND_VERSION, externalTransactionControllerClass, JMX_REGISTER_DEV_MBEAN_PROPERTY, JMX_REGISTER_RUN_MBEAN_PROPERTY, serverNameAndVersion, shouldRegisterDevelopmentBean, shouldRegisterRuntimeBean, threadPool, threadPoolSize |
Constructor Summary | |
---|---|
JMXServerPlatformBase(DatabaseSession newDatabaseSession)
INTERNAL: Default Constructor: Initialize so that runtime services and JTA are enabled. |
Method Summary | |
---|---|
protected org.eclipse.persistence.internal.sessions.AbstractSession |
getAbstractSession()
Return the AbstractSession required to log to the non-platform EclipseLink log. |
java.lang.String |
getApplicationName()
INTERNAL: getApplicationName(): Answer the name of the module (EAR name) that this session is associated with. |
protected java.lang.String |
getApplicationName(boolean enableDefault)
INTERNAL: Lazy initialize the application name by first checking for a persistence.xml property override and then deferring to a default name in the absence of a platform override of this function |
javax.management.MBeanServer |
getMBeanServer()
INTERNAL: Return the MBeanServer to be used for MBean registration and deregistration. |
protected java.lang.String |
getMBeanSessionName()
Remove JMX reserved characters from the session name |
java.lang.String |
getModuleName()
INTERNAL: getModuleName(): Answer the name of the context-root of the application that this session is associated with. |
protected java.lang.String |
getModuleName(boolean enableDefault)
INTERNAL: |
protected MBeanRuntimeServicesMBean |
getRuntimeServicesMBean()
INTERNAL: Return the cached server specific services MBean |
protected void |
initializeApplicationNameAndModuleName()
INTERNAL: Get the applicationName and moduleName from the application server. |
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: |
protected void |
setModuleName(java.lang.String aName)
INTERNAL; |
protected void |
setRuntimeServicesMBean(MBeanRuntimeServicesMBean runtimeServicesMBean)
INTERNAL: Set the cached server specific services MBean |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String JMX_REGISTRATION_PREFIX
public static final int JMX_MBEANSERVER_INDEX_DEFAULT_FOR_MULTIPLE_SERVERS
protected static final java.lang.String OVERRIDE_JMX_MODULENAME_PROPERTY
protected static final java.lang.String OVERRIDE_JMX_APPLICATIONNAME_PROPERTY
protected static java.lang.String APP_SERVER_CLASSLOADER_APPLICATION_PU_SEARCH_STRING_PREFIX
protected static java.lang.String APP_SERVER_CLASSLOADER_APPLICATION_PU_SEARCH_STRING_POSTFIX
protected static java.lang.String APP_SERVER_CLASSLOADER_MODULE_EJB_SEARCH_STRING_PREFIX
protected static java.lang.String APP_SERVER_CLASSLOADER_MODULE_WAR_SEARCH_STRING_PREFIX
protected static java.lang.String APP_SERVER_CLASSLOADER_MODULE_EJB_WAR_SEARCH_STRING_POSTFIX
protected javax.management.MBeanServer mBeanServer
Constructor Detail |
---|
public JMXServerPlatformBase(DatabaseSession newDatabaseSession)
Method Detail |
---|
protected org.eclipse.persistence.internal.sessions.AbstractSession getAbstractSession()
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()
serverSpecificRegisterMBean
in class ServerPlatformBase
ServerPlatformBase.isRuntimeServicesEnabled()
,
ServerPlatformBase.disableRuntimeServices()
,
ServerPlatformBase.registerMBean()
public void serverSpecificUnregisterMBean()
serverSpecificUnregisterMBean
in class ServerPlatformBase
ServerPlatformBase.isRuntimeServicesEnabled()
,
ServerPlatformBase.disableRuntimeServices()
protected java.lang.String getMBeanSessionName()
aSession
-
protected MBeanRuntimeServicesMBean getRuntimeServicesMBean()
protected void setRuntimeServicesMBean(MBeanRuntimeServicesMBean runtimeServicesMBean)
runtimeServicesMBean
- protected java.lang.String getModuleName(boolean enableDefault)
enableDefault
-
public java.lang.String getModuleName()
getModuleName
in interface ServerPlatform
getModuleName
in class ServerPlatformBase
protected void setModuleName(java.lang.String aName)
aName
- protected java.lang.String getApplicationName(boolean enableDefault)
enableDefault
-
public java.lang.String getApplicationName()
JMXEnabledPlatform
public void setApplicationName(java.lang.String aName)
aName
- protected void initializeApplicationNameAndModuleName()
|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |