InfoCenter Home >
4: Developing applications >
4.3: Developing enterprise beans >
4.3.4: Developing enterprise beans for use with the Connector Architecture (J2C)
4.3.4: Developing enterprise beans for use with the Connector Architecture (J2C)
It is assumed that you know how to create enterprise beans. This topic contains additional hints and tips which will help prepare your beans for successful deployment.
For information on the concepts behind EJB programming in WebSphere, see the following sources:
Developing enterprise beans
The Connector Architecture (technology preview) runtime is tuned to support the EAB Session Beans that are produced by VisualAge for Java version 3.5.3 and later.
You use the Enterprise Access Builder (EAB) feature of VisualAge for Java to create Session Beans that interact with non-relational backend systems such as CICS and
IMS. VisualAge for Java
also automatically generates significant parts of the enterprise bean code, and
contains integrated tools for packaging and testing enterprise beans. For more information on using VisualAge for Java to develop enterprise beans, refer to the appropriate topics
under the VisualAge for Java help topic Tasks > Developing EJB components.
Although use of VisualAge for Java is strongly
recommended, it is not compulsory. For more information on developing enterprise beans without using VisualAge for Java, see Tools for developing and deploying enterprise beans in the EJB server (AE) environment, especially the subtopic Developing and deploying enterprise beans with EJB server (AE) tools.
Exporting enterprise beans from VisualAge for Java
To export your enterprise bean package from VisualAge for Java as a JAR file, complete the following steps:
- In the Workbench, click the EJB tab. The EJB page appears.
- In the Enterprise Beans pane, select your EJB Group or an individual bean.
- From the pop-up menu for your EJB Group or bean, select Export > EJB JAR.... The Export to an EJB JAR File wizard opens.
- Type the name and full path for your exported .jar file in the JAR file field.
- In the section What do you want to include in the JAR file?, complete the following steps:
- Confirm that the checkboxes are enabled for beans and .class.
- Confirm that the checkbox is cleared for .java and .resource.
The reasons for not exporting .java and .resource files are that the.resource files
are usually not necessary, and if you
export the .java files then the WebSphere deployment step will attempt to
re-compile these files and you will need additional .jar files on your
classpath for the EAB runtime and resource adapter classes.
- For .class, complete the following steps.
To make your exported .jar file much smaller and quicker to process,
you should only export those classes that are required to support your
bean. This includes your bean, home, and remote
interface, plus any utility or helper classes
that might be contained in another project. The easiest
way to get all of these utility and helper classes is
to use Select referenced types and resources to pre-select
all of the referenced classes that your EJB uses, then to deselect the
projects that are not required in the WebSphere environment.
- Click Select referenced types and resources.
- Click the .class Details button.
- Clear the checkboxes for the following Projects:
- Connector CICS Beta
- IBM Common Connector Framework
- IBM Common Connector Framework 2
- Connector Architecture (J2C)
- IBM Enterprise Access Builder Library
- IBM Java Record Library
- Java Authentication and Authorization
- Click OK.
- Click Finish.
Your exported EJB jar file
is now ready for deployment in WebSphere.
|
|