docs.intersystems.com
Home  /  Application Development: Language Bindings and Gateways  /  Using JDBC with InterSystems IRIS  /  Introduction to InterSystems JDBC


Using JDBC with InterSystems IRIS
Introduction to InterSystems JDBC
[Back]  [Next] 
InterSystems: The power behind what matters   
Search:  


InterSystems IRIS™ provides Java APIs for easy database access via SQL tables and objects. See Persisting Java Objects with InterSystems IRIS XEP for object access. This book discusses the InterSystems IRIS implementation of Java JDBC for SQL table access.
The InterSystems IRIS data processing platform includes a high-performance type 4 JDBC database driver. The InterSystems JDBC driver is fully compliant with the JDBC 4.1 API, supporting all required interfaces and adhering to all JDBC 4.1 guidelines and requirements.
The online InterSystems Supported Platforms document for this release document specifies the current requirements for all Java-based binding applications:
You can use the InterSystems JDBC driver and SQL when you want to access your InterSystems IRIS data using a relational model. The Java Binding mechanism also uses the JDBC driver. You can mix relational and object-oriented database access to provide maximum flexibility to your application.
Using the JDBC Driver
The InterSystems JDBC driver is contained in isc-jdbc-3.0.0.jar. See The InterSystems IRIS Java Class Packages for information on using this file.
JavaDoc class documentation for the packages in isc-jdbc-3.0.0.jar is located in <install-dir>\dev\java\doc.
Installation and Configuration
All applications using the InterSystems IRIS Java binding are divided into two parts: an InterSystems IRIS server and a Java client. The InterSystems IRIS server is responsible for database operations as well as the execution of InterSystems IRIS object methods. The Java client is responsible for the execution of all Java code (such as additional business logic or the user interface). When an application runs, the Java client connects to and communicates with an InterSystems IRIS server via a TCP/IP socket. The actual deployment configuration is up to the application developer: the Java client and InterSystems IRIS server may reside on the same physical machine or they may be located on different machines. Only the InterSystems IRIS server machine requires a copy of InterSystems IRIS.
Java Client Requirements
The InterSystems IRIS Java client requires the a supported version of the Java JDK. Client applications do not require a local copy of InterSystems IRIS.
The online InterSystems Supported Platforms document for this release document specifies the current requirements for all Java-based binding applications:
The core component of the Java binding is a file named isc-jdbc-3.0.0.jar, which contains the Java classes that provide the connection and caching mechanisms for communication with the InterSystems IRIS server and JDBC connectivity. Client applications do not require a local copy of InterSystems IRIS, but the isc-jdbc-3.0.0.jar file must be on the class path of the application when compiling or using Java proxy classes. See The InterSystems IRIS Java Class Packages for more information on these files.
InterSystems IRIS Server Configuration
Very little configuration is required to use a Java client with an InterSystems IRIS server. The Java sample programs provided with InterSystems IRIS should work with no change following a default InterSystems IRIS installation. This section describes the server settings that are relevant to Java and how to change them.
Every Java client that wishes to connect to an InterSystems IRIS server needs a URL that provides the server IP address, TCP port number, and InterSystems IRIS namespace, plus a username and password.
To run a Java or JDBC client application, make sure that your installation meets the following requirements:
The InterSystems IRIS Java Class Packages
The files containing the InterSystems IRIS Java class packages are located in <install-dir>\Dev\java\lib\<java-release>, where <install-dir> is the root directory of your InterSystems IRIS installation and <java-release> corresponds to the Java JDK you are using. See InterSystems IRIS Installation Directory in the Installation Guide for the location of <install-dir> on your system. For supported Java releases, see “Supported Java Technologies” in the online InterSystems Supported Platforms document for this release.
The Java class packages are contained in the following files:
See the JavaDoc in <install-dir>\dev\java\doc\ for the latest and most complete description of these packages.