river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Firmstone <j...@zeus.net.au>
Subject Re: Tricky question - UnmarshalException Serialized Form.
Date Thu, 29 Apr 2010 06:44:35 GMT
Peter Firmstone wrote:
> Got a tricky question about java.rmi.UnmarshalException and 
> compatibility communicating with earlier versions of Jini.
> For Java CDC, I'm missing java.rmi.UnmarshalException
> UnmarshalException extends java.rmi.RemoteException, which I do have.
> UnmarshalException has no Serialized state, nor does it have any 
> methods, only constructors.
> I can't go changing all existing public API methods that throw it, to 
> throw say, net.jini.io.UnmarshalException since earlier platform 
> versions won't have the required class file.
> I could throw RemoteException instead, however that might cause the 
> Exception to be caught higher up the call stack.
> One solution seems to be to convert the serialized form of <edit> 
> net.jini.io.UnmarshalException to java.rmi.UnmarshalException for 
> ObjectOutputStream</edit>, and then change it back in 
> ObjectInputStream somewhere, perhaps in JERI for java cdc only?
This doesn't seem very reasonable, I guess the consequences of changing 
the exception thrown will cause a ClassNotFoundException or similar in a 
remote jvm that unmarshalls the exception if it is serialized.

Still thinking...

> Any ideas?
> Cheers,
> Peter.

View raw message