Previous  Table of Contents  Next  

  J2EE Tools - Lightweight IDE for J2EE Version 1.4  
     
 

GETTING STARTED

Build, Deploy and Run Converter Enterprise Application

This page describes how to build, deploy and run the Converter enterprise application in the J2EE Tutorial.
  1. Browse Converter Enterprise Application in J2EE Tutorial:

    1. Click Help | J2EE Tutorial in the J2EE Tools window.
    2. Wait until the J2EE Tutorial appears in the browser window.
    3. Scroll to Chapter 24: Getting Started with Enterprise Bean Applications then click Creating the J2EE Application.
    4. When done browsing, click X in the top right corner of the browser window.
  2. Build Converter Enterprise Application:

    1. Click the Application tab in the J2EE Tools window.
    2. Click the Project Directory box in the Application tab then click ejb in the popup list.
    3. Click the Application Directory box then click converter.
    4. Click the Build File box then click build.xml (default).
    5. Click the Build Target box then click build (default).
    6. Click Tools | Build.
    7. Wait until Build Successful appears in the Build Target window.
    8. Click X in the top right corner of the Build Target window.
  3. Start Application Server:

    1. Click Tools | Application Server | Start in the J2EE Tools window.
    2. Wait until Application server startup complete appears in the Start Application Server window.
    3. If the domain window appears, click _ (minimize) in the top right corner of the domain window.
  4. Create Converter Enterprise Application Enterprise Archive File:

    1. Click Tools | Deployment | Console in the J2EE Tools window.
    2. Wait until the Deployment Tool window appears.
    3. Click File | New | Application in the Deployment Tools window.
    4. Click Browse in the New Application dialog.
    5. Click Up One Level in the New Application dialog until Local Disk (C:) appears in the Look In box.
    6. Double click the fieldbird directory in the Look In area.
    7. Double click the j2eetools directory in the Look In area.
    8. Double click the j2ee directory in the Look In area.
    9. Double click the projects directory in the j2ee directory.
    10. Double click the ejb directory in the projects directory.
    11. Double click the converter directory in the ejb directory.
    12. Click the File Name field then type ConverterApp.ear.
    13. Click New Application.
    14. Verify that the Application File Name field in the New Application dialog contains C:\fieldbird\j2eetools\j2ee\projects\ejb\converter\ConverterApp.ear.
    15. Click OK.
  5. Create Converter Enterprise Application Enterprise Java Bean in Enterprise Archive File:

    1. Click File | New | Enterprise Bean in the Deployment Tool window.
    2. Click Next in the New Enterprise Bean Wizard - Introduction dialog.
    3. Click Create New JAR Module in Application in the New Enterprise Bean Wizard - EJB JAR General Settings dialog.
    4. Click the Create New JAR Module in Application box then click ConverterApp.
    5. Click the JAR Name field then type ConverterJAR.
    6. Click Edit Contents.
    7. Verify that the Starting Directory box in the Edit Contents dialog contains C:\fieldbird\j2eetools\j2ee\projects\ejb\converter.
    8. Double click the build directory in the converter directory in the Available Files area.
    9. Click the converter directory in the build directory then click Add.
    10. Click OK.
    11. Click Next in the New Enterprise Bean Wizard - EJB JAR General Settings dialog.
    12. Click the Enterprise Bean Class box in the New Enterprise Bean Wizard - Bean General Settings dialog then click converter.ConverterBean in the popup list.
    13. Click the Enterprise Bean Name field then type ConverterBean.
    14. Click the Enterprise Bean Type box then click Stateless Session.
    15. Click the Remote Home Interface box then click converter.ConverterHome.
    16. Click the Remote Interface box then click converter.Converter.
    17. Click Next.
    18. Click No in the New Enterprise Bean Wizard - Expose as Web Service Endpoint dialog.
    19. Click Next.
    20. Click Finish in the New Enterprise Bean Wizard - Next Steps dialog.
  6. Create Converter Enterprise Application Client in Enterprise Archive File:

    1. Click File | New | Application Client in the Deployment Tool window.
    2. Click Next in the New Application Client Wizard - Introduction dialog.
    3. Click Create New AppClient Module in Application in the New Application Client Wizard - JAR File Contents dialog.
    4. Click the Create New AppClient Module in Application box then click ConverterApp.
    5. Click the AppClient Name field then type ConverterClient.
    6. Click Edit Contents.
    7. Verify that the Starting Directory box in the Edit Contents dialog contains C:\fieldbird\j2eetools\j2ee\projects\ejb\converter.
    8. Double click the build directory in the converter directory in the Available Files area.
    9. Click the ConverterClient.class file in the build directory then click Add.
    10. Click OK.
    11. Click Next in the New Application Client Wizard - JAR File Contents dialog.
    12. Click the Main Class box in the New Application Client Wizard - General dialog then click ConverterClient in the popup list.
    13. Click Next.
    14. Click Finish in the New Application Client Wizard - Next Steps dialog.
    15. Click ConverterClient under ConverterApp on the left side of the Deployment Tool window.
    16. Click the EJB Refs tab on the right side of the Deployment Tool window.
    17. Click Add in the EJB Refs tab.
    18. Click the Coded Name field in the Add Enterprise Bean Reference dialog then type ejb/SimpleConverter in the field.
    19. Click the EJB Type box then click Session.
    20. Click the Interfaces box then click Remote.
    21. Click the Home Interface box then type converter.ConverterHome.
    22. Click the Local/Remote Interface box then type converter.Converter.
    23. Click JNDI Name.
    24. Click the JNDI Name box then type ConverterBean.
    25. Click OK.
  7. Create Converter Enterprise Application Web Client in Enterprise Archive File:

    1. Click File | New | Web Component in the Deployment Tool window.
    2. Click Next in the New Web Application Wizard - Introduction dialog.
    3. Click Create New WAR Module in Application in New Web Application Wizard - WAR File dialog.
    4. Click the Create New WAR Module in Application box then click ConverterApp.
    5. Click the WAR Name field then type ConverterWAR.
    6. Click Edit Contents.
    7. Verify that the Starting Directory box in the Edit Contents dialog contains C:\fieldbird\j2eetools\j2ee\projects\ejb\converter.
    8. Double click C:\fieldbird\j2eetools\j2ee\projects\ejb\converter in the Available Files area.
    9. Double click the web directory in the converter directory.
    10. Click the index.jsp file in the web directory then click Add.
    11. Click OK.
    12. Click Next in the New Web Application Wizard - WAR File dialog.
    13. Click JSP Page in the New Web Application Wizard - Choose Component Type dialog.
    14. Click Next.
    15. Click the JSP Filename box in the New Web Application Wizard - Component General Properties dialog then click /index.jsp in the popup list.
    16. Click Finish.
    17. Click ConverterWAR under ConverterApp on the left side of the Deployment Tool window.
    18. Click the EJB Refs tab on the right side of the Deployment Tool window.
    19. Click Add in the EJB Refs tab.
    20. Click the Coded Name field in the Add Enterprise Bean Reference dialog then type ejb/TheConverter in the field.
    21. Click the EJB Type box then click Session.
    22. Click the Interfaces box then click Remote.
    23. Click the Home Interface box then type converter.ConverterHome.
    24. Click the Local/Remote Interface box then type converter.Converter.
    25. Click JNDI Name.
    26. Click the JNDI Name box then click ConverterBean.
    27. Click OK.
  8. Add Converter Enterprise Application Web Context to Enterprise Archive File:

    1. Click ConverterApp on the left side of the Deployment Tool window.
    2. Click the Web Context tab on the right side of the Deployment Tool window.
    3. Click the field under Context Root then type /converter and press the Enter key.
    4. Click File | Save in the Deployment Tool window.
    5. Click File | Exit.
  9. Deploy Converter Enterprise Application Enterprise Archive File on Application Server:

    1. Click Tools | Deployment | Deploy in the J2EE Tools window.
    2. Wait until Command deploy executed successfully appears in the Deploy Archive File window.
    3. Click X in the top right corner of the Deploy Archive File window.
  10. Run Converter Enterprise Application Client:

    1. Click Tools | Run | Application Client in the J2EE Tools window.
    2. Wait until the following output appears in the Run Application Client window:
      12160.00 (yen for 100 dollars)
      0.77 (euros for 100 yen)
    3. Click X in the top right corner of the Run Application Client window.
  11. Run Converter Enterprise Application Web Client:

    1. Click Tools | Run | Web Client in the J2EE Tools window.
    2. Wait until the Converter page appears in the browser window.
    3. Click the amount field then type 100.
    4. Click Submit.
    5. Wait until the following output appears in the browser window:
      100 dollars are 12160.00 Yen
      100 Yen are 0.77 Euro
    6. When done entering amounts, click X in the top right corner of the browser window.
  12. Undeploy Converter Enterprise Application Enterprise Archive File on Application Server:

    1. Click Tools | Deployment | Undeploy in the J2EE Tools window.
    2. Wait until Command undeploy executed successfully appears in the Undeploy Archive File window.
    3. Click X in the top right corner of the Undeploy Archive File window.
  13. Stop Application Server:

    1. Click Tools | Application Server | Stop in the J2EE Tools window.
    2. Wait until JMS service shutdown complete appears in the Start Application Server window.
    3. Click X in the top right corner of the Start Application Server window.
    4. Click X in the top right corner of the Stop Application Server window.
  14. Delete Converter Enterprise Application Enterprise Archive File:

    1. Click Tools | Deployment | Delete in the J2EE Tools window.
    2. Click Yes in the delete Confirm dialog.
 

 
Get J2EE Tools from Field Bird at SourceForge.net Previous  Table of Contents  Next