You could only allow a certain role to access that method; that's how
declarative security works in J2EE: role(s) X are allowed to reach method(s)
N().

Alternatively, if you want the method to fail silently, write/generate a
wrapper class, that calls remove() in a try/catch, only catching the security
exception and propagating any other exceptions.

HTH,

JP

> Hi All
>
> Had a couple of typos when I first sent this, so here it goes again...
>
> Is there a way to prevent the deletion of an Entity EJB? Let's say I
> have a 'read only' Entity Bean. How do I configure the Bean such that
> remove (if called) can never delete the entity? I notice that throwing a
> RemoveException from ejbRemove() prevents deletion but was wondering if
> there was a more elegant way to prevent deletion.
>
> Thanks
> Rob
--

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to