Previous  Table of Contents  Next  

  J2EE Tools - Lightweight IDE for J2EE Version 1.3.1  
     
 

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 Getting Started 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 Project Directory box in the J2EE Tools window then click blank in the popup list.
    2. Click the Build File box then click build.xml (default).
    3. Click the Build Target box then click converter.
    4. Click Tools | Build.
    5. Wait until Build Successful appears in the Build Target window.
    6. 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 J2EE server startup complete appears in the Start Application Server window.
  4. Create Converter Enterprise Application Enterprise Archive File:

    1. Click the Project Directory box in the J2EE Tools window then click ejb in the popup list.
    2. Click the Application Directory box then click converter.
    3. Click Tools | Deployment | Console.
    4. Wait until the Deployment Tool window appears.
    5. Click the square (maximize) in the top right corner of the Deployment Tool window.
    6. Click File | New | Application.
    7. Click Browse in the New Application dialog.
    8. Click Up One Level in the New Application dialog until Local Disk (C:) appears in the Look In box.
    9. Double click the fieldbird directory in the Look In area.
    10. Double click the j2eetools directory in the Look In area.
    11. Double click the j2ee directory in the Look In area.
    12. Double click the projects directory in the j2ee directory.
    13. Double click the ejb directory in the projects directory.
    14. Double click the converter directory in the ejb directory.
    15. Click the File Name field then type ConverterApp.ear.
    16. Click New Application.
    17. Verify that the Application File Name field in the New Application dialog contains C:\fieldbird\j2eetools\j2ee\projects\ejb\converter\ConverterApp.ear.
    18. 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 File in Application in the New Enterprise Bean Wizard - EJB JAR dialog.
    4. Click the Create New JAR File in Application box then click ConverterApp in the popup list.
    5. Click the JAR Display Name field then type ConverterJAR.
    6. Click Edit.
    7. Click Up One Level in the Edit Contents dialog until C:\fieldbird\j2eetools\j2ee\projects appears in the Starting Directory box.
    8. Double click the C:\fieldbird\j2eetools\j2ee\projects directory in the Available Files area.
    9. Double click the build directory in the projects directory.
    10. Double click the ejb directory in the build directory.
    11. Double click the converter directory in the ejb directory.
    12. Click the Converter.class file in the converter directory then click Add.
    13. Click the ConverterBean.class file in the converter directory then click Add.
    14. Click the ConverterHome.class file in the converter directory then click Add.
    15. Click OK.
    16. Click Next in the New Enterprise Bean Wizard - EJB JAR dialog.
    17. Click Session in the New Enterprise Bean Wizard - General dialog.
    18. Click Stateless under Session.
    19. Click the Enterprise Bean Class box then click ConverterBean.
    20. Click the Enterprise Bean Name field then type ConverterEJB.
    21. Click the Remote Home Interface box then click ConverterHome.
    22. Click the Remote Interface box then click Converter.
    23. Click Next.
    24. Click Finish in the New Enterprise Bean Wizard - Transaction Management 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 the box in the New Application Client Wizard - JAR File Contents dialog then click ConverterApp in the popup list.
    4. Click Edit.
    5. Click Up One Level in the Edit Contents dialog until C:\fieldbird\j2eetools\j2ee\projects appears in the Starting Directory box.
    6. Double click the C:\fieldbird\j2eetools\j2ee\projects directory in the Available Files area.
    7. Double click the build directory in the projects directory.
    8. Double click the ejb directory in the build directory.
    9. Double click the converter directory in the ejb directory.
    10. Click the ConverterClient.class file in the converter directory then click Add.
    11. Click OK.
    12. Click Next in the New Application Client Wizard - JAR File Contents dialog.
    13. Click the Main Class box in the New Application Client Wizard - General dialog then click ConverterClient in the popup list.
    14. Click the Display Name field then type ConverterClient.
    15. Click Next.
    16. Click Finish in the New Application Client Wizard - Environment Entries dialog.
    17. Click ConverterClient 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 field under Coded Name then type ejb/SimpleConverter.
    21. Click the field under Type then click Session.
    22. Click the field under Interfaces then click Remote.
    23. Click the field under Home Interface then type ConverterHome.
    24. Click the field under Local/Remote Interface then type Converter and press the Enter key.
  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 Component Wizard - Introduction dialog.
    3. Click Create New WAR File in Application in New Web Component Wizard - WAR File dialog.
    4. Click the Create New WAR File in Application box then click ConverterApp.
    5. Click the WAR Display Name field then type ConverterWAR.
    6. Click Edit.
    7. Click Up One Level in the Edit Contents dialog until C:\fieldbird\j2eetools\j2ee\projects appears in the Starting Directory box.
    8. Double click the C:\fieldbird\j2eetools\j2ee\projects directory in the Available Files area.
    9. Double click the build directory in the projects directory.
    10. Double click the ejb directory in the build directory.
    11. Double click the converter directory in the ejb directory.
    12. Click the index.jsp file in the converter directory then click Add.
    13. Click OK.
    14. Click Next in the New Web Component Wizard - WAR File dialog.
    15. Click JSP in the New Web Component Wizard - Choose Component Type dialog.
    16. Click Next.
    17. Click the JSP Filename box in the New Web Component Wizard - Component General Properties dialog then click index.jsp in the popup list.
    18. Click Finish.
    19. Click ConverterWAR under ConverterApp on the left side of the Deployment Tool window.
    20. Click the EJB Refs tab on the right side of the Deployment Tool window.
    21. Click Add in the EJB Refs tab.
    22. Click the field under Coded Name then type ejb/TheConverter.
    23. Click the field under Type then click Session.
    24. Click the field under Interfaces then click Remote.
    25. Click the field under Home Interface then type ConverterHome.
    26. Click the field under Local/Remote Interface then type Converter and press the Enter key.
  8. Add Converter Enterprise Application JNDI Name to Enterprise Archive File:

    1. Click ConverterApp on the left side of the Deployment Tool window.
    2. Click the JNDI Names tab on the right side of the Deployment Tool window.
    3. Click the field under JNDI Name to the right of the field under Component that contains ConverterEJB then type MyConverter and press the Enter key.
    4. Click the field under JNDI Name to the right of the field under Referenced By that contains ConverterClient then type MyConverter and press the Enter key.
    5. Click the field under JNDI Name to the right of the field under Referenced By that contains ConverterWAR then type MyConverter and press the Enter key.
  9. 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.
    5. Click File | Exit.
  10. Deploy Converter Enterprise Application Enterprise Archive File on Application Server:

    1. Click Tools | Deployment | Deploy in the J2EE Tools window.
    2. Wait until Deployment of ConverterApp is complete appears in the Deploy Archive File window.
    3. Click X in the top right corner of the Deploy Archive File window.
  11. Run Converter Enterprise Application Client:

    1. Click Tools | Run | Application Client in the J2EE Tools window.
    2. Wait until Enter Username appears in the Run Application Client window.
    3. Click the Enter field at the bottom of the Run Application Client window then type guest in the field and press the Enter key.
    4. Wait until Enter Password appears in the Run Application Client window.
    5. Type guest123 and press the Enter key.
    6. Wait until the following output appears in the Run Application Client window:
      12160.00 (yen for 100 dollars)
      0.77 (euros for 100 yen)
    7. Click X in the top right corner of the Run Application Client window.
  12. Run Converter Enterprise Application Web Client:

    1. Click Tools | Run | Web Client in the J2EE Tools window.
    2. Wait until the Converter appears in the browser window.
    3. Click the Enter an 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.
  13. Undeploy Converter Enterprise Application Enterprise Archive File on Application Server:

    1. Click Tools | Deployment | Undeploy in the J2EE Tools window.
    2. Wait until ConverterApp was uninstalled appears in the Undeploy Archive File window.
    3. Click X in the top right corner of the Undeploy Archive File window.
  14. Stop Application Server:

    1. Click Tools | Application Server | Stop in the J2EE Tools window.
    2. Wait until Shutting down the J2EE server followed by Shutting down JMS service 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.
  15. 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