Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

E28847-01


org.eclipse.persistence.platform.server.wls
Class WebLogic_10_Platform

java.lang.Object
  extended by org.eclipse.persistence.platform.server.ServerPlatformBase
      extended by org.eclipse.persistence.platform.server.JMXServerPlatformBase
          extended by org.eclipse.persistence.platform.server.wls.WebLogicPlatform
              extended by org.eclipse.persistence.platform.server.wls.WebLogic_9_Platform
                  extended by org.eclipse.persistence.platform.server.wls.WebLogic_10_Platform

All Implemented Interfaces:
JMXEnabledPlatform, ServerPlatform

public class WebLogic_10_Platform
extends WebLogic_9_Platform
implements JMXEnabledPlatform

PUBLIC: This is the concrete subclass responsible for representing WebLogic 10 specific behavior. This includes WebLogic 10.3 behavior.


Field Summary
private static java.lang.String JMX_JNDI_RUNTIME_REGISTER
          This JNDI address is for JMX MBean registration
private static java.lang.String JMX_JNDI_RUNTIME_UNREGISTER
          This JNDI address is for JMX MBean unregistration
protected static java.lang.String SERVER_SPECIFIC_APPLICATIONNAME_PROPERTY
          This persistence.xml or sessions.xml property is used to override the applicationName
protected static java.lang.String SERVER_SPECIFIC_MODULENAME_PROPERTY
          This persistence.xml or sessions.xml property is used to override the moduleName
private static java.lang.String WLS_APPLICATION_NAME_GET_METHOD_NAME
           
private static java.lang.String WLS_CLASSLOADER_APPLICATION_PU_SEARCH_STRING_PREFIX
          Search String in WebLogic ClassLoader for the application:persistence_unit name
private static java.lang.String WLS_EXECUTE_THREAD_GET_METHOD_NAME
           
private static java.lang.String WLS_MODULE_NAME_GET_METHOD_NAME
           
private static java.lang.String WLS_SERVER_RUNTIME
           
private static java.lang.String WLS_SERVICE_KEY
           
private static java.lang.String WLS_THREADPOOL_RUNTIME
           
private  javax.management.ObjectName wlsThreadPoolRuntime
          Cache the WebLogic ThreadPoolRuntime for performance

 

Fields inherited from class org.eclipse.persistence.platform.server.wls.WebLogicPlatform
clearStatementCacheMethod, shouldClearStatementCache, vendorConnectionMethod, weblogicConnectionClass

 

Fields inherited from class org.eclipse.persistence.platform.server.JMXServerPlatformBase
APP_SERVER_CLASSLOADER_APPLICATION_PU_SEARCH_STRING_POSTFIX, APP_SERVER_CLASSLOADER_APPLICATION_PU_SEARCH_STRING_PREFIX, APP_SERVER_CLASSLOADER_MODULE_EJB_SEARCH_STRING_PREFIX, APP_SERVER_CLASSLOADER_MODULE_EJB_WAR_SEARCH_STRING_POSTFIX, APP_SERVER_CLASSLOADER_MODULE_WAR_SEARCH_STRING_PREFIX, JMX_MBEANSERVER_INDEX_DEFAULT_FOR_MULTIPLE_SERVERS, JMX_REGISTRATION_PREFIX, mBeanServer, OVERRIDE_JMX_APPLICATIONNAME_PROPERTY, OVERRIDE_JMX_MODULENAME_PROPERTY

 

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

 

Constructor Summary
WebLogic_10_Platform(DatabaseSession newDatabaseSession)
          INTERNAL: Default Constructor: All behavior for the default constructor is inherited

 

Method Summary
private  java.lang.Object getExecuteThreadFromMBean()
          INTERNAL: This convenience method will look up a WebLogic execute thread from the runtime MBean tree.
 javax.management.MBeanServer getMBeanServer()
          INTERNAL: Return the MBeanServer to be used for MBean registration and deregistration.
private  java.lang.String getModuleOrApplicationName(java.lang.String getMethodName)
          INTERNAL: This method will return the application|module name for WebLogic.
protected  java.lang.reflect.Method getVendorConnectionMethod()
          Return the method for the WebLogic JDBC connection wrapper vendorConnection.
protected  void initializeApplicationNameAndModuleName()
          Deprecated.  
 boolean isRuntimeServicesEnabledDefault()
          INTERNAL: isRuntimeServicesEnabledDefault(): Answer true if the JMX/MBean providing runtime services for the receiver's DatabaseSession will be deployed at runtime.
 void prepareServerSpecificServicesMBean()
          INTERNAL: prepareServerSpecificServicesMBean(): Server specific implementation of the creation and deployment of the JMX MBean to provide runtime services for the databaseSession.
 void serverSpecificRegisterMBean()
          INTERNAL: serverSpecificRegisterMBean(): Server specific implementation of the creation and deployment of the JMX MBean to provide runtime services for my databaseSession.

 

Methods inherited from class org.eclipse.persistence.platform.server.wls.WebLogicPlatform
clearStatementCache, getClearStatementCacheMethod, getExternalTransactionControllerClass, getWebLogicConnectionClass, initializeServerNameAndVersion, unwrapConnection

 

Methods inherited from class org.eclipse.persistence.platform.server.JMXServerPlatformBase
getAbstractSession, getApplicationName, getApplicationName, getMBeanSessionName, getModuleName, getModuleName, getRuntimeServicesMBean, serverSpecificUnregisterMBean, setApplicationName, setModuleName, setRuntimeServicesMBean

 

Methods inherited from class org.eclipse.persistence.platform.server.ServerPlatformBase
configureProfiler, disableJTA, disableRuntimeServices, enableRuntimeServices, ensureNotLoggedIn, externalTransactionControllerNotNullWarning, getDatabaseSession, getNewTempClassLoader, getServerLog, getServerNameAndVersion, initializeExternalTransactionController, isCMP, isJTAEnabled, isRuntimeServicesEnabled, launchContainerRunnable, registerMBean, setExternalTransactionControllerClass, setIsCMP, shouldUseDriverManager, unregisterMBean, wasFailureCommunicationBased

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Methods inherited from interface org.eclipse.persistence.platform.server.JMXEnabledPlatform
getApplicationName

 

Field Detail

JMX_JNDI_RUNTIME_REGISTER

private static final java.lang.String JMX_JNDI_RUNTIME_REGISTER
This JNDI address is for JMX MBean registration
See Also:
Constant Field Values

JMX_JNDI_RUNTIME_UNREGISTER

private static final java.lang.String JMX_JNDI_RUNTIME_UNREGISTER
This JNDI address is for JMX MBean unregistration
See Also:
Constant Field Values

SERVER_SPECIFIC_MODULENAME_PROPERTY

protected static final java.lang.String SERVER_SPECIFIC_MODULENAME_PROPERTY
This persistence.xml or sessions.xml property is used to override the moduleName
See Also:
Constant Field Values

SERVER_SPECIFIC_APPLICATIONNAME_PROPERTY

protected static final java.lang.String SERVER_SPECIFIC_APPLICATIONNAME_PROPERTY
This persistence.xml or sessions.xml property is used to override the applicationName
See Also:
Constant Field Values

wlsThreadPoolRuntime

private javax.management.ObjectName wlsThreadPoolRuntime
Cache the WebLogic ThreadPoolRuntime for performance

WLS_SERVICE_KEY

private static final java.lang.String WLS_SERVICE_KEY
See Also:
Constant Field Values

WLS_SERVER_RUNTIME

private static final java.lang.String WLS_SERVER_RUNTIME
See Also:
Constant Field Values

WLS_THREADPOOL_RUNTIME

private static final java.lang.String WLS_THREADPOOL_RUNTIME
See Also:
Constant Field Values

WLS_EXECUTE_THREAD_GET_METHOD_NAME

private static final java.lang.String WLS_EXECUTE_THREAD_GET_METHOD_NAME
See Also:
Constant Field Values

WLS_APPLICATION_NAME_GET_METHOD_NAME

private static final java.lang.String WLS_APPLICATION_NAME_GET_METHOD_NAME
See Also:
Constant Field Values

WLS_MODULE_NAME_GET_METHOD_NAME

private static final java.lang.String WLS_MODULE_NAME_GET_METHOD_NAME
See Also:
Constant Field Values

WLS_CLASSLOADER_APPLICATION_PU_SEARCH_STRING_PREFIX

private static final java.lang.String WLS_CLASSLOADER_APPLICATION_PU_SEARCH_STRING_PREFIX
Search String in WebLogic ClassLoader for the application:persistence_unit name
See Also:
Constant Field Values

Constructor Detail

WebLogic_10_Platform

public WebLogic_10_Platform(DatabaseSession newDatabaseSession)
INTERNAL: Default Constructor: All behavior for the default constructor is inherited

Method Detail

isRuntimeServicesEnabledDefault

public boolean isRuntimeServicesEnabledDefault()
Description copied from class: ServerPlatformBase
INTERNAL: isRuntimeServicesEnabledDefault(): Answer true if the JMX/MBean providing runtime services for the receiver's DatabaseSession will be deployed at runtime. Provide the default value for ServerPlatformBase.isRuntimeServicesEnabled() for a ServerPlatform. By default this is false but some platforms can choose to have MBeans deployed by default.
Specified by:
isRuntimeServicesEnabledDefault in interface ServerPlatform
Overrides:
isRuntimeServicesEnabledDefault in class ServerPlatformBase

prepareServerSpecificServicesMBean

public void prepareServerSpecificServicesMBean()
INTERNAL: prepareServerSpecificServicesMBean(): Server specific implementation of the creation and deployment of the JMX MBean to provide runtime services for the databaseSession. Default is to do nothing. Implementing platform classes must override this function and supply the server specific MBean instance for later registration by calling it in the constructor.
Specified by:
prepareServerSpecificServicesMBean in interface JMXEnabledPlatform
See Also:
ServerPlatformBase.isRuntimeServicesEnabled(), ServerPlatformBase.disableRuntimeServices(), ServerPlatformBase.registerMBean()

serverSpecificRegisterMBean

public void serverSpecificRegisterMBean()
INTERNAL: serverSpecificRegisterMBean(): Server specific implementation of the creation and deployment of the JMX MBean to provide runtime services for my databaseSession.
Overrides:
serverSpecificRegisterMBean in class JMXServerPlatformBase
See Also:
ServerPlatformBase.isRuntimeServicesEnabled(), ServerPlatformBase.disableRuntimeServices(), ServerPlatformBase.registerMBean()

getMBeanServer

public javax.management.MBeanServer getMBeanServer()
INTERNAL: Return the MBeanServer to be used for MBean registration and deregistration.
This MBeanServer reference is lazy loaded and cached on the platform.
There are multiple ways of getting the MBeanServer

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

We are using method (3)
Overrides:
getMBeanServer in class JMXServerPlatformBase
Returns:
the JMX specification MBeanServer

initializeApplicationNameAndModuleName

protected void initializeApplicationNameAndModuleName()
Deprecated. 
INTERNAL: Get the applicationName and moduleName from the runtime WebLogic MBean reflectively
Overrides:
initializeApplicationNameAndModuleName in class JMXServerPlatformBase

getModuleOrApplicationName

private java.lang.String getModuleOrApplicationName(java.lang.String getMethodName)
INTERNAL: This method will return the application|module name for WebLogic. If the call to executeThread on the MBean fails - return the current classloader Thread.currentThread().getContextClassLoader() ER 248746: Use reflection to obtain the application name (EJB, Web or MDB module) Get either a String containing the module/applicationName or a WebLogic classLoader that contains the module/applicationName in the format... weblogic.utils.classloaders.ChangeAwareClassLoader@19bb43f finder: weblogic.utils.classloaders.CodeGenClassFinder@ab7c2e annotation: org.eclipse.persistence.example.jpa.server.weblogic.enterpriseEAR@enterprise If the getExecuteThread call failed, use the classloader string representation as backup. If the classloader is not in the correct format, defer to superclass.
Returns:
String module|application Name from WLS

getExecuteThreadFromMBean

private java.lang.Object getExecuteThreadFromMBean()
INTERNAL: This convenience method will look up a WebLogic execute thread from the runtime MBean tree. The execute thread contains application information. This code will use the name of the current thread to lookup the corresponding ExecuteThread. The ExecuteThread will allow us to obtain the application name (and version, etc). Note that the MBeanServer and ThreadPoolRuntime instances will be cached for performance.
Returns:
application name or null if the name cannot be obtained

getVendorConnectionMethod

protected java.lang.reflect.Method getVendorConnectionMethod()
Return the method for the WebLogic JDBC connection wrapper vendorConnection. WLS 10.3.4.0 added a getVendorConnectionSafe that does not invalidate the connection, so use this if available.
Overrides:
getVendorConnectionMethod in class WebLogicPlatform

Skip navigation links

Copyright © 1998, 2012, Oracle. All Rights Reserved.