TS 61 EjbJar xml editor

Test Specification for ejb-jar.xml visual editor

Author: Radim Roska
Estimated time: 2 hours
Default IZ component(s): j2ee/ejb/dd
Version: 1.0
Last update: 2008/05/20
Comments: This test specification tests visual editor for deployment descriptor ejb-jar.xml


Test suite: Creation of deployment descriptor

Purpose: To be sure that xml is created together with the ejb module.
Setup: Registered Java J2EE 1.4 compliant application server. For example glassfish

  1. Creating EJB module
    1. File - New Project - Enterprise - EJB Module
    2. Press Next, Next, select Java J2EE 1.4 version and press Finish.
    • EXPECTED RESULT: EJB Module is created. Check that deployment descriptors are created in Configuration Files (in projects view). Open them - ejb-jar.xml and sun-ejb-jar.xml(this one is glassfish related). Open ejb-jar.xml, general tab is opened in editor, you can see form where just Display Name is filled - it contain name of the project. XML view shows physical content of xml file. Its like following example

<?xml version="1.0" encoding="UTF-8"?> <ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">



  1. Modifying ejb-jar.xml
    1. Modify Module Details - Display Name, Description, Small/Large Icon. And check result in XML view.
    2. Create EJB Beans - Session Bean, Message-driven Bean and Entity Bean according to the http://wiki.netbeans.org/TS_61_EJB_Support specification. This will create 3 bean elements in Enterprise Beans section.
    3. Check XML view. XML file now contains almost 80 lines. You can notice entity, session, message-driver elements in enterprise-beans element.
    4. Expand NewSessionSB node and all it's subnodes in Enterprise Beans section in General view
      1. General - all 3 fields contain correct value.
      2. Enterprise Bean Implementation and Interfaces - ensure go to source will lead you to correct source file.
      3. Bean Environment - in environment entries, resource references, resource environment references and security role references add entries and check this operation generated correct xml structure in XML view.
    5. Bean detail - contains just module name in display name text field. Check that every following action will generate appropriate XML code in XML view in correct bean element.
      1. Change Display Name
      2. Write some description
      3. set small and large icon
    6. Security - again go through all variables and set some values. Check result in XML view.
    7. Do steps 4-7 for another 2 bean elements as well.
    • EXPECTED RESULT: Everything is working as I've described in steps.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo