The J2EETM Tutorial
Home
TOC
PREV TOC NEXT Search
Feedback

Modifying the J2EE Application

Since the J2EE SDK is intended for experimentation, it directly supports iterative development. Whenever you make a change to a J2EE application, you must redeploy the application.

Modifying a Class File

To modify a class file in an enterprise bean, you change the source code, recompile it, and redeploy the application. For example, suppose that you want to change the exchange rate in the dollarToYen business method of the ConverterEJB class:

  1. Edit the ConverterEJB.java source file.
  2. Recompile ConverterEJB.java by typing ant converter.
  3. In the deploytool, select Tools->Update and Redeploy Application. The deploytool replaces the old class file in ConverterApp.ear with the new one and then redeploys the application.

Adding a File

To add a file to the EJB JAR or WAR of the application, you would perform these steps:

  1. Select the JAR or WAR in the tree.
  2. Select the General tab.
  3. Click the Add button to the right of the Contents field.
  4. In the Edit Contents dialog box, locate the file and click Add.
  5. From the main toolbar, select Tools->Update and Redeploy Application.

Modifying the Web Client

To modify the web client, you simply edit the JSP page and redeploy ConverterApp.

Modifying a Deployment Setting

To modify a deployment setting of ConverterApp, you edit the appropriate field in a tabbed pane and redeploy the application. For example, to change the JNDI name of the ConverterBean from ATypo to MyConverter, you would follow these steps:

  1. In the deploytool, select ConverterApp in the tree.
  2. Select the JNDI Names tab.
  3. In the JNDI Name field, enter MyConverter.
  4. Select Tools->Update and Redeploy Application.
Home
TOC
PREV TOC NEXT Search
Feedback