Re: tomcat-jdbc: correct way to create a new separated org.apache.tomcat.jdbc.pool.DataSource from another one

2012-08-09 Thread Germán Ferrari
On Wed, Aug 8, 2012 at 4:08 PM, Germán Ferrari wrote: > On Wed, Aug 8, 2012 at 3:11 PM, Martin Gainty wrote: > >> >> the test\java\org\apache\tomcat\jdbc\test\DefaulCase.java TC >> builds the properties... then calls >> BasicDataSourceFactory.createDataSource(p)

Re: tomcat-jdbc: correct way to create a new separated org.apache.tomcat.jdbc.pool.DataSource from another one

2012-08-08 Thread Germán Ferrari
le. Should I report a bug? Regards, Germán > > > From: german.ferr...@gmail.com > > Date: Wed, 8 Aug 2012 14:20:22 -0300 > > Subject: Re: tomcat-jdbc: correct way to create a new separated > org.apache.tomcat.jdbc.pool.DataSource from another one > > To: users@tomcat.apache.org > > > > On

Re: tomcat-jdbc: correct way to create a new separated org.apache.tomcat.jdbc.pool.DataSource from another one

2012-08-08 Thread Germán Ferrari
On Wed, Aug 8, 2012 at 2:12 PM, Germán Ferrari wrote: > > (...) > > For the moment I think I have three options: > 1. Change some interfaces to receive a Properties object with the pool > configuration and use the suggestion given by Daniel > 2. Cast the return of DataSou

Re: tomcat-jdbc: correct way to create a new separated org.apache.tomcat.jdbc.pool.DataSource from another one

2012-08-08 Thread Germán Ferrari
On Wed, Aug 8, 2012 at 12:15 PM, Martin Gainty wrote: > > what I was thinking is manipulating maxActive via > org.apache.commons.dbcp.datasources.SharedPoolDataSource > http://commons.apache.org/dbcp/apidocs/index.html > > Can you give me an example of how the code would look like? > unless you

Re: tomcat-jdbc: correct way to create a new separated org.apache.tomcat.jdbc.pool.DataSource from another one

2012-08-08 Thread Germán Ferrari
Hello, On Wed, Aug 8, 2012 at 9:19 AM, Daniel Mikusa wrote: > > (...) > > > > Have you looked at the method "parsePoolProperties" on the > DataSourceFactory class? > > public static PoolConfiguration parsePoolProperties(Properties > properties) > > You could load your configuration into a Prop

Re: tomcat-jdbc: correct way to create a new separated org.apache.tomcat.jdbc.pool.DataSource from another one

2012-08-08 Thread Germán Ferrari
Hello, On Tue, Aug 7, 2012 at 9:36 PM, Martin Gainty wrote: > > Germán > > Is there a reason why you would not use > org.apache.commons.dbcp.datasources.SharedPoolDataSource from DBCP 1.4 > http://commons.apache.org/dbcp/apidocs/index.html ? For what I've looked in the javadoc of that class,

tomcat-jdbc: correct way to create a new separated org.apache.tomcat.jdbc.pool.DataSource from another one

2012-08-07 Thread Germán Ferrari
Hello. I have an use case in which I would want to copy an `org.apache.tomcat.jdbc.pool.DataSource`, to have two disjoint connection pools, with some pool properties changed. My first thought was to do something like this: PoolProperties props = new PoolProperties(baseDataSource.getPoolPropertie