< prev index next >

src/java.xml.ws/share/classes/com/sun/xml/internal/ws/protocol/soap/ServerMUTube.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
*** 28,47 **** --- 28,50 ---- import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.pipe.*; import com.sun.xml.internal.ws.client.HandlerConfiguration; import javax.xml.namespace.QName; import java.util.Set; + import java.util.concurrent.locks.Lock; + import java.util.concurrent.locks.ReentrantLock; /** * @author Rama Pulavarthi */ public class ServerMUTube extends MUTube { private ServerTubeAssemblerContext tubeContext; private final Set<String> roles; private final Set<QName> handlerKnownHeaders; + private final Lock lock = new ReentrantLock(); public ServerMUTube(ServerTubeAssemblerContext tubeContext, Tube next) { super(tubeContext.getEndpoint().getBinding(), next); this.tubeContext = tubeContext;
*** 67,77 **** * if all the headers in the packet are not understood, returns action such that * SOAPFault Message is sent to previous pipes. */ @Override public NextAction processRequest(Packet request) { ! Set<QName> misUnderstoodHeaders = getMisUnderstoodHeaders(request.getMessage().getHeaders(),roles, handlerKnownHeaders); if((misUnderstoodHeaders == null) || misUnderstoodHeaders.isEmpty()) { return doInvoke(super.next, request); } return doReturnWith(request.createServerResponse(createMUSOAPFaultMessage(misUnderstoodHeaders), tubeContext.getWsdlModel(), tubeContext.getSEIModel(), tubeContext.getEndpoint().getBinding())); --- 70,86 ---- * if all the headers in the packet are not understood, returns action such that * SOAPFault Message is sent to previous pipes. */ @Override public NextAction processRequest(Packet request) { ! Set<QName> misUnderstoodHeaders=null; ! lock.lock(); ! try{ ! misUnderstoodHeaders = getMisUnderstoodHeaders(request.getMessage().getHeaders(),roles, handlerKnownHeaders); ! } finally { ! lock.unlock(); ! } if((misUnderstoodHeaders == null) || misUnderstoodHeaders.isEmpty()) { return doInvoke(super.next, request); } return doReturnWith(request.createServerResponse(createMUSOAPFaultMessage(misUnderstoodHeaders), tubeContext.getWsdlModel(), tubeContext.getSEIModel(), tubeContext.getEndpoint().getBinding()));
< prev index next >