src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ProviderImpl.java

changeset 515
6cd506508147
parent 408
b0610cd08440
child 637
9c07ef4934dd
child 721
06807f9a6835
     1.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ProviderImpl.java	Fri Feb 14 10:53:55 2014 +0100
     1.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ProviderImpl.java	Fri Feb 14 11:13:45 2014 +0100
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -80,7 +80,12 @@
    1.11   */
    1.12  public class ProviderImpl extends Provider {
    1.13  
    1.14 -    private final static JAXBContext eprjc = getEPRJaxbContext();
    1.15 +    private final static ContextClassloaderLocal<JAXBContext> eprjc = new ContextClassloaderLocal<JAXBContext>() {
    1.16 +        @Override
    1.17 +        protected JAXBContext initialValue() throws Exception {
    1.18 +            return getEPRJaxbContext();
    1.19 +        }
    1.20 +    };
    1.21  
    1.22      /**
    1.23       * Convenient singleton instance.
    1.24 @@ -148,7 +153,7 @@
    1.25          return AccessController.doPrivileged(new PrivilegedAction<EndpointReference>() {
    1.26              public EndpointReference run() {
    1.27                  try {
    1.28 -                    Unmarshaller unmarshaller = eprjc.createUnmarshaller();
    1.29 +                    Unmarshaller unmarshaller = eprjc.get().createUnmarshaller();
    1.30                      return (EndpointReference) unmarshaller.unmarshal(eprInfoset);
    1.31                  } catch (JAXBException e) {
    1.32                      throw new WebServiceException("Error creating Marshaller or marshalling.", e);

mercurial