0 Replies Latest reply on Oct 23, 2002 11:19 AM by Sebastien Petrucci

    read-ahead and groups

    Sebastien Petrucci Newbie

      Hi all,

      I'am using JBoss 3.0.2 and I'm having some problems to optimize my entity beans.

      What I want to do is to load a complete bean when calling a finder (findByPrimaryKey + all others).

      For a finder method, I can define the read-ahead attributes and it works. But what about my 'findByPrimaryKey' method ? When I try to do the following :


      <query-method>
      <method-name>findByPrimaryKey</method-name>
      <method-params>
      <method-param>java.lang.Integer</method-param>
      </method-params>
      </query-method>
      <read-ahead>
      on-find
      <page-size>1</page-size>
      <eager-load-group>*</eager-load-group>
      </read-ahead>


      JBoss says, during deployment, that :
      Unknown query method : public abstract MyBean MyBeanHome.findByPrimaryKey(java.lang.Integer) throws javax.ejb.FinderException

      So, how do it then ?

      Also, I tried to the following :


      <ejb-name>MyBean</ejb-name>
      <read-ahead>
      on-find
      <page-size>1</page-size>
      <eager-load-group>*</eager-load-group>
      </read-ahead>
      ...

      But it didn't change anything.

      Any idea ?

      Sebastien.