EJB 2.x CMP/CMR and EJB QL tutorial ported/tested on JBoss.
The free tutorial is broken up into four parts.
The first part describes basic EJB 2.x CMP with a simple finder method defined in EJB QL. The second part describes defining EJB CMR relationships. Four types of relationships are defined:
Many to Many
One to Many
One to One
Both unidirectional and bidirectional relationships are covered.
The third part describes basic EJB QL. It mostly deals with joining cmr fields and working with IN and MEMBER OF.
The fourth and final part describes advanced EJB QL, and how to create select methods. It even rewrites code with select methods and shows a 10x reduction in code. Master select methods and you will love EJB.
Tutorial home page:
(source code at bottom of page)
Six changes needed to get the examples to work with JBoss.
Peter from WestSideWidgets was kind enough to port the examples to JBoss. I used XDoclet to generate the deployment descriptors, but never spent the time with JBoss to test them. Peter tested them and fixed them. Thus, the example has been ported to JBoss.
He found six problems, which he fixed.
What people think:
Achim from Germany writes: "I read your white papers "Introducing EJB-CMP/CMR" part 1 and part 2.... These papers are the best start for EJB.... Now I'm very interested in part 3 (and 4), but I can't find them on the developerWorks Homepage ..." (They are out and ported to JBoss and WebLogic.)
Pete from North Carolina writes: "I've been working through your "Introducing EJB-CMP/CMR" tutorials. Great stuff. Well presented - simple and straight forward. Really learning a lot. "
Patrick from the U.S.A. writes: "Great Job on part 1 and 2 of your tutorial on CMP/CMR and EJB QL. When will part 3 and 4 be out.? Will it be able to run on JBoss Resin, and Orion." (It is done! Part 3 and 4 works with WebLogic and JBoss. I got the examples working with WebLogic and Peter got them working with JBoss. --Rick)
Chintan from parts unknown writes “...thank you for putting out fabulous quality CMP/CMR tutorial. This is the best tutorial I have ever seen. Complete, concise and clear. (Where is the source?) (The source code is at the bottom of this page.)”