Creating a plug-in project

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.

Before you begin

You need to set the Target Platform. For more information, see Setting up the Target Platform.

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

  1. On the Eclipse menu bar click File > New > Project to open the New Project wizard.
  2. Select Plug-in Project from the list provided, then click Next to open the New Plug-in Project wizard.
  3. 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.
  4. In the Version field remove the .qualifier from the end of the version number.
  5. 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.
  6. Uncheck the Generate an activator check box and click Finish.
    The new plug-in project is created in the Package Explorer view.
  7. 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.
    1. In the Package Explorer view, right-click the project name and click Plug-in Tools > Open Manifest.
      The manifest file opens in the manifest editor.
    2. Select the Dependencies tab and in the Imported Packages section, click Add.
      The Package Selection dialog opens.
    3. Select the package com.ibm.cics.server and click OK.
      The package is displayed in the Imported Packages list.
    4. 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.
    5. Select File > Save 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.