Updating the plug-in project manifest file

When you develop a JCICS application, or package an existing application in a plug-in project, you must update the project manifest file and include a CICS-MainClass header.

About this task

The CICS-MainClass header is used to declare the classes that can be called by a LINK, START or RUN command, or a transaction initial program. Do not use lazy activation policies for OSGi bundles that declare a CICS® main class. CICS activates the OSGi bundles as soon as they are started in the OSGi framework. You must add the declaration manually to the manifest file.

Procedure

  1. If the manifest file is not already open in the editor, right-click the project name in the Package Explorer view and click Plug-in Tools > Open Manifest.
    The manifest file opens in the manifest editor.
  2. Select the MANIFEST.MF tab. The content of the file is displayed.
  3. Add the following declaration to the manifest file:
    CICS-MainClass: packagename.classname where:
    packagename
    Is the fully qualified Java™ package name.
    classname
    Is the name of the class used in the application. If more than one class is used, repeat the packagename.classname element, separated by a comma.

    You can use aliases in the CICS-MainClass header; for example, the declaration CICS-MainClass: examples.hello.HelloCICSWorld; alias=greeting assigns the alias greeting to the CICS-MainClass examples.hello.HelloCICSWorld. When you define the program to CICS, you use the alias name, greeting, instead of the class name. An alias is useful if you have multiple versions of the same program, each with the same class name. By using aliases you can identify the different versions.

    The following example shows a manifest file with a CICS-MainClass header for the classes HelloCICSWorld and HelloWorld.
    Manifest-Version: 1.0
    Bundle-ManifestVersion: 2
    Bundle-Name: Hello Plug-in
    Bundle-SymbolicName: com.ibm.cics.server.examples.hello
    Bundle-Version 1.0.0
    Bundle-RequiredExecutionEnvironment: JavaSE-1.7
    Import-Package: com.ibm.cics.core.bundle,
      com.ibm.cics.core.model.builders,
      com.ibm.cics.server;version="[1.300.0,2.0.0)"
    CICS-MainClass: examples.hello.HelloCICSWorld,
      examples.hello.HelloWorld
  4. When you have added all the class declarations, select File > Save to save the manifest file.

Results

You can now add the plug-in project to a CICS bundle and deploy it to zFS. CICS bundles can contain one or more plug-ins and are the unit of deployment for your application in CICS.

What to do next

Create a CICS bundle project. See Creating a CICS bundle project in the CICS Explorer product documentation.