commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pramodh Peddi" <>
Subject [dbcp] use of BasicDataSourceFactory.createDataSource(Properties)
Date Wed, 22 Jun 2005 20:26:40 GMT
Hi DBCP experts,


Is anyone using BasicDataSourceFactory.createDataSource(Properties) to
create a BasicDataSource object (using version 1.2)? I have not yet used
this, but I desire to use this. I can see few 'issues' when I use it:


*	Every time BasicDataSource is created, we need to create a
Properties object. Is this not going to be a performance hit?
*	To avoid the above performance hit, is it ok if I cache
BasicDataSource (make it static variable) and re-use it every time
connection is borrowed from pool.
*	If BasicDataSource caching is ok, do read-only methods like
getNumIdle() and getNumActive() return the right values?
*	Do I still need to define the Resource (<Resource
name="jdbc/ImprivataDB" auth="Container" type="javax.sql.DataSource"/>)
in server.xml and web.xml?
*	Are there any examples around which uses
BasicDataSourceFactory.createDataSource(Properties) to create


Thanks in advance for the answers, 




  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message