Examples of SessionBroker


Examples of oracle.toplink.sessionbroker.SessionBroker

   * that this SessionBroker is not capable of creating "client" Sessions. We need to handle
   * these differently depending on how the SessionFactory is being used. If we are creating a
   * plain Session than we can return the original SessionBroker.
   */
  public void testSessionBrokerThrowingValidationException() {
    SessionBroker broker = new MockSingleSessionBroker();
    SessionBrokerSessionFactory factory = new SessionBrokerSessionFactory(broker);

    assertEquals(factory.createSession(), broker);
    try {
      factory.createManagedClientSession();
View Full Code Here

Examples of oracle.toplink.sessionbroker.SessionBroker

    /**
     * Insure that the managed TopLink Session proxy is behaving correctly
     * when it has been initialized with a SessionBroker. 
     */
  public void testManagedSessionBroker() {
    SessionBroker client = new MockClientSessionBroker();
    SessionBroker broker = new MockServerSessionBroker(client);
    SessionBrokerSessionFactory factory = new SessionBrokerSessionFactory(broker);

    assertEquals(client, factory.createSession());

    Session session = factory.createManagedClientSession();
View Full Code Here

Examples of org.eclipse.persistence.sessions.broker.SessionBroker

    /**
     * INTERNAL:
     * Builds a session broker from the given SessionBrokerConfig.
     */
    protected SessionBroker buildSessionBrokerConfig(SessionBrokerConfig sessionBrokerConfig) {
        SessionBroker sessionBroker = new SessionBroker();

        // Session names
        Enumeration sessionNames = sessionBrokerConfig.getSessionNames().elements();

        while (sessionNames.hasMoreElements()) {
            // Register the sessions
            String sessionName = (String)sessionNames.nextElement();
            sessionBroker.registerSession(sessionName, (AbstractSession)m_sessions.get(sessionName));
        }

        // Process the common elements in SessionConfig
        processSessionConfig(sessionBrokerConfig, sessionBroker);

View Full Code Here

Examples of org.eclipse.persistence.sessions.broker.SessionBroker

        // All the sessions have been built now so we can process the Session Brokers
        Enumeration ee = sessionBrokerConfigs.elements();

        while (ee.hasMoreElements()) {
            SessionBrokerConfig sessionBrokerConfig = (SessionBrokerConfig)ee.nextElement();
            SessionBroker sessionBroker = buildSessionBrokerConfig(sessionBrokerConfig);
            sessionBroker.getDatasourcePlatform().getConversionManager().setLoader(classLoader);
            processSessionCustomizer(sessionBrokerConfig, sessionBroker);
            m_sessions.put(sessionBroker.getName(), sessionBroker);
        }

        return m_sessions;
    }
View Full Code Here

Examples of org.eclipse.persistence.sessions.broker.SessionBroker

        // All the sessions have been built now so we can process the Session Brokers
        Enumeration ee = sessionBrokerConfigs.elements();

        while (ee.hasMoreElements()) {
            SessionBrokerConfig sessionBrokerConfig = (SessionBrokerConfig)ee.nextElement();
            SessionBroker sessionBroker = buildSessionBrokerConfig(sessionBrokerConfig);
            sessionBroker.getDatasourcePlatform().getConversionManager().setLoader(classLoader);
            processSessionCustomizer(sessionBrokerConfig, sessionBroker);
            m_sessions.put(sessionBroker.getName(), sessionBroker);
        }

        return m_sessions;
    }
View Full Code Here

Examples of org.eclipse.persistence.sessions.broker.SessionBroker

    /**
     * INTERNAL:
     * Builds a session broker from the given SessionBrokerConfig.
     */
    protected SessionBroker buildSessionBrokerConfig(SessionBrokerConfig sessionBrokerConfig) {
        SessionBroker sessionBroker = new SessionBroker();

        // Session names
        Enumeration sessionNames = sessionBrokerConfig.getSessionNames().elements();

        while (sessionNames.hasMoreElements()) {
            // Register the sessions
            String sessionName = (String)sessionNames.nextElement();
            sessionBroker.registerSession(sessionName, (AbstractSession)m_sessions.get(sessionName));
        }

        // Process the common elements in SessionConfig
        processSessionConfig(sessionBrokerConfig, sessionBroker);

View Full Code Here

Examples of org.eclipse.persistence.sessions.broker.SessionBroker

        if (sharedSession.isServerSession()) {
            return ((Server)sharedSession).acquireClientSession();
        }
        if (sharedSession.isSessionBroker()) {
            SessionBroker broker = (SessionBroker)sharedSession;
            if (broker.isServerSessionBroker()) {
                return broker.acquireClientSessionBroker();
            }
            return broker;
        }
        // Assume we have a database session and return it.
        return sharedSession;
View Full Code Here

Examples of org.eclipse.persistence.sessions.broker.SessionBroker

            RemoteConnection con = ((RemoteSession)session).getRemoteConnection();
            if (RemoteConnectionSequencing.masterSequencingExists(con)) {
                sequencing = new RemoteConnectionSequencing(con);
            }
        } else if (session.isBroker()) {
            SessionBroker br = (SessionBroker)session;
            if (SessionBrokerSequencing.atLeastOneSessionHasSequencing(br)) {
                sequencing = new SessionBrokerSequencing(br);
            }
        }
        return sequencing;
View Full Code Here

Examples of org.eclipse.persistence.sessions.broker.SessionBroker

        // All the sessions have been built now so we can process the Session Brokers
        Enumeration ee = sessionBrokerConfigs.elements();

        while (ee.hasMoreElements()) {
            SessionBrokerConfig sessionBrokerConfig = (SessionBrokerConfig)ee.nextElement();
            SessionBroker sessionBroker = buildSessionBrokerConfig(sessionBrokerConfig);
            sessionBroker.getDatasourcePlatform().getConversionManager().setLoader(classLoader);
            processSessionCustomizer(sessionBrokerConfig, sessionBroker);
            m_sessions.put(sessionBroker.getName(), sessionBroker);
        }

        return m_sessions;
    }
View Full Code Here

Examples of org.eclipse.persistence.sessions.broker.SessionBroker

    /**
     * INTERNAL:
     * Builds a session broker from the given SessionBrokerConfig.
     */
    protected SessionBroker buildSessionBrokerConfig(SessionBrokerConfig sessionBrokerConfig) {
        SessionBroker sessionBroker = new SessionBroker();

        // Session names
        Enumeration sessionNames = sessionBrokerConfig.getSessionNames().elements();

        while (sessionNames.hasMoreElements()) {
            // Register the sessions
            String sessionName = (String)sessionNames.nextElement();
            sessionBroker.registerSession(sessionName, (AbstractSession)m_sessions.get(sessionName));
        }

        // Process the common elements in SessionConfig
        processSessionConfig(sessionBrokerConfig, sessionBroker);

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.