Solution 1

The advantage of this solution is that it is relatively easy to implement. The disadvantage is that it is not seamless—that is, there is a period (while instances of the old versions of bean5 and bean6 are being destroyed or passivated) during which it is impossible to create a new instance of bean5 or bean6.

  1. Issue an EXEC CICS SET CORBASERVER(COR2) ENABLESTATUS(DISABLED) or a CEMT SET CORBASERVER(COR2) DISABLED command. Any attempts to create new instances of bean5 or bean6, regardless of whether the clients have references to the beans' home interfaces, will fail.

    Typically, currently-executing methods on instances of bean5 and bean6 will proceed to completion.

    An instance of bean5 or bean6 that is not participating in an OTS transaction is destroyed or passivated at the end of the currently-executing method. (If there is no currently-executing method, all instances will already have been destroyed or passivated.)
    Note: Stateless session beans are destroyed. Stateful session beans are passivated.

    An instance of bean5 or bean6 that is participating in an OTS transaction is not destroyed or passivated until the end of the OTS transaction; typically, any future method calls against this instance (within the scope of the OTS transaction) will succeed. At the end of the OTS transaction the instance is destroyed or passivated.

  2. Check when all instances of bean5 and bean6 have been destroyed or passivated by issuing EXEC CICS or CEMT INQUIRE CORBASERVER(COR2) ENABLESTATUS commands. A status of DISABLED indicates that all bean instances have been destroyed or passivated.
  3. When all instances of bean5 and bean6 have been destroyed or passivated, install the updated version of the DJAR3.jar deployed JAR file, using either the CICS scanning mechanism or a static DJAR definition. (You cannot use the scanning mechanism to update a static DJAR definition.)
    Either:
    1. Put the new version of the DJAR3.jar deployed JAR file into CorbaServer COR2's pickup directory.
    2. Issue a PERFORM CORBASERVER(COR2) SCAN command. CICS scans COR2's pickup directory, installs the new definition of DJAR3.jar, and copies the new versions of bean5 and bean6 to COR2's shelf directory.
    or:
    1. Issue an EXEC CICS or CEMT DISCARD DJAR(DJAR3) command, to remove the current definition of DJAR3.jar from CICS.
    2. Issue a CEDA INSTALL DJAR(DJAR3) or an EXEC CICS CREATE DJAR(DJAR3) CORBASERVER(COR2) HFSFILE(new_version_of_DJAR3.jar_on_HFS) command. CICS installs the new definition of DJAR3.jar, and copies the new versions of bean5 and bean6 to COR2's shelf directory.
    Note:
    1. It is not necessary to re-publish the updated versions of bean5 and bean6 to the namespace, even if the home or component interfaces of the beans have changed since the previous version.
    2. If the home or component interface of bean5 or bean6 has changed since the previous version, before using the changed bean client applications must be updated to use the new signature.
    3. If you update a stateful session bean, depending on exactly what changes are made you may change the structure of its serialised state. If this happens, you will invalidate any passivated instances of the bean in the object store. If this happens, any attempts to use the now invalidated bean will result in an exception. You should code your client applications to cope with this possibility.
  4. Issue a CEMT SET CORBASERVER(COR2) ENABLED command. From this moment, all new work will use the updated versions of bean5 and bean6.