Previous Topic Next topic Print topic


Sample Program to Connect to a Resource Adapter

You need to map the COBOL program onto a Java interface using the Interface Mapper. You drag the Calculator parameter into the Reusable Mappings pane and then drag it up into the Interface Fields pane for the Add operation. You can do the same for the subtract, divide and multiply operations. You need to map the interface this way, in this example, because the sample unmanaged class is demonstrating the use of a CCI custom record.

The sample program uses classes from these Java packages:

javax.resource.cci A collection of CCI interfaces defined in the J2EE Connector Architecture specification
com.microfocus.cobol.connector.spi Classes specific to the Micro Focus resource adapters that implement the Service Provider Interface (SPI) interfaces
com.microfocus.cobol.connector.cci Classes specific to the Micro Focus resource adapters that implement the CCI interfaces

To use the classes from these packages, we recommend that you import them into your code. For example, use statements such as:

import com.microfocus.cobol.connector.spi.*;
import com.microfocus.cobol.connector.cci.*;
import javax.resource.cci.*;
Previous Topic Next topic Print topic