You can expose procedural COBOL as EJBs or Java beans by using the Service Interfaces feature to map an interface onto your COBOL program.
The COBOL service interface then needs to be deployed as a service to an enterprise server. The COBOL service comprises the mapping information and the original COBOL. You can deploy the service interface automatically by deploying from your Eclipse project, or you can do it manually in one of the following ways:
At run time, your client application makes Java requests and invokes the generated EJB or Java bean. The EJB uses the resource adapter to pass the requests to an enterprise server, which in turn runs the exposed COBOL. The Java bean passes the requests to the enterprise server directly.
The mapping information is used at run time to pass data to and from the exposed COBOL. The enterprise server returns the response to the EJB through the resource adapter or directly to the Java bean. The EJB or bean passes the response on to the client.