XStream
  1. XStream
  2. XSTR-377

Sanitizing hibernate proxied objects ( GetOutOfMyPojo)

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4
    • Component/s: None
    • Labels:
      None

      Description

      This is a known problem that objects loaded via hibernate are
      heavily proxied by CGLIB, and thus not really serializable.

      Since hibernate is de-facto O/R mapping standard, this is pretty common
      that such objects have to be sent to remote clients via SOAP or other
      means, and somehow this is not working
      ( See for example: http://www.mojavelinux.com/blog/archives/2006/06/hibernate_get_out_of_my_pojo/ )

      I played around with mappers / converters and it seems that I got it working.
      Since my knowlege about xstream internals is pretty limited, I would like developers to review
      ( and maybe make it better ) my solution

      Attached file is quick & dirty testcase, adapted from jtec-user
      ( http://www.sourceforge.net/projects/jtec/ ,
      svn:https://jtec.svn.sourceforge.net/svnroot/jtec/jtec-user )

        Issue Links

          People

          • Assignee:
            Jörg Schaible
            Reporter:
            Konstantin Pribluda
          • Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: