In order to run the IMS™ phonebook sample, follow the instructions below.
Before you begin
- Make sure you have a clean workspace.
- 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
- To associate the sample with your IMS server, you need to change the connection
information in the bean implementation class.
- 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
*/
- Test the application using the TestPhoneBook.java program. To directly invoke and run the TestPhoneBook program, use
the TestPhoneBook file.
- Right-click , and select .
Results
If you are using an IMS version earlier than 12, you see the following in the console:
If you are using an IMS version 12 or later, you see
the following in the console: