Testing EJB Consumption in NetBeans 6 Visual Web Projects
Test a version of NetBeans 6 Visual Web trunk later than
2007-06-07T22:30 (UTC). The functional spec is the same as for Creator 2
Update 1 release.
Server-side Setup
First, set up a server-side EJB service. For example, deploy the sample
converter-client.ear to Sun AS 9.1. Download the client-side jar from the
app server and save it. As of 2007-06-07, if you use Sun AS 9.1 you need to
manually extract the ejb-client-ic.jar containing the EJB client stubs from
the downloaded app-client-ic.jar.
IDE Test Cases
Scenario 1:
Create new visual web JSF project
Services Tab->Enterprise Java Beans->Add Set of Session EJBs
Use the ejb-client-ic.jar as the client jar file.
Press "Next", "Finish" and wait while the IDE generates wrapper jars.
Expand Services Tab->Enterprise Java Beans
Drag and drop or invoke context menu item for new Session Bean and activate "Add To Page"
Build rest of app by adding text field, group message, and submit button, etc. Add call to session bean wrapper in code.
Press "Run" to build and deploy to Sun AS 9.1
Test app in browser.
Other Items to Test
In Services Tab->Enterprise Java Beans:
Export EJB Sets
Import EJB Sets
In Services Tab->Enterprise Java Beans->'An-EJB-Group-Name'
Remove
Refresh
Modify
Configure Methods
In Services Tab->Enterprise Java Beans->'An-EJB-Group-Name'->'A-Session-Bean'
Add To Page = adds a Session Bean wrapper
Properties
In Services Tab->Enterprise Java Beans->'An-EJB-Group-Name'->'A-Session-Bean'->'A-Method'