Java Direct Call interface

Hello community,

the Java Direct Call (JDC) interface is a set of Java classes and methods. It allows you to develop Adabas direct calls in Java. The set of Java classes and modules provides the same functionality as the C-API does. All relevant C-API structures are represented in the JDC interface.

Please keep in mind, that the current implementation does not handle special password storage functionality. If there are passed passwords in e.g. Addition 3 fields, then the Buffer is not encrypted and there are no restrictions to reading the Addition 3 fields out of the Adabas control block. Security enhancements are not planned at the moment.

There is no global Software AG support for Java Direct Call (JDC) interface. At the moment, any problems and additional enhancements should not be addressed to Software AG support. Please send feedback to the community thread were you got this version.

In general please provide your interest in the JDC interface and additional enhancements to bring the project forward or, if I get no feedback, to close the project.

Copyright
jdc-doc.pdf (122 KB)
jdc-package.zip (1.09 MB)

Hello Thorsten,
in my previous company we needed such a Java API for Adabas Direct Calls at the end of the nineties. Since it wasn’t available we developed one on base of the ADALNK (C-API) and Java Native Interface. Currently it is running stabil at three big player in germany (one is my current company I am working now). However its not perfect yet, I think. I.e. the thread-safety we never tested. This is an issue especially in web applications. Probably it wouldn’t work actually cause in the consequence of JNI one java process use one database connection only. Thus our web applications are running as “application” only with synchronized services.
Based on this low level classes we developed wrapper classes for a more comfortable way to access adabas (i.e. automated format conversion and a simple sql-like query language).
Apart from that I could imagine to use your classes as our base classes. I haven’t tried it but its better documented as ours at least ;-)… Provided that it will become a official, supported component of the Adabas product or as an open source product.
Currently I have no time to check the interface, but I will do it next month.
best regards
Tom

Any idea why this error:

Java example program for calling ADABAS
Call database 28 and file 35:

java.lang.UnsatisfiedLinkError: com.softwareag.jdc.stub.AdabasStubLoader.jlnk_init()I
at com.softwareag.jdc.stub.AdabasStubLoader.jlnk_init(Native Method)
at com.softwareag.jdc.stub.AdabasStubLoader.(AdabasStubLoader.java:86)
at com.softwareag.jdc.stub.AdabasDirectCallStub.(AdabasDirectCallStub.java:32)
at com.softwareag.jdc.AdabasDirectCall.initSystem(AdabasDirectCall.java:315)
at com.softwareag.jdc.AdabasDirectCall.(AdabasDirectCall.java:103)
at com.softwareag.jdc.AdabasDirectCall.(AdabasDirectCall.java:160)
at com.softwareag.jdc.example.JavaExample.callDatabase(JavaExample.java:127)
at JavaExampleApplication.main(JavaExampleApplication.java:51)
Try load CallStub
Try load CallStubclass com.softwareag.jdc.stub.AdabasDirectCallStub
java.lang.UnsatisfiedLinkError: com.softwareag.jdc.stub.AdabasStubLoader.jlnk_init()I
at com.softwareag.jdc.stub.AdabasStubLoader.jlnk_init(Native Method)
at com.softwareag.jdc.stub.AdabasStubLoader.(AdabasStubLoader.java:86)
at com.softwareag.jdc.stub.AdabasDirectCallStub.(AdabasDirectCallStub.java:32)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorIm
pl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374)
at com.softwareag.jdc.AdabasDirectCall.loadDynamicStub(AdabasDirectCall.java:239)
at com.softwareag.jdc.AdabasDirectCall.initSystem(AdabasDirectCall.java:334)
at com.softwareag.jdc.AdabasDirectCall.(AdabasDirectCall.java:103)
at com.softwareag.jdc.AdabasDirectCall.(AdabasDirectCall.java:160)
at com.softwareag.jdc.example.JavaExample.callDatabase(JavaExample.java:127)
at JavaExampleApplication.main(JavaExampleApplication.java:51)
UnsatisfiedLinkError: Error loading JDC stub
ADABAS is not active or accessible: 148

Hi,

the java.lang.UnsatisfiedLinkError: com.softwareag.jdc.stub.AdabasStubLoader.jlnk_init()I error message
is thrown during loading the JNI library. So Java didn’t found the library.

It could be caused by

  1. The JNI is not located in the %PATH% or $LD_LIBRARY_PATH
  2. Dependent of the used Java version, the wrong JNI is used (e.g. Java 32Bit and JNI 64Bit)
  3. The Adabas environment is not sourced. The referenced ACL library is needed.

Bye,
Thorsten

P.S. Soon we provide you a more modern version of an interface to connect from Java to Adabas.
In the new approach you don’t need to be aware of Control block or buffer. Even a REST server
will be included in that new Adabas Java Client.

Hi Thorsten Knieling,

Do you have an early release to test??

Thanx

Hello,

sorry for answering late. The interface contains a Java API which makes it possible to access Adabas out of Java
and a REST server (JSON and XML, CRUD).

Please contact Adabas Product Marketing if you’re interested in a preview or beta version
of the Java API.

Bye,
Thorsten

Hello,

yesterday the Adabas Client for Java was released.
This product provides a Java framework where you can easily access Adabas out of a Java application.
It provides a Java framework, where no Adabas buffer knowledge is needed.
In addition you can define Long names to short names based on SYSTRANS/SYSOBJH exported DDM’s.
Sure you can even use XSD or FDT files.

In addition a Rest Server and a data browsing GUI is contained in the package.

The product is delivered in the Software AG installer.

Bye,
Thorsten

Hi

I am looking to implement the jdbc driver on my current site.
We are running natural 8.2.3.0 on z/Os ver 02.01.00.

besides downloading the package and writing the java service what else do I need as I see the jdbc driver uses SQL. do I need some SQL package for natural?

I am fairly new to implementing this a service and have in the past worked with entireX for web service calls. But the current site do not have EntireX thus I am looking at an alternative.

Any and all help will be welcome.
Thank you

Hello,

to connect to Adabas using JDBC drivers you need to use Adabas SQL Gateway.

The Adabas Interface for Java is a native direct access to Adabas using Adabas Period group, Multiple fields and other
Adabas specific features.

Bye,
Thorsten

Hi Ivan,

If you use Natural you do not need JDBC to process data stored in Adabas.

If, however, you want to use SQL based application the Adabas SQL Gateway needs to be used.
The advantage of the gateway is, you can also include other data sources.

The Adabas Client for Java is the interface from Java-based / REST-based application to Adabas.

Regards,
Wolfgang