Package org.springframework.jdbc.datasource

Examples of org.springframework.jdbc.datasource.SimpleConnectionHandle


    AbstractSession session = (AbstractSession) getSession(em);
    // The connection was already acquired eagerly in beginTransaction,
    // unless lazyDatabaseTransaction was set to true.
    Connection con = session.getAccessor().getConnection();
    return (con != null ? new SimpleConnectionHandle(con) : null);
  }
View Full Code Here


  public ConnectionHandle getJdbcConnection(EntityManager entityManager, boolean readOnly)
      throws PersistenceException, SQLException {

    Session session = getSession(entityManager);
    Connection con = session.connection();
    return (con != null ? new SimpleConnectionHandle(con) : null);
  }
View Full Code Here

    AbstractSession session = (AbstractSession) getSession(em);
    // The connection was already acquired eagerly in beginTransaction,
    // unless lazyDatabaseTransaction was set to true.
    Connection con = session.getAccessor().getConnection();
    return (con != null ? new SimpleConnectionHandle(con) : null);
  }
View Full Code Here

    AbstractSession session = (AbstractSession) getSession(em);
    // The connection was already acquired eagerly in beginTransaction,
    // unless lazyDatabaseTransaction was set to true.
    Connection con = session.getAccessor().getConnection();
    return (con != null ? new SimpleConnectionHandle(con) : null);
  }
View Full Code Here

  @Override
  public ConnectionHandle getJdbcConnection(EntityManager entityManager, boolean readOnly)
      throws PersistenceException, SQLException {

    Connection connection = (Connection) getOpenJPAEntityManager(entityManager).getConnection();
    return new SimpleConnectionHandle(connection);
  }
View Full Code Here

  public ConnectionHandle getJdbcConnection(EntityManager entityManager, boolean readOnly)
      throws PersistenceException, SQLException {

    Session session = getSession(entityManager);
    Connection con = session.connection();
    return (con != null ? new SimpleConnectionHandle(con) : null);
  }
View Full Code Here

  public ConnectionHandle getJdbcConnection(EntityManager entityManager, boolean readOnly)
      throws PersistenceException, SQLException {

    Session session = getSession(entityManager);
    Connection con = session.connection();
    return (con != null ? new SimpleConnectionHandle(con) : null);
  }
View Full Code Here

    AbstractSession session = (AbstractSession) getSession(em);
    // The connection was already acquired eagerly in beginTransaction,
    // unless lazyDatabaseTransaction was set to true.
    Connection con = session.getAccessor().getConnection();
    return (con != null ? new SimpleConnectionHandle(con) : null);
  }
View Full Code Here

    final DataSource ds = (DataSource) dsControl.getMock();
    MockControl dialectControl = MockControl.createControl(JdoDialect.class);
    JdoDialect dialect = (JdoDialect) dialectControl.getMock();
    MockControl conControl = MockControl.createControl(Connection.class);
    final Connection con = (Connection) conControl.getMock();
    ConnectionHandle conHandle = new SimpleConnectionHandle(con);

    pmf.getPersistenceManager();
    pmfControl.setReturnValue(pm, 1);
    pm.currentTransaction();
    pmControl.setReturnValue(tx, 3);
View Full Code Here

    final DataSource ds = (DataSource) dsControl.getMock();
    MockControl dialectControl = MockControl.createControl(JdoDialect.class);
    JdoDialect dialect = (JdoDialect) dialectControl.getMock();
    MockControl conControl = MockControl.createControl(Connection.class);
    final Connection con = (Connection) conControl.getMock();
    ConnectionHandle conHandle = new SimpleConnectionHandle(con);

    pmfControl.reset();
    pmf.getConnectionFactory();
    pmfControl.setReturnValue(ds, 2);
    con.getMetaData();
View Full Code Here

TOP

Related Classes of org.springframework.jdbc.datasource.SimpleConnectionHandle

Copyright © 2018 www.massapicom. 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.