1 Reply Latest reply on Aug 30, 2002 1:41 AM by rickhigh

    EJB 2.x CMP/CMR and EJB QL tutorial ported/tested on JBoss

    rickhigh

      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:
      http://www.rickhightower.com/ejbcmpcmrtut.html

      (source code at bottom of page)

      Six changes needed to get the examples to work with JBoss.
      http://www.rickhightower.com/jbossupdate.html

      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.)”

        • 1. Re: EJB 2.x CMP/CMR and EJB QL tutorial ported/tested on JBo
          rickhigh

          Complete zip file with build script for JBoss for part 1 and part 2....

          Yin just contributed a zip file for part 1 and 2.
          Sounds like it will simplyfy development for jBoss developers. He modified the build and such....

          Note from Yin....
          """
          Hi Pete and Rick,
          I just thought that I might make a small contribution by sending you the jboss port of the part 1-2 series of Rick's cmp/cmr tutorial series. I couldn't find it on pete's website (I might have missed them... , I saw the part 3-4 port though ). Pete, if you don't have
          them on your website, you can post them for all these guys who are just starting out ....

          I customized the script for the client , run.bat to run for jboss and also customized the build.xml, added a jboss.xml and jbosscmp-jdbc.xml file in the session and entity descriptor folders.

          I also use the build in db of jboss, hypersonic sql and added trace output for all the methods that can be followed on the jboss console.

          Everything seems to work fine on my computer. Let me know if it works for you too.

          Thanks Rick for the great tutorial !!!
          (Thanks for the port --Rick Hightower)

          CONTRIBUTION FROM YIN: jbosssection4.zip

          Yin
          """

          (ytse@canada.com)