Hi Bill,

I've been running DB2 on Linux, with lots of Java applications since
DB2 for Linux came out ~2 years ago. Here are some data points WRT the
app vs. net Java drivers:

Both drivers have an identical interface, however the connection path
for each is very different. 

>From the client side of things:

The app driver is a very thin wrapper that makes calls to local native
methods on the client machine. It requires that you've cataloged a
database on the client machine, and will use a connection URL that looks
something like jdbc:db2:MYDB.

The net driver is a complete Java implementation that does not require
any DB2 code on the client machine, other than the driver itself. In this
case, a connection URL looks something like: jdbc:db2://host:6789/MYDB.

On the server side of things:

If you are only using app drivers, you don't need to do anything to
support JDBC connectivity.

If you are using the net drivers, you'll need to start up an additional
process on the server, "db2jd", that will listen and provide connections
to net driver clients, via the method I described above.

Pros and Cons, and why you would use a particular driver:

The app driver pros: 

It is faster than the net driver.

It's db connection compatibility is more flexible. (If you can catalog
a remote db from the client, it will work.)

The app driver cons:

Each client machine must be a supported DB2 platform, have the DB2 client 
code installed, and have a cataloged db before it will work. (if you
have lots of clients, this can be a lot of work)

The net driver pros:

An application will install and run with minimal effort, the only
requirement is that the client machine must have a Java runtime installed.
(NB: We have an app that uses the net drivers, which we typically run on
Windows. I took the *exact* same application code, put it on a Mac OSX
box and the app came up and ran perfectly the first time, without any
problems. BTW, the Mac OSX platform has an awesome Java implementation,
but does not have any native DB2 support)

The net driver cons:

Like I said above, the net driver is slower. In addition, I've seen
memory leaks and other performance issues.

One of the most severe limitations of the net driver is that the net
driver code (the db2java.zip file) must be the *exact* *same* version on
both the client and server. This means that if you use the net driver,
the client and server must be at the same version and patch level.

Another limitation for the net driver is that you'll need to ensure
that the "db2jd" process is setup and running for any instance you
want to connect to. This is a fairly easy problem to solve, but it's
yet another configuration task that must be done.

---

In summary, the forces that drive a app/net driver for us are simple: When
we have a static, server to server configuration that won't change often,
we use the app drivers. When we have a need for a more flexible client
(typically a GUI application) that needs to install easily on desktops,
we use the net drivers, as it doesn't require the additional time and
space for a DB2 client installation.

I realize this is a pretty high level description, with lots of details
missing, but I hope it will help get you started for any decisions you
need to make. It goes without saying, you should carefully consider what
problem you're trying to solve and try each driver to help you with the
best fit.


Best regards,

Doug Carter
WebCriteria


On Thu, Aug 16, 2001 at 08:27:55AM -0400, [EMAIL PROTECTED] wrote:
> Hi,
> 
> Can anybody explain to me the difference between a JDBC App driver and a
> JDBC Net driver?  I've looked in the UDB v7.2 manuals for information, and
> all I've been able to find is that the "app" driver is an "application"
> driver (type 2), and that the "net" driver is an "applet" driver (type 3).
> 
> My problem is that I'm not in the least bit Java literate, so "application"
> vs. "applet" driver means nothing to me, and neither does type 2 vs. type
> 3.
> 
> Can anybody explain to me in fairly simple terms what the difference is
> between the two, and more importantly, under what circumstances would you
> want to use one instead of the other?
> 
> Thanks,
> 
> Bill Gallagher, DBA
> Phoenix Life Insurance
> 
> 
> 
> =====
> To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
> For other info (and scripts), see http://people.mn.mediaone.net/scottrmcleod

=====
To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
For other info (and scripts), see http://people.mn.mediaone.net/scottrmcleod

Reply via email to