1 |
To Access a database residing on machine M2 from Machine M1 over the internet/intranet is dependent currently upon the specific database you wish to connect to, and the type of the jdbc driver you at your disposal.
-
In case the driver is a Native-protocol all-Java driver (Class 4) ( e.g mSql jdbc driver for mSql database ) , it can connect to the remote database directly since such kind of driver knows the net-protocol the particular database supports, and thus is able to contact and talk to the database server directly via opening socket connections over the network.
-
In case the driver is a Native-API partly-Java driver (Class 2), it can connect to the database if the driver and the database resides on the same machine.This is a limitation of this type of driver, but remote access can be supplied by RMI or CORBA in a 3-tier solution.
|