Exercises

To extend your knowledge of the subjects covered today, try the following exercises:

1:Add the findAllOrders() method to the OrderHome interface, and specify the corresponding EJB QL query SELECT OBJECT(o) FROM Order AS o in the ejb-jar.xml deployment descriptor. In addition, package and deploy the entity bean.
2:Define local interfaces for the OrderEJB bean. Define an OrderLocalHome local home interface and OrderLocal local interface. We will use these local interfaces on Day 21.

Get Sams Teach Yourself EJB in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.