Issue Details (XML | Word | Printable)

Key: OPENEJB-47
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: David Blevins
Reporter: David Blevins
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenEJB

Support for common Exceptions serialization issues

Created: 08/Aug/05 12:56 PM   Updated: 29/Aug/06 01:20 PM  Due: 25/Sep/06
Return to search
Component/s: None
Affects Version/s: 0.9.2, 1.0
Fix Version/s: 3.0-beta-1

Time Tracking:
Not Specified

Resolution Date: 25/Sep/06 12:13 AM


 Description  « Hide
Occasionally Application or System exceptions thrown to a client hold data which is not serializable and prevents the exception from being serialized. This prevents the exception from reaching the client.

The second and most common scenario is that the exception class is not on the client side and deserialization fails as the class cannot be loaded.

The ejbd server protocol could be updated with improved serialization logic on system and application exceptions. One of the basic concepts I've thought is to basically wrap the exeption and a string version of the exception in an externalizable object and write that to the stream. A failure to serialize/deserialize something inside an externalizable object doesn't cause the stream to become corrupted as the externalizable object itself is written in it's own special buffer by the ObjectOutputStream.

So you would write (or read) the string version first, then make an honest attempt to write (or read) the actual excption instance.

The tricky part is that it is a little hard to make an identically looking exception instance to throw the client.


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no subversion log entries for this issue yet.