About jdbc drivers difference
1 posts in topic
Flat View  Flat View

Posted By:   manisha_vandara
Posted On:   Wednesday, June 8, 2005 08:36 AM

what is the difference between type-2 and type-4 driver?why we can't use type-2 inplace of type-4?

Re: About jdbc drivers difference

Posted By:   Christopher_Koenigsberg  
Posted On:   Wednesday, June 8, 2005 12:30 PM

"type-2" means that there is some installation required, before the driver can be used, of native code libraries (compiled C code etc.) on the client machine. (the library files have to be in the LD_LIBRARY_PATH for Unix, PATH for Windows, versions have to match what was linked, etc.)

Once you have installed the type 2 driver's libraries on the client machine, you can use the type 2 driver instead of the type 4 driver, no problem.

In fact sometimes the type 2 driver is more capable (some known bugs in the old "classes12" Oracle type4 driver re CLOB's do not show up, in the equivalent type 2 "OCI" driver). The type 2 drivers used to run a lot faster than type 4 drivers, because they were executing compiled code rather than Java bytecode, though this may not be true anymore. with JIT compiling, improvements in JVM's etc.? (plus the speed of execution, of code in the driver itself, may just be irrelevant overall to an application, since the time spent waiting for the database's response will greatly overshadow any speed difference in the driver's own execution, by orders of magnitude)

But to continue using the type 2 driver you have to maintain the installation of the native libraries, on the client machine.
About | Sitemap | Contact