Class CDISEPlatform

    • 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​(org.eclipse.persistence.sessions.DatabaseSession session)
      Creates a CDISEPlatform.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Class<?> getExternalTransactionControllerClass()
      Returns a non-null Class that extends AbstractTransactionController, namely CDISEPlatform.TransactionController.
      int getJNDIConnectorLookupType()
      Returns JNDIConnector.UNDEFINED_LOOKUP when invoked.
      MBeanServer getMBeanServer()
      Uses CDI to find a relevant MBeanServer, caches it, and returns it.
      void initializeExternalTransactionController()
      Overrides the ServerPlatformBase.initializeExternalTransactionController() method to disable JTA if there is no TransactionManager bean present in CDI before invoking the superclass implementation.
      protected void initializeServerNameAndVersion()
      Sets the name of the platform.
      void launchContainerRunnable​(Runnable runnable)
      Uses CDI to find a relevant Executor whose Executor.execute(Runnable) method will be used to submit the supplied Runnable.
      • 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​(org.eclipse.persistence.sessions.DatabaseSession session)
        Creates a CDISEPlatform.
        Parameters:
        session - the DatabaseSession this platform will wrap; must not be null
        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:
        initializeServerNameAndVersion in class org.eclipse.persistence.platform.server.ServerPlatformBase
        See Also:
        ServerPlatformBase.getServerNameAndVersion()
      • getMBeanServer

        public MBeanServer getMBeanServer()
        Uses CDI to find a relevant MBeanServer, caches it, and returns it.

        This method may return null.

        Overrides of this method may return null.

        If there is no such MBeanServer then the MBeanServer found and cached by the superclass implementation of this method is returned instead.

        Overrides:
        getMBeanServer in class org.eclipse.persistence.platform.server.JMXServerPlatformBase
        Returns:
        an MBeanServer, or null
      • launchContainerRunnable

        public void launchContainerRunnable​(Runnable runnable)
        Uses CDI to find a relevant Executor whose Executor.execute(Runnable) method will be used to submit the supplied Runnable.

        If there is no such Executor, then the superclass implementation of this method is used instead.

        Specified by:
        launchContainerRunnable in interface org.eclipse.persistence.platform.server.ServerPlatform
        Overrides:
        launchContainerRunnable in class org.eclipse.persistence.platform.server.ServerPlatformBase
        Parameters:
        runnable - the Runnable to launch; should not be null
        See Also:
        ServerPlatformBase.launchContainerRunnable(Runnable)
      • initializeExternalTransactionController

        public void initializeExternalTransactionController()
        Overrides the ServerPlatformBase.initializeExternalTransactionController() method to disable JTA if there is no TransactionManager bean present in CDI before invoking the superclass implementation.

        This method also acquires a DataSource from CDI proactively, and installs it to preëmpt any JNDI operations.

        Specified by:
        initializeExternalTransactionController in interface org.eclipse.persistence.platform.server.ServerPlatform
        Overrides:
        initializeExternalTransactionController in class org.eclipse.persistence.platform.server.ServerPlatformBase
        Throws:
        org.eclipse.persistence.exceptions.ValidationException - if a DataSource could not be acquired
        See Also:
        ServerPlatformBase.initializeExternalTransactionController(), Session.getLogin(), DatasourceLogin.getConnector(), JNDIConnector, JNDIConnector.getName(), JNDIConnector.setDataSource(DataSource)
      • getExternalTransactionControllerClass

        public Class<?> getExternalTransactionControllerClass()
        Returns a non-null Class that extends AbstractTransactionController, namely CDISEPlatform.TransactionController.
        Specified by:
        getExternalTransactionControllerClass in interface org.eclipse.persistence.platform.server.ServerPlatform
        Specified by:
        getExternalTransactionControllerClass in class org.eclipse.persistence.platform.server.ServerPlatformBase
        Returns:
        a non-null Class that extends AbstractTransactionController
        See Also:
        AbstractTransactionController, CDISEPlatform.TransactionController
      • getJNDIConnectorLookupType

        public final int getJNDIConnectorLookupType()
        Returns JNDIConnector.UNDEFINED_LOOKUP when invoked.
        Specified by:
        getJNDIConnectorLookupType in interface org.eclipse.persistence.platform.server.ServerPlatform
        Overrides:
        getJNDIConnectorLookupType in class org.eclipse.persistence.platform.server.ServerPlatformBase
        Returns:
        JNDIConnector.UNDEFINED_LOOKUP