EJB Test Client wizard

The EJB Test Client wizard creates a test client class you can use to test a new enterprise bean.

To display the EJB Test Client wizard, choose File|New, click the Enterprise tab, and double-click the EJB Test Client wizard icon.

Enterprise JavaBean

From the drop-down list, select the enterprise bean you want to create a test client for. The list displays all enterprise beans in the current project.

Package

From the drop-down list, select the package you want the test client to be in or type in the name of the package you want to use. The drop-down list displays all currently opened projects.

Class

Enter a name for your new EJB test client. JBuilder suggests a default name based on the name of the enterprise bean you are building the test client for. You can accept this name or enter another.

Base Class

If you want the test client based on a class, specify the base class name by typing it in or use the class tool to navigate to where the base class resides and select it.

Generate Logging Messages

If this option is checked, the wizard generates code that declares and implements a method in the test client for each method in the home and remote interface. Each of these implemented methods calls a corresponding method in the home or remote interface. Each of these implemented methods reports its success in invoking the home or remote method and how long the method took to execute.

Generate Main Function

Check this option to add a main() function to the test client. You can then call the bean's methods from the main() function. You do this by first calling either a create or find method, and, if a remote reference is returned, by using that remote reference to call the bean's business methods. Or, because the wizard declares a client object in the main() function, you can use that client object to call the methods declared in the test client that call the bean's remote methods.

Generate Header Comments

If checked, this option adds JavaDoc header comments such as Title and Author to the top of the EJB test client.