Package org.springframework.jdbc.datasource

Examples of org.springframework.jdbc.datasource.ConnectionHolder


    JpaTransactionObject txObject = (JpaTransactionObject) transaction;
    txObject.setEntityManagerHolder(null, false);
    EntityManagerHolder entityManagerHolder = (EntityManagerHolder)
        TransactionSynchronizationManager.unbindResource(getEntityManagerFactory());
    txObject.setConnectionHolder(null);
    ConnectionHolder connectionHolder = null;
    if (getDataSource() != null && TransactionSynchronizationManager.hasResource(getDataSource())) {
      connectionHolder = (ConnectionHolder) TransactionSynchronizationManager.unbindResource(getDataSource());
    }
    return new SuspendedResourcesHolder(entityManagerHolder, connectionHolder);
  }
View Full Code Here


        });
    }

    @Override
    public boolean hasActiveTransaction() {
        ConnectionHolder conHolder = (ConnectionHolder) TransactionSynchronizationManager.getResource(dataSource);
        return conHolder != null && (conHolder.getConnectionHandle() != null || conHolder.isSynchronizedWithTransaction());
    }
View Full Code Here

TOP

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

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.