Hi, >That is a good question. In the past, the datasource classes overrode the >close() method to mean "put it back" instead of an actual close. I'm not >sure in this case because the close() method in the >org.apache.commons.dbcp.BasicDataSource means "Close and release all >connections that are currently stored in the connection pool associated >with >our data source."
It's not a particularly good question IMHO, it's trivial: call getConnection to get the connection, call close to close it. You're not calling close on the data source, you're calling close on the connection. The connection is a PooledConnetion overriding java.sql.Connection close() implementation with a return to the Pool. It's really fairly trivial, well-documented both in the javax.sql docs and the DBCP documentation. If you don't call close, then you have an abandoned connection from the point of view of the pool. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
