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.
> I need to be able to dynamically instruct Derby's DataSource to
> provide a connection to a particular database, with particular
> 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.
> resin-interest mailing list
resin-interest mailing list