summaryrefslogtreecommitdiffstats
path: root/sandbox/travelsample/gettingstarted/src/client/TripClient.java
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2008-08-31 12:27:58 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2008-08-31 12:27:58 +0000
commitbcbd8cb0b78cf576d73a0140476b2996a36e5245 (patch)
treefa4ff621017da31c51e8f591325cd42d6cad3686 /sandbox/travelsample/gettingstarted/src/client/TripClient.java
parentc9ca42a3aa4ac890695ec10e7746b9895fc2cf64 (diff)
Namespace changes from scatours to tuscanyscatours and addition of callback configuration.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@690687 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--sandbox/travelsample/gettingstarted/src/client/TripClient.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/sandbox/travelsample/gettingstarted/src/client/TripClient.java b/sandbox/travelsample/gettingstarted/src/client/TripClient.java
index 73aa5e2146..36616569a4 100644
--- a/sandbox/travelsample/gettingstarted/src/client/TripClient.java
+++ b/sandbox/travelsample/gettingstarted/src/client/TripClient.java
@@ -18,7 +18,9 @@
*/
package client;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode2Factory;
import trip.Trip;
@@ -28,10 +30,16 @@ import trip.Trip;
public class TripClient {
public final static void main(String[] args) throws Exception {
- SCADomain scaDomain = SCADomain.newInstance("trip.composite");
- Trip trip = scaDomain.getService(Trip.class, "TripComponent");
+ SCANode2Factory factory = SCANode2Factory.newInstance();
+ SCANode2 node = factory.createSCANodeFromClassLoader("trip.composite",
+ null);
+ node.start();
+
+ Trip trip = ((SCAClient)node).getService(Trip.class,
+ "TripComponent");
+
System.out.println(trip.getTotalPrice());
- scaDomain.close();
+ node.stop();
}
}