Testing J2EE Application Clients

J2EE application clients are like regular Java™ applications. They contain a main() method that is executed, and they continue executing until the client virtual machine terminates. They can be run as typical "fat client" applications, to display a GUI that connects to a set of EJBs for persistence and business logic, or as server applications that provide services over the network. However, a J2EE application client has several advantages over regular Java applications, because it runs within a lightweight server container. This container can provide the application client with services that used to be available only to other J2EE components.

Before you begin

About this task

Benefits of using J2EE application clients instead of regular Java applications include:

To build a full command line to launch an application client, complete the following steps:

Procedure

  1. Switch to the Debug perspective (Window > Open Perspective > Other > Debug).
  2. In the main toolbar, expand the Run icon This is an image of the run icon. and select Run Configurations, alternatively expand the Debug icon This is an image of the debug icon. and select Debug Configurations.
  3. In the left pane of the dialog box, select WebSphere Application Server vx.x Application Client, where x.x is the version level of the WebSphere® Application Server and click New launch configuration.
  4. In the Name field, enter the name of your configuration.
  5. In the Application tab, select your enterprise application from the Enterprise Application list.
  6. For WebSphere Application Server v6.0, if you want to make changes to your code while you are debugging, select the Enable hot method replace in debug mode check box.
    Tip: Hot method replace is only an option on WebSphere Application Server v6.0. In later versions, it is enabled in debug mode by default.
  7. In the Arguments tab, you can add Program arguments and VM arguments as well as specifying your working directory. All WebSphere Application Server client launcher arguments begin with -CC. The default Program argument is -CCverbose=true, which will provide useful debugging information and at run-time. Any arguments that do not start with -cc will be passed to your application at run-time. For more information on the various Program arguments and VM arguments, refer to the WebSphere Application Server documentation for the Launch Client tool
  8. When you have completed configuring your launch configurations, click Apply to set your configuration, then click Run to launch the application client.

Feedback