You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by John Dunne <jd...@dbamsystems.com> on 2005/12/23 15:59:46 UTC

Getting number of DB connections torque currently has

Hello All,

Is there any way to get hold of the number of connections that Torque 
currently has open to a particular database.... From what I can see, I 
need to get hold of the relevant DataSource object (SharedDataSource). 
Anyone know how I can get hold of this object???

Thanks in advance.
John.

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


RE: Getting number of DB connections torque currently has

Posted by Thomas Fischer <fi...@seitenbau.net>.



Hi,

in the current Torque API, there is no way to get the Connection pool. I
would guess this is an anti-feature.

If you are ready to patch Torque, you can change the relevant methods in
TorqueInstance to public. If not, only a hack comes to my mind: Configure
the pool in JNDI, use the JndiDataSource to get hold of the pool in Torque,
and use also JNDI to get the pool for asking it for its connections.

    Thomas

John Dunne <jd...@dbamsystems.com> schrieb am 23.12.2005 15:59:46:

> Hello All,
>
> Is there any way to get hold of the number of connections that Torque
> currently has open to a particular database.... From what I can see, I
> need to get hold of the relevant DataSource object (SharedDataSource).
> Anyone know how I can get hold of this object???
>
> Thanks in advance.
> John.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>


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