Author: objectiser
Date: 2010-06-17 11:08:32 -0400 (Thu, 17 Jun 2010)
New Revision: 756
Modified:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/CXFJAXWSInitializer.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/JAXWSInitializer.java
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java
Log:
Fix for RIFTSAW-228 - reset cxf bus config after service client proxy created.
Modified:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/CXFJAXWSInitializer.java
===================================================================
---
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/CXFJAXWSInitializer.java 2010-06-17
12:56:09 UTC (rev 755)
+++
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/CXFJAXWSInitializer.java 2010-06-17
15:08:32 UTC (rev 756)
@@ -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:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/JAXWSInitializer.java
===================================================================
---
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/JAXWSInitializer.java 2010-06-17
12:56:09 UTC (rev 755)
+++
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/JAXWSInitializer.java 2010-06-17
15:08:32 UTC (rev 756)
@@ -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:
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java
===================================================================
---
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java 2010-06-17
12:56:09 UTC (rev 755)
+++
trunk/runtime/engine/src/main/java/org/jboss/soa/bpel/runtime/ws/WebServiceClient.java 2010-06-17
15:08:32 UTC (rev 756)
@@ -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