Easy-WSDL

Use of a static JAXBContext shared by everyone is broken

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 2.3
  • Fix Version/s: None
  • Component/s: None
  • Security Level: Public
  • Description:
    Hide

    In EasyWSDL, the JAXBContext responsible of marshmalling and unmarshmalling XML in Java is shared by all the modules and there is only one instance at runtime in SchemaJAXBContext shared by all the classloader.

    Other modules (such as WSDLJAXBContext, WSDL4ComplexJAXBContext, and so on) only add more classes supported by the unique JAXBContext which is reinitialised everytime it is needed.

    This is quite ugly, not very safe and seems to currently produces strange errors in the BC Mail and the BC SQL most certainly due to concurrency problems.
    They got visible because some dependencies changed and found themselves in the system classpath (see PETALSESBCONT-323 for this problem) which is shared by everything.

    The symptoms will be fixed by fixing PETALSESBCONT-323, but nevertheless, there is something wrong with the way things are currently done... (and I'm not clear what is the problem, as I tried to first fix this bug, and finally settled for fixing the classloader problem for now...).

    Show
    In EasyWSDL, the JAXBContext responsible of marshmalling and unmarshmalling XML in Java is shared by all the modules and there is only one instance at runtime in SchemaJAXBContext shared by all the classloader. Other modules (such as WSDLJAXBContext, WSDL4ComplexJAXBContext, and so on) only add more classes supported by the unique JAXBContext which is reinitialised everytime it is needed. This is quite ugly, not very safe and seems to currently produces strange errors in the BC Mail and the BC SQL most certainly due to concurrency problems. They got visible because some dependencies changed and found themselves in the system classpath (see PETALSESBCONT-323 for this problem) which is shared by everything. The symptoms will be fixed by fixing PETALSESBCONT-323, but nevertheless, there is something wrong with the way things are currently done... (and I'm not clear what is the problem, as I tried to first fix this bug, and finally settled for fixing the classloader problem for now...).
  • Environment:
    -

People

Dates

  • Created:
    Tue, 5 May 2015 - 17:36:47 +0200
    Updated:
    Wed, 26 Apr 2017 - 15:05:59 +0200