Skip to content

Commit

Permalink
SWITCHYARD-436 temporary fix for threading issue in AS7 WS stack
Browse files Browse the repository at this point in the history
  • Loading branch information
rcernich committed Nov 10, 2011
1 parent e3b17a9 commit c266614
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ public InboundHandler(final SOAPBindingModel config) {
* @throws WebServicePublishException If unable to publish the endpoint
*/
public void start(ServiceReference service) throws WebServicePublishException {
//XXX: REMOVE THIS SYNCHRONIZED: once threading issues in AS7 WS are fixed
synchronized (BaseWebService.class) {
try {
_service = service;
PortName portName = _config.getPort();
Expand Down Expand Up @@ -130,13 +132,17 @@ public void start(ServiceReference service) throws WebServicePublishException {
} catch (WSDLException e) {
throw new WebServicePublishException(e);
}
}
}

/**
* Stop lifecycle.
*/
public void stop() {
//XXX: REMOVE THIS SYNCHRONIZED: once threading issues in AS7 WS are fixed
synchronized (BaseWebService.class) {
_endpoint.stop();
}
LOGGER.info("WebService " + _config.getPort() + " stopped.");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ public OutboundHandler(final SOAPBindingModel config) {
* @throws WebServiceConsumeException If unable to load the WSDL
*/
public void start() throws WebServiceConsumeException {
//XXX: REMOVE THIS SYNCHRONIZED: once threading issues in AS7 WS are fixed
synchronized (BaseWebService.class) {
if (_dispatcher == null) {
try {
PortName portName = _config.getPort();
Expand All @@ -94,6 +96,7 @@ public void start() throws WebServiceConsumeException {
throw new WebServiceConsumeException(wsdle);
}
}
}
}

/**
Expand Down

0 comments on commit c266614

Please sign in to comment.