[ http://issues.apache.org/jira/browse/TUSCANY-417?page=all ]

Jojo Joseph updated TUSCANY-417:
--------------------------------

    Attachment: TuscanyShell.zip

I have a very primitive, but running, prototype of the javascript shell. The 
only script function that works as of now is getComponent(). 

This is how you can get it running:

1. Ensure that <mvn repository>\rhino\js\1.6R2\js-1.6R2.jar is in the classpath.

2. You also need at least one sca.module file in the class path (because this 
prototype loads  the module file from the classpath).

3. Start the shell by running the class : 
org.apache.tuscany.tools.scripting.TuscanyShell. The following example shows 
how to use the script with the calculator sample. 

--------------------------------------------------------
Tuscany SCA Shell 0.1, type help() for a list of supported functions.

js> var calc = getComponent("CalculatorServiceComponent");
js> echo(calc)
[EMAIL PROTECTED]

js> calc.add(500, 125)
625
js> var product = calc.multiply(45, 5)
js> echo (product)
225.0

js> 
--------------------------------------------------------

I am looking into bringing in more functionality into the shell.

Thanks.
jojo.

> Interactive JavaScript SCA client
> ---------------------------------
>
>          Key: TUSCANY-417
>          URL: http://issues.apache.org/jira/browse/TUSCANY-417
>      Project: Tuscany
>         Type: New Feature

>   Components: Java SCA JavaScript Container
>     Versions: Java-M2
>     Reporter: ant elder
>      Fix For: Java-M2
>  Attachments: TuscanyShell.zip
>
> Create a new JavaScript SCA client shell similar to the Rhino shell 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to