diff options
Diffstat (limited to '')
3 files changed, 29 insertions, 3 deletions
diff --git a/branches/sca-java-1.4/samples/callbacks-jms/build.xml b/branches/sca-java-1.4/samples/callbacks-jms/build.xml index 665feeca71..bc2c191fc2 100644 --- a/branches/sca-java-1.4/samples/callbacks-jms/build.xml +++ b/branches/sca-java-1.4/samples/callbacks-jms/build.xml @@ -16,8 +16,8 @@ * specific language governing permissions and limitations
* under the License.
-->
-<project name="calculator" default="compile">
- <property name="test.class" value="callbacks.CallbacksTestCase" />
+<project name="callbacks-jms" default="compile">
+ <property name="test.class" value="callbacks.CallbackJMSClient" />
<property name="test.jar" value="sample-callbacks-jms.jar" />
<target name="init">
diff --git a/branches/sca-java-1.4/samples/callbacks-jms/pom.xml b/branches/sca-java-1.4/samples/callbacks-jms/pom.xml index 25f3f5592e..9a96fa6078 100644 --- a/branches/sca-java-1.4/samples/callbacks-jms/pom.xml +++ b/branches/sca-java-1.4/samples/callbacks-jms/pom.xml @@ -26,7 +26,7 @@ <relativePath>../../pom.xml</relativePath> </parent> <artifactId>sample-callbacks-jms</artifactId> - <name>Apache Tuscany SCA Callbacks with JMS Sample</name> + <name>Apache Tuscany SCA Sample Callbacks with JMS</name> <repositories> <repository> diff --git a/branches/sca-java-1.4/samples/callbacks-jms/src/main/java/callbacks/CallbackJMSClient.java b/branches/sca-java-1.4/samples/callbacks-jms/src/main/java/callbacks/CallbackJMSClient.java new file mode 100644 index 0000000000..a08d336180 --- /dev/null +++ b/branches/sca-java-1.4/samples/callbacks-jms/src/main/java/callbacks/CallbackJMSClient.java @@ -0,0 +1,26 @@ +package callbacks;
+
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCANode;
+import org.apache.tuscany.sca.node.SCANodeFactory;
+
+public class CallbackJMSClient {
+
+ public static void main(String[] args) throws Exception {
+
+ SCANodeFactory factory = SCANodeFactory.newInstance();
+ SCANode node = factory.createSCANodeFromClassLoader("callbacks.composite", CallbackJMSClient.class.getClassLoader());
+ node.start();
+
+ OrderServiceClient orderServiceClient = ((SCAClient)node).getService(OrderServiceClient.class, "ClientComponent");
+
+ // do something
+ orderServiceClient.doSomeOrdering();
+
+ // wait to give the service time to respond
+ Thread.sleep(500);
+
+ node.stop();
+ }
+
+}
|