You can bypass the Java application server and the resource adapter, by generating a Java bean that accesses the COBOL enterprise server directly. Although this avoids the overhead of administering a Java EE application server, you lose its advantages such as transaction support.
The Java bean generated is stateless. One class is generated for the bean and other classes are generated for any data classes representing the records that are mapped.
The Java bean runs in a J2SE environment with the libraries from the Java application server. The Java bean accesses the COBOL enterprise server directly, in an out-of-process manner. The J2SE and enterprise server run in two separate processes and they communicate through sockets.
You need to write your client software to call the Java bean.
Support for the Java bean is supplied in mfj2se.jar, which is available in the $COBDIR/javaee/common directory.
To trace the behavior of the Java bean, use the –Dmfdebug=true switch. For example, run the program myBean as follows:
java –Dmfdebug=true myBean