For Container Managed Persistence beans, you just add the method to the Home
interface:

public Collection findByField1 ( String field1 ) throws FinderException ,
RemoteException ;

The container will automatically write the finder method for you.

For Bean Managed Persistence beans, you put the same method in the Home
interface,
but you must write your own finder method in the EJB class:

public Collection ejbFindByField1( String field1 ) {

     ...  SQL statements to find Collection 
    return Collection.

}

> -----Original Message-----
> From: James Ho [SMTP:[EMAIL PROTECTED]]
> Sent: August 29, 2000 12:18 PM
> To:   Orion-Interest
> Subject:      Re: EJB finder methods.
> 
> Hi Paul
> 
> I am a newbie in EJB...so don't know if this will really helps..
> 
> I guess u implement the finder methods in the bean class?  and also modify
> the Home interface file to add that method in.
> 
> Regards, James
> 
> 
> > Where do I specify my own finder methods in my entity bean.
> >
> _________________________________________________________________________
> > Get Your Private, Free E-mail from MSN Hotmail at
> http://www.hotmail.com.
> >
> > Share information about yourself, create your own public profile at
> > http://profiles.msn.com.
> 

Reply via email to