Step 3: Running and Testing the Application

Previous topic
Previous
Next topic
Next

You will now run the application and generate a sample client for testing purposes.

To run the application:

As you did previously, you'll use the sample Java client to test the application.

To create and run a sample client:

  1. In the Navigator, right click on your session bean (hrApp) and choose New Sample Java Client.
  2. In the Sample EJB Java Client Details dialog, select the default option for Connect to OC4J Embedded in JDeveloper and click OK.
    A new file, hrAppClient1.java appears in the Navigator and opens in the Code Editor.
  3. Underneath the create() method, call listDepartments() with the following code:
    System.out.println( HrApp.listDepartments(  ));
    
  4. Run the application by selecting Run | Run hrAppClient1.java
  5. You should see a list of department numbers, department names, and locations in the Log Window.