This won't answer the question, but what about registering a DataSource in
the OSGi registry and use it instead ?
That way, you could easily create a bundle that will import the needed
package from your JDBC driver, create the DataSource and register it in
OSGi...

I guess your problem comes from the fact that the DriverManager is provided
by the System bundle, so I doubt you could even use the dynamic import
package thingy.  But I guess the problem is the same for XML parsers and
all, so there must be a solution to that.

On Dec 19, 2007 10:58 AM, Damian Gołda <[EMAIL PROTECTED]> wrote:

> I have question, not regarding OPS4J but you are OSGi experts ...
>
> In many libraries, especially providing database connection pools,
> there is used DriverManager for instantiation of JDBC Driver.
> I can't  force DriverManager to work in OSGi - it always cannot find
> class with driver. I've looked in its source code and find weird way
> to find "correct" classloader, which actually is unuseful, because
> doesn't use bundle classloader or context classloader.
>
> Do you have any solutions, how to solve that problem?
> Only solution working for me is to modify source code of connection
> pool, to not use DriverManager. But I hate it...
> I try to use C3P0.
> --
> Damian
>
> _______________________________________________
> general mailing list
> [email protected]
> http://lists.ops4j.org/mailman/listinfo/general
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to