Configuring the client

The source code of the client application is in the HelloWorldCLI.jar file.

On z/OS UNIX System Services, you must:
  1. Copy the runEJBIVP script to a working directory. The original runEJBIVP script is located, with the IVP sample, in the following directory:
    /usr/lpp/cicsts/cicsts31/samples/ejb/helloworld
    where cicsts31 is the value of the CICS_DIRECTORY variable used by the DFHIJVMJ job during CICS installation.
  2. Edit your copy of runEJBIVP script as follows. This is necessary so that the client can locate the published enterprise bean in the JNDI namespace. (A typical client will not have access to the CICS JVM profile and JVM properties file.)
    1. Modify the JAVA_HOME variable to your IBM® SDK 1.4.2 installation directory, as indicated by the comments in the script. The line to be changed is:
      JAVA_HOME=/usr/lpp/<Java SDK 1.4.2 installation directory>/J1.4
    2. Modify the CICS_DIRECTORY variable to your CICS installation directory, as indicated by the comments in the script. The line to be changed is:
      CICS_DIRECTORY=/usr/lpp/cicsts/<CICS installation directory>
    3. Modify the JNDI_PROVIDER_URL variable to the URL and port number of your name server, as indicated by the comments in the script. The line to be changed is:
      JNDI_PROVIDER_URL=iiop://nameserver.location.company.com:2809

      The above line assumes that you are using a COS name server, such as tnameserv, the lightweight COS Naming Directory Server supplied with Java 1.3 and later, and that it is configured to listen on port 2809.

      If, for example, you are using a COS name server configured to listen on port 900, you might specify:
      JNDI_PROVIDER_URL=iiop://nameserver.location.company.com:900
      If you are using the tnameserv name server, configured to listen on port 2809, on a workstation named myworkstation.acme.com you should specify:
      JNDI_PROVIDER_URL=iiop://myworkstation.acme.com:2809
      To start the tnameserv program, type the following command at the workstation command prompt:
      tnameserv -ORBInitialPort 2809
      If you are using the COS Naming Directory Server supplied with WebSphere® Application Server Version 5 or later, configured to listen on port 2809, you should specify:
      JNDI_PROVIDER_URL=iiop://nameserver.location.company.com:2809/domain/legacyRoot
      If you are using an LDAP name server, the protocol should be ldap rather than iiop; the port number should be 389. For example:
      JNDI_PROVIDER_URL=ldap://nameserver.location.company.com:389
    4. If you are using an LDAP name server, modify the LDAP_CONTAINERDN and LDAP_NODEROOTDN variables, as indicated by the comments in the script.

      If you are using a COS naming server, these properties are ignored.

    5. If necessary, modify the INITIAL_CONTEXT_FACTORY variable as indicated by the comments in the script. Usually, you can leave this property to default. However, some JNDI service providers cannot be accessed using the default initial context factory. For example, if you are using WebSphere Application Server as your JNDI provider you should set this variable to com.ibm.websphere.naming.WsnInitialContextFactory.
    6. If you have set up your CorbaServer and installed the IVP in the way suggested, the CORBASERVER_JNDI_PREFIX and BEAN_NAME variables will already be set to the correct values. See the comments in the script.