public abstract class ServerPlatformBase extends java.lang.Object implements ServerPlatform
Modifier and Type | Field and Description |
---|---|
protected java.lang.Class |
externalTransactionControllerClass
externalTransactionControllerClass: This is a user-specifiable class defining the class
of external transaction controller to be set into the DatabaseSession
|
Constructor and Description |
---|
ServerPlatformBase(DatabaseSessionImpl newDatabaseSession)
INTERNAL:
Default Constructor: Initialize so that runtime services and JTA are enabled.
|
Modifier and Type | Method and Description |
---|---|
void |
disableJTA()
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.
|
void |
disableRuntimeServices()
INTERNAL: disableRuntimeServices(): Configure the receiver such that no JMX/MBean will be registered
to provide runtime services for my DatabaseSession at runtime.
|
protected void |
ensureNotLoggedIn()
INTERNAL: Make sure that the DatabaseSession has not logged in yet.
|
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.
|
DatabaseSessionImpl |
getDatabaseSession()
INTERNAL: getDatabaseSession(): Answer the instance of DatabaseSession the receiver is helping.
|
abstract java.lang.Class |
getExternalTransactionControllerClass()
INTERNAL: getExternalTransactionControllerClass(): Answer the class of external transaction controller to use
For this server platform.
|
java.lang.String |
getModuleName()
INTERNAL: getModuleName(): Answer the name of the module (jar name) that my session
is associated with.
|
SessionLog |
getServerLog()
INTERNAL: getServerLog(): Return the ServerLog for this platform
Return the default ServerLog in the base
|
java.lang.String |
getServerNameAndVersion()
PUBLIC: getServerNameAndVersion(): Talk to the relevant server class library, and get the server name
and version
Default is "unknown"
|
void |
initializeExternalTransactionController()
INTERNAL: initializeExternalTransactionController(): Populate the DatabaseSession's
external transaction controller with an instance of my transaction controller class.
|
boolean |
isCMP()
INTERNAL: isCMP(): Answer true if we're in the context of CMP (i.e.
|
boolean |
isJTAEnabled()
INTERNAL: isJTAEnabled(): Answer true if the DatabaseSession's external transaction controller class will
be populated with my transaction controller class at runtime.
|
boolean |
isRuntimeServicesEnabled()
INTERNAL: isRuntimeServicesEnabled(): Answer true if the JMX/MBean providing runtime services for
the receiver's DatabaseSession will be deployed at runtime.
|
void |
launchContainerRunnable(java.lang.Runnable runnable)
INTERNAL: launchContainerRunnable(Runnable runnable): Use the container library to
start the provided Runnable.
|
void |
registerMBean()
INTERNAL: registerMBean(): Create and deploy the JMX MBean to provide runtime services for my
databaseSession.
|
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
unregistration of the JMX MBean from its server.
|
void |
setExternalTransactionControllerClass(java.lang.Class newClass)
INTERNAL: setExternalTransactionControllerClass(Class newClass): Set the class of external
transaction controller to use in the DatabaseSession.
|
void |
setIsCMP(boolean isThisCMP)
INTERNAL: setIsCMP(boolean): Define whether or not we're in the context of CMP (i.e.
|
void |
unregisterMBean()
INTERNAL: unregisterMBean(): Unregister the JMX MBean that was providing runtime services for my
databaseSession.
|
java.sql.Connection |
unwrapOracleConnection(Platform platform,
java.sql.Connection connection)
INTERNAL: This method is used to unwrap the oracle connection wrapped by
the application server.
|
protected java.lang.Class externalTransactionControllerClass
public ServerPlatformBase(DatabaseSessionImpl newDatabaseSession)
public DatabaseSessionImpl getDatabaseSession()
getDatabaseSession
in interface ServerPlatform
public java.lang.String getServerNameAndVersion()
getServerNameAndVersion
in interface ServerPlatform
public java.lang.String getModuleName()
getModuleName
in interface ServerPlatform
public abstract java.lang.Class getExternalTransactionControllerClass()
getExternalTransactionControllerClass
in interface ServerPlatform
JTATransactionController
,
isJTAEnabled()
,
disableJTA()
public void setExternalTransactionControllerClass(java.lang.Class newClass)
setExternalTransactionControllerClass
in interface ServerPlatform
JTATransactionController
,
isJTAEnabled()
,
disableJTA()
,
initializeExternalTransactionController()
public void initializeExternalTransactionController()
initializeExternalTransactionController
in interface ServerPlatform
ServerPlatformBase
protected void externalTransactionControllerNotNullWarning()
getExternalTransactionControllerClass()
public boolean isJTAEnabled()
isJTAEnabled
in interface ServerPlatform
getExternalTransactionControllerClass()
,
disableJTA()
public void disableJTA()
disableJTA
in interface ServerPlatform
getExternalTransactionControllerClass()
,
isJTAEnabled()
public boolean isRuntimeServicesEnabled()
isRuntimeServicesEnabled
in interface ServerPlatform
disableRuntimeServices()
public void disableRuntimeServices()
disableRuntimeServices
in interface ServerPlatform
isRuntimeServicesEnabled()
public void registerMBean()
registerMBean
in interface ServerPlatform
isRuntimeServicesEnabled()
,
disableRuntimeServices()
,
unregisterMBean()
public void serverSpecificRegisterMBean()
public void unregisterMBean()
unregisterMBean
in interface ServerPlatform
isRuntimeServicesEnabled()
,
disableRuntimeServices()
,
registerMBean()
public java.sql.Connection unwrapOracleConnection(Platform platform, java.sql.Connection connection)
unwrapOracleConnection
in interface ServerPlatform
public void serverSpecificUnregisterMBean()
public void launchContainerRunnable(java.lang.Runnable runnable)
launchContainerRunnable
in interface ServerPlatform
Runnable
- runnable: the instance of runnable to be "started"protected void ensureNotLoggedIn()
public SessionLog getServerLog()
getServerLog
in interface ServerPlatform
public boolean isCMP()
public void setIsCMP(boolean isThisCMP)