Spring Framework
  1. Spring Framework
  2. SPR-1228

Create factory method for ObjectOutputStream in HttpInvokerServiceExporter for easy replacement in subclasses

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.4
    • Fix Version/s: 1.2.4
    • Component/s: Remoting
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      Hello,

      It would be really nice to have a createObjectOutputStream method in HttpInvokerServiceExporter so that subclasses can create their own ObjectOutputStream impl.

      For instance, I need to strip out Hibernate collections and replace them with standard JDK collections at serialization time. I have created a DeHibernateCollectionsObjectOutputStream that simply overrides replaceObject().

      I had to override the entire writeRemoteInvocationResult() method in HttpInvokerServiceExporter just to create my special object output stream.

      Thanks very much!
      Seth

        Activity

        Hide
        Juergen Hoeller added a comment -

        Thanks for pointing that out: That's more or less an oversight, as there already is a "createObjectInputStream" method. I've factored out a corresponding "createObjectOutputStream" for 1.2.4.

        Juergen

        Show
        Juergen Hoeller added a comment - Thanks for pointing that out: That's more or less an oversight, as there already is a "createObjectInputStream" method. I've factored out a corresponding "createObjectOutputStream" for 1.2.4. Juergen
        Hide
        Seth Ladd added a comment -

        Thanks Juergen!

        Now I won't have any more serialization of Hibernate collections problems again.

        Show
        Seth Ladd added a comment - Thanks Juergen! Now I won't have any more serialization of Hibernate collections problems again.

          People

          • Assignee:
            Juergen Hoeller
            Reporter:
            Seth Ladd
            Last updater:
            Trevor Marshall
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              8 years, 37 weeks, 5 days ago