Class CDISEPlatform
- java.lang.Object
-
- org.eclipse.persistence.platform.server.ServerPlatformBase
-
- org.eclipse.persistence.platform.server.JMXServerPlatformBase
-
- io.helidon.integrations.cdi.eclipselink.CDISEPlatform
-
- All Implemented Interfaces:
ServerPlatform
public class CDISEPlatform extends JMXServerPlatformBase
AJMXServerPlatformBasethat arranges things such that CDI, not JNDI, will be used to acquire aTransactionManagerandMBeanServer.Most users will not use this class directly, but will supply its fully-qualified name as the value of the
eclipselink.target-serverEclipselink JPA extension property in aMETA-INF/persistence.xmlfile.For example:
<property name="eclipselink.target-server" value="io.helidon.integrations.cdi.eclipselink.CDISEPlatform"/>- See Also:
getExternalTransactionControllerClass()
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceCDISEPlatform.EclipselinkAQualifierused to designate various things as being related to Eclipselink in some way.static classCDISEPlatform.TransactionControllerAJTATransactionControllerwhoseCDISEPlatform.TransactionController.acquireTransactionManager()method uses CDI, not JNDI, to return aTransactionManagerinstance.
-
Field Summary
-
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, threadPool, threadPoolSize
-
-
Constructor Summary
Constructors Constructor Description CDISEPlatform(DatabaseSession session)Creates aCDISEPlatform.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<?>getExternalTransactionControllerClass()Returns a non-nullClassthat extendsAbstractTransactionController, namelyCDISEPlatform.TransactionController.intgetJNDIConnectorLookupType()ReturnsJNDIConnector.UNDEFINED_LOOKUPwhen invoked.MBeanServergetMBeanServer()Uses CDI to find a relevantMBeanServer, caches it, and returns it.voidinitializeExternalTransactionController()Overrides theServerPlatformBase.initializeExternalTransactionController()method to disable JTA if there is noTransactionManagerbean present in CDI before invoking the superclass implementation.protected voidinitializeServerNameAndVersion()Sets the name of the platform.voidlaunchContainerRunnable(Runnable runnable)Uses CDI to find a relevantExecutorwhoseExecutor.execute(Runnable)method will be used to submit the suppliedRunnable.-
Methods inherited from class org.eclipse.persistence.platform.server.JMXServerPlatformBase
getAbstractSession, getApplicationName, getApplicationName, getMBeanSessionName, getModuleName, getModuleName, getRuntimeServicesMBean, initializeApplicationNameAndModuleName, serverSpecificRegisterMBean, serverSpecificUnregisterMBean, setApplicationName, setModuleName, setRuntimeServicesMBean
-
Methods inherited from class org.eclipse.persistence.platform.server.ServerPlatformBase
clearStatementCache, configureProfiler, disableJTA, disableRuntimeServices, enableRuntimeServices, ensureNotLoggedIn, externalTransactionControllerNotNullWarning, getDatabaseSession, getNewTempClassLoader, getPartitionID, getServerLog, getServerNameAndVersion, getThreadPool, getThreadPoolSize, isCMP, isJTAEnabled, isRuntimeServicesEnabled, isRuntimeServicesEnabledDefault, registerMBean, setExternalTransactionControllerClass, setIsCMP, setThreadPool, setThreadPoolSize, shouldUseDriverManager, shutdown, unregisterMBean, unwrapConnection, usesPartitions, wasFailureCommunicationBased
-
-
-
-
Constructor Detail
-
CDISEPlatform
public CDISEPlatform(DatabaseSession session)
Creates aCDISEPlatform.- Parameters:
session- theDatabaseSessionthis platform will wrap; must not benull- See Also:
JMXServerPlatformBase(DatabaseSession)
-
-
Method Detail
-
initializeServerNameAndVersion
protected void initializeServerNameAndVersion()
Sets the name of the platform.The format of the platform name is subject to change without notice.
- Overrides:
initializeServerNameAndVersionin classServerPlatformBase- See Also:
ServerPlatformBase.getServerNameAndVersion()
-
getMBeanServer
public MBeanServer getMBeanServer()
Uses CDI to find a relevantMBeanServer, caches it, and returns it.This method may return
null.Overrides of this method may return
null.If there is no such
MBeanServerthen theMBeanServerfound and cached by the superclass implementation of this method is returned instead.- Overrides:
getMBeanServerin classJMXServerPlatformBase- Returns:
- an
MBeanServer, ornull
-
launchContainerRunnable
public void launchContainerRunnable(Runnable runnable)
Uses CDI to find a relevantExecutorwhoseExecutor.execute(Runnable)method will be used to submit the suppliedRunnable.If there is no such
Executor, then the superclass implementation of this method is used instead.- Specified by:
launchContainerRunnablein interfaceServerPlatform- Overrides:
launchContainerRunnablein classServerPlatformBase- Parameters:
runnable- theRunnableto launch; should not benull- See Also:
ServerPlatformBase.launchContainerRunnable(Runnable)
-
initializeExternalTransactionController
public void initializeExternalTransactionController()
Overrides theServerPlatformBase.initializeExternalTransactionController()method to disable JTA if there is noTransactionManagerbean present in CDI before invoking the superclass implementation.This method also acquires a
DataSourcefrom CDI proactively, and installs it to preëmpt any JNDI operations.- Specified by:
initializeExternalTransactionControllerin interfaceServerPlatform- Overrides:
initializeExternalTransactionControllerin classServerPlatformBase- Throws:
ValidationException- if aDataSourcecould not be acquired- See Also:
ServerPlatformBase.initializeExternalTransactionController(),Session.getDatasourceLogin(),DatasourceLogin.getConnector(),JNDIConnector,JNDIConnector.getName(),JNDIConnector.setDataSource(DataSource)
-
getExternalTransactionControllerClass
public Class<?> getExternalTransactionControllerClass()
Returns a non-nullClassthat extendsAbstractTransactionController, namelyCDISEPlatform.TransactionController.- Specified by:
getExternalTransactionControllerClassin interfaceServerPlatform- Specified by:
getExternalTransactionControllerClassin classServerPlatformBase- Returns:
- a non-
nullClassthat extendsAbstractTransactionController - See Also:
AbstractTransactionController,CDISEPlatform.TransactionController
-
getJNDIConnectorLookupType
public final int getJNDIConnectorLookupType()
ReturnsJNDIConnector.UNDEFINED_LOOKUPwhen invoked.- Specified by:
getJNDIConnectorLookupTypein interfaceServerPlatform- Overrides:
getJNDIConnectorLookupTypein classServerPlatformBase- Returns:
JNDIConnector.UNDEFINED_LOOKUP
-
-