The CICS Explorer® and IBM® CICS® SDK for Java™ help provides full details on
how you can perform each of the following steps to develop and deploy applications.
Procedure
-
Set up a target platform for your Java development.
-
Create an OSGi Bundle Project or a plug-in
project for your Java application development.
-
The default version of the project is 1.0.0.qualifier. In the
Version field either remove the
.qualifier from the end of
the version number, if you do not wish to use one, or set it to something meaningful, for example
the date/time stamp.
Develop your Java application using best practices; for
example, to organize the dependencies between OSGi bundles, use Import-Package /
Export-Package in preference to Require-Bundle.
-
If you are new to developing Java applications for CICS, you can use the examples that are provided with the IBM CICS SDK for Java to get started.
To use JCICS in a OSGi Java application, you must import
the com.ibm.cics.server package.
- Optional:
In Liberty, create a dynamic web application (WAR) or a web-enabled OSGi Bundle Project (WAB) to develop your application
presentation layer.
You can create servlets and JSP pages in a
Dynamic Web Project. For a WAR file, you must also add the
Liberty libraries to your build path to give you access to the Liberty API bundles. For further
details, refer to
Setting up the development environment.
-
Package your application for deployment:
-
If you are deploying a web-enabled OSGi Bundle Project (WAB), create an OSGi Application Project (EBA).
-
Create one or more CICS bundle projects to reference
your EBA, your EAR file, or your web application (WAR file).
CICS bundles are the unit of deployment for your application
in CICS. Put the web applications that you want to update and
manage together in a CICS bundle project. You must know the
name of the JVMSERVER resource in which you want to deploy the application.
You
can also add CICS resources to the CICS bundle project, such as PROGRAM, URIMAP, and TRANSACTION resources. These
resources are dynamically installed and managed with the Java
application.
- Optional:
If you want to deploy the application to a CICS
platform, create an application project that references your CICS bundles.
-
You should always explicitly declare the packages that your OSGi bundle uses, even if the
tooling does not indicate an error. You can do this by adding or updating the
Import-Package bundle header in your OSGi bundle manifest. Tools such as
Eclipse make assumptions about the availability of javax.* packages that might
not be correct for a runtime environment where an explicit Import is necessary.
-
Deploy your Java application to zFS by exporting the
application project or CICS bundle projects. Alternatively,
you can save the projects in a source repository for deployment.
Results
You have successfully developed and exported your application by using the IBM CICS SDK for Java.
What to do next
Install the application in a JVM server. If you do not have authority to create resources
in CICS, the system programmer or administrator can create
the application for you. You must tell the system programmer or administrator where the exported
bundle is located and the name of the target JVM server.