Configuring RMI settings

Integrated Test Environment uses a software agent that communicates with InterChange Server Express to perform tests. This agent must communicate with InterChange Server Express and the tools through a port using Remote Method Invocation (RMI). Integrated Test Environment also requires a block of nine contiguous ports over which to communicate with each connector that is emulated in the interface being tested.

You must configure your environment so that there are ports available for these communication requirements. The default RMI port is 1099, and this is the port that the Integrated Test Environment agent is configured to use by default. Integrated Test Environment is configured by default to use ports 1100 and up to communicate with the connectors being emulated in the interface.

Other programs installed on your system may be configured to use port 1099, however, so you must determine which ports you can use. After determining which ports you can use you must configure settings in Integrated Test Environment to use the desired port as well as set a property in the start_server.bat batch file.

Determining which ports to use

Before attempting to use Integrated Test Environment, you should use the techniques described in the following sections to determine if the ports it is configured to use by default are available or not.

Using the netstat command

You can execute the netstat command at a command line interface in Windows to generate a list of the ports that are currently in use. It is recommended that you use the -a option to list all of the ports in use, rather than just those used for TCP/IP. You might also want to use the -n option, which orders the ports numerically.

The following example shows the use of the netstat command and a portion of the returned output:

C:\>netstat -a -n
Active Connections
Proto  Local Address          Foreign Address        State
TCP    0.0.0.0:80             0.0.0.0:0              LISTENING
TCP    0.0.0.0:135            0.0.0.0:0              LISTENING
TCP    0.0.0.0:371            0.0.0.0:0              LISTENING
TCP    0.0.0.0:445            0.0.0.0:0              LISTENING
TCP    0.0.0.0:1029           0.0.0.0:0              LISTENING
TCP    0.0.0.0:1030           0.0.0.0:0              LISTENING

The first entry shows that port 80 is being used and the last line shows that port 1030 is being used. Examine the lines to determine if ports 1099 through 1108 are being used. It is recommended that you copy the output into a text file where you can search for the port numbers.

If ports 1099 through 1108 are in use already then you must change the settings as described in Setting the RMI port in start_server.bat and Setting the RMI port in start_server.bat.

Checking the services file

Besides using the netstat command to determine which ports are currently in use, you can also check the services file to determine which ports are reserved. Do the following:

  1. Use a text editor to open the file named services in the Winnt\System32\drivers\etc directory in your file system.
  2. Search the entries in the file to determine if there are any services listed that are associated with ports 1099 through 1108.

    If you find any such entries, you might experience complications when trying to use Integrated Test Environment with the default configuration. Change the settings as described in Setting the RMI port in start_server.bat and Setting the RMI port in start_server.bat if so.

Setting the RMI port in the Integrated Test Environment preferences

If you follow the instructions in Determining which ports to use and determine that the ports used by Integrated Test Environment by default are already in use then you must set the preferences for Integrated Test Environment to use ports that are available.

Integrated Test Environment requires a single port for the test environment agent to communicate with the server. It also requires nine ports to communicate with up to nine connector agents that can be emulated during a test. You configure the port number that Integrated Test Environment will use for the first of the nine possible connector agents, and then it uses the eight ports above that number for the others, so you must ensure that there is a block of nine contiguous ports available. If you do not have nine connectors that require emulation in the interface then you can use a smaller block of ports. Ideally, you should find a block of ten available ports so that all of the ports related to the Integrated Test Environment are contiguous.

Do the following to configure the port usage for Integrated Test Environment:

  1. Select Window > Preferences from the menu bar of the workbench.
  2. Expand Integrated Test Environment.
  3. Select Test Server.

    Figure 58 shows the Test Server preferences.

    Figure 58. Test Server preferences


  4. In the "Test Server" pane, enter the port number for the test environment agent in the TEAgent port number field.

    The default value is 1099.

  5. In the "Client Simulator" pane, enter the port number that Integrated Test Environment should use for the first of the nine possible connector agents or access clients in the Base port number field.

    The default value is 1100. Integrated Test Environment uses the value in the Base port number field for the first connector agent that must be emulated, and use the subsequent port numbers for other connector agents.

  6. Follow the instructions in Enabling Integrated Test Environment to create a custom batch file to have Integrated Test Environment use a custom batch file to which it adds the necessary port configuration information specified in the previous steps.
  7. Click OK.

Setting the RMI port in start_server.bat

If you do not configure the Integrated Test Environment preferences to use a custom batch file to start the server then you must add the RMI port configuration information to the start_server.bat batch file yourself.

Even if you plan to use the default RMI port number of 1099, you must add the property to the batch file and set it equal to the default value. Do the following to do so:

  1. Use a text editor to open the batch file named start_server.bat in the bin directory of the product installation.
  2. Add the -DTEAgent Java system property to the line in the batch file where the Java program is executed to start the server, and set it equal to the value in the TEAgent port number field in the Integrated Test Environment preferences. The following example shows how the batch file would appear if the -DTEAgent property were set to the default RMI port number of 1099:
    %CWJAVA% -Djava.ext.dirs=%JRE_EXT_DIRS%;"%MQ_LIB%";"%DB2_LIB%" 
    -Duser.home="%CROSSWORLDS%" -mx%CW_MEM_HEAP%m -DTEAgent=1099 
    -DCW_MEMORY_MAX=%CW_MEM_HEAP% %ORB_PROPERTY% -classpath %JCLASSES% 
    ServerWrapper -s%SERVERNAME% %2 %3
    
    Note:
    You might want to make the modifications described in Configuring InterChange Server Express to start in design mode at this point, as those modifications also involve the start_server.bat batch file.
  3. Save and close the file.

Copyright IBM Corp. 2004