db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Monroe" <Greg.Mon...@DukeCE.com>
Subject RE: Number of Max Active Connections
Date Thu, 12 Jan 2006 16:03:16 GMT
The SharedPoolDataSourceFactory is basically a 
wrapper for the common.dbcp/pool, etc. packages.  
As such all the settings are simply to define the
rules that dbcp/pool's Connection caching will 
operate with.

AFAIK, dbcp/pool does not contain any support for
changing any SQL server or other environment settings.  

FWIW, this means that you can have an connection 
object in the JVM memory space that has had it's TCP 
server connection closed by the SQL server's timeout
rules.   Or, if maxactive is higher than the allowed
server connections, you may have either exceptions 
or queueing issues as connections in the Java pool 
compete for server connectins.

What happens in these cases is dependent on the JDBC
driver you are using.  Some of them will automatically
re-open closed connections or wait in queue to get
a connection.  Some (especially older drivers) will 
do some nasty things.

A couple setting that helps with some of these 
conditions (but adds a little overhead) are:

  torque.dsfactory.default.pool.testOnBorrow=true
  torque.dsfactory.default.pool.validationQuery=SELECT 1

Which causes a SELECT 1 query to be issued when a 
connection object is checked out of the pool.  This 
quick query is used to determine if the connection 
needs to be re-opened or not.

Finally, you mention WebSphere settings.  I don't use
this but I would guess that these are setting for 
using connections from it's JNDI pool.  The Torque
SharedPoolDataSourceFactory uses native connection
objects and does not get them from JNDI.  (but there
is a JndiDataSourceFactory if you want to use that 
method...)

Hope this helps.

Greg


> -----Original Message-----
> From: Jim Caserta
> 
> Thanks Tom,
> 
> Do the settings for: 
> torque.defaults.pool.timeBetweenEvictionRunsMillis=
> 300000
> torque.defaults.pool.minEvictableIdleTimeMillis =
> 3600000
> 
> override the defaults set on the server or in
> Websphere for connections?
> 
> Thanks!
> Jim
> 
> 
> --- Thomas Fischer <fischer@seitenbau.net> wrote:
> 
> > 
> > 
> > 
> > 
> > Most probable, the limit is the number of open
> > connections the databased
> > can accept server is limited. This may either be a
> > setting in the database,
> > or also the number of maximum open connections the
> > operating system the
> > server runs on accepts. But in most cases, the limit
> > you will see is the
> > number of open connections the database accepts
> > 
> >           Thomas
> > 
> > Jim Caserta <smoothie_jc@yahoo.com> schrieb am
> > 11.01.2006 14:22:20:
> > 
> > > If I'm using the SharedPoolDataSourceFactory for
> > DB2
> > > in version 3.2 RC-2, is the
> > > torque.defaults.pool.maxActive setting limited any
> > set
> > > nummber?
> > > Possibly to whatever limit set by the DBA's in a corporation?
> > >
> > > Thank You,
> > > Jim
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Tired of spam?  Yahoo! Mail has the best spam
> > protection around
> > > http://mail.yahoo.com
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > 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
> > 
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
> 
> 

Duke CE Privacy Statement
Please be advised that this e-mail and any files transmitted with it are confidential communication
or may otherwise be privileged or confidential and are intended solely for the individual
or entity to whom they are addressed.  If you are not the intended recipient you may not rely
on the contents of this email or any attachments, and we ask that you  please not read, copy
or retransmit this communication, but reply to the sender and destroy the email, its contents,
and all copies thereof immediately.  Any unauthorized dissemination, distribution or copying
of this communication is strictly prohibited.



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


Mime
View raw message