Finding an enterprise bean

In order to test an enterprise bean in the Universal Test Client, you must locate it on your server. If you know the JNDI name of your enterprise bean, you may use the JNDI Explorer page of the Universal Test Client to directly type the name. Otherwise, use the graphical view on the JNDI Explorer page to browse the JNDI hierarchy of your server and locate the enterprise bean.

Selecting a bean automatically loads the EJB home into the EJB Beans pane. Data sources and user transactions are loaded into the JNDI Objects page. Selecting a URL displays it in a Web browser.

Use the JNDI Explorer page of the Universal Test Client to find an enterprise bean on a server when you know the JNDI name of the EJB file. The JNDI Explorer page allows you to load an enterprise bean that you want to test by directly typing in the JNDI name of the enterprise bean.

If you want to find an enterprise bean, but you do not know the JNDI name, you should use the graphical representation of the JNDI server's namespace that is located on the JNDI Explorer page. The root contexts in the JNDI namespace are displayed as folders and allow you to browse through the hierarchy:

  1. To find the JNDI name of the enterprise bean when the JNDI name is known:
    1. In the Universal Test Client toolbar, select the JNDI Explorer link in the left pane. The JNDI Explorer page appears.
    2. In the JNDI Name field, type the JNDI name of the enterprise bean that you want to test.
    3. Click Lookup. Depending on the type of object that was entered, the appropriate page displays. For example, if a bean was entered, then the EJB Beans pane of the test client opens displaying all the methods for that particular EJB.
  2. To find the JNDI name of the enterprise bean when the JNDI name is unknown:
    1. In the Universal Test Client toolbar, select the JNDI Explorer link in the left pane. The JNDI Explorer page appears showing a list of the JNDI server's namespace.
    2. Click the JNDI name of the enterprise bean that you want to test. Depending on the type of object that was entered, the appropriate page displays. For example, if a bean was entered, then the EJB Beans pane of the test client opens displaying all the methods for that particular EJB.

If an enterprise bean with a remote view does not appear in the JNDI Explorer, then it is not correctly deployed in the server. There are a number of causes of this problem, including not generating deployment code for the enterprise bean, not deploying the EJB JAR file to the EAR file correctly, and incorrect deployment descriptors in either the EJB JAR file or EAR file.

If an enterprise bean is not a selectable link in the JNDI Explorer, then there are two possible causes to this problem:
  • The object you are looking at may not be an enterprise bean. Make sure you have the JNDI name correct and that you are looking at the correct object.
  • The client side EJB classes may not be available to the Universal Test Client. If you are not running the test client on the same server as the enterprise beans are deployed to, make sure you add the EJB client JAR file to the server's class path before starting the Universal Test Client.
Terms of use | Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.