While fixing a bug I had to unwrap another ServerException in
JRMPInvokerProxy. I'm not really an expert on the exception handling here,
but shouldn't we be unwrapping a lot more exceptions, at least any
ServerException that wraps a RemoteException?
Here's the code:
try {
return ((MarshalledObject) remoteInvoker.invoke(mi)).get();
}
catch (ServerException ex) {
// Suns RMI implementation wraps NoSuchObjectException in
// a ServerException. We cannot have that if we want
// to comply with the spec, so we unwrap here.
if (ex.detail instanceof NoSuchObjectException)
{
throw (NoSuchObjectException) ex.detail;
}
//likewise
if (ex.detail instanceof TransactionRolledbackException)
{
throw (TransactionRolledbackException) ex.detail;
}
/* Shouldn't we unwrap _all_ remote exceptions with this code?
if (ex.detail instanceof RemoteException)
{
throw (RemoteException) ex.detail;
}
*/
throw ex;
}
Thanks
david jencks
-------------------------------------------------------
In remembrance
www.osdn.com/911/
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development