can you please give me the name of such a driver ?
JDBC driver
Type 2: Native -API Partly - Java Driver
Type 2 drivers are developed using native code libraries, which were originally designed for accessing the database through C/C++. Here a thin code of Java wrap around the native code and converts JDBC commands to DBMS-specific native calls.
can you please give me the name of such a driver ?
I have no idea what it's good for, but:com.ibm.db2.jcc.DB2ConnectionPoolDataSource(I think)
What do you mean by name? For what database? Why do you need the information? You shouldn't use a type 2 driver unless you really need one.
kajbja at 2007-7-14 23:30:12 >

Oracle has a type 2 driver named JDBC OCI.Kaj
kajbja at 2007-7-14 23:30:12 >

> drivers are developed using native code libraries
so, these drivers are built upon C/C++
>Here a thin code of Java wrap around the native code
thin code !!! .....whats that ?are they referring to JNI kind of things here ? please explain a bit here.
>Oracle has a type 2 driver named JDBC OCI.
Oracle has all 4 types of driver ....right ? but Type 4 is the latest ...right ?
>You shouldn't use a type 2 driver
which driver should be used ? Type 4 ?
well, the TYPE 4 says ...
Type 4: Native-Protocol Pure Java Driver
Type 4 drivers are entirely written in Java that communicate directly with vendor's database through socket connection. Here no translation or middleware layer, are required which improves performance tremendously.
is this the best ? i see its in pure java driver ....fine....but they also say Here no translation or middleware layer ......what kind of middleware they are worried about actually....some example please.
> > drivers are developed using native code libraries
>
> so, these drivers are built upon C/C++
..Or any other language which can be compiled to native code. Language doesn't matter.
>
> >Here a thin code of Java wrap around the native
> code
>
> thin code !!! .....whats that ?are they referring
> to JNI kind of things here ? please explain a bit
> here.
Yes. JNI is probably involved, but it isn't a requirement.
>
> >Oracle has a type 2 driver named JDBC OCI.
>
> Oracle has all 4 types of driver ....right ? but Type
> 4 is the latest ...right ?
I don't know. There are probably all types of drivers for Oracle, but I don't know if Oracle has developed them all. (And it doesn't matter)
>
> >You shouldn't use a type 2 driver
>
> which driver should be used ? Type 4 ?
Correct.
> Here no translation
> or middleware layer ......what kind of middleware
> they are worried about actually....some example
> please.
They are referring to the native code used by a type 2 driver.
Kaj
kajbja at 2007-7-14 23:30:12 >

> so, these drivers are built upon C/C++
It's not unlikely, but why is "native code" C/C++? It could as well be COBOL. It's *native* code. It's compiled, that's all you can tell.
> thin code !!! .....whats that ?are they referring
> to JNI kind of things here ? please explain a bit
> here.
They just mean that the wrapper doesn't do much except forwarding the Java calls to the native libs.
> Oracle has all 4 types of driver ....right ? but Type
> 4 is the latest ...right ?
Wrong. They're just different types.
> which driver should be used ? Type 4 ?
Yepp, it's preferable. Non-native code won't crash badly and kill your app server, and the lack of native calls make it faster.
> is this the best ? i see its in pure java driver
> ....fine....but they also say Here no translation
> or middleware layer ......what kind of middleware
> they are worried about actually....some example
> please.
Those JNI layers the Type 2 drivers use.
Thanks for the response.
> > so, these drivers are built upon C/C++
>
> It's not unlikely, but why is "native code" C/C++?
i assumed C/C++ as native because windows,linux are built upon C/C++
>It
> could as well be COBOL. It's *native* code.
so COBOL is a native code ? COBOL is used in making OS ? how about FORTRAN,PASCAL ? are these also native code ?
so, does native implies non-java in broader sense ?
>It's
> compiled, that's all you can tell.
ok ....so you mean any non-java language which is compilable is a native code .
It *need* not have to have any relationship with OS ?
> > thin code !!! .....whats that ?are they
> referring
> > to JNI kind of things here ? please explain a bit
> > here.
>
> They just mean that the wrapper doesn't do much
> except forwarding the Java calls to the native libs.
>
> > Oracle has all 4 types of driver ....right ? but
> Type
> > 4 is the latest ...right ?
>
> Wrong. They're just different types.
>
> > which driver should be used ? Type 4 ?
>
> Yepp, it's preferable. Non-native code won't crash
> badly and kill your app server, and the lack of
> native calls make it faster.
>
> > is this the best ? i see its in pure java driver
> > ....fine....but they also say Here no
> translation
> > or middleware layer ......what kind of
> middleware
> > they are worried about actually....some example
> > please.
>
> Those JNI layers the Type 2 drivers use.
rest is fine.
Message was edited by:
Unknown_Citizen
> i assumed C/C++ as native because windows,linux
> are built upon C/C++
It doesn't matter in which language the OS is written. You can create exe and dll files in many languages, e.g. Assembler, C#, Pascal, C, C++, etc etc
> so, does native implies non-java in broader sense ?
No, it means anything which can be compiled into exe or dll if we are talking about windows.
Kaj
kajbja at 2007-7-14 23:30:12 >

> so COBOL is a native code ?
Native code is native code. Machine instructions. Even C is not "native code".
> COBOL is used in making OS ?
What does that have to do with a COBOL compiliation becoming native code?
> how about FORTRAN,PASCAL ? are these also native
> code ?
See above. C code is C code. If you compile it, it becomes native.
> so, does native implies non-java in broader sense ?
It just implies "code a platform can execute". Java code is compiled to native code, too.
> ok ....so you mean any non-java language which is
> compilable is a native code .
No.
> It *need* not have to have any relationship with
> OS ?
The OS will be able to execute that code. That's the relationship.