This is a perfect application for an EJB 2.0 home method. Call the
finder from within the home method and filter the results.
Basically, you put in your Home interface:
public Collection thisIsAHomeMethod() throws RemoteException;
and you put in your implementation class:
public Collection ejbHomeThisIsAHomeMethod()
{
...
}
No need to add anything to the deployment descriptor. If you want to
secure access, you can require different security roles for the finder
vs. the home method.
Jeff Schnitzer
> -----Original Message-----
> From: Armin Michel [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 04, 2001 7:50 AM
> To: Orion-Interest
> Subject: Re: custom finder in CMPs
>
>
> On Friday 04 May 2001 14:44, you wrote:
> > Commonly, developers build a Stateless Session EJB "facade"
> through which
> > all access to Entity EJBs is accomplished. If you were to
> employ such a
> > pattern, the method of this "facade" that invokes the CMP finder in
> > question would be an appropriate place to manipulate the
> results before
> > returning them to the client. Have a look around
www.theserverside.com for
> lots of information and discussions of EJB module design.
The facade-approach is no option, because someone could bypass that
facade
and use the home interface directly. (Everybody must be able to access
my
JNDI - thus everybody has access to the Home-Interfaces too).
It would be cool, if I could hook the cmp-finder-Method in some way. Is
that
possible? Such a callback-solution would solve my problem.
Armin Michel
PS: Meanwhile I will have a look at theserverside.com