LegacyJ CICS and COBOL technology for the J2EE Enterprise Environment

Products     Services     Support     Sales     News     Partners

Academic
Programs

Customer
Information

News &
Information

Technical
Information

White
Papers

About Us

ISAMJ 

Description
Documentation
Fact Sheet
ISAMJ connects Java applications to the C interface to ISAM.

OVERVIEW

As ISAM is defined for native code (primarily C), a bridge is necessary to connect Java to the native code. This bridge is done through JNI (Java Native Interface), allowing Java code to access ISAM as if it were just another Java API, while allowing the original native code ISAM to execute and access the original ISAM data.   

ISAMJ is in two parts: the Java side and the JNI native side. The Java side remains the same regardless of platform. The same Java interfaces and Java classes are accessed on any platform from Windows to Solaris. The JNI piece is unique to each platform.

ISAMJ Java

The ISAMJ Java side has two interface layers, a low-level and a high-level interface. The low-level interface closely matches the original ISAM specification, including functions such as isaddindex and iserase. The high-level interface more closely resembles existing Java API's,  encapsulating the ISAM function in a more object-oriented framework; classes such as ISAMFile extends File and ISAMRecord which may be extended by user record classes. The low-level functionality is encompassed within the ISAM and ISAMConstants classes.   

The high-level functionality is encompassed within the ISAMFile,  ISAMRecord, ISAMKey, ISAMAudHead, ISAMDictInfo and ISAMConstants classes.

ISAMJ Native

The ISAMJ native side implements a JNI interface used by the Java side and accesses a native code shared library which implements the ISAM functionality. Java native code must be in shared library/shared object  form (.DLL in Windows). The ISAMJ native side accesses this shared library, passing requests and data from the Java side to the native ISAM driver. The native ISAM drivers tested include D-ISAM and ObjecTrieve; of these two,  only D-ISAM provides variable length as well as fixed length functionality.

ISAMJ Deliverables

ISAMJ includes the high- and low-level functionality .class files (Java executables). ISAMJ also includes the native isamj.dll or libisamj.so connector piece. This connector piece is unique to each platform, currently available for Windows and Solaris; other platforms are available upon request.

ISAMJ does not include ISAM functionality itself; this must be provided by a third-party (such as Byte Designs D-ISAM). File created and accessed using ISAMJ may be created and accessed using Java programs, while the data is in the original binary datafile format.

ISAMJ includes the JavaDoc documentation of the classes, the format most used for Java class documentation and most familiar to Java programmers.

Installation

Installation for development consists of unzipping or untarring the distribution file. A Java file called 'isamj.jar' and several directories will be created upon extracting the distribution file. The directories will include one named 'docs' and one named after the platform (e.g., 'win32').

In the docs directory are the documentation files in JavaDoc .html format. They may be viewed using any modern browser and are for the development machine only.

The isamj.jar file contains the Java .class files necessary for the implementation and access of ISAMJ from Java. This isamj.jar file must be made accessible to the Java Virtual Machine used in development (and later, the JVM used in deployment). This may be done by adding it to the CLASSPATH, as in:

CLASSPATH=$CLASSPATH:{isamj-directory}/isamj.jar       export CLASSPATH

Or it may be done by copying it to the ext (extensions) directory of Java. Or an IDE (Integrated Development Environment) may have its own method of adding .jar files.    

The native file (found in a directory named after the platform, such as win32) will be named after isamj with the shared object extension for the platform, such as isamj.dll, libisamj.so, libisamj.sa, or libisamj.sl. It must be available in the same fashion that native shared object are always made available on the native platform. In Windows, it will look in the PATH and current directory. On other platforms, LD_LIBRARY_PATH must include the directory which contains the file.

Finally, the ISAM implementation itself (such as D-ISAM) must be present and available. The ISAM implementation must be in the form of a shared library for it to be accessible by Java. See the JavaDoc on ISAM for information on setting the filename. The native ISAM library provides the actual ISAM functionality to which ISAMJ bridges. Follow the directions for the ISAM implementation in regards to its setup.
 

 

Home         About Us         Privacy        Legal        
© Copyright LegacyJ Corp. 1998, 2006
All Rights Reserved.

All trademarks are the properties of their respective owners or licensers.