On Thu, 08 Feb 2001, you wrote:
> Version: JBoss 2.0-FINAL
> 
> I am having problems getting custom finders to work,
> both using the JAWS <finder> tag and defining an
> ejbFindXXX method. So I have two questions:
> 
> 1. How do you write your own finder in an entity bean?
> 
> MyEntityHome:
> public abstract Collection findBySomething(int i)
> 
> MyEntityBean:
> public Collection ejbFindBySomething(int i){
>   // Do something and return a Collection of primary
>   // keys for all records that match this criteria
> }

Won't work in a CMP bean.  I've just noticed in the last few days that if you
don't define a finder in jboss.xml, then it just returns an empty collection (!)

> 2. How do you configure a working JAWS finder?
> 
> MyEntityHome:
> public abstract Collection findBySomething(int i)
> 
> jaws.xml:
> <jaws>
>   <enterprise-beans>
>     <entity>
>       <ejb-name>MyEntityBean</ejb-name>
>       <finder>
>         <name>findBySomething</name>
>         <query>something < {0}</query>

This should cause a deployment error, I think.  The left angle bracket is not a
legal character here, AFAIK.  Could that be causing your problem?  Another
thing I've heard is that you need something in the <order> tag.

Tom


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to