This is the abstract superclass of all platforms for all servers. 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 user wants a different external transaction controller class or to provide some different behavior than the provided ServerPlatform(s), we recommend subclassing org.eclipse.persistence.platform.server.ServerPlatformBase (or a subclass), and overriding:
org.eclipse.persistence.platform.server.ServerPlatform
| Modifier and Type | Field and Description |
|---|---|
| private DatabaseSession | databaseSession
INTERNAL: databaseSession: The instance of DatabaseSession that I am helping. |
| public static final String | DEFAULT_SERVER_NAME_AND_VERSION
INTERNAL: Answer "unknown" as a default for platforms that do not implement getModuleName() |
| protected Class | externalTransactionControllerClass
externalTransactionControllerClass: This is a user-specifiable class defining the class of external transaction controller to be set into the DatabaseSession |
| private boolean | isCMP
INTERNAL: isCMP: true if the container created the server platform, because we're configured for CMP. |
| private boolean | isJTAEnabled
INTERNAL: isJTAEnabled: Determines if the external transaction controller will be populated into the DatabaseSession at runtime |
| private boolean | isRuntimeServicesEnabled
INTERNAL: isRuntimeServicesEnabled: Determines if the JMX Runtime Services will be deployed at runtime |
| public static final String | JMX_REGISTER_DEV_MBEAN_PROPERTY
This System property "eclipselink.register.dev.mbean" when set to true will enable registration/unregistration of the DevelopmentServices MBean |
| public static final String | JMX_REGISTER_RUN_MBEAN_PROPERTY
This System property "eclipselink.register.run.mbean" when set to true will enable registration/unregistration of the RuntimeServices MBean |
| protected String | serverNameAndVersion
INTERNAL: Server name and version. |
| protected boolean | |
| protected boolean | |
| protected volatile ExecutorService | threadPool
Allow pooling of threads for asynchronous processing in RCM and other areas. |
| protected int | threadPoolSize
Allow the thread pool size to be configured. |
| Access | Constructor and Description |
|---|---|
| protected | ServerPlatformBase(DatabaseSession
The instance of DatabaseSession that I am helping. newDatabaseSession)INTERNAL: Default Constructor: Initialize so that runtime services and JTA are enabled. |
| Modifier and Type | Method and Description |
|---|---|
| public void | clearStatementCache(Connection connection)
Implements org. |
| public void | configureProfiler(Session session)
INTERNAL: configureProfiler(): set default performance profiler used in this server. |
| public void | disableJTA()
Implements org. |
| public void | disableRuntimeServices()
Implements org. |
| public void | enableRuntimeServices()
INTERNAL: enableRuntimeServices(): Configure the receiver such that JMX/MBeans will be registered to provide runtime services for my DatabaseSession at runtime. |
| protected void | |
| protected void | externalTransactionControllerNotNullWarning()
INTERNAL: externalTransactionControllerNotNullWarning(): When the external transaction controller is being initialized, we warn the developer if they have already defined the external transaction controller in some way other than subclassing ServerPlatformBase. |
| public DatabaseSession | Returns: DatabaseSession databaseSessionImplements org. |
| public abstract Class | Returns: Class externalTransactionControllerClassRedeclares org. |
| public int | Returns: Return JNDIConnector.COMPOSITE_NAME_LOOKUP.Implements org. |
| public String | Returns: String moduleNameImplements org. |
| public JPAClassLoaderHolder | getNewTempClassLoader(PersistenceUnitInfo
- the persistence unit info puInfo)Implements org. |
| public String | getPartitionID()
Implements org. |
| public SessionLog | Returns: org.eclipse.persistence.logging.SessionLogImplements org. |
| public String | Returns: String serverNameAndVersionImplements org. |
| public ExecutorService | |
| public int | getThreadPoolSize()
Implements org. |
| public void | initializeExternalTransactionController()
Implements org. |
| protected void | initializeServerNameAndVersion()
INTERNAL: initializeServerNameAndVersion(): Talk to the relevant server class library, and get the server name and version Default is "unknown" |
| public boolean | Returns: booleanINTERNAL: isCMP(): Answer true if we're in the context of CMP (i.e. the container created me) |
| public boolean | Returns: value oftrue when JTA 1.1 API is available or false otherwise.INTERNAL: Check whether JTA 1.1 API is available. |
| public boolean | Returns: boolean isJTAEnabledImplements org. |
| public boolean | Returns: boolean isRuntimeServicesEnabledImplements org. |
| public boolean | isRuntimeServicesEnabledDefault()
Implements org. |
| public void | launchContainerRunnable(Runnable
the instance of runnable to be "started" runnable)Implements org. |
| public void | registerMBean()
Implements org. |
| public void | serverSpecificRegisterMBean()
INTERNAL: serverSpecificRegisterMBean(): Server specific implementation of the creation and deployment of the JMX MBean to provide runtime services for my databaseSession. |
| public void | serverSpecificUnregisterMBean()
INTERNAL: serverSpecificUnregisterMBean(): Server specific implementation of the unregistration of the JMX MBean from its server. |
| public void | setExternalTransactionControllerClass(Class<? extends ExternalTransactionController> newClass)
Implements org. |
| public void | setIsCMP(boolean isThisCMP)
INTERNAL: setIsCMP(boolean): Define whether or not we're in the context of CMP (i.e. the container created me) |
| public void | |
| public void | setThreadPoolSize(int threadPoolSize)
Implements org. |
| public boolean | Returns: booleanImplements org. |
| public void | shutdown()
Implements org. |
| public void | unregisterMBean()
Implements org. |
| public Connection | unwrapConnection(Connection connection)
Implements org. |
| public boolean | usesPartitions()
Implements org. |
| public boolean | wasFailureCommunicationBased(SQLException exception, Accessor connection, AbstractSession sessionForProfile)
Implements org. |
| databaseSession | back to summary |
|---|---|
| private DatabaseSession databaseSession INTERNAL: databaseSession: The instance of DatabaseSession that I am helping. | |
| DEFAULT_SERVER_NAME_AND_VERSION | back to summary |
|---|---|
| public static final String DEFAULT_SERVER_NAME_AND_VERSION INTERNAL: Answer "unknown" as a default for platforms that do not implement getModuleName() | |
| externalTransactionControllerClass | back to summary |
|---|---|
| protected Class<? extends ExternalTransactionController> externalTransactionControllerClass externalTransactionControllerClass: This is a user-specifiable class defining the class of external transaction controller to be set into the DatabaseSession | |
| isCMP | back to summary |
|---|---|
| private boolean isCMP INTERNAL: isCMP: true if the container created the server platform, because we're configured for CMP. | |
| isJTAEnabled | back to summary |
|---|---|
| private boolean isJTAEnabled INTERNAL: isJTAEnabled: Determines if the external transaction controller will be populated into the DatabaseSession at runtime | |
| isRuntimeServicesEnabled | back to summary |
|---|---|
| private boolean isRuntimeServicesEnabled INTERNAL: isRuntimeServicesEnabled: Determines if the JMX Runtime Services will be deployed at runtime | |
| JMX_REGISTER_DEV_MBEAN_PROPERTY | back to summary |
|---|---|
| public static final String JMX_REGISTER_DEV_MBEAN_PROPERTY This System property "eclipselink.register.dev.mbean" when set to true will enable registration/unregistration of the DevelopmentServices MBean | |
| JMX_REGISTER_RUN_MBEAN_PROPERTY | back to summary |
|---|---|
| public static final String JMX_REGISTER_RUN_MBEAN_PROPERTY This System property "eclipselink.register.run.mbean" when set to true will enable registration/unregistration of the RuntimeServices MBean | |
| serverNameAndVersion | back to summary |
|---|---|
| protected String serverNameAndVersion INTERNAL: Server name and version. | |
| shouldRegisterDevelopmentBean | back to summary |
|---|---|
| protected boolean shouldRegisterDevelopmentBean | |
| shouldRegisterRuntimeBean | back to summary |
|---|---|
| protected boolean shouldRegisterRuntimeBean | |
| threadPool | back to summary |
|---|---|
| protected volatile ExecutorService threadPool Allow pooling of threads for asynchronous processing in RCM and other areas. | |
| threadPoolSize | back to summary |
|---|---|
| protected int threadPoolSize Allow the thread pool size to be configured. | |
| ServerPlatformBase | back to summary |
|---|---|
| protected ServerPlatformBase(DatabaseSession newDatabaseSession) INTERNAL: Default Constructor: Initialize so that runtime services and JTA are enabled. Set the DatabaseSession that I will be helping.
| |
| clearStatementCache | back to summary |
|---|---|
| public void clearStatementCache(Connection connection) Implements org. INTERNAL: Clears statement cache of the wrapper connection. Required by Oracle proxy authentication: currently connection statement cache becomes invalid on switching to/from proxy session. This method is called by OracleJDBC_10_1_0_2ProxyConnectionCustomizer before opening proxy session and before closing it.
| |
| configureProfiler | back to summary |
|---|---|
| public void configureProfiler(Session session) INTERNAL: configureProfiler(): set default performance profiler used in this server. | |
| disableJTA | back to summary |
|---|---|
| public void disableJTA() Implements org. INTERNAL: disableJTA(): Configure the receiver such that my external transaction controller class will be ignored, and will NOT be used to populate DatabaseSession's external transaction controller class at runtime. TopLink will NOT be configured to register for callbacks for beforeCompletion and afterCompletion.
| |
| disableRuntimeServices | back to summary |
|---|---|
| public void disableRuntimeServices() Implements org. INTERNAL: disableRuntimeServices(): Configure the receiver such that no JMX/MBean will be registered to provide runtime services for my DatabaseSession at runtime.
| |
| enableRuntimeServices | back to summary |
|---|---|
| public void enableRuntimeServices() INTERNAL: enableRuntimeServices(): Configure the receiver such that JMX/MBeans will be registered to provide runtime services for my DatabaseSession at runtime.
| |
| ensureNotLoggedIn | back to summary |
|---|---|
| protected void ensureNotLoggedIn() INTERNAL: Make sure that the DatabaseSession has not logged in yet. Throw a ValidationException if we have. | |
| externalTransactionControllerNotNullWarning | back to summary |
|---|---|
| protected void externalTransactionControllerNotNullWarning() INTERNAL: externalTransactionControllerNotNullWarning(): When the external transaction controller is being initialized, we warn the developer if they have already defined the external transaction controller in some way other than subclassing ServerPlatformBase. | |
| getDatabaseSession | back to summary |
|---|---|
| public DatabaseSession getDatabaseSession() Implements org. INTERNAL: getDatabaseSession(): Answer the instance of DatabaseSession the receiver is helping.
| |
| getExternalTransactionControllerClass | back to summary |
|---|---|
| public abstract Class Redeclares org. INTERNAL: getExternalTransactionControllerClass(): Answer the class of external transaction controller to use For this server platform. This is read-only. If the user wants a different external transaction controller class than the provided ServerPlatform(s), we recommend subclassing org.eclipse.persistence.platform.server.ServerPlatformBase (or a subclass), and overriding: ServerPlatformBase.getExternalTransactionControllerClass() for the desired behavior.
| |
| getJNDIConnectorLookupType | back to summary |
|---|---|
| public int getJNDIConnectorLookupType() Implements org. Doc from org. INTERNAL: Get JNDIConnector lookupType value for this platform.
| |
| getModuleName | back to summary |
|---|---|
| public String getModuleName() Implements org. INTERNAL: getModuleName(): Answer the name of the module (jar name) that my session is associated with. Answer "unknown" if there is no module name available. Default behavior is to return "unknown". | |
| getNewTempClassLoader | back to summary |
|---|---|
| public JPAClassLoaderHolder getNewTempClassLoader(PersistenceUnitInfo puInfo) Implements org. Doc from org. INTERNAL: JIRA EJBTHREE-572 requires that we use the real classLoader in place of the getNewTempClassLoader(). The override code should stay in place until the UCL3 loader does not throw a NPE on loadClass()
| |
| getPartitionID | back to summary |
|---|---|
| public String getPartitionID() Implements org. Doc from org. INTERNAL: Get Partition ID. | |
| getServerLog | back to summary |
|---|---|
| public SessionLog getServerLog() Implements org. INTERNAL: getServerLog(): Return the ServerLog for this platform Return the default ServerLog in the base
| |
| getServerNameAndVersion | back to summary |
|---|---|
| public String getServerNameAndVersion() Implements org. PUBLIC: getServerNameAndVersion(): Talk to the relevant server class library, and get the server name and version | |
| getThreadPool | back to summary |
|---|---|
| public ExecutorService getThreadPool() INTERNAL: Return the thread pool, initializing if required. | |
| getThreadPoolSize | back to summary |
|---|---|
| public int getThreadPoolSize() Implements org. Return the thread pool size.
| |
| initializeExternalTransactionController | back to summary |
|---|---|
| public void initializeExternalTransactionController() Implements org. INTERNAL: initializeExternalTransactionController(): Populate the DatabaseSession's external transaction controller with an instance of my transaction controller class. To change the external transaction controller class, we recommend creating a subclass of ServerPlatformBase, and overriding getExternalTransactionControllerClass().
| |
| initializeServerNameAndVersion | back to summary |
|---|---|
| protected void initializeServerNameAndVersion() INTERNAL: initializeServerNameAndVersion(): Talk to the relevant server class library, and get the server name and version Default is "unknown" | |
| isCMP | back to summary |
|---|---|
| public boolean isCMP() INTERNAL: isCMP(): Answer true if we're in the context of CMP (i.e. the container created me)
| |
| isJTA11 | back to summary |
|---|---|
| public boolean isJTA11() INTERNAL: Check whether JTA 1.1 API is available.
| |
| isJTAEnabled | back to summary |
|---|---|
| public boolean isJTAEnabled() Implements org. INTERNAL: isJTAEnabled(): Answer true if the DatabaseSession's external transaction controller class will be populated with my transaction controller class at runtime. If the transaction controller class is overridden in the DatabaseSession, my transaction controller class will be ignored. Answer true if TopLink will be configured to register for callbacks for beforeCompletion and afterCompletion.
| |
| isRuntimeServicesEnabled | back to summary |
|---|---|
| public boolean isRuntimeServicesEnabled() Implements org. INTERNAL: isRuntimeServicesEnabled(): Answer true if the JMX/MBean providing runtime services for the receiver's DatabaseSession will be deployed at runtime.
| |
| isRuntimeServicesEnabledDefault | back to summary |
|---|---|
| public boolean isRuntimeServicesEnabledDefault() Implements org. 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
| |
| launchContainerRunnable | back to summary |
|---|---|
| public void launchContainerRunnable(Runnable runnable) Implements org. INTERNAL: launchContainerRunnable(Runnable runnable): Use the container library to start the provided Runnable. Default behavior is to use Thread(runnable).start() | |
| registerMBean | back to summary |
|---|---|
| public void registerMBean() Implements org. INTERNAL: registerMBean(): Create and deploy the JMX MBean to provide runtime services for my databaseSession. Default is to do nothing.
| |
| serverSpecificRegisterMBean | back to summary |
|---|---|
| public void serverSpecificRegisterMBean() INTERNAL: serverSpecificRegisterMBean(): Server specific implementation of the creation and deployment of the JMX MBean to provide runtime services for my databaseSession. Default is to do nothing. This should be subclassed if required. | |
| serverSpecificUnregisterMBean | back to summary |
|---|---|
| public void serverSpecificUnregisterMBean() INTERNAL: serverSpecificUnregisterMBean(): Server specific implementation of the unregistration of the JMX MBean from its server. Default is to do nothing. This should be subclassed if required. | |
| setExternalTransactionControllerClass | back to summary |
|---|---|
| public void setExternalTransactionControllerClass(Class<? extends ExternalTransactionController> newClass) Implements org. INTERNAL: setExternalTransactionControllerClass(Class newClass): Set the class of external transaction controller to use in the DatabaseSession. This is defined by the user via the sessions.xml. | |
| setIsCMP | back to summary |
|---|---|
| public void setIsCMP(boolean isThisCMP) INTERNAL: setIsCMP(boolean): Define whether or not we're in the context of CMP (i.e. the container created me) | |
| setThreadPool | back to summary |
|---|---|
| public void setThreadPool(ExecutorService threadPool) INTERNAL: Set the thread pool to use. | |
| setThreadPoolSize | back to summary |
|---|---|
| public void setThreadPoolSize(int threadPoolSize) Implements org. Set the thread pool size.
| |
| shouldUseDriverManager | back to summary |
|---|---|
| public boolean shouldUseDriverManager() Implements org. INTERNAL: shouldUseDriverManager(): Indicates whether DriverManager should be used while connecting DefaultConnector.
| |
| shutdown | back to summary |
|---|---|
| public void shutdown() Implements org. INTERNAL: perform any require shutdown tasks.
| |
| unregisterMBean | back to summary |
|---|---|
| public void unregisterMBean() Implements org. INTERNAL: unregisterMBean(): Unregister the JMX MBean that was providing runtime services for my databaseSession.
| |
| unwrapConnection | back to summary |
|---|---|
| public Connection unwrapConnection(Connection connection) Implements org. INTERNAL: This method is used to unwrap the connection wrapped by the application server. TopLink needs this unwrapped connection for certain database vendor specific support. (i.e. TIMESTAMPTZ,NCHAR,XMLTYPE) Be default we will use the connection's metadata to try to get the connection
| |
| usesPartitions | back to summary |
|---|---|
| public boolean usesPartitions() Implements org. Doc from org. INTERNAL: Some servers may support partitioning
| |
| wasFailureCommunicationBased | back to summary |
|---|---|
| public boolean wasFailureCommunicationBased(SQLException exception, Accessor connection, AbstractSession sessionForProfile) Implements org. INTERNAL: A call to this method will perform a platform based check on the connection and exception error code to determine if the connection is still valid or if a communication error has occurred. If a communication error has occurred then the query may be retried. If this platform is unable to determine if the error was communication based it will return false forcing the error to be thrown to the user.
| |