You can add a Java™ method for each function or service you want to access from the
enterprise information system. Additional methods can be added later
in the Java source editor from
the Enterprise Explorer view or through the Snippets view.
Procedure
- If you click Next on the J2C Java Bean Output Properties page
of the J2C Bean wizard, you can add a Java method now on theAdd method to J2C Java bean page. To add methods without the wizard:
Important: The Add J2C Java Bean Method snippet does not automatically copy the J2C bean interface
to the client EJB project until the J2C Deployment wizard is run.
If the J2C deployment wizard has already been run or you need the
new method to be reflected in the client project interface file immediately
(if you are adding to a faces JSP web page, for example), copy the
file manually to the client project.
- To add a Java method
in the Enterprise Explorer view, expand your project and expand . Right click the class and select Source > Add/Edit J2C Java bean method.
- To add a Java method
from the Snippets view, expand your project and expand . Double click this file to open it in the Java Editor. The Snippets view is found in the
top right pane in the Web perspective, or in the bottom left pane
of the Java EE perspective.
Click J2C in the Snippets view, and right click,
and select Add method to J2C Java bean, and
select Insert. The New Java Method page appears.
- To add a Java method
from the menu in the Java Editor,
right click in the source view and select Source > Add/Edit J2C Java bean method.
- On the New Java Method
page, click Add.
- In the Name field,
type in a meaningful name (getCustomer, for example).
- Next, you specify the input 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.
- Click Next.