FileDocCategorySizeDatePackage
ServerPlatform.javaAPI DocGlassfish v2 API8523Tue May 22 16:54:48 BST 2007oracle.toplink.essentials.platform.server

ServerPlatform

public interface ServerPlatform
PUBLIC: This is the interface describing the behaviour for ServerPlatformBase, and any other class that wants to provide behaviour for a server. This interface provides the behaviour for - Which external transaction controller to use - Whether or not to enable JTA (external transaction control) - How to register/unregister for runtime services (JMX/MBean) - Whether or not to enable runtime services - How to launch container Threads Any subclasses of ServerPlatformBase created by the user must implement this interface. public API: String getServerNameAndVersion()
see
ServerPlatformBase

Fields Summary
Constructors Summary
Methods Summary
public abstract voiddisableJTA()
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.

return
void
see
#getExternalTransactionControllerClass()
see
#isJTAEnabled()

public abstract voiddisableRuntimeServices()
INTERNAL: disableRuntimeServices(): Configure the receiver such that no JMX/MBean will be registered to provide runtime services for my DatabaseSession at runtime.

return
void
see
#isRuntimeServicesEnabled()

public abstract oracle.toplink.essentials.internal.sessions.DatabaseSessionImplgetDatabaseSession()
INTERNAL: getDatabaseSession(): Answer the instance of DatabaseSession the receiver is helping.

return
DatabaseSession

public abstract java.lang.ClassgetExternalTransactionControllerClass()
INTERNAL: getExternalTransactionControllerClass(): Answer the class of external transaction controller to use For this server platform. This is read-only. If the subclasses of the ServerPlatformBase do not provide the Class desired, then a new subclass should be created to return the desired class.

return
Class externalTransactionControllerClass
see
oracle.toplink.essentials.transaction.JTATransactionController
see
#isJTAEnabled()
see
#disableJTA()
see
#initializeExternalTransactionController()

public abstract java.lang.StringgetModuleName()
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.

return
String moduleName

public oracle.toplink.essentials.logging.SessionLoggetServerLog()
INTERNAL: getServerLog(): Return the ServerLog for this platform Return the default ServerLog in the base

return
oracle.toplink.essentials.logging.SessionLog

public abstract java.lang.StringgetServerNameAndVersion()
PUBLIC: getServerNameAndVersion(): Talk to the relevant server class library, and get the server name and version

return
String serverNameAndVersion

public abstract voidinitializeExternalTransactionController()
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()

see
ServerPlatformBase
return
void

public abstract booleanisJTAEnabled()
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.

return
boolean isJTAEnabled
see
#getExternalTransactionControllerClass()
see
#disableJTA()

public abstract booleanisRuntimeServicesEnabled()
INTERNAL: isRuntimeServicesEnabled(): Answer true if the JMX/MBean providing runtime services for the receiver's DatabaseSession will be deployed at runtime.

return
boolean isRuntimeServicesEnabled
see
#disableRuntimeServices()

public voidlaunchContainerRunnable(java.lang.Runnable runnable)
INTERNAL: launchContainerRunnable(Runnable runnable): Use the container library to start the provided Runnable. Default behaviour is to use Thread(runnable).start()

param
Runnable runnable: the instance of runnable to be "started"
return
void

public abstract voidregisterMBean()
INTERNAL: registerMBean(): Create and deploy the JMX MBean to provide runtime services for my databaseSession.

return
void
see
#isRuntimeServicesEnabled()
see
#disableRuntimeServices()
see
#unregisterMBean()

public voidsetExternalTransactionControllerClass(java.lang.Class newClass)
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.

see
oracle.toplink.essentials.transaction.JTATransactionController
see
#isJTAEnabled()
see
#disableJTA()
see
#initializeExternalTransactionController()

public abstract voidunregisterMBean()
INTERNAL: unregisterMBean(): Unregister the JMX MBean that was providing runtime services for my databaseSession.

return
void
see
#isRuntimeServicesEnabled()
see
#disableRuntimeServices()
see
#registerMBean()

public java.sql.ConnectionunwrapOracleConnection(oracle.toplink.essentials.internal.databaseaccess.Platform platform, java.sql.Connection connection)
INTERNAL: This method is used to unwrap the oracle connection wrapped by the application server. TopLink needs this unwrapped connection for certain Oracle Specific support. (ie TIMESTAMPTZ) This is added as a workaround for bug 4460996