On Aug 4, 2007, at 3:40 PM, Geoff hendrey wrote:

> Hi there,
>
> I've got an interesting database pooling need. I have multiple  
> databases, each with a different URL which is determined  
> dynamically at runtime. Therefore, I cannot provide these URL (or  
> associated database info) at configuration time.

There's is a com.caucho.sql.DatabaseManager class that you could  
use.  The findDatabase(String driver, String url) would return a  
different DataSource for each URL.

-- Scott
>
> I need to be able to dynamically instruct Derby's DataSource to  
> provide a connection to a particular database, with particular  
> parameters.
>
> On Jetty web server, I cast the DataSource to a  
> org.apache.derby.jdbc.ClientConnectionPoolDataSource and I can then  
> call methods on that class to point it at the right database.
>
> However, on resin, the DataSource returned to me is the DBPool.  
> What I need is some way to get at the underlying  
> ClientConnectionPoolDataSource and call methods on it. I was  
> looking at the JDK 6/JDBC 4 Wrapper class as a possible way to get  
> at the underlying DataSource implementation, but I don't kow if  
> that's the rght aproach, or if Resin even supports it.
>
> If I use a standard non-pooled  
> org.apache.derby.jdbc.ClientDataSource then I don't have this  
> problem since Resin just returns the ClientDataSource as expected.  
> But then I don't get pooling, which I need. Please advise.
>
> -geoff
>
>
>
>
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest



_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to