Simple Calculator EJB 2.1 setup
Configuring this project takes approximately 5 minutes.
About this task
Procedure
- Before you can run the sample, you must first import it
into your workspace.
- Import sample
- In the Import Project dialog box, accept the defaults and click Finish.
- To run the program:
- Ensure there are no errors listed in the Problems view. From the Servers view, start the WebSphere Application Server instance. This sample will run on IBM® WebSphere® Application Server v7.0.
- Right-click the started server instance and select Add/Remove Projects. Add the SimpleCalculatorEJB21EAR to the configured project list and click Finish.
- In the Enterprise Explorer view, select the EJB project SimpleCalculatorEJB21, right-click, and select Run As > Run on Server.
- In the Run ON Server wizard, select the previously started server instance and click Next.
- Ensure the SimpleCalculatorEJB21EAR is added to the Configured Projects and click Finish.
- Once the Universal Test Client opens, select JNDI Explorer in the left frame. On the right frame, expand ejb -> ejbs and click on SimpleCalculatorHome.
- From the EJB Bean section on the left frame, expand SimpleCalculatorHome and click on SimpleCalculator create().
- Select the Invoke button and click Work with Object. This will create a SimpleCalculator 1 under EJB Beans section in the left frame.
- Expand SimpleCalculator 1 and the four previously promoted methods are available to be tested.
Feedback