0 Replies Latest reply on Jan 31, 2002 10:17 AM by Thomas Hamann

    ejbSelect without relationship

    Thomas Hamann Newbie


      corresponding to EJB2.0 specification i tried the following:
      I implemented two remote entity beans (Group and User) and one local entity bean (GroupMember) - all with CMP. Both remote beans define their own ejbSelect method to access the database table of the local bean. This is very much like a container managed relationship, but unfortunately those relationships are only allowed between local beans.
      Now the problem: jboss (3.0.0DR1) is unable to deploy the beans... following exception:
      org.jboss.deployment.DeploymentException: Error in query spedification for method ejbSelectGroupMember
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCQueryMetaDataFactory.createJDBCQueryMetaData(JDBCQueryMetaDataFac
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCQueryMetaDataFactory.createJDBCQueryMetaData(JDBCQueryMetaDataFac
      at ... and so on.

      The method signature is:
      public abstract GroupMember ejbSelectGroupMember (long group, long member) throws FinderException;

      Defined in ejb-jar.xml as:

      <ejb-ql>select distinct object(gm) from GROUPMEMBER as
      gm where gm.jgroup=?1 and gm.member=?2</ejb-ql>


      ... and in jbosscmp-jdbc.xml almost the same (just without result-type-mapping, ejb-ql, and abstract-schema-name).

      In EJB spec there is nothing said that a CMR is needed to access a local bean via ejbSelect, but i'm drawing the conclusion that JBoss does not support that. Does it?!