Author: objectiser
Date: 2010-06-17 08:56:09 -0400 (Thu, 17 Jun 2010)
New Revision: 755
Modified:
branches/RiftSaw-2.1.x/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/CXFJAXWSInitializer.java
branches/RiftSaw-2.1.x/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/JAXWSInitializer.java
branches/RiftSaw-2.1.x/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java
Log:
RIFTSAW-228 - need to reset the thread bus configuration, as soon as the service is
created, is it caches the bus and makes use of the configured bus for the remainder of the
service client lifetime.
Modified:
branches/RiftSaw-2.1.x/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/CXFJAXWSInitializer.java
===================================================================
---
branches/RiftSaw-2.1.x/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/CXFJAXWSInitializer.java 2010-06-17
11:38:06 UTC (rev 754)
+++
branches/RiftSaw-2.1.x/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/CXFJAXWSInitializer.java 2010-06-17
12:56:09 UTC (rev 755)
@@ -74,4 +74,23 @@
log.error("Failed to initialize WS-Security in stack", e);
}
}
+
+ /**
+ * This method is used to notify the initializer that the service has
+ * not been created.
+ *
+ */
+ public void serviceCreated() {
+ try {
+ SpringBusFactory bf = new SpringBusFactory();
+
+ bf.setThreadDefaultBus(bf.getDefaultBus());
+
+ log.debug("Have reset thread default bus to default");
+
+ } catch(Exception e) {
+ log.error("Failed to reset default bus", e);
+ }
+ }
+
}
Modified:
branches/RiftSaw-2.1.x/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/JAXWSInitializer.java
===================================================================
---
branches/RiftSaw-2.1.x/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/JAXWSInitializer.java 2010-06-17
11:38:06 UTC (rev 754)
+++
branches/RiftSaw-2.1.x/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/JAXWSInitializer.java 2010-06-17
12:56:09 UTC (rev 755)
@@ -46,4 +46,11 @@
*/
public void initializeStack(QName serviceName, QName portName, java.net.URI baseURI);
+ /**
+ * This method is used to notify the initializer that the service has
+ * not been created.
+ *
+ */
+ public void serviceCreated();
+
}
Modified:
branches/RiftSaw-2.1.x/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java
===================================================================
---
branches/RiftSaw-2.1.x/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java 2010-06-17
11:38:06 UTC (rev 754)
+++
branches/RiftSaw-2.1.x/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java 2010-06-17
12:56:09 UTC (rev 755)
@@ -371,7 +371,7 @@
if(null==dispatcher) {
log.debug("Creating Dispatcher ("+this.id+") on " + wsdlUrl +
": "+serviceName);
- initializeStack(portName);
+ JAXWSInitializer initializer=initializeStack(portName);
Service service = Service.create(this.wsdlUrl, serviceName);
dispatcher = service.createDispatch(
@@ -379,16 +379,20 @@
SOAPMessage.class,
Service.Mode.MESSAGE
);
+
+ if (initializer != null) {
+ initializer.serviceCreated();
+ }
}
return dispatcher;
}
- private synchronized void initializeStack(QName portName) {
+ private synchronized JAXWSInitializer initializeStack(QName portName) {
+ JAXWSInitializer initializer=null;
String
impl=this.executionEnvironment.getOdeConfig().getProperty(JAXWS_CLIENT_INITIALIZER);
if (impl != null && impl.trim().length() > 0) {
- JAXWSInitializer initializer=null;
try {
Class<?> cls=Class.forName(impl);
@@ -405,6 +409,8 @@
} else {
log.debug("JAXWS Client Initializer not defined");
}
+
+ return(initializer);
}
public String toString()
Show replies by date