J2EE Resource Adapter Sample Application

This sample illustrates how to create a web-based application that sends input to and receives output from your Synapta Services Builder for IMS task, deployed to a WebLogic app server as a J2EE resource adapter generated from MCS. The sample application and the files used to create and deploy it are all installed on your computer when you install a Synapta Services Builder for IMS component.

Sample Files

This sample consists of several different files with different purposes. The purposes of each file are explained in the sections after the list below. The files below can be found in the following location:


Preparing the Task

Start by using Task Builder to convert the sample COBOL copybooks into a task file. For this kind of application, the task interface object will be generated within MCS, not Task Builder. So once you've created the task, you can go straight to the publishing step, and publish your task file to MCS. For this sample, the task file must be saved as IVTNOStatelessEJB.

From MCS, register your application server, then package your published task for that application server. Use the J2EE Session EJB wizard to deploy the J2EE resource adapter.

Deploying to WebLogic

Depending on your environment, running build.bat or build.sh will generate the sample WAR file. Deploy this file to a running WebLogic server (the one registered in MCS in the previous step). The two XML files in the WEB-INF directory are used to deploy the sample task to your WebLogic server.

Calling the Task in an Application

The sample application consists of a JSP file which provides a user interface with fields to enter input to send to the task, an Execute button to send the input, and some output fields to display the returned data. This code can be used this way, or integrated into a more complex existing application. The JSP file includes comments in the code to explain what each step accomplishes. A notes.txt file is included to describe the basic steps needed to see the sample in action.

Related Topics
Bullet Using J2EE Architecture
Bullet Deploying J2EE Session EJBs
Bullet Accessing Data with the Attachmate J2EE Resource Adapter
Bullet How to Provide Tasks in a J2EE App Server