home.j and home-local.j both use the following for finder methods:
<XDoclet:ifEntityIsBmp>
<XDoclet:forAllMethods>
<XDoclet:ifIsFinderMethod>
<XDoclet:comment indent="3"/>
public <XDoclet:methodType/> <XDoclet:methodName paramName="substring"
value="3"/>(<XDoclet:parameterList/>)
throws java.rmi.RemoteException,javax.ejb.FinderException;
</XDoclet:ifIsFinderMethod>
</XDoclet:forAllMethods>
</XDoclet:ifEntityIsBmp>
Only problem is the BMP class returns PKs and the container looks them up
and returns the corresponding remote references. The above is fine for
finders that are returning an Enumeration or Collection of PKs (the EJB
class returns a collection of PKs while the home's find returns a
collection of remote interfaces, but because they're both collections it
still compiles). For finders returning a single instance, however, the
above means the home find method also gets defined as returning the PK
class, not the remote interface class...
Also, at lines 43-46 in both templates it always adds a findByPrimaryKey
method; it shouldn't for BMP, because I already have an
ejbFindByPrimaryKey in the EJB to look it up in the database (which was
how I noticed the above - the one that was already included returned the
interface, while the one produced from ejbFindByPrimaryKey returned the
PK, so I got a compiler error "Methods can't be redefined with a different
return type").
The second problem is easily solved with a <XDoclet:ifEntityIsCmp>; the
first is a bit trickier...
Andrew.
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel