Module org.eclipse.persistence.core
Class SessionsFactory
- java.lang.Object
-
- org.eclipse.persistence.internal.sessions.factories.SessionsFactory
-
public class SessionsFactory extends Object
INTERNAL: Builds EclipseLink Sessions from the XML Session Config model. Model classes that are not built, are processed only.- Version:
- 1.0
- Author:
- Guy Pelletier
-
-
Field Summary
Fields Modifier and Type Field Description protected ClassLoaderm_classLoaderprotected Map<String,Integer>m_logLevelsprotected Map<String,Session>m_sessions
-
Constructor Summary
Constructors Constructor Description SessionsFactory()INTERNAL:
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ConnectionPoolbuildConnectionPoolConfig(ConnectionPoolConfig poolConfig, ServerSession serverSession)INTERNAL: Build a connection pool from the config to store on the server session.protected ServerPlatformbuildCustomServerPlatformConfig(CustomServerPlatformConfig platformConfig, DatabaseSessionImpl session)INTERNAL:protected LoginbuildDatabaseLoginConfig(DatabaseLoginConfig databaseLoginConfig)INTERNAL: Build a DatabaseLogin for the given Session Wrapped by the getLogin() call, therefore, config can't be null at this point.protected AbstractSessionbuildDatabaseSessionConfig(DatabaseSessionConfig databaseSessionConfig)INTERNAL: Wrapped by the getSession() call, therefore, config can't be null at this point.protected SessionLogbuildDefaultSessionLogConfig(DefaultSessionLogConfig defaultSessionLogConfig)INTERNAL: Wrapped by the getSessionLog() call, therefore, config can't be null at this point.protected LoginbuildEISLoginConfig(EISLoginConfig eisLoginConfig)INTERNAL: Wrapped by the getLogin() call, therefore, config can't be null at this point.protected SessionLogbuildJavaLogConfig(JavaLogConfig javaLogConfig, AbstractSession session)INTERNAL:protected voidbuildJMSPublishingTransportManagerConfig(JMSPublishingTransportManagerConfig tmConfig, RemoteCommandManager rcm)INTERNAL:protected voidbuildJMSTopicTransportManagerConfig(JMSTopicTransportManagerConfig tmConfig, RemoteCommandManager rcm)INTERNAL:protected LoginbuildLogin(LoginConfig loginConfig)INTERNAL: Build the correct login based on the login config typeprotected ConnectionPoolbuildReadConnectionPoolConfig(ReadConnectionPoolConfig poolConfig, ServerSession serverSession)INTERNAL: Build a read connection pool from the config to store on the server session.protected voidbuildRemoteCommandManagerConfig(RemoteCommandManagerConfig rcmConfig, AbstractSession session)INTERNAL:protected voidbuildRMIIIOPTransportManagerConfig(RMIIIOPTransportManagerConfig tmConfig, RemoteCommandManager rcm)INTERNAL: Left this in for now since in the future we may add more IIOP specific configurations?protected voidbuildRMITransportManagerConfig(RMITransportManagerConfig tmConfig, RemoteCommandManager rcm)INTERNAL:protected SequencebuildSequence(SequenceConfig sequenceConfig)INTERNAL: Builds a Sequence from the given SequenceConfig.protected SessionLogbuildServerLogConfig(ServerLogConfig serverLogConfig, AbstractSession session)INTERNAL:protected ServerPlatformbuildServerPlatformConfig(ServerPlatformConfig platformConfig, DatabaseSessionImpl session)INTERNAL: Build the appropriate server platformprotected AbstractSessionbuildServerSessionConfig(ServerSessionConfig serverSessionConfig)INTERNAL: Builds a server server from the given ServerSessionConfig.protected AbstractSessionbuildSession(SessionConfig sessionConfig)INTERNAL: Build the correct session based on the session config typeprotected SessionBrokerbuildSessionBrokerConfig(SessionBrokerConfig sessionBrokerConfig)INTERNAL: Builds a session broker from the given SessionBrokerConfig.Map<String,Session>buildSessionConfigs(SessionConfigs eclipseLinkSessions, ClassLoader classLoader)INTERNAL: To build EclipseLink sessions, users must call this method with a SessionConfigs object returned from an OX read in theXMLSessionConfigLoader.protected SessionLogbuildSessionLog(LogConfig logConfig, AbstractSession session)INTERNAL:protected voidbuildSunCORBATransportManagerConfig(SunCORBATransportManagerConfig tmConfig, RemoteCommandManager rcm)INTERNAL: Builds a Sun CORBA transport manager with the given remote command managerprotected voidbuildTransportManager(TransportManagerConfig tmConfig, RemoteCommandManager rcm)INTERNAL:protected voidbuildUserDefinedTransportManagerConfig(UserDefinedTransportManagerConfig tmConfig, RemoteCommandManager rcm)INTERNAL:protected LoginbuildXMLLoginConfig(XMLLoginConfig xmlLoginConfig)INTERNAL: Wrapped by the getLogin() call, therefore, config can't be null at this point.protected DatabaseSessionImplcreateSession(DatabaseSessionConfig sessionConfig, Login login)INTERNAL: Return a DatabaseSession object from it's config object using either the project classes or project XML files.protected DatabaseSessionImplgetSession(SessionConfig sessionConfig, Project project)INTERNAL: Return the correct session type from the sessionConfigprotected ProjectloadProjectConfig(ProjectConfig projectConfig)INTERNAL: Load a projectConfig from the session.xml file.protected voidprepareProjectLogin(Project project, Login login)INTERNAL: Return the correct session type from the sessionConfigprotected voidprocessCommandsConfig(CommandsConfig commandsConfig, RemoteCommandManager rcm)INTERNAL:protected voidprocessConnectionPolicyConfig(ConnectionPolicyConfig connectionPolicyConfig, ServerSession serverSession)INTERNAL: Process the common elements from a ConnectionPoolConfigprotected voidprocessConnectionPoolConfig(ConnectionPoolConfig poolConfig, ConnectionPool connectionPool, AbstractSession session)INTERNAL: Process the common elements from a ConnectionPoolConfigprotected voidprocessDatabaseSessionConfig(DatabaseSessionConfig sessionConfig, AbstractSession session)INTERNAL Process a DatabaseSessionConfig object.protected voidprocessDiscoveryConfig(DiscoveryConfig discoveryConfig, DiscoveryManager discoveryManager)INTERNAL:protected voidprocessJMSTransportManagerConfig(JMSPublishingTransportManagerConfig tmConfig, JMSPublishingTransportManager tm)INTERNAL: Common JMS configurationprotected voidprocessJNDINamingServiceConfig(JNDINamingServiceConfig namingConfig, TransportManager tm)INTERNAL:protected voidprocessLogConfig(LogConfig logConfig, SessionLog log)INTERNAL:protected voidprocessLoginConfig(LoginConfig loginConfig, DatasourceLogin login)INTERNAL: Process the common elements of a Login.protected voidprocessPoolsConfig(PoolsConfig poolsConfig, ServerSession serverSession)INTERNAL: Process the PoolsConfig object.protected voidprocessRMIRegistryNamingServiceConfig(RMIRegistryNamingServiceConfig namingConfig, TransportManager tm)INTERNAL:protected voidprocessSequenceConnectionPoolConfig(ConnectionPoolConfig poolConfig, ServerSession serverSession)INTERNAL: Process a SequenceConnectionPoolConfig object.protected voidprocessServerPlatformConfig(ServerPlatformConfig platformConfig, ServerPlatform platform)INTERNAL: Process a ServerPlatformConfig object.protected voidprocessSessionConfig(SessionConfig sessionConfig, AbstractSession session)INTERNAL: Process the common elements from a SessionConfig.protected voidprocessSessionCustomizer(SessionConfig sessionConfig, AbstractSession session)INTERNAL: Process the user inputed session customizer class.protected voidprocessSessionEventManagerConfig(SessionEventManagerConfig sessionEventManagerConfig, AbstractSession session)INTERNAL:protected voidprocessStructConverterConfig(StructConverterConfig converterClassConfig, DatabaseLogin login)INTERNAL:protected voidprocessTransportManagerConfig(TransportManagerConfig tmConfig, TransportManager tm)INTERNAL:
-
-
-
Method Detail
-
buildSessionConfigs
public Map<String,Session> buildSessionConfigs(SessionConfigs eclipseLinkSessions, ClassLoader classLoader)
INTERNAL: To build EclipseLink sessions, users must call this method with a SessionConfigs object returned from an OX read in theXMLSessionConfigLoader.- Parameters:
eclipseLinkSessions- object returned from an OX read in the XMLSessionConfigLoaderclassLoader- class loader used in the XMLSessionConfigLoader- Returns:
- EclipseLink sessions
-
processSessionCustomizer
protected void processSessionCustomizer(SessionConfig sessionConfig, AbstractSession session)
INTERNAL: Process the user inputed session customizer class. Will be run at the end of the session build process
-
buildSession
protected AbstractSession buildSession(SessionConfig sessionConfig)
INTERNAL: Build the correct session based on the session config type
-
buildDatabaseSessionConfig
protected AbstractSession buildDatabaseSessionConfig(DatabaseSessionConfig databaseSessionConfig)
INTERNAL: Wrapped by the getSession() call, therefore, config can't be null at this point.
-
processDatabaseSessionConfig
protected void processDatabaseSessionConfig(DatabaseSessionConfig sessionConfig, AbstractSession session)
INTERNAL Process a DatabaseSessionConfig object.
-
buildServerSessionConfig
protected AbstractSession buildServerSessionConfig(ServerSessionConfig serverSessionConfig)
INTERNAL: Builds a server server from the given ServerSessionConfig.
-
createSession
protected DatabaseSessionImpl createSession(DatabaseSessionConfig sessionConfig, Login login)
INTERNAL: Return a DatabaseSession object from it's config object using either the project classes or project XML files.
-
prepareProjectLogin
protected void prepareProjectLogin(Project project, Login login)
INTERNAL: Return the correct session type from the sessionConfig
-
getSession
protected DatabaseSessionImpl getSession(SessionConfig sessionConfig, Project project)
INTERNAL: Return the correct session type from the sessionConfig
-
loadProjectConfig
protected Project loadProjectConfig(ProjectConfig projectConfig)
INTERNAL: Load a projectConfig from the session.xml file. This method will determine the proper loading scheme, that is, for a class or xml project.
-
buildLogin
protected Login buildLogin(LoginConfig loginConfig)
INTERNAL: Build the correct login based on the login config type
-
buildEISLoginConfig
protected Login buildEISLoginConfig(EISLoginConfig eisLoginConfig)
INTERNAL: Wrapped by the getLogin() call, therefore, config can't be null at this point.
-
buildXMLLoginConfig
protected Login buildXMLLoginConfig(XMLLoginConfig xmlLoginConfig)
INTERNAL: Wrapped by the getLogin() call, therefore, config can't be null at this point.
-
buildDatabaseLoginConfig
protected Login buildDatabaseLoginConfig(DatabaseLoginConfig databaseLoginConfig)
INTERNAL: Build a DatabaseLogin for the given Session Wrapped by the getLogin() call, therefore, config can't be null at this point.
-
processStructConverterConfig
protected void processStructConverterConfig(StructConverterConfig converterClassConfig, DatabaseLogin login)
INTERNAL:
-
processLoginConfig
protected void processLoginConfig(LoginConfig loginConfig, DatasourceLogin login)
INTERNAL: Process the common elements of a Login.
-
processPoolsConfig
protected void processPoolsConfig(PoolsConfig poolsConfig, ServerSession serverSession)
INTERNAL: Process the PoolsConfig object.
-
processSequenceConnectionPoolConfig
protected void processSequenceConnectionPoolConfig(ConnectionPoolConfig poolConfig, ServerSession serverSession)
INTERNAL: Process a SequenceConnectionPoolConfig object.
-
processServerPlatformConfig
protected void processServerPlatformConfig(ServerPlatformConfig platformConfig, ServerPlatform platform)
INTERNAL: Process a ServerPlatformConfig object.
-
buildConnectionPoolConfig
protected ConnectionPool buildConnectionPoolConfig(ConnectionPoolConfig poolConfig, ServerSession serverSession)
INTERNAL: Build a connection pool from the config to store on the server session.
-
buildCustomServerPlatformConfig
protected ServerPlatform buildCustomServerPlatformConfig(CustomServerPlatformConfig platformConfig, DatabaseSessionImpl session)
INTERNAL:
-
buildReadConnectionPoolConfig
protected ConnectionPool buildReadConnectionPoolConfig(ReadConnectionPoolConfig poolConfig, ServerSession serverSession)
INTERNAL: Build a read connection pool from the config to store on the server session.
-
processConnectionPolicyConfig
protected void processConnectionPolicyConfig(ConnectionPolicyConfig connectionPolicyConfig, ServerSession serverSession)
INTERNAL: Process the common elements from a ConnectionPoolConfig
-
processConnectionPoolConfig
protected void processConnectionPoolConfig(ConnectionPoolConfig poolConfig, ConnectionPool connectionPool, AbstractSession session)
INTERNAL: Process the common elements from a ConnectionPoolConfig
-
processSessionConfig
protected void processSessionConfig(SessionConfig sessionConfig, AbstractSession session)
INTERNAL: Process the common elements from a SessionConfig.
-
buildServerPlatformConfig
protected ServerPlatform buildServerPlatformConfig(ServerPlatformConfig platformConfig, DatabaseSessionImpl session)
INTERNAL: Build the appropriate server platform
-
buildRemoteCommandManagerConfig
protected void buildRemoteCommandManagerConfig(RemoteCommandManagerConfig rcmConfig, AbstractSession session)
INTERNAL:
-
buildTransportManager
protected void buildTransportManager(TransportManagerConfig tmConfig, RemoteCommandManager rcm)
INTERNAL:
-
buildRMITransportManagerConfig
protected void buildRMITransportManagerConfig(RMITransportManagerConfig tmConfig, RemoteCommandManager rcm)
INTERNAL:
-
buildSequence
protected Sequence buildSequence(SequenceConfig sequenceConfig)
INTERNAL: Builds a Sequence from the given SequenceConfig.
-
buildRMIIIOPTransportManagerConfig
protected void buildRMIIIOPTransportManagerConfig(RMIIIOPTransportManagerConfig tmConfig, RemoteCommandManager rcm)
INTERNAL: Left this in for now since in the future we may add more IIOP specific configurations?
-
buildJMSTopicTransportManagerConfig
protected void buildJMSTopicTransportManagerConfig(JMSTopicTransportManagerConfig tmConfig, RemoteCommandManager rcm)
INTERNAL:
-
buildJMSPublishingTransportManagerConfig
protected void buildJMSPublishingTransportManagerConfig(JMSPublishingTransportManagerConfig tmConfig, RemoteCommandManager rcm)
INTERNAL:
-
processJMSTransportManagerConfig
protected void processJMSTransportManagerConfig(JMSPublishingTransportManagerConfig tmConfig, JMSPublishingTransportManager tm)
INTERNAL: Common JMS configuration
-
buildUserDefinedTransportManagerConfig
protected void buildUserDefinedTransportManagerConfig(UserDefinedTransportManagerConfig tmConfig, RemoteCommandManager rcm)
INTERNAL:
-
processJNDINamingServiceConfig
protected void processJNDINamingServiceConfig(JNDINamingServiceConfig namingConfig, TransportManager tm)
INTERNAL:
-
processRMIRegistryNamingServiceConfig
protected void processRMIRegistryNamingServiceConfig(RMIRegistryNamingServiceConfig namingConfig, TransportManager tm)
INTERNAL:
-
processDiscoveryConfig
protected void processDiscoveryConfig(DiscoveryConfig discoveryConfig, DiscoveryManager discoveryManager)
INTERNAL:
-
processTransportManagerConfig
protected void processTransportManagerConfig(TransportManagerConfig tmConfig, TransportManager tm)
INTERNAL:
-
processSessionEventManagerConfig
protected void processSessionEventManagerConfig(SessionEventManagerConfig sessionEventManagerConfig, AbstractSession session)
INTERNAL:
-
buildSessionLog
protected SessionLog buildSessionLog(LogConfig logConfig, AbstractSession session)
INTERNAL:
-
buildJavaLogConfig
protected SessionLog buildJavaLogConfig(JavaLogConfig javaLogConfig, AbstractSession session)
INTERNAL:
-
buildDefaultSessionLogConfig
protected SessionLog buildDefaultSessionLogConfig(DefaultSessionLogConfig defaultSessionLogConfig)
INTERNAL: Wrapped by the getSessionLog() call, therefore, config can't be null at this point.
-
buildServerLogConfig
protected SessionLog buildServerLogConfig(ServerLogConfig serverLogConfig, AbstractSession session)
INTERNAL:
-
processLogConfig
protected void processLogConfig(LogConfig logConfig, SessionLog log)
INTERNAL:
-
buildSunCORBATransportManagerConfig
protected void buildSunCORBATransportManagerConfig(SunCORBATransportManagerConfig tmConfig, RemoteCommandManager rcm)
INTERNAL: Builds a Sun CORBA transport manager with the given remote command manager
-
processCommandsConfig
protected void processCommandsConfig(CommandsConfig commandsConfig, RemoteCommandManager rcm)
INTERNAL:
-
buildSessionBrokerConfig
protected SessionBroker buildSessionBrokerConfig(SessionBrokerConfig sessionBrokerConfig)
INTERNAL: Builds a session broker from the given SessionBrokerConfig.
-
-