yes. it is based on commons-pool which gives it a few more features than are available from torque's pool which is based on a simple Stack.
the connection pool the ability to validate connections when handed out, when returned, or in a separate thread as a process that occurs while connections are sitting idle. The pool can shrink, if too many connections are sitting idle. In normal torque usage you only use one user per db, but Jdbc2PoolDataSource can support multiple users sharing a single maximum number of connections which can be useful in an application where each user is given a unique username to the db. In Jdbc2Pool as well as TorqueClassicDataSource, you can set individual maximum limits on per user connections. Could be useful in the case where you have an admin username, normal, and read-only username, and you want to limit the number separately. So you could for example ensure that a high load did not remove the ability for the admin to access the db. It is my opinion that any further features be added to Jdbc2PoolDataSource and TorqueClassicDataSource be eventually removed once Jdbc2PoolDataSource has been better tested. john mcnally On Mon, 2002-06-03 at 17:47, Daniel Rall wrote: > Did you write the code backing Jdbc2PoolDataSourceFactory from > scratch? > > John McNally <[EMAIL PROTECTED]> writes: > > > No. that one uses object pools from commons-pool. The one that is > > based on the old code is TorqueDataSourceFactory. > > > > john mcnally > > > > On Mon, 2002-06-03 at 16:19, Daniel Rall wrote: > > > John McNally <[EMAIL PROTECTED]> writes: > >> > >> > Yes. I moved the jndi stuff into a "factory" implementation and then > >> > created a couple more implementations that are a bit easier to > >> > configure. One is the updated "classic" torque pool. The other is the > >> > one James shows below. > >> > > >> > If you have some other pool or you do not want to use properties to set > >> > up the pool, you could just write a custom factory that initialized your > >> > pool in whatever way you want. > >> > >> Is the Jdbc2PoolDataSourceFactory the refactored classic pool which > >> moved into the Commons? If so, I'd probably like to use that. > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
