Program Lifecycle
When a
Java™
EE application is installed into
Liberty the
cicsts:link-1.0
feature searches for methods that are annotated with
@CICSProgram
. For each one, it dynamically installs a PROGRAM resource. If a
Java
EE application is installed into Liberty by using a
CICS®
bundle, the PROGRAM resources are created when the bundle is
enabled. Otherwise, PROGRAM resources are created when Liberty installs the
application.
When an application is removed, CICS deletes any dynamically installed PROGRAM resources that are associated with that application. If the application was installed by using a CICS bundle, CICS deletes the programs when the bundle is disabled. If an application is removed while tasks that invoke the application are still in progress, errors might occur. Therefore, disable any PROGRAM resources that are associated with a Java EE application and allow work to drain before you remove the application. Otherwise, programs are deleted when Liberty uninstalls the application.
In most cases, you do not need to create your own PROGRAM definition.
You might want to create
your own PROGRAM definition if you do not want
CICS
to create
one for you automatically, or if you want to specify particular
attributes. To create a private
program as part of a
CICS
application that is deployed on a
platform, you must define it in a
CICS
bundle that is
installed as part of that application. You can create a program definition in
the CSD, BAS or in a
CICS
bundle, and install it yourself. When
CICS
finds a method that is annotated with
@CICSProgram
and a matching PROGRAM resource is already installed,
CICS
does not replace it.
@CICSProgram
. You can optionally
specify the method name as well.
CICS
validates this
information when the program is invoked. The JVMCLASS attribute should contain
the classname and
optionally the method name in the format
wlp:classname#methodname
, for example:
wlp:com.example.CustomerLinkTarget#getCustomer
@CICSProgram
annotations exist

