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 ClassLoader
m_classLoader
protected Map<String,Integer>
m_logLevels
protected 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 ConnectionPool
buildConnectionPoolConfig(ConnectionPoolConfig poolConfig, ServerSession serverSession)
INTERNAL: Build a connection pool from the config to store on the server session.protected ServerPlatform
buildCustomServerPlatformConfig(CustomServerPlatformConfig platformConfig, DatabaseSessionImpl session)
INTERNAL: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.protected AbstractSession
buildDatabaseSessionConfig(DatabaseSessionConfig databaseSessionConfig)
INTERNAL: Wrapped by the getSession() call, therefore, config can't be null at this point.protected SessionLog
buildDefaultSessionLogConfig(DefaultSessionLogConfig defaultSessionLogConfig)
INTERNAL: Wrapped by the getSessionLog() call, therefore, config can't be null at this point.protected Login
buildEISLoginConfig(EISLoginConfig eisLoginConfig)
INTERNAL: Wrapped by the getLogin() call, therefore, config can't be null at this point.protected SessionLog
buildJavaLogConfig(JavaLogConfig javaLogConfig, AbstractSession session)
INTERNAL:protected void
buildJMSPublishingTransportManagerConfig(JMSPublishingTransportManagerConfig tmConfig, RemoteCommandManager rcm)
INTERNAL:protected void
buildJMSTopicTransportManagerConfig(JMSTopicTransportManagerConfig tmConfig, RemoteCommandManager rcm)
INTERNAL:protected Login
buildLogin(LoginConfig loginConfig)
INTERNAL: Build the correct login based on the login config typeprotected void
buildOc4jJGroupsTransportManagerConfig(Oc4jJGroupsTransportManagerConfig tmConfig, RemoteCommandManager rcm)
INTERNAL:protected ConnectionPool
buildReadConnectionPoolConfig(ReadConnectionPoolConfig poolConfig, ServerSession serverSession)
INTERNAL: Build a read connection pool from the config to store on the server session.protected void
buildRemoteCommandManagerConfig(RemoteCommandManagerConfig rcmConfig, AbstractSession session)
INTERNAL:protected void
buildRMIIIOPTransportManagerConfig(RMIIIOPTransportManagerConfig tmConfig, RemoteCommandManager rcm)
INTERNAL: Left this in for now since in the future we may add more IIOP specific configurations?protected void
buildRMITransportManagerConfig(RMITransportManagerConfig tmConfig, RemoteCommandManager rcm)
INTERNAL:protected Sequence
buildSequence(SequenceConfig sequenceConfig)
INTERNAL: Builds a Sequence from the given SequenceConfig.protected SessionLog
buildServerLogConfig(ServerLogConfig serverLogConfig, AbstractSession session)
INTERNAL:protected ServerPlatform
buildServerPlatformConfig(ServerPlatformConfig platformConfig, DatabaseSessionImpl session)
INTERNAL: Build the appropriate server platformprotected AbstractSession
buildServerSessionConfig(ServerSessionConfig serverSessionConfig)
INTERNAL: Builds a server server from the given ServerSessionConfig.protected AbstractSession
buildSession(SessionConfig sessionConfig)
INTERNAL: Build the correct session based on the session config typeprotected SessionBroker
buildSessionBrokerConfig(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 SessionLog
buildSessionLog(LogConfig logConfig, AbstractSession session)
INTERNAL:protected void
buildSunCORBATransportManagerConfig(SunCORBATransportManagerConfig tmConfig, RemoteCommandManager rcm)
INTERNAL: Builds a Sun CORBA transport manager with the given remote command managerprotected void
buildTransportManager(TransportManagerConfig tmConfig, RemoteCommandManager rcm)
INTERNAL:protected void
buildUserDefinedTransportManagerConfig(UserDefinedTransportManagerConfig tmConfig, RemoteCommandManager rcm)
INTERNAL:protected Login
buildXMLLoginConfig(XMLLoginConfig xmlLoginConfig)
INTERNAL: Wrapped by the getLogin() call, therefore, config can't be null at this point.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.protected DatabaseSessionImpl
getSession(SessionConfig sessionConfig, Project project)
INTERNAL: Return the correct session type from the sessionConfigprotected Project
loadProjectConfig(ProjectConfig projectConfig)
INTERNAL: Load a projectConfig from the session.xml file.protected void
prepareProjectLogin(Project project, Login login)
INTERNAL: Return the correct session type from the sessionConfigprotected void
processCommandsConfig(CommandsConfig commandsConfig, RemoteCommandManager rcm)
INTERNAL:protected void
processConnectionPolicyConfig(ConnectionPolicyConfig connectionPolicyConfig, ServerSession serverSession)
INTERNAL: Process the common elements from a ConnectionPoolConfigprotected void
processConnectionPoolConfig(ConnectionPoolConfig poolConfig, ConnectionPool connectionPool, AbstractSession session)
INTERNAL: Process the common elements from a ConnectionPoolConfigprotected void
processDatabaseSessionConfig(DatabaseSessionConfig sessionConfig, AbstractSession session)
INTERNAL Process a DatabaseSessionConfig object.protected void
processDiscoveryConfig(DiscoveryConfig discoveryConfig, DiscoveryManager discoveryManager)
INTERNAL:protected void
processJMSTransportManagerConfig(JMSPublishingTransportManagerConfig tmConfig, JMSPublishingTransportManager tm)
INTERNAL: Common JMS configurationprotected void
processJNDINamingServiceConfig(JNDINamingServiceConfig namingConfig, TransportManager tm)
INTERNAL:protected void
processLogConfig(LogConfig logConfig, SessionLog log)
INTERNAL:protected void
processLoginConfig(LoginConfig loginConfig, DatasourceLogin login)
INTERNAL: Process the common elements of a Login.protected void
processPoolsConfig(PoolsConfig poolsConfig, ServerSession serverSession)
INTERNAL: Process the PoolsConfig object.protected void
processRMIRegistryNamingServiceConfig(RMIRegistryNamingServiceConfig namingConfig, TransportManager tm)
INTERNAL:protected void
processSequenceConnectionPoolConfig(ConnectionPoolConfig poolConfig, ServerSession serverSession)
INTERNAL: Process a SequenceConnectionPoolConfig object.protected void
processServerPlatformConfig(ServerPlatformConfig platformConfig, ServerPlatform platform)
INTERNAL: Process a ServerPlatformConfig object.protected void
processSessionConfig(SessionConfig sessionConfig, AbstractSession session)
INTERNAL: Process the common elements from a SessionConfig.protected void
processSessionCustomizer(SessionConfig sessionConfig, AbstractSession session)
INTERNAL: Process the user inputed session customizer class.protected void
processSessionEventManagerConfig(SessionEventManagerConfig sessionEventManagerConfig, AbstractSession session)
INTERNAL:protected void
processStructConverterConfig(StructConverterConfig converterClassConfig, DatabaseLogin login)
INTERNAL:protected void
processTransportManagerConfig(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
-
buildOc4jJGroupsTransportManagerConfig
protected void buildOc4jJGroupsTransportManagerConfig(Oc4jJGroupsTransportManagerConfig tmConfig, RemoteCommandManager rcm)
INTERNAL:
-
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.
-
-