Mantis - Resin
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
1932 | minor | always | 08-07-07 08:56 | 11-05-07 14:55 | |
|
|||||
Reporter: | ferg | Platform: | |||
Assigned To: | ferg | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | |||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 3.1.4 | ||
|
|||||
Summary: | 0001932: DataSource casting | ||||
Description: |
(rep by Geoff Hendry) 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. 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. |
||||
Steps To Reproduce: | |||||
Additional Information: | |||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|