I have a web based application Turbine/Torque using dbcp for connection pooling. Torque maintains a pool of database connections all logged into the database under the same id. I also need to implement functionality on the database that requires me to "initialize" the connection by calling a stored procedure on it before it is returned from the pool. I also need to do some cleanup work when the connection is returned to the pool.
Is this sort of functionality currently available in dbcp? If not, where would be the best place to implement it? I was thinking about a "listener" type class that could be configured for the pool. This listener class would implement methods that would be called just before the connection is return and when it is returned. The connection would be passed as a parameter to the method call. If the listener is not cofigured for the pool, nothing happens. It would also make sense to have methods that are called when a physical connection is created to the database and one called when a physical connection is destroyed. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
