Its as portable as it can get with the current spec. The 1.1 spec only requires
that a RemoteException be thrown and the only reasonable mechanism for
differentiating RemoteExceptions is via the nested exception type. In general
though, portable security is an oxymoron.
15.6.9 Runtime security enforcement
The general security enforcement requirements for the EJB Container follow:
. The EJB Container must provide enforcement of the client access control per the
policy
defined by the Deployer. A caller is allowed to invoke a method if, and only if, the
caller prin-cipal
is assigned at least one of the security roles that includes the method in its method
per-missions
definition. (That is, it is not meant that the caller must be assigned all the roles
associated with the method.) If the Container denies a client access to a business
method, the
Container must throw the java.rmi.RemoteExcetion to the client
----- Original Message -----
From: "Alexander Klyubin" <[EMAIL PROTECTED]>
To: "jBoss" <[EMAIL PROTECTED]>
Sent: Friday, January 19, 2001 9:39 AM
Subject: RE: [jBoss-User] Testing bean security with JUnit
> This isn't portable across EJB servers, is it? Anyway, thanks.
>
> Alexander Klyubin
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Scott M Stark
> Sent: Friday, January 19, 2001 19:29
> To: jBoss
> Subject: Re: [jBoss-User] Testing bean security with JUnit
>
>
> The latest cvs code throws a SecurityException wrapped in a RemoteException
> so you
> can identify a security exception by looking at the remote exception detail
> value:
>
> try
> {
> ...
> }
> catch(RemoteException e)
> {
> if( e.detail instance of SecurityException )
> System.out.println("Security violation");
> }
>
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> List Help?: [EMAIL PROTECTED]
>
>
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]