To deploy enterprise beans into CICS, the supported deployment tool is the Assembly Toolkit (ATK), a component of the Application Server Toolkit (ASTK). The ASTK is supplied with:
It is recommended that you use the most recent version of ATK, and that where possible you create deployment descriptors for EJB Version 1.1.
ATK is a graphical tool used by CICS® and other IBM® EJB servers to create and edit Java™ 2 Enterprise Edition (J2EE) deployment modules ready for the target runtime environment. The only J2EE deployment module supported by CICS is the enterprise bean JAR (ejb-jar) file. ATK can be used (amongst other things) to create and edit these ejb-jars and their deployment descriptors.
You should install ATK on those workstations that are expected to prepare enterprise beans for deployment in a CICS system.
The installation and use of ATK is described in the documentation that comes with WebSphere Application Server. WebSphere Application Server has an information center which can be accessed from the Help buttons once you have installed the product. Installation is described in the README file. This topic notes some considerations when using ATK to deploy enterprise beans for a CICS environment.
Application assembly is an essential part of the process of taking an enterprise bean and getting it ready to be deployed into a runtime environment. The process of application assembly includes:
ATK can be used to perform all these functions. It can also be used to perform some of the functions typically associated with enterprise bean deployment. Specifically, it can be used to perform the required step of generating the deployed code needed by the server at runtime. This deployed code includes the concrete implementation classes of the bean's home and component interfaces, together with the stub and tie files required by RMI-IIOP. (Note that CICS TS for z/OS®, Version 2.2 and CICS TS for z/OS, Version 2.3 ejb-jar files and deployed JAR files can be used unchanged in CICS Transaction Server for z/OS, Version 3 Release 1.)
ATK is provided by WebSphere as an environment for assembling applications prior to deployment into WebSphere Application Server. Consequently, it can be used to provide deployment information supported by WebSphere but not by CICS. For example, it supports the use of entity beans, unlike CICS.
In general terms, CICS supports the deployment information that is specified in the standard EJB 1.1 deployment descriptor, except for that which is only relevant to entity beans (that is, re-entrancy, persistence management, primary key, and container-managed fields). The deployment descriptor items that CICS is able to use are:
In addition to these items, CICS supports JNDI bindings for EJB references and resource manager connection factory references.
There are various things that you must, or must not, do when using ATK to prepare enterprise beans for a CICS runtime environment. Some actions are required or recommended, and others are unsupported. The following topics describe these actions and other considerations:
Several wizards are available in ATK. For example:
The following list of actions must be completed for an ejb-jar file before it can be used in CICS. ATK can be used to perform all of these actions:
If any of the above is missing then the ejb-jar will either fail to install into the CICS region or will fail to behave correctly when invoked at runtime.
ATK allows you to define a default DataSource for an enterprise bean. If you want to do this, you must specify a DataSource that is CICS-compatible, as described in the topic "Acquiring a connection using the DataSource interface" in the CICS DB2® Guide. Define the DataSource as a resource reference, for example jdbc/CICSDB2DataSource, with a type of javax.sql.DataSource. CICS does not support the use of a userid and password for the DataSource.
You must ensure that the ejb-jar has been saved using a supported version of the Enterprise JavaBeans specification. Although CICS currently supports only Version 1.1 of the Enterprise JavaBeans specification, it tolerates EJB 2.0 JAR files. However, CICS ignores any 2.0-specific features in the deployment descriptor, except for local interfaces. (If you try to deploy an EJB 2.0 JAR file that contains local interfaces, CICS issues an error message and the JAR file becomes unresolved.)
When using ATK to deploy your enterprise beans, you can choose the format that is used for saving each ejb-jar file, such as EJB 1.1 or EJB 2.0. It is recommended that, where possible, you create deployment descriptors for EJB 1.1.
If you use a
WebSphere deployment tool, select "WebSphere 5" as the target application
server, rather than "WebSphere 6" (which is the default). This is because
the CICS EJB container is not compatible with the generated code produced
for WebSphere Application Server Version 6.
In addition to the above required actions, it is strongly recommended that you use the Run Validation option (with the relevant EJB module selected) in ATK, to verify that your ejb-jar file is both correct and complete prior to saving your changes. Any error and warning messages displayed as a result of the verification should be acted on as appropriate.
The following actions are available in ATK, but are not suitable when deploying enterprise beans for a CICS environment: