The CICS Explorer® and CICS Explorer SDK 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. For detailed instructions, see the relevant step in Creating the JCICS examples or Creating the servlet examples.
The target platform
ensures that you use only the Java classes that are
appropriate for the target release of CICS® in your
application 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 CICS Explorer SDK 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. An application provides a single management point for deploying and managing the application
across a CICSplex in CICS. For more information, see Packaging applications for deployment.
- 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
CICS Explorer SDK.
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.