Code example for Connection

Methods: getAutoCommitsetAutoCommitsetTransactionIsolation

0
 
	private static final Log log = LogFactory.getLog(C3P0ConnectionProvider.class);
 
	public Connection getConnection() throws SQLException {
		final Connection c = ds.getConnection();
		if (isolation!=null) c.setTransactionIsolation( isolation.intValue() );
		if ( c.getAutoCommit()!=autocommit ) c.setAutoCommit(autocommit);
		return c;
	} 
 
	public void closeConnection(Connection conn) throws SQLException {
		conn.close();
	} 
 
	public void configure(Properties props) throws HibernateException {
		String jdbcDriverClass = props.getProperty(Environment.DRIVER);
		String jdbcUrl = props.getProperty(Environment.URL);
		Properties connectionProps = ConnectionProviderFactory.getConnectionProperties(props);
 
		log.info( "C3P0 using driver: " + jdbcDriverClass + " at URL: " + jdbcUrl );
Stop searching for code, let great code find you!  Add Codota to your java IDE