1 /* |
1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
52 * |
52 * |
53 */ |
53 */ |
54 public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { |
54 public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { |
55 |
55 |
56 // xml security enabled always, xpath used for parsing "part" attribute |
56 // xml security enabled always, xpath used for parsing "part" attribute |
57 private static final XPathFactory xpf = XmlUtil.newXPathFactory(true); |
57 private static final ContextClassloaderLocal<XPathFactory> xpf = new ContextClassloaderLocal<XPathFactory>() { |
58 private final XPath xpath = xpf.newXPath(); |
58 @Override |
|
59 protected XPathFactory initialValue() throws Exception { |
|
60 return XPathFactory.newInstance(); |
|
61 } |
|
62 }; |
|
63 |
|
64 private final XPath xpath = xpf.get().newXPath(); |
59 |
65 |
60 public JAXWSBindingExtensionHandler(Map<String, AbstractExtensionHandler> extensionHandlerMap) { |
66 public JAXWSBindingExtensionHandler(Map<String, AbstractExtensionHandler> extensionHandlerMap) { |
61 super(extensionHandlerMap); |
67 super(extensionHandlerMap); |
62 } |
68 } |
63 |
69 |