Part Two-Working with the Bean and Incoking it.
----------------------------------------------------------
Last time around we Learnt how to Create a Bean. Now let us add a method and call that Bean.
Reach the Bean Class and add your Method
Save the file and Right Click on OUTLINE. Here u must Promote the method...Remotely and Locally.
Check to see if it has been promoted remotely one class under your session bean will have the remote method.
Next..
Select the Server u want to run the EJB on and click Next...
Will get an Option Deploy EJB Beans select the same...and click Finish.
Now sit back and
Next select Test EJB Remote Interface and click FINISH.
Next u will get The EJB Reference screen click on Invoke and then an Object should have been created that can be used to access the method.
Next use that object and access the method. That's how simple it is.
....Next Learn how to invoke the ejb from a JSP Page.
No comments:
Post a Comment