|
I am using @ejb:finder tag and version 1.1.2. The
home interface for the finder method is created properly, but the localhome is
not. The local home's return type is incorrect. Here's a snippet:
* @ejb:bean * type="CMP" * cmp-version="2.x" * name="RentalProperty" * jndi-name="ejb/RentalProperty" * local-jndi-name="ejb/RentalPropertyLocal" * view-type="both" * reentrant="false" * schema="RentalProperty" * primkey-field="propertyId" * * @ejb:pk * class="java.lang.Long" * * @ejb:finder * signature="com.je.ejb.interfaces.RentalProperty findByMLS(java.lang.String mls)" * query="SELECT OBJECT(c) from RentalProperty rp WHERE rp.mlsNumber = ?1" Remote home generated looks like this: public com.je.ejb.interfaces.RentalProperty findByMLS(java.lang.String mls) throws java.rmi.RemoteException,javax.ejb.FinderException; The local home generated looks like this: public com.je.ejb.interfaces.RentalProperty findByMLS(java.lang.String mls) throws javax.ejb.FinderException; The obvious error being RentalProperty should be RentalPropertyLocal. I've tried various combinations of result-type-mapping and it seems that the documentation is poor regarding this attribute, and it has been hard to find good examples that expose a finder method to both local and remote interfaces. What's the trick here? Remember I'm not returning a collection or list from the finder. I am returning a single type which is different in the remote and local interfaces. Thanks Jim Kennedy IT Consultant ----------------------------------------------------- |
