Class CDISEPlatform
- All Implemented Interfaces:
- org.eclipse.persistence.platform.server.ServerPlatform
JMXServerPlatformBase that arranges things such that CDI,
 not JNDI, will be used to acquire a TransactionManager and
 MBeanServer.
 Most users will not use this class directly, but will supply its
 fully-qualified name as the value of the 
 eclipselink.target-server Eclipselink JPA extension property in a 
 META-INF/persistence.xml file.
For example:
<property name="eclipselink.target-server"
          value="io.helidon.integrations.cdi.eclipselink.CDISEPlatform"/>- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic @interfaceAQualifierused to designate various things as being related to Eclipselink in some way.static classAJTATransactionControllerwhoseCDISEPlatform.TransactionController.acquireTransactionManager()method uses CDI, not JNDI, to return aTransactionManagerinstance.
- 
Field SummaryFields inherited from class org.eclipse.persistence.platform.server.JMXServerPlatformBaseAPP_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_PROPERTYFields inherited from class org.eclipse.persistence.platform.server.ServerPlatformBaseDEFAULT_SERVER_NAME_AND_VERSION, externalTransactionControllerClass, JMX_REGISTER_DEV_MBEAN_PROPERTY, JMX_REGISTER_RUN_MBEAN_PROPERTY, serverNameAndVersion, shouldRegisterDevelopmentBean, shouldRegisterRuntimeBean, threadPool, threadPoolSize
- 
Constructor SummaryConstructorsConstructorDescriptionCDISEPlatform(org.eclipse.persistence.sessions.DatabaseSession session) Creates aCDISEPlatform.
- 
Method SummaryModifier and TypeMethodDescriptionClass<? extends org.eclipse.persistence.sessions.ExternalTransactionController> Returns a non-nullClassthat extendsAbstractTransactionController, namelyCDISEPlatform.TransactionController.final intReturnsJNDIConnector.UNDEFINED_LOOKUPwhen invoked.Uses CDI to find a relevantMBeanServer, caches it, and returns it.voidOverrides theServerPlatformBase.initializeExternalTransactionController()method to disable JTA if there is noTransactionManagerbean present in CDI before invoking the superclass implementation.protected voidSets the name of the platform.voidlaunchContainerRunnable(Runnable runnable) Uses CDI to find a relevantExecutorwhoseExecutor.execute(Runnable)method will be used to submit the suppliedRunnable.Overrides theServerPlatformBase.unwrapConnection(Connection)method to considerDelegatingConnections.Methods inherited from class org.eclipse.persistence.platform.server.JMXServerPlatformBasegetAbstractSession, getApplicationName, getApplicationName, getMBeanSessionName, getModuleName, getModuleName, getRuntimeServicesMBean, initializeApplicationNameAndModuleName, serverSpecificRegisterMBean, serverSpecificUnregisterMBean, setApplicationName, setModuleName, setRuntimeServicesMBeanMethods inherited from class org.eclipse.persistence.platform.server.ServerPlatformBaseclearStatementCache, configureProfiler, disableJTA, disableRuntimeServices, enableJTA, enableRuntimeServices, ensureNotLoggedIn, externalTransactionControllerNotNullWarning, getDatabaseSession, getNewTempClassLoader, getPartitionID, getServerLog, getServerNameAndVersion, getThreadPool, getThreadPoolSize, isCMP, isJTA11, isJTAEnabled, isRuntimeServicesEnabled, isRuntimeServicesEnabledDefault, registerMBean, setExternalTransactionControllerClass, setIsCMP, setJTAEnabled, setThreadPool, setThreadPoolSize, shouldUseDriverManager, shutdown, unregisterMBean, usesPartitions, wasFailureCommunicationBased
- 
Constructor Details- 
CDISEPlatformpublic CDISEPlatform(org.eclipse.persistence.sessions.DatabaseSession session) Creates aCDISEPlatform.- Parameters:
- session- the- DatabaseSessionthis platform will wrap; must not be- null
- See Also:
 
 
- 
- 
Method Details- 
initializeServerNameAndVersionprotected void initializeServerNameAndVersion()Sets the name of the platform.The format of the platform name is subject to change without notice. - Overrides:
- initializeServerNameAndVersionin class- org.eclipse.persistence.platform.server.ServerPlatformBase
- See Also:
 
- 
getMBeanServerUses 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 class- org.eclipse.persistence.platform.server.JMXServerPlatformBase
- Returns:
- an MBeanServer, ornull
 
- 
launchContainerRunnableUses 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 interface- org.eclipse.persistence.platform.server.ServerPlatform
- Overrides:
- launchContainerRunnablein class- org.eclipse.persistence.platform.server.ServerPlatformBase
- Parameters:
- runnable- the- Runnableto launch; should not be- null
- See Also:
 
- 
initializeExternalTransactionControllerpublic 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 interface- org.eclipse.persistence.platform.server.ServerPlatform
- Overrides:
- initializeExternalTransactionControllerin class- org.eclipse.persistence.platform.server.ServerPlatformBase
- Throws:
- org.eclipse.persistence.exceptions.ValidationException- if a- DataSourcecould not be acquired
- See Also:
 
- 
getExternalTransactionControllerClasspublic Class<? extends org.eclipse.persistence.sessions.ExternalTransactionController> getExternalTransactionControllerClass()Returns a non-nullClassthat extendsAbstractTransactionController, namelyCDISEPlatform.TransactionController.- Specified by:
- getExternalTransactionControllerClassin interface- org.eclipse.persistence.platform.server.ServerPlatform
- Specified by:
- getExternalTransactionControllerClassin class- org.eclipse.persistence.platform.server.ServerPlatformBase
- Returns:
- a non-nullClassthat extendsAbstractTransactionController
- See Also:
 
- 
getJNDIConnectorLookupTypepublic final int getJNDIConnectorLookupType()ReturnsJNDIConnector.UNDEFINED_LOOKUPwhen invoked.- Specified by:
- getJNDIConnectorLookupTypein interface- org.eclipse.persistence.platform.server.ServerPlatform
- Overrides:
- getJNDIConnectorLookupTypein class- org.eclipse.persistence.platform.server.ServerPlatformBase
- Returns:
- JNDIConnector.UNDEFINED_LOOKUP
 
- 
unwrapConnectionOverrides theServerPlatformBase.unwrapConnection(Connection)method to considerDelegatingConnections.By design, only one level of unwrapping occurs; i.e. if the unwrapped Connectionis itself aDelegatingConnectionit is returned as is.- Specified by:
- unwrapConnectionin interface- org.eclipse.persistence.platform.server.ServerPlatform
- Overrides:
- unwrapConnectionin class- org.eclipse.persistence.platform.server.ServerPlatformBase
- Parameters:
- c- the- Connectionto unwrap; must not be- null
- Returns:
- the unwrapped Connection(which may be the suppliedConnection); nevernull
- Throws:
- NullPointerException- if- cis- null
- See Also:
 
 
-