J2EE (EJB) Smoke Test

  1. Open an empty workbench.
  2. Switch to the J2EE perspective: Perspective->Open->Other->J2EE
    1. Verify that the J2EE toolbar actions appear (create an EJB, create a Servlet, create an EJB project, create an Application Client module, create a Web Project, create EJB to RDB mapping, create and Enterprise Application)
    2. Verify that the J2EE view appears in the navigator frame. It will probably be empty.
    3. Verify that the appropriate New menu items are visible, these are the project actions from the toolbar, plus create a new EJB example
  3. Create a new EJB project for testing EJB creation. Press the "New EJB Project" toolbar button. Call the project "TestEJBs", use the default location, check the "Add to an EAR" option and call the ear "default_ear".
    1. Verify that a new EJB project called "TestEJBs" is created.
      1. The corresponding module should appear in the J2EE view in the EJB Modules folder. (175916 - the module does not appear until it contains at least one EJB.)
    2. Verify that a new EAR project called "default_app" is created.
      1. The corresponding module should appear in the J2EE view in the Enterprise Applications folder. It should contain the nested EJB module.
    3. Open "default_app" by double-clicking in the J2EE view. The EAR editor should be opened. Verify that the application.xml source looks good in the source page.
    4. Modify the module display name in the source page, switch to the General page and verify that the change is reflected. Verify that save is enabled for the application.xml. Save and close the editor. Re-open the editor and verify the description change.
    5. Modify the display name on the general page, and verify it in the source page. Save should be enabled, and the resource tab should be marked dirty (with a "*").
  4. Add a new session bean to the EJB module.
    1. Press the Create an Enterprise Java Bean toolbar button.  This will launch the new Enterprise Java Bean wizard.  Name the bean "Hello", select "Session bean" as the EJB type.  Verify that the target project is already selected.

    2. (175845) Project selection is not being picked up from the J2EE view, so you'll need to manually select the project for now.
    3. Provide the package name for the generated classes by entering "testing" into the first package name field.  Verify that it propogates to the other fields.
    4. Press Finish to generate the Session bean classes.
    5. Open the Java perspective: Perspective->Open Perspective->Other...->Java.

    6. For now this has to be done in the Java perspective, the generated classes will appear in the J2EE view under the EJB when 175608 is implemented.
      1. In the package view, verify that the package "testing" appears under "TestEJBs\ejbModule".
      2. Verify that the files hello.java, hellobean.java, and hellohome.java exist.
      3. Switch to the J2EE view, the new EJB should appear under the "Test_EJB" module in "EJB Modules".
    7. Add a test method to Hello.  Open the java editor on hellobean.java by double-clicking on it.  Add a new method String sayHello(String) using the Java tooling like so:

    8.    public String sayHello(String message) {
             return "Hello, " + message + "!";
         }
    9. Add the method to the remote interface.

    10. This is currently done manually, by copying and pasting the method into the remote interface.  The method in the remote interface should appear like this:
             public String sayHello(String message) throws java.rmi.RemoteException;
      Use code assist, ctrl-Space to lookup RemoteException, to verify that the project's Java environment is working properly.
      When 175610 is completed, there will be a "Promote to remote interface" menu item available on the specialized Bean class Java editor which will do this for you.
  5. Open the EJB editor for "TestEJBs" by double-clicking on the module under "EJB Modules"
    1. The EJB editor should be opened. Verify that the source for the ejb-jar looks reasonable.

    2. (175817) Once we get our DTD's registered, add a step to use code-assist in the source page.
      1. Verify that the EJB editor is working properly.  Edit the display name field.  When you tab out of that field, the display name in the J2EE view should be updated.  Sitch to the source page and verify that the XML is also updated.

      2. Verify that source changes flow to the general page, too.  In the source page, copy and paste the display-name element from the JAR to the Hello entity.  The display-name element must be the first element under <session>.  Switch to the general tab, select Hello in the Enterprise Beans list, and verify the display name you entered.
  6. Generate Deployed code for Hello.  Select the project TestEJBs, pop-up Generate for enterprise beans...->Generate deployed code.  Make sure Hello is checked on the prompter, and hit finish.
    1. Switch to the Java perspective, and verify that three new .java files were generated and do not have compile errors.  They are EJSRemoteStatelessHello.java, EJBRemoteStatelessHelloHome.java, and EJSStatelessHelloHomeBean.java.
  7. Generate RMIC code for Hello.  Select the project TestEJBs, pop-up Generate for enterprise beans...->Generate RMIC stub and tie code.  Make sure Hello is checked on the prompter, and hit finish.
    1. Switch to the Java perspective, and verify that a whole slew of incomprehensible classes were generated in multiple packages, some of which have names like _Hello_Stub.java, and _HelloHome_stub.java.  Check the task list and make sure there are no compile errors.  Even better, make sure the corresponding .class files exist in \bin\....
  8. Next, testing with the unit test environment...