0 Replies Latest reply on Oct 24, 2002 11:55 AM by Jürgen Krannich

    Use a custom finder for CMP-beans???

    Jürgen Krannich Newbie

      Hi there,

      I'm trying to implement a dynamic finder for a CMP-bean. I'd prefer to do
      this by implementing the finder in the bean-class itself (it would
      access the database directly) rather than using dynamic-ql. I'm not very sure if
      this is allowed at all. On the one hand Dain posted that this should work (see
      Thread http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ but on the
      other hand the JBoss.3.0QuickStart.pdf states that "The EJB 2.0 specification
      requires that every ejbSelect or finder method (except findByPrimaryKey) have an
      EJB-QL query defined in the ejb-jar.xml file.". For me this sounds like it is
      not permitted to do so, because it is not possible to define an EJB-QL query for
      a custom finder (otherwise I wouldn't need a customized one).

      Any ideas???

      Greetings,
      Jürgen