i’m been provided with a jar i should integrate into my web application, to call some third party functionalities. This jar exposes some static methods that have (among others) two java.sql.connection parameters , the first to connect to Oracle the latter to connect to db2 . Now searching around i’m not been able to find any example about using a single jdbc driver (i.e. oracle ojdbc ) to connect to both kind of db, so i desume i’ll have to put both drivers (db2 and Oracle) in the classpath and pass to the jar a connection built from each one. Doesn’t connection classes will conflict ? aren’t both of them in the same java.sql namespace ?
This is the first time i need to connect to two different db at the same time , where can i find some example ?
Please note that i need to build two Connection objects and pass them to a (static) method.
Do you think i should synchronize methods that use this jar ?
i’m been provided with a jar i should integrate into my web application, to
Share
The class names of Oracle and DB2 JDBC drivers are different, so you will be fine.