You create your CICS®
Java™ application as an Eclipse plug-in project that complies
with the OSGi specification. The OSGi Service Platform provides a mechanism for developing
applications by using a component model and deploying those applications into a framework as OSGi
bundles.
The plug-in project is an OSGi bundle, and contains all the files and artifacts
needed for the CICS
Java application. The plug-in project is then included in a
CICS bundle project before being exported to the host
system.
About this task
This task creates a new plug-in project. You can leave the settings on their default values
unless otherwise stated. When the project is created you must edit the manifest and add the JCICS
API dependencies.
Procedure
-
On the Eclipse menu bar click to open the New Project wizard.
-
Select Plug-in Project from the list provided, then click
Next to open the New Plug-in Project wizard.
-
In the Project name field, enter a name for the project, for example
com.ibm.cics.example.accounting
. In the Target Platform section, select
an OSGi framework and select standard from the menu.
Click Next.
The Content pane is displayed.
-
In the Version field remove the
.qualifier
from the end of the
version number.
-
In the Execution Environment field select the Java level that matches the execution environment in your CICS runtime target platform, for example JavaSE-1.7.
-
Uncheck the Generate an activator check box and click
Finish.
The new plug-in project is created in the Package Explorer view.
- Required:
You must now edit the plug-in manifest file and add the
JCICS and com.ibm.record API dependencies. If you do not
perform these steps, you will be able to export and install the bundle, but it will not run.
-
In the Package Explorer view, right-click the project name and click .
The manifest file opens in the manifest editor.
-
Select the Dependencies tab and in the Imported Packages section, click
Add.
The Package Selection dialog opens.
-
Select the package com.ibm.cics.server and click
OK.
The package is displayed in the Imported Packages list.
- Optional:
Repeat the previous step to install the following package, if it is
required for your application:
- com.ibm.record
- The Java API for legacy programs that use IByteBuffer from the Java Record Framework that came
with VisualAge. Previously in the dfjcics.jar file.
-
Select to save the manifest file.
Results
The new plug-in project is created containing the JCICS API dependencies.
What to do next
You can now create your CICS
Java application. If you are new to developing Java applications for CICS, you can use
the JCICS samples provided with the IBM® CICS SDK for Java to help you get started.
Note: After you have developed your application, you must add a CICS-MainClass declaration to the
manifest file and declare the classes used in the application. See the related link for more
information.
For more information on plug-in development, see the section Plug-in development
environment (PDE) user guide in the Eclipse Help documentation.
When your Java application is finished, you must deploy it
in a CICS bundle to zFS. CICS bundles can contain one or more plug-ins and are the unit of deployment for your
application in CICS.