Connecting to IBM WebSphere

To connect to an IBM WebSphere server:
  1. In the Connect to Naming Service dialog box, choose WebSphere Application Server from the Server list box.
  2. From the Factory list box, choose com.ibm.websphere.naming.WsnInitialContextFactory.
  3. In the Provider Url text box, type iiop://lab44:900. The port may vary depending on the configuration of the server.
  4. Click Edit Classpath ... and specify the following server and client classpaths:
    1. In the Server Classpath text box, type the path to csicpi.jar, which is the IBM implementation of J2EE. This file is provided by IBM and contains the IBM J2EE implementation.
    2. Additionally type the paths to the following required packages into the Server Classpath text box:
      WebSphere 4.x
      • ejbcontainer.jar
      • iwsorb.jar
      • j2ee.jar
      • jts.jar
      • ns.jar
      • ras.jar
      • ujc.jar
      • utils.jar
      • websphere.jar
      WebSphere 5.x
      • ffdc.jar
      • idl.jar
      • iwsorb.jar
      • j2ee.jar
      • naming.jar
      • namingclient.jar
      • ras.jar
      • wsexception.jar
      • ecutils.jar
      • tx.jar
      • utils.jar
      • ejbportable.jar
      • The properties directory, which is usually located in the WebSphere home directory.
      These files are shipped with each WebSphere installation and are normally found in the lib directory of WebSphere installations.
    3. In the Client Classpath text box, type all JAR files and classpaths that are required to connect to the EJB. You usually put the client-side stubs and additional classpath entries into the client classpath. WebSphere servers automatically generate the stubs when EJBs are deployed. You can normally find these stubs in the installedApps directory, which is located within the WebSphere home directory.
  5. Verify your settings and click Next. The names of all registered EJBs and RMI objects that are hooked into your WebSphere server are browsed.
  6. Choose the home interface that allows for the creation of instances of EJBs. It is typical for EJBs to have home interfaces that are used to create EJB instances. For example, choose cart to use the CartHome interface from the petstore sample.
  7. Click Finish.
  8. In the Load File Wizard, click Next. The home interface you have selected is browsed for the published methods it includes. A method named create is likely to be among these methods. Call this method to get a valid reference to an EJB object.
  9. Click Next and select the test case where Java Explorer should write code for the steps that are performed by the wizard. For example, you can put the steps that are referred to as bootstrapping into the init test case or an existing test case.
  10. Click Next.
  11. Check the Store as variable check box and type a name for the EJB reference obtained by the Java Explorer Wizard into the Variable name text box.
  12. Click OK. You can now call any of the EJBs business methods.