Re: How to find JDBC Driver class in a bundle?

2011-05-23 Thread Justin Edelson
You should never use Class.forName(). See http://blog.bjhargrave.com/2007/09/classforname-caches-defined-class-in.html Justin On Mon, May 23, 2011 at 12:15 PM, jie yan wrote: > With the help of some engineers in Karaf forum, I've wrapped an Oracle > driver bundle. > > But I can't find the suitab

Re: How to find JDBC Driver class in a bundle?

2011-05-23 Thread Guillaume Nodet
You should have a look at the OSGi Enterprise specifications that has a whole chapter targetted at using JDBC inside OSGi. See http://www.osgi.org/Download/File?url=/download/r4v42/r4.enterprise.pdf On Mon, May 23, 2011 at 18:15, jie yan wrote: > With the help of some engineers in Karaf forum, I'

How to find JDBC Driver class in a bundle?

2011-05-23 Thread jie yan
With the help of some engineers in Karaf forum, I've wrapped an Oracle driver bundle. But I can't find the suitable way to create a JDBC driver in my Oracle client bundle. Attempt 1: 1) oracle.jdbc 2) Class.forName("oracle.jdbc.OracleDriver"); Failed. Attempt 2: 1) oracle.jdbc 2) static{ Driver