Adding a Java method

You can add a Java™ method for each function or service you want to access from the EIS. Additional methods can be added later in the Java source editor from the project explorer view or through the Snippets view.

  1. You can add a Java method now, if you have followed the J2C wizard directly to this point; the Add method to J2C Java bean will appear when you click Next on the New J2C Java Bean page. If you are adding methods without the wizard, here are a few ways you can do this:
    1. To add a Java method in the Project Explorer view, expand your project to the J2C implementation class. Right click on the this class and choose Source->Add Method to J2C Java bean.
    2. To add a Java method from the Snippets view, first ensure that you are editing the J2C Java bean's implementation class (eg. CustomerImpl.java). The Snippets view is found in the top right pane in the Web Perspective, or in the bottom left pane of the J2EE perspective. Click J2C in the Snippets view, and right click, and selectAdd method to J2C Java bean, and select Insert. The New Java Method page will appear.
    3. To add a Java method from the context menu in the Java Editor, right click in the source view and choose Source >Add Method to J2C Java bean.
  2. On the New Java Method page, click the Add button.
  3. In the Java method name field, type in a meaningful name (getCustomer, for example).
  4. Click Next.
  5. Next, you will specify the imput and output data types for your java method.
    • Input type: For the input type, you can choose to browse for an existing data type, or click new to launch the CICS/IMS Data Binding wizard .
    • Use input type for output: If your output data type is the same as your input type, you can select Use the input for output.
    • Output type: If your output data type is different from your input type, you can choose to browse for an existing data type, or click new to launch the CICS/IMS Data Binding wizard .
Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.