public class C3P0DataSourceConnectionProvider extends Object implements org.hibernate.connection.ConnectionProvider
DataSource
.Constructor and Description |
---|
C3P0DataSourceConnectionProvider() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close all data sources
|
void |
closeConnection(Connection con) |
void |
configure(Properties props) |
protected DataSource |
createDataSource()
Create the DataSource from which the connections should be retrieved.
|
Connection |
getConnection() |
protected DataSource |
getDataSource()
Get the datasource for the client
|
protected DataSource |
postDataSourceCreation(DataSource dataSource)
Method that is called after DataSource creation to allow further modifications of the
DataSource.
|
boolean |
supportsAggressiveRelease() |
public void close()
close
in interface org.hibernate.connection.ConnectionProvider
public void closeConnection(Connection con) throws SQLException
closeConnection
in interface org.hibernate.connection.ConnectionProvider
SQLException
public void configure(Properties props) throws org.hibernate.HibernateException
configure
in interface org.hibernate.connection.ConnectionProvider
org.hibernate.HibernateException
protected DataSource createDataSource() throws SQLException, PropertyVetoException
postDataSourceCreation(DataSource)
. The result of that method will be returned.SQLException
- in case of an errorPropertyVetoException
- in case of an errorpublic Connection getConnection() throws SQLException
getConnection
in interface org.hibernate.connection.ConnectionProvider
SQLException
protected DataSource getDataSource() throws SQLException
SQLException
- in case the datasource could not be createdprotected DataSource postDataSourceCreation(DataSource dataSource)
dataSource
- the DataSource that was just createdpublic boolean supportsAggressiveRelease()
supportsAggressiveRelease
in interface org.hibernate.connection.ConnectionProvider
Copyright © 2019 Communote team. All rights reserved.