0 Replies Latest reply on Feb 24, 2005 7:23 AM by sys user

    entity-beans / finders EJB1.1

    sys user Master

      I hope someone can help me.

      I use JBoss 4.0.0 with EJB1.1 and CMP1.
      For EntityBeans: which deployment descriptors do I need and where are the finder-Methods declared?
      I currently use ejb-jar.xml (bean-declaration), Jboss.xml (jndi names of beans) and jaws.xml:

      <jaws>
      <datasource>java:/informix</datasource>
      <type-mapping>InformixDB</type-mapping>
      <enterprise-beans>
      <entity>
      <ejb-name>LoginBean</ejb-name>
      <cmp-field>
      <field-name>id</field-name>
      <column-name>id</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>user</field-name>
      <column-name>user</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>login</field-name>
      <column-name>login</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>passw</field-name>
      <column-name>passw</column-name>
      </cmp-field>
      <finder>
      <name>findByPrimaryKey</name>
      <query>where id = {0}</query>
      <order></order>
      </finder>
      <finder>
      <finder>
      <name>findByUser</name>
      <query><where login={0} and user={0}></query>
      <order></order>
      </finder>
      <table-name>login</table-name>
      <time-out>10</time-out>
      </entity>
      </enterprise-beans>
      </jaws>


      When I call the findByUser Method I receive the error :
      javax.ejb.FinderException: Unknown query

      I also read that jaws.xml is no longer supported, but jbosscmp-jdbc.xml is for cmp 2.0, or?

      Thanks in advance for your help.