public class LocalDataSourceConnectionProvider implements ConnectionProvider(Code)
Hibernate connection provider for local DataSource instances
in an application context. This provider will be used if
LocalSessionFactoryBean's "dataSource" property is set.
author: Juergen Hoeller since: 1.2 See Also:LocalSessionFactoryBean.setDataSource
Method Summary
public void
close() This implementation does nothing:
We're dealing with an externally managed DataSource.
supportsAggressiveRelease() This implementation returns false: We cannot guarantee
to receive the same Connection within a transaction, not even when
dealing with a JNDI DataSource.
Return the DataSource to use for retrieving Connections.
This implementation returns the passed-in DataSource as-is.
Parameters: originalDataSource - the DataSource as configured by the useron LocalSessionFactoryBean the DataSource to actually retrieve Connections from(potentially wrapped) See Also:LocalSessionFactoryBean.setDataSource
This implementation returns false: We cannot guarantee
to receive the same Connection within a transaction, not even when
dealing with a JNDI DataSource.