Package org.springframework.jdbc.datasource

Examples of org.springframework.jdbc.datasource.ConnectionHandle


        txObject.getEntityManagerHolder().setTimeoutInSeconds(timeout);
      }

      // Register the JPA EntityManager's JDBC Connection for the DataSource, if set.
      if (getDataSource() != null) {
        ConnectionHandle conHandle = getJpaDialect().getJdbcConnection(em, definition.isReadOnly());
        if (conHandle != null) {
          ConnectionHolder conHolder = new ConnectionHolder(conHandle);
          if (timeout != TransactionDefinition.TIMEOUT_DEFAULT) {
            conHolder.setTimeoutInSeconds(timeout);
          }
View Full Code Here


        txObject.getEntityManagerHolder().setTimeoutInSeconds(timeout);
      }

      // Register the JPA EntityManager's JDBC Connection for the DataSource, if set.
      if (getDataSource() != null) {
        ConnectionHandle conHandle = getJpaDialect().getJdbcConnection(em, definition.isReadOnly());
        if (conHandle != null) {
          ConnectionHolder conHolder = new ConnectionHolder(conHandle);
          if (timeout != TransactionDefinition.TIMEOUT_DEFAULT) {
            conHolder.setTimeoutInSeconds(timeout);
          }
View Full Code Here

        txObject.getEntityManagerHolder().setTimeoutInSeconds(timeoutToUse);
      }

      // Register the JPA EntityManager's JDBC Connection for the DataSource, if set.
      if (getDataSource() != null) {
        ConnectionHandle conHandle = getJpaDialect().getJdbcConnection(em, definition.isReadOnly());
        if (conHandle != null) {
          ConnectionHolder conHolder = new ConnectionHolder(conHandle);
          if (timeoutToUse != TransactionDefinition.TIMEOUT_DEFAULT) {
            conHolder.setTimeoutInSeconds(timeoutToUse);
          }
View Full Code Here

        txObject.getPersistenceManagerHolder().setTimeoutInSeconds(timeout);
      }

      // Register the JDO PersistenceManager's JDBC Connection for the DataSource, if set.
      if (getDataSource() != null) {
        ConnectionHandle conHandle = getJdoDialect().getJdbcConnection(pm, definition.isReadOnly());
        if (conHandle != null) {
          ConnectionHolder conHolder = new ConnectionHolder(conHandle);
          if (timeout != TransactionDefinition.TIMEOUT_DEFAULT) {
            conHolder.setTimeoutInSeconds(timeout);
          }
View Full Code Here

        txObject.getPersistenceManagerHolder().setTimeoutInSeconds(timeout);
      }

      // Register the JDO PersistenceManager's JDBC Connection for the DataSource, if set.
      if (getDataSource() != null) {
        ConnectionHandle conHandle = getJdoDialect().getJdbcConnection(pm, definition.isReadOnly());
        if (conHandle != null) {
          ConnectionHolder conHolder = new ConnectionHolder(conHandle);
          if (timeout != TransactionDefinition.TIMEOUT_DEFAULT) {
            conHolder.setTimeoutInSeconds(timeout);
          }
View Full Code Here

        txObject.getEntityManagerHolder().setTimeoutInSeconds(timeout);
      }

      // Register the JPA EntityManager's JDBC Connection for the DataSource, if set.
      if (getDataSource() != null) {
        ConnectionHandle conHandle = getJpaDialect().getJdbcConnection(em, definition.isReadOnly());
        if (conHandle != null) {
          ConnectionHolder conHolder = new ConnectionHolder(conHandle);
          if (timeout != TransactionDefinition.TIMEOUT_DEFAULT) {
            conHolder.setTimeoutInSeconds(timeout);
          }
View Full Code Here

        txObject.getPersistenceManagerHolder().setTimeoutInSeconds(timeout);
      }

      // Register the JDO PersistenceManager's JDBC Connection for the DataSource, if set.
      if (getDataSource() != null) {
        ConnectionHandle conHandle = getJdoDialect().getJdbcConnection(pm, definition.isReadOnly());
        if (conHandle != null) {
          ConnectionHolder conHolder = new ConnectionHolder(conHandle);
          if (timeout != TransactionDefinition.TIMEOUT_DEFAULT) {
            conHolder.setTimeoutInSeconds(timeout);
          }
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

    conControl.setVoidCallable(1);
    final TransactionTemplate tt = new TransactionTemplate();
    tt.setPropagationBehavior(TransactionDefinition.PROPAGATION_NESTED);
    dialect.beginTransaction(tx, tt);
    dialectControl.setReturnValue(null, 1);
    ConnectionHandle conHandle = new SimpleConnectionHandle(con);
    dialect.getJdbcConnection(pm, false);
    dialectControl.setReturnValue(conHandle, 1);
    dialect.releaseJdbcConnection(conHandle, pm);
    dialectControl.setVoidCallable(1);
    dialect.cleanupTransaction(null);
View Full Code Here

TOP

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

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.