Uploaded image for project: 'OpenEJB'
  1. OpenEJB
  2. OPENEJB-47

Support for common Exceptions serialization issues

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.9.2, 1.0
    • 3.0-beta-1
    • None
    • None

    Description

      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.

      Attachments

        Activity

          People

            dblevins David Blevins
            dblevins David Blevins
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: