You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by na...@apache.org on 2010/10/25 13:42:26 UTC
svn commit: r1027072 - in /tuscany/sca-java-1.x/trunk/samples:
binding-notification-broker/ binding-notification-consumer/
binding-notification-producer/
Author: nash
Date: Mon Oct 25 11:42:26 2010
New Revision: 1027072
URL: http://svn.apache.org/viewvc?rev=1027072&view=rev
Log:
Merge r1000266 Fix notification sample build.xml and README files to provide clear instructions that work
Modified:
tuscany/sca-java-1.x/trunk/samples/binding-notification-broker/README
tuscany/sca-java-1.x/trunk/samples/binding-notification-broker/build.xml
tuscany/sca-java-1.x/trunk/samples/binding-notification-consumer/README
tuscany/sca-java-1.x/trunk/samples/binding-notification-consumer/build.xml
tuscany/sca-java-1.x/trunk/samples/binding-notification-producer/README
tuscany/sca-java-1.x/trunk/samples/binding-notification-producer/build.xml
Modified: tuscany/sca-java-1.x/trunk/samples/binding-notification-broker/README
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/samples/binding-notification-broker/README?rev=1027072&r1=1027071&r2=1027072&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/samples/binding-notification-broker/README (original)
+++ tuscany/sca-java-1.x/trunk/samples/binding-notification-broker/README Mon Oct 25 11:42:26 2010
@@ -29,19 +29,37 @@ via <binding.notification/> to be transp
Sample Usage
------------
-This sample is run using the tuscany binary distribution. To run it, navigate to this sample's directory and
+These instructions assume that you will start the notification samples in the
+following order:
+ binding-notification-consumer
+ binding-notification-broker
+ binding-notification-producer
+
+For a clean shutdown without exceptions, you should end the notification samples
+in the following order:
+ binding-notification-producer
+ binding-notification-broker
+ binding-notification-consumer
+
+This sample is run using the tuscany binary distribution. To see what it does,
+first start the consumer sample. When this is running, open a command prompt,
+navigate to this sample's directory and do
-on Wondows, use following command:
+ant run
+
+OR if you don't have ant,
-java -Dnotification.httpPort=8080 -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-binding-notification-broker.jar notification.broker.TrafficAdvisoryServer
+on Windows, use the following command:
-on *nix, use following command:
+java -Dnotification.httpPort=8082 -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-binding-notification-broker.jar notification.broker.TrafficAdvisoryServer
-java -Dnotification.httpPort=8080 -cp ../../lib/tuscany-sca-manifest.jar:target/sample-binding-notification-broker.jar notification.broker.TrafficAdvisoryServer
+on *nix, use the following command:
+
+java -Dnotification.httpPort=8082 -cp ../../lib/tuscany-sca-manifest.jar:target/sample-binding-notification-broker.jar notification.broker.TrafficAdvisoryServer
this should bring up the following prompt:
-Send a report value, ^C or <end> to end
+Send a report value, ^C or 'end' to end
at this point you should be able to type a message to send, for instance:
@@ -51,7 +69,7 @@ Notice that before you try to receive an
consumer sample or another broker sample. When you have finished using this
sample, type 'end' or ^C to end.
-Also notice that '-Dnotification.httpPort=8080' is used in the java command.
+Also notice that '-Dnotification.httpPort=8082' is used in the java command.
This indicates the port the sample should use. This also says that this server
is not going to play the role of ntm, given our previous assumption. It is important
that the first one of the producer, consumer or broker sample that is run be the
@@ -80,7 +98,7 @@ binding-notification-broker/
TrafficAdvisoryNotification.composite - the main composite including producer, consumer and
notification components, and composite service and reference
binding-notification-broker.png - a pictorial representation of the sample .composite file
- build.xml - the Ant build file
+ build.xml - the Ant build file
pom.xml - the Maven build file
Building And Running The Sample Using Ant
@@ -96,11 +114,9 @@ You should see the following output from
run:
[java] Sep 14, 2007 11:14:24 AM org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
- [java] INFO: Added Servlet mapping: http://localhost:8083/ntm/trafficAdvisory
- [java] Sep 14, 2007 11:14:24 AM org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
- [java] INFO: Added Servlet mapping: http://localhost:8083/consumer/trafficAdvisory
+ [java] INFO: Added Servlet mapping: http://localhost:8082/consumer/trafficAdvisory
[java] Sep 14, 2007 11:14:24 AM org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
- [java] INFO: Added Servlet mapping: http://localhost:8083/producer/trafficAdvisory
+ [java] INFO: Added Servlet mapping: http://localhost:8082/producer/trafficAdvisory
Building And Running The Sample Using Maven
-------------------------------------------
Modified: tuscany/sca-java-1.x/trunk/samples/binding-notification-broker/build.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/samples/binding-notification-broker/build.xml?rev=1027072&r1=1027071&r2=1027072&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/samples/binding-notification-broker/build.xml (original)
+++ tuscany/sca-java-1.x/trunk/samples/binding-notification-broker/build.xml Mon Oct 25 11:42:26 2010
@@ -51,7 +51,7 @@
<pathelement path="target/classes"/>
<pathelement location="../../lib/tuscany-sca-manifest.jar"/>
</classpath>
- <sysproperty key="notification.httpPort" value="8083"/>
+ <sysproperty key="notification.httpPort" value="8082"/>
<arg value="end"/>
</java>
</target>
@@ -63,7 +63,7 @@
<pathelement path="target/${test.jar}"/>
<pathelement location="../../lib/tuscany-sca-manifest.jar"/>
</classpath>
- <sysproperty key="notification.httpPort" value="8083"/>
+ <sysproperty key="notification.httpPort" value="8082"/>
</java>
</target>
Modified: tuscany/sca-java-1.x/trunk/samples/binding-notification-consumer/README
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/samples/binding-notification-consumer/README?rev=1027072&r1=1027071&r2=1027072&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/samples/binding-notification-consumer/README (original)
+++ tuscany/sca-java-1.x/trunk/samples/binding-notification-consumer/README Mon Oct 25 11:42:26 2010
@@ -1,5 +1,5 @@
Notification Consumer Binding Sample
-===============================
+====================================
This sample illustrates the use of <binding.notification/> with a
remote consumer.
@@ -29,15 +29,32 @@ via <binding.notification/> to be transp
Sample Usage
------------
-This sample is run using the tuscany binary distribution. To run it, navigate to this sample's directory and
+These instructions assume that you will start the notification samples in the
+following order:
+ binding-notification-consumer
+ binding-notification-broker
+ binding-notification-producer
+
+For a clean shutdown without exceptions, you should end the notification samples
+in the following order:
+ binding-notification-producer
+ binding-notification-broker
+ binding-notification-consumer
-on Wondows, use following command:
+This sample is run using the tuscany binary distribution. To see what it does,
+open a command prompt, navigate to this sample's directory and do
-java -Dnotification.httpPort=8082 -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-binding-notification-consumer.jar notification.consumer.TrafficAdvisoryServer
+ant run
+
+OR if you don't have ant,
+
+on Windows, use the following command:
+
+java -Dnotification.httpPort=8083 -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-binding-notification-consumer.jar notification.consumer.TrafficAdvisoryServer
-on *nix, use following command:
+on *nix, use the following command:
-java -Dnotification.httpPort=8082 -cp ../../lib/tuscany-sca-manifest.jar:target/sample-binding-notification-consumer.jar notification.consumer.TrafficAdvisoryServer
+java -Dnotification.httpPort=8083 -cp ../../lib/tuscany-sca-manifest.jar:target/sample-binding-notification-consumer.jar notification.consumer.TrafficAdvisoryServer
this should bring up the following prompt:
@@ -49,9 +66,9 @@ Notice that before you try to receive an
producer sample or the broker sample. When you have finished using this
sample, hit return to end.
-Also notice that '-Dnotification.httpPort=8082' is used in the java command.
+Also notice that '-Dnotification.httpPort=8083' is used in the java command.
This indicates the port the sample should use. This also says that this server
-is not going to play the role of ntm, given our previous assumption. It is important
+is going to play the role of ntm, given our previous assumption. It is important
that the first one of the producer, consumer or broker sample that is run be the
one that uses '-Dnotification.httpPort=8083', otherwise there is no ntm to talk
to and an exception will be thrown.
@@ -80,7 +97,7 @@ binding-notification-consumer/
TrafficAdvisoryTestCase.java - JUnit test case
resources/
binding-notification-consumer.png - a pictorial representation of the sample .composite file
- build.xml - the Ant build file
+ build.xml - the Ant build file
pom.xml - the Maven build file
Building And Running The Sample Using Ant
@@ -108,3 +125,17 @@ using Maven as follows.
cd binding-notification-consumer
mvn
+You should see the following output from the test phase.
+
+-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+Running notification.consumer.TrafficAdvisoryTestCase
+Only instantiating and closing domain ...
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.252 sec
+
+Results :
+
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
+
+This shows that the Junit test cases have run successfully.
Modified: tuscany/sca-java-1.x/trunk/samples/binding-notification-consumer/build.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/samples/binding-notification-consumer/build.xml?rev=1027072&r1=1027071&r2=1027072&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/samples/binding-notification-consumer/build.xml (original)
+++ tuscany/sca-java-1.x/trunk/samples/binding-notification-consumer/build.xml Mon Oct 25 11:42:26 2010
@@ -63,7 +63,7 @@
<pathelement path="target/${test.jar}"/>
<pathelement location="../../lib/tuscany-sca-manifest.jar"/>
</classpath>
- <sysproperty key="notification.httpPort" value="8081"/>
+ <sysproperty key="notification.httpPort" value="8083"/>
</java>
</target>
Modified: tuscany/sca-java-1.x/trunk/samples/binding-notification-producer/README
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/samples/binding-notification-producer/README?rev=1027072&r1=1027071&r2=1027072&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/samples/binding-notification-producer/README (original)
+++ tuscany/sca-java-1.x/trunk/samples/binding-notification-producer/README Mon Oct 25 11:42:26 2010
@@ -1,5 +1,5 @@
Notification Producer Binding Sample
-===============================
+====================================
This sample illustrates the use of <binding.notification/> with a
remote producer.
@@ -29,19 +29,37 @@ via <binding.notification/> to be transp
Sample Usage
------------
-This sample is run using the tuscany binary distribution. To run it, navigate to this sample's directory and
+These instructions assume that you will start the notification samples in the
+following order:
+ binding-notification-consumer
+ binding-notification-broker
+ binding-notification-producer
+
+For a clean shutdown without exceptions, you should end the notification samples
+in the following order:
+ binding-notification-producer
+ binding-notification-broker
+ binding-notification-consumer
+
+This sample is run using the tuscany binary distribution. To see what it does,
+first start the consumer and broker samples. When these are running, open a
+command prompt, navigate to this sample's directory and do
-on Wondows, use following command:
+ant run
+
+OR if you don't have ant,
+
+on Windows, use the following command:
-java -Dnotification.httpPort=8083 -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-binding-notification-producer.jar notification.producer.TrafficAdvisoryServer
+java -Dnotification.httpPort=8081 -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-binding-notification-producer.jar notification.producer.TrafficAdvisoryServer
-on *nix, use following command:
+on *nix, use the following command:
-java -Dnotification.httpPort=8083 -cp ../../lib/tuscany-sca-manifest.jar:target/sample-binding-notification-producer.jar notification.producer.TrafficAdvisoryServer
+java -Dnotification.httpPort=8081 -cp ../../lib/tuscany-sca-manifest.jar:target/sample-binding-notification-producer.jar notification.producer.TrafficAdvisoryServer
this should bring up the following prompt:
-Send a report value, ^C or <end> to end
+Send a report value, ^C or 'end' to end
at this point you should be able to type a message to send, for instance:
@@ -51,9 +69,9 @@ Notice that before you try to send any m
consumer sample or the broker sample. When you have finished using this
sample, type 'end' or ^C to end.
-Also notice that '-Dnotification.httpPort=8083' is used in the java command.
+Also notice that '-Dnotification.httpPort=8081' is used in the java command.
This indicates the port the sample should use. This also says that this server
-is going to play the role of ntm, given our previous assumption. It is important
+is not going to play the role of ntm, given our previous assumption. It is important
that the first one of the producer, consumer or broker sample that is run be the
one that uses '-Dnotification.httpPort=8083', otherwise there is no ntm to talk
to and an exception will be thrown.
@@ -89,7 +107,7 @@ binding-notification-producer/
TrafficAdvisoryNotification.composite - the main composite including producer and
notification components, and composite reference
binding-notification-producer.png - a pictorial representation of the sample .composite file
- build.xml - the Ant build file
+ build.xml - the Ant build file
pom.xml - the Maven build file
Building And Running The Sample Using Ant
@@ -105,9 +123,7 @@ You should see the following output from
run:
[java] Sep 14, 2007 10:31:45 AM org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
- [java] INFO: Added Servlet mapping: http://localhost:8083/ntm/trafficAdvisory
- [java] Sep 14, 2007 10:31:45 AM org.apache.tuscany.sca.http.jetty.JettyServer addServletMapping
- [java] INFO: Added Servlet mapping: http://localhost:8083/producer/trafficAdvisory
+ [java] INFO: Added Servlet mapping: http://localhost:8081/producer/trafficAdvisory
Building And Running The Sample Using Maven
-------------------------------------------
@@ -131,4 +147,3 @@ Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
This shows that the Junit test cases have run successfully.
-
Modified: tuscany/sca-java-1.x/trunk/samples/binding-notification-producer/build.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/samples/binding-notification-producer/build.xml?rev=1027072&r1=1027071&r2=1027072&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/samples/binding-notification-producer/build.xml (original)
+++ tuscany/sca-java-1.x/trunk/samples/binding-notification-producer/build.xml Mon Oct 25 11:42:26 2010
@@ -51,7 +51,7 @@
<pathelement path="target/classes"/>
<pathelement location="../../lib/tuscany-sca-manifest.jar"/>
</classpath>
- <sysproperty key="notification.httpPort" value="8083"/>
+ <sysproperty key="notification.httpPort" value="8081"/>
<arg value="end"/>
</java>
</target>
@@ -63,7 +63,7 @@
<pathelement path="target/${test.jar}"/>
<pathelement location="../../lib/tuscany-sca-manifest.jar"/>
</classpath>
- <sysproperty key="notification.httpPort" value="8082"/>
+ <sysproperty key="notification.httpPort" value="8081"/>
</java>
</target>