jaxb
  1. jaxb
  2. JAXB-525

Post-Unmarshall Object Retention

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.1.7
    • Fix Version/s: 2.2.1
    • Component/s: runtime
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      In a web services (Metro) environment, in which Unmarshaller instances are held
      across requests, the JAXB objects delivered to the web service implementations
      are retained by the Unarshallers after the request has been completed. These
      objects are not released until they are replaced by those for another request.

      Note that this is very similar to a recently fixed defect with Marshallers:

      https://jaxb.dev.java.net/issues/show_bug.cgi?id=519

        Activity

        Hide
        Martin Grebac added a comment -

        Hi, would you please provide a testcase for this one? Thanks.

        Show
        Martin Grebac added a comment - Hi, would you please provide a testcase for this one? Thanks.
        Hide
        Martin Grebac added a comment -

        incomplete for a long time, closing

        Show
        Martin Grebac added a comment - incomplete for a long time, closing
        Hide
        jherbers added a comment -

        Is there a workaround for this issue? We're hitting this with jdk 1.6.0_20 which includes 2.1.10 (appears the latest jdk _24 also does). Is there a way to cause UnMarshaller to release the resources after it's done processing the xml?

        Show
        jherbers added a comment - Is there a workaround for this issue? We're hitting this with jdk 1.6.0_20 which includes 2.1.10 (appears the latest jdk _24 also does). Is there a way to cause UnMarshaller to release the resources after it's done processing the xml?
        Hide
        ndjensen added a comment -

        I think this should be reopened and addressed. We have encountered this too due to pooling unmarshallers. The JAXB guide suggests pooling unmarshallers to boost performance: https://jaxb.java.net/guide/Performance_and_thread_safety.html

        Furthermore, the same kind of issue was fixed with marshallers so why are unmarshallers not also fixed? https://java.net/jira/browse/JAXB-843

        Show
        ndjensen added a comment - I think this should be reopened and addressed. We have encountered this too due to pooling unmarshallers. The JAXB guide suggests pooling unmarshallers to boost performance: https://jaxb.java.net/guide/Performance_and_thread_safety.html Furthermore, the same kind of issue was fixed with marshallers so why are unmarshallers not also fixed? https://java.net/jira/browse/JAXB-843
        Hide
        peddapola added a comment -

        work around for this issue is, instead of retaining unmarshaller, retain only JAXBContext in static way.

        and create Unmarshaller every time, creating Unmarshaller from static JAXBContext is not a big performance hit.

        Creating JAXBContext is very expensive, not Unmarshaller.

        Show
        peddapola added a comment - work around for this issue is, instead of retaining unmarshaller, retain only JAXBContext in static way. and create Unmarshaller every time, creating Unmarshaller from static JAXBContext is not a big performance hit. Creating JAXBContext is very expensive, not Unmarshaller.

          People

          • Assignee:
            Martin Grebac
            Reporter:
            mshaffer55
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: