You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2008/09/29 03:20:26 UTC

svn commit: r699950 - /tuscany/branches/sca-equinox/modules/implementation-xquery/src/main/java/org/apache/tuscany/sca/implementation/xquery/xml/XQueryIntrospector.java

Author: jsdelfino
Date: Sun Sep 28 18:20:26 2008
New Revision: 699950

URL: http://svn.apache.org/viewvc?rev=699950&view=rev
Log:
Pulled from trunk. Clone interface to configure the databinding.

Modified:
    tuscany/branches/sca-equinox/modules/implementation-xquery/src/main/java/org/apache/tuscany/sca/implementation/xquery/xml/XQueryIntrospector.java

Modified: tuscany/branches/sca-equinox/modules/implementation-xquery/src/main/java/org/apache/tuscany/sca/implementation/xquery/xml/XQueryIntrospector.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/implementation-xquery/src/main/java/org/apache/tuscany/sca/implementation/xquery/xml/XQueryIntrospector.java?rev=699950&r1=699949&r2=699950&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/implementation-xquery/src/main/java/org/apache/tuscany/sca/implementation/xquery/xml/XQueryIntrospector.java (original)
+++ tuscany/branches/sca-equinox/modules/implementation-xquery/src/main/java/org/apache/tuscany/sca/implementation/xquery/xml/XQueryIntrospector.java Sun Sep 28 18:20:26 2008
@@ -217,11 +217,21 @@
         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 @@
         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);
         }