4 Replies Latest reply on Dec 27, 2001 2:35 PM by pmckinstry

    generated finder methods

    olekg

      In cmp-cd example there are some findBy<> methods declared in CDHome.java interface. How and where are they implemented. Why also for completly stupid findByFooFoo declared method compilation is OK ? Can I see what code is generated by container for these methods ?

      sincerely Olek

        • 1. Re: generated finder methods

          CMP finders findByPrimaryKey(), findAll() and findBy are generated for you by the container during deployment.

          The specifics of the code that handles the finders are part of the JBoss source.

          • 2. Re: generated finder methods
            olekg

            Thanks, for your answer Yuha. Am I able to define finders that are to be genarated ?

            • 3. Re: generated finder methods

              Yes. See the JAWS Documentation.

              • 4. Re: generated finder methods
                pmckinstry

                Which version of jboss automatically generates the finder methods?

                I'm using 2.4.4 & my findByPrimaryKey is generated & works fine, but my findByOwner (where owner is a cmp field on the ejb) raises a finder exception. If i define it in the jaws.xml, it works fine. Am i doing something wrong? or using the wrong version?

                -pgm