< prev index next >

jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/model/SOAPSEIModel.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 31,48 **** --- 31,52 ---- import javax.jws.WebParam.Mode; import javax.xml.namespace.QName; import java.util.HashSet; import java.util.Iterator; import java.util.Set; + import java.util.concurrent.locks.Lock; + import java.util.concurrent.locks.ReentrantLock; /** * Creates SOAP specific RuntimeModel * * @author Vivek Pandey */ public class SOAPSEIModel extends AbstractSEIModelImpl { + private final Lock lock = new ReentrantLock(); + public SOAPSEIModel(WebServiceFeatureList features) { super(features); } @Override
*** 70,88 **** --- 74,99 ---- } } public Set<QName> getKnownHeaders() { Set<QName> headers = new HashSet<QName>(); + + try{ + lock.lock(); for (JavaMethodImpl method : getJavaMethods()) { // fill in request headers Iterator<ParameterImpl> params = method.getRequestParameters().iterator(); fillHeaders(params, headers, Mode.IN); // fill in response headers params = method.getResponseParameters().iterator(); fillHeaders(params, headers, Mode.OUT); } + }finally + { + lock.unlock(); + } return headers; } /** * @param params
< prev index next >