I've been playing around with variations of the @ejb:finder tag and can't figure out 
how to get it to work properly. I have a finder method (getByName) that locates and 
returns a single entity. I also want this method to be available in both the remote 
and local interface. 

If I declare the return type as BeanRemote, I can't use the finder method on the local 
interface - the compile fails if you try to assign it to BeanLocal and the runtime 
fails if you try to assign it to BeanRemote. If I declare the return type as 
BeanLocal, jboss complains about having a local reference in a remote home interface.

The work around is to declare the return type as Collection and pull off the only item 
on the list. 

So now the questions - Am I missing something about using the original tag or is this 
a bug? From a coding style perspective, is it preferable to always use a return type 
of Collection as opposed to the local or remote interface?

Thank you for your comments,

Joseph Hindsley
Systems Architect
Providerlink, Inc.



_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to