summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-09-26 22:00:53 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-09-26 22:00:53 +0000
commitdb72136306cdedbee6b1cfb03a299fab8157ff8e (patch)
treea88858ecc15dcba3658e5f7ac487436bdfe181c7
parenta2c5bd5b0cc013bfc116ef5ff158303ac1946da8 (diff)
Clone interface to configure the databinding
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@699516 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--java/sca/modules/implementation-xquery/src/main/java/org/apache/tuscany/sca/implementation/xquery/xml/XQueryIntrospector.java29
1 files changed, 25 insertions, 4 deletions
diff --git a/java/sca/modules/implementation-xquery/src/main/java/org/apache/tuscany/sca/implementation/xquery/xml/XQueryIntrospector.java b/java/sca/modules/implementation-xquery/src/main/java/org/apache/tuscany/sca/implementation/xquery/xml/XQueryIntrospector.java
index 6f18e518bd..d1e74dd40d 100644
--- a/java/sca/modules/implementation-xquery/src/main/java/org/apache/tuscany/sca/implementation/xquery/xml/XQueryIntrospector.java
+++ b/java/sca/modules/implementation-xquery/src/main/java/org/apache/tuscany/sca/implementation/xquery/xml/XQueryIntrospector.java
@@ -217,11 +217,21 @@ public class XQueryIntrospector {
service.setName(name);
// Set the call interface and, if present, the callback interface
- JavaInterface callInterface = javaFactory.createJavaInterface(interfaze);
+ JavaInterface callInterface = null;
+ try {
+ callInterface = (JavaInterface) javaFactory.createJavaInterface(interfaze).clone();
+ } catch (CloneNotSupportedException e) {
+ // Ignore
+ }
//setDataBindingForInterface(callInterface, DataObject.class.getName());
service.getInterfaceContract().setInterface(callInterface);
if (callInterface.getCallbackClass() != null) {
- JavaInterface callbackInterface = javaFactory.createJavaInterface(callInterface.getCallbackClass());
+ JavaInterface callbackInterface = null;
+ try {
+ callbackInterface = (JavaInterface) javaFactory.createJavaInterface(callInterface.getCallbackClass()).clone();
+ } catch (CloneNotSupportedException e) {
+ //Ignore
+ }
//setDataBindingForInterface(callbackInterface, DataObject.class.getName());
service.getInterfaceContract().setCallbackInterface(callbackInterface);
}
@@ -253,10 +263,21 @@ public class XQueryIntrospector {
reference.setMultiplicity(Multiplicity.ONE_ONE);
// Set the call interface and, if present, the callback interface
- JavaInterface callInterface = javaFactory.createJavaInterface(interfaze);
+ // Set the call interface and, if present, the callback interface
+ JavaInterface callInterface = null;
+ try {
+ callInterface = (JavaInterface) javaFactory.createJavaInterface(interfaze).clone();
+ } catch (CloneNotSupportedException e) {
+ // Ignore
+ }
reference.getInterfaceContract().setInterface(callInterface);
if (callInterface.getCallbackClass() != null) {
- JavaInterface callbackInterface = javaFactory.createJavaInterface(callInterface.getCallbackClass());
+ JavaInterface callbackInterface = null;
+ try {
+ callbackInterface = (JavaInterface) javaFactory.createJavaInterface(callInterface.getCallbackClass()).clone();
+ } catch (CloneNotSupportedException e) {
+ //Ignore
+ }
reference.getInterfaceContract().setCallbackInterface(callbackInterface);
}