Well.. I'm using declarative (using only xml
descriptors) security not programative security.
Elena Barns wrote :
This exception is thrown when you use method that throws
this exception, so
as with any exception you have to put this method in try{} block and in catch(e com.evermind.server.rmi.OrionRemoteException) {} put method that shows the user message about lacking of security permissions. This is my opinion Elena 1. I canīt catch the
com.evermind.server.rmi.OrionRemoteException because itīs a Orion
propietary Exception and my Application must work over any Application Server to
get the J2EE Certified Seal.
Serguei Batiuk wrote :
You probably
need to derive all you exceptions from RemoteException, and work with these
exceptions as usually, for example:
public class
WrongUserException extends RemoteException {
public
WrongUserException {
}
...
}
Then you code
will look like:
public class
SomeClass {
public
void SomeMethod {
try {
// Invoke some secure
method..
MyEJB ejb =
someBean.someSecureMethod();
}
catch( WrongUserException e )
{
// Wrong
User!
}
catch( RemoteException )
{
// Something else has
happened!
}
}
}
HTH,
Sergei.
2. Yeah... good idea but how and when must I throw this
"WrongUserException" ? Thatīs my problem... I donīt know when I have a pure
RemoteException or when I have a RemoteException that mask a Security
Constraint...
__________________________
David Bonilla Fuertes THE BIT BANG NETWORK http://www.bit-bang.com Profesor Waksman, 8, 6š B 28036 Madrid SPAIN Tel.: (+34) 914 577 747 Móvil: 656 62 83 92 Fax: (+34) 914 586 176 __________________________ |