IMS phonebook sample setup instructions

In order to run the IMS™ phonebook sample, follow the instructions below.

Before you begin

  1. Make sure you have a clean workspace.
  2. You need to perform some setup work on the IMS server, where you want the phonebook IMS program to execute. These steps are not covered. Contact your IMS server administrator for setup instructions and for connection information to your IMS server.

About this task

You need to configure the server and associate the sample with it using the following steps:

Procedure

  1. To associate the sample with your IMS server, you need to change the connection information in the bean implementation class.
  2. Open PhoneBookImpl.java in a Java™ editor, change the following tag to use your IMS server connection information.
    /**
     * @j2c.managedConnectionFactory class="com.ibm.connector2.ims.ico.IMSManagedConnectionFactory"
     * @j2c.managedConnectionFactory-property name="dataStoreName" value="dataStoreName"
     * @j2c.managedConnectionFactory-property name="hostName" value="hostname"
     * @j2c.managedConnectionFactory-property name="portNumber" value="portNumber"
     * @j2c.connectionSpec class="com.ibm.connector2.ims.ico.IMSConnectionSpec"
     * @generated
     */
  3. Test the application using the TestPhoneBook.java program. To directly invoke and run the TestPhoneBook program, use the TestPhoneBook file.
    1. Right-click PhoneBookproject > sample.ims > TestPhoneBook.java, and select Run As > Java Application.

Results

If you are using an IMS version earlier than 12, you see the following in the console:

Sample application output

If you are using an IMS version 12 or later, you see the following in the console:

Sample application output version 12


Feedback