tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r400275 - in /incubator/tuscany/java/sca/containers/container.rhino/src/main/java/org/apache/tuscany/container/rhino: builder/JavaScriptTargetWireBuilder.java rhino/RhinoScript.java rhino/RhinoTargetInvoker.java
Date Sat, 06 May 2006 09:35:45 GMT
Author: antelder
Date: Sat May  6 02:35:44 2006
New Revision: 400275

URL: http://svn.apache.org/viewcvs?rev=400275&view=rev
Log:
Fix for TUSCANY-221, use TargetInvoker in core

Removed:
    incubator/tuscany/java/sca/containers/container.rhino/src/main/java/org/apache/tuscany/container/rhino/rhino/RhinoTargetInvoker.java
Modified:
    incubator/tuscany/java/sca/containers/container.rhino/src/main/java/org/apache/tuscany/container/rhino/builder/JavaScriptTargetWireBuilder.java
    incubator/tuscany/java/sca/containers/container.rhino/src/main/java/org/apache/tuscany/container/rhino/rhino/RhinoScript.java

Modified: incubator/tuscany/java/sca/containers/container.rhino/src/main/java/org/apache/tuscany/container/rhino/builder/JavaScriptTargetWireBuilder.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/containers/container.rhino/src/main/java/org/apache/tuscany/container/rhino/builder/JavaScriptTargetWireBuilder.java?rev=400275&r1=400274&r2=400275&view=diff
==============================================================================
--- incubator/tuscany/java/sca/containers/container.rhino/src/main/java/org/apache/tuscany/container/rhino/builder/JavaScriptTargetWireBuilder.java
(original)
+++ incubator/tuscany/java/sca/containers/container.rhino/src/main/java/org/apache/tuscany/container/rhino/builder/JavaScriptTargetWireBuilder.java
Sat May  6 02:35:44 2006
@@ -16,16 +16,16 @@
  */
 package org.apache.tuscany.container.rhino.builder;
 
+import java.lang.reflect.Method;
+
 import org.apache.tuscany.container.rhino.config.JavaScriptContextFactory;
-import org.apache.tuscany.container.rhino.rhino.RhinoTargetInvoker;
 import org.apache.tuscany.core.context.QualifiedName;
 import org.apache.tuscany.core.context.ScopeContext;
+import org.apache.tuscany.core.extension.ComponentTargetInvoker;
 import org.apache.tuscany.core.extension.WireBuilderSupport;
 import org.apache.tuscany.core.wire.TargetInvoker;
 import org.osoa.sca.annotations.Scope;
 
-import java.lang.reflect.Method;
-
 /**
  * Responsible for bridging source- and target-side invocations chains when the target type
is a JavaScript implementation
  *
@@ -35,7 +35,6 @@
 public class JavaScriptTargetWireBuilder extends WireBuilderSupport<JavaScriptContextFactory>
{
 
     protected TargetInvoker createInvoker(QualifiedName targetName, Method operation, ScopeContext
context, boolean downScope) {
-        String serviceName = targetName.getPartName();
-        return new RhinoTargetInvoker(serviceName, operation, context);
+        return new ComponentTargetInvoker(targetName, operation, context);
     }
 }

Modified: incubator/tuscany/java/sca/containers/container.rhino/src/main/java/org/apache/tuscany/container/rhino/rhino/RhinoScript.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/containers/container.rhino/src/main/java/org/apache/tuscany/container/rhino/rhino/RhinoScript.java?rev=400275&r1=400274&r2=400275&view=diff
==============================================================================
--- incubator/tuscany/java/sca/containers/container.rhino/src/main/java/org/apache/tuscany/container/rhino/rhino/RhinoScript.java
(original)
+++ incubator/tuscany/java/sca/containers/container.rhino/src/main/java/org/apache/tuscany/container/rhino/rhino/RhinoScript.java
Sat May  6 02:35:44 2006
@@ -19,6 +19,7 @@
 import java.util.Iterator;
 import java.util.Map;
 
+import org.apache.tuscany.core.extension.ExternalServiceInvoker;
 import org.mozilla.javascript.Context;
 import org.mozilla.javascript.ContextFactory;
 import org.mozilla.javascript.Function;
@@ -30,7 +31,7 @@
 /**
  * Represents, and is responsible for dispatching to, a JavaScript artifact in Rhino
  */
-public class RhinoScript {
+public class RhinoScript implements ExternalServiceInvoker {
 
     protected String scriptName;
 
@@ -284,6 +285,10 @@
         } finally {
             Context.exit();
         }
+    }
+
+    public Object invoke(String methodName, Object[] args) {
+        return invoke(methodName, (Object) args);
     }
 
 }



Mime
View raw message