commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Zoetebier <john.zoeteb...@transparent.co.nz>
Subject [DBCP] Are connection properties reset when returning to pool ?
Date Sat, 29 Nov 2003 22:46:11 GMT
Does DBCP reset properties like AutoCommit ?

For example a class with 2 methods:
public void ClientDataModel readClient() {
	conn = DriverManager.getConnection(Constants.JDBC_URL);
	// Do I have to set AutoCommit explitly here ?
	conn.setAutoCommit(true);	// No transaction
	...
	conn.close()
}

public void void updateClient(ClientDataModel) {
	conn = DriverManager.getConnection(Constants.JDBC_URL);
	// Do I have to set AutoCommit explitly here ?
	conn.setAutoCommit(false);	// Run in transaction mode
	...
	conn.close()
}

Assume that I have only 1 connection in the pool.
After connection has been closed in a method, is it returned to the next 
method like it was set in the previous method ?

-- 
John Zoetebier
Web site: http://www.transparent.co.nz

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message