"Michael Konietzka" wrote : When my client tries to access a secured EJB with
wrong credentials, the server throws a FailedLoginException as expected. But
then the client throws UndeclaredThrowableException, because the method
signature doesn't know anything about LoginException.
| [..]
|
Well, it seems to be a problem from our client-application:
There:
Class[] classes = ReflectionHelper.getClasses(args);
EJBObject ejbObject = null;
// get EJB home
EJBHome ejbHome = getEJBHome(jndiName, narrowTo);
// call create method
try {
Method method = ejbHome.getClass().getMethod("create",
classes);
ejbObject = (EJBObject)method.invoke(ejbHome, args);
} catch (Exception e) { ...}
There is an InvocationTargetException with UndeclaredThrowableException.
while the following code is ok:
Object obj = ctx.lookup(AnotherRemoteHome.JNDI_NAME);
AnotherRemoteHome home = (AnotherRemoteHome)
PortableRemoteObject
.narrow(obj, AnotherRemoteHome.class);
EJBObject ejbObject = null;
// call create method
try {
Method method = home.getClass().getMethod("create", null);
ejbObject = (EJBObject)method.invoke(home, null);
} catch (Exception ite)
{...}
There will be an InvocationException, with the "real" RemoteException, none
UndeclaredThrowableException.
Nevertheless, this is not a JBoss-Security issue.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3886389#3886389
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3886389
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user