J2C Java Bean for IMS PhoneBook Transaction sample setup instructions

Before you import the PhoneBook sample,

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

After you import the Phonebook sample,

If you want to run the sample code you need to configure the server and associate the sample with it using the following steps:

  1. To associate the sample with your IMS server, you need to change the connection information in Bean implementation class.
  2. Open up the 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="HostName" value="csdmecxx.sss.ibm.com"
     * @j2c.managedConnectionFactory-property name="PortNumber" value="9999"
     * @j2c.managedConnectionFactory-property name="DataStoreName" value="IMS1"
     * @generated
     */
               
Testing the application using the TestPhoneBook program

To directly invoke and run the TestPhoneBook program, you will use the TestPhoneBook.java file.

  1. Go to TestPhoneBook.java under the project PhoneBook and package sample.ims.
  2. Right click to invoke Run -> Run As Application.

You will see the following in the console.

Congratulations, you have completed the PhoneBook Sample.