summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x')
-rw-r--r--sca-java-2.x/trunk/samples/binding-rmi/contribution-calculator-reference/README120
-rw-r--r--sca-java-2.x/trunk/samples/binding-rmi/contribution-calculator-service/README135
-rw-r--r--sca-java-2.x/trunk/samples/launcher-command-line/README2
3 files changed, 17 insertions, 240 deletions
diff --git a/sca-java-2.x/trunk/samples/binding-rmi/contribution-calculator-reference/README b/sca-java-2.x/trunk/samples/binding-rmi/contribution-calculator-reference/README
index 07b6dd9713..2f169419ba 100644
--- a/sca-java-2.x/trunk/samples/binding-rmi/contribution-calculator-reference/README
+++ b/sca-java-2.x/trunk/samples/binding-rmi/contribution-calculator-reference/README
@@ -1,38 +1,14 @@
-Calculator RMI Reference Sample
-===============================
+Calculator RMI Reference Sample Contribution
+============================================
This sample illustrates the use of Tuscany RMI Binding to call reference
services that are hosted as Java RMI services.
-The README in the samples directory (the directory above this) provides
-general instructions about building and running samples. Take a look there
-first.
-
-If you just want to run it to see what happens open a command prompt, first
-navigate to the calculator-rmi-service sample and do:
-
-ant run
-
-OR if you don't have ant, on Windows do
-
-java -cp ..\..\features\tuscany-sca-manifest.jar;target\sample-calculator-rmi-service.jar calculator.CalculatorServer
-
-and on *nix do
-
-java -cp ../../features/tuscany-sca-manifest.jar:target/sample-calculator-rmi-service.jar calculator.CalculatorServer
-
-Now you have the server running you need to open another command prompt, navigate
-to this sample directory and do:
-
-ant run
-
-OR if you don't have ant, on Windows do
-
-java -cp ..\..\features\tuscany-sca-manifest.jar;target\sample-calculator-rmi-reference.jar calculator.CalculatorClient
-
-and on *nix do
-
-java -cp ../../features/tuscany-sca-manifest.jar:target/sample-calculator-rmi-reference.jar calculator.CalculatorClient
+The README in the <distribution-unpack-dir>/samples directory provides
+general instructions about building and running samples. ( where
+distribution-unpack-dir is the directory in which you unpacked the tuscany
+binary distribution archive) Take a look there for instructions on how to launch
+this sample contribution.
Sample Overview
---------------
@@ -42,97 +18,17 @@ divide components, an RMI service implementation now provides the
add, subtract, multiply and divide interfaces and is hosted as an RMI server.
References specified in the .composite file include an RMI binding which targets
this RMI server.
-
-This sample adds a number of classes to the basic calculator sample:
-
-calculator-rmi-reference/
- src/
- main/
- java/
- calculator/
- CalculatorService.java - as calculator sample
- AddService.java - as calculator sample
- SubtractService.java - as calculator sample
- MultipleService.java - as calculator sample
- DivideService.java - as calculator sample
- CalculatorClient.java - as calculator sample
- CalculatorServiceImpl.java - calls the RMI service
- that provides the target for the
- RMI bindings in the composite
- resources/
- CalculatorRMIReference.composite - the SCA assembly for this sample
- test/
- java/
- calculator/
- CalculatorRMIReferenceTestCase.java - JUnit test case
- CalculatorRMIServiceImpl.java - test RMI service to call
- calculator-rmi-reference.png - a pictorial representation of the
- .composite file
- build.xml - the Ant build file for the client
- pom.xml - the Maven build file
-
Note. As this test creates and uses local network connections you may need to
configure your firewall, if you are running one, to allow the test to run
successfully.
-Building And Running The Sample Using Ant
------------------------------------------
-With the binary distribution the sample can be built and run using Ant.
+Amongst the other output created by the launcher/contribution combination, you should see the following output ...
-The server provides an RMI server that the acts as a target for the SCA RMI
-bindings. Start a new console and use the following commands.
-cd calculator-rmi-service
-ant compile
-ant run
-
-This will run up the server and display the following.
-
-run:
- [java] Starting of the SCA Calculator Application exposed as RMI Services...
- [java] ...Press Enter to Exit...
-
-The client is very similar to the calculator sample. It starts the SCA runtime
-and calls each of the calculator operations. In doing this the RMI bindings
-make calls out to the RMI server you started in the previous step. Start
-a new console and use the following commands.
-
-cd calculator-rmi-reference
-ant compile
-ant run
-
-You should see the following output from the run target.
-
-run:
[java] 3 + 2=5.0
[java] 3 - 2=1.0
[java] 3 * 2=6.0
[java] 3 / 2=1.5
-If you now return to the console window running the server and press enter the
-server should stop.
-
-Building And Running The Sample Using Maven
--------------------------------------------
-With either the binary or source distributions the sample can be built and run
-using Maven as follows.
-
-cd calculator-rmi-reference
-mvn
-
-You should see the following output from the test phase.
-
--------------------------------------------------------
- T E S T S
--------------------------------------------------------
-Running calculator.CalculatorRMIReferenceTestCase
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.308 sec
-
-Results :
-
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
-
-This shows that the Junit test cases have run successfully.
-
diff --git a/sca-java-2.x/trunk/samples/binding-rmi/contribution-calculator-service/README b/sca-java-2.x/trunk/samples/binding-rmi/contribution-calculator-service/README
index 144881134b..cb25027f14 100644
--- a/sca-java-2.x/trunk/samples/binding-rmi/contribution-calculator-service/README
+++ b/sca-java-2.x/trunk/samples/binding-rmi/contribution-calculator-service/README
@@ -1,40 +1,16 @@
-Calculator RMI Service Sample
-=============================
+Calculator RMI Service Sample Contribution
+==========================================
This sample illustrates the use of Tuscany RMI Binding to expose component
services as Java RMI Services. It also demonstrates how a simple Java RMI
Client application invokes the SCA Application's services exposed as RMI
Services.
-The README in the samples directory (the directory above this) provides
-general instructions about building and running samples. Take a look there
-first.
-
-If you just want to run it to see what happens open a command prompt, navigate
-to this sample directory and do:
-
-ant run
-
-OR if you don't have ant, on Windows do
-
-java -cp ..\..\features\tuscany-sca-manifest.jar;target\sample-calculator-rmi-service.jar calculator.CalculatorServer
-
-and on *nix do
-
-java -cp ../../features/tuscany-sca-manifest.jar:target/sample-calculator-rmi-service.jar calculator.CalculatorServer
-
-Now you have the server running you need to open another command prompt, navigate
-to the calculator-rmi-reference sample directory and do:
-
-ant run
-
-OR if you don't have ant, on Windows do
-
-java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-calculator-rmi-reference.jar calculator.CalculatorClient
-
-and on *nix do
-
-java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-calculator-rmi-reference.jar calculator.CalculatorClient
+The README in the <distribution-unpack-dir>/samples directory provides
+general instructions about building and running samples. ( where
+distribution-unpack-dir is the directory in which you unpacked the tuscany
+binary distribution archive) Take a look there for instructions on how to launch
+this sample contribution.
Sample Overview
@@ -43,105 +19,10 @@ This sample extends the calculator sample by replacing the local service
binding with an RMI binding. SO a java client can call the service exposed
by the SCA application using an RMI client.
-This sample adds a number of classes to the basic calculator sample:
-
-calculator-rmi-service/
- src/
- main/
- java/
- calculator/
- CalculatorService.java - as calculator sample
- CalculatorServiceImpl.java
- AddService.java - as calculator sample
- AddServiceImpl.java
- SubtractService.java - as calculator sample
- SubtractServiceImpl.java
- MultiplyService.java - as calculator sample
- MultiplyServiceImpl.java
- DivideService.java - as calculator sample
- DivideServiceImpl.java
- CalculatorClient.java - (Not currently used) Uses the
- java naming service to
- look up the Calculator RMI service.
- It then calls add, subtract, multiple
- and divide methods on the service
- CalculatorServer.java - starts the SCA Runtime and deploys
- the CalculatorRMIServer.composite.
- In doing this the SCA RMI binding
- acts to expose the CalculatorService
- over RMI.
- resources/
- CalculatorRMIServer.composite - the SCA assembly for this sample
- test/
- java/
- calculator/
- CalculatorRMIServerTestCase.java - JUnit test case
- calculator-rmi-service.png - a pictorial representation of the
- .composite file
- build.xml - the Ant build file for the server
- pom.xml - the Maven build file
-
-Note. As this test creates and uses local network connections you may need to
-configure your firewall, if you are running one, to allow the test to run
-successfully.
-
-Building And Running The Sample Using Ant
------------------------------------------
-With the binary distribution the sample can be built and run using Ant. Two
-build files are used to support client and server functions.
+Amongst the other output created by the launcher/contribution combination, you should see the following output ...
-The server starts the SCA runtime and loads the SCA calculator application
-which exposes an RMI service. Start a new console and use the following
-commands.
-cd calculator-rmi-service
-ant compile
-ant run
-
-This will run up the server and display the following.
-
-run:
- [java] Starting of the SCA Calculator Application exposed as RMI Services...
- [java] ...Press Enter to Exit...
-
-The client is very similar to the calculator sample
-
-It locates the RMI service that the SCA runtime is exposing and calls each of
-the calculator operations. Start a new console and use the following commands.
-
-cd calculator-rmi-reference
-ant compile
-ant run
-
-You should see the following output from the run target.
-
-run:
[java] 3 + 2=5.0
[java] 3 - 2=1.0
[java] 3 * 2=6.0
[java] 3 / 2=1.5
-
-If you now return to the console window running the server and press enter the
-server should stop.
-
-Building And Running The Sample Using Maven
--------------------------------------------
-With either the binary or source distributions the sample can be built and run
-using Maven as follows.
-
-cd calculator-rmi-service
-mvn
-
-You should see the following output from the test phase.
-
--------------------------------------------------------
- T E S T S
--------------------------------------------------------
-Running calculator.CalculatorRMIServerTestCase
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.819 sec
-
-Results :
-
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
-
-This shows that the Junit test cases have run successfully.
diff --git a/sca-java-2.x/trunk/samples/launcher-command-line/README b/sca-java-2.x/trunk/samples/launcher-command-line/README
index f0d4f76be5..bf963ea98e 100644
--- a/sca-java-2.x/trunk/samples/launcher-command-line/README
+++ b/sca-java-2.x/trunk/samples/launcher-command-line/README
@@ -8,6 +8,6 @@ for example
..\bin\tuscany.bat contribution-binding-sca-calculator
-or on *nix platforms, from a shell prompt in the samples direcotry, run the command ...
+or on *nix platforms, from a shell prompt in the samples directory, run the command ...
../bin/tuscany.sh contribution-binding-sca-calculator