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
- Creating EJB module
- File - New Project - Enterprise - EJB Module
- 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">
<display-name>EJBModule10</display-name>
<enterprise-beans>
</enterprise-beans>
</ejb-jar>
- Modifying ejb-jar.xml
- Modify Module Details - Display Name, Description, Small/Large Icon. And check result in XML view.
- 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.
- Check XML view. XML file now contains almost 80 lines. You can notice entity, session, message-driver elements in enterprise-beans element.
- Expand NewSessionSB node and all it's subnodes in Enterprise Beans section in General view
- General - all 3 fields contain correct value.
- Enterprise Bean Implementation and Interfaces - ensure go to source will lead you to correct source file.
- 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.
- 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.
- Change Display Name
- Write some description
- set small and large icon
- Security - again go through all variables and set some values. Check result in XML view.
- Do steps 4-7 for another 2 bean elements as well.
- EXPECTED RESULT: Everything is working as I've described in steps.