diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-01-25 18:00:45 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-01-25 18:00:45 +0000 |
commit | 3852b601e7c5d71282cb5e37e9c6ce6e648503a2 (patch) | |
tree | 65e9367a1a4e6b3386f3b745f0611fb13ac67396 /sandbox/travelsample/travelcatalog-contribution/src/scatours | |
parent | fcc6917ad657da26eedccadf3e7b8d81d410b6a7 (diff) |
switch components so that the booking component talks directly to the trip suppliers.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@737553 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/travelsample/travelcatalog-contribution/src/scatours')
-rw-r--r-- | sandbox/travelsample/travelcatalog-contribution/src/scatours/travelcatalog/TravelCatalogImpl.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sandbox/travelsample/travelcatalog-contribution/src/scatours/travelcatalog/TravelCatalogImpl.java b/sandbox/travelsample/travelcatalog-contribution/src/scatours/travelcatalog/TravelCatalogImpl.java index 524507589d..2369baaff1 100644 --- a/sandbox/travelsample/travelcatalog-contribution/src/scatours/travelcatalog/TravelCatalogImpl.java +++ b/sandbox/travelsample/travelcatalog-contribution/src/scatours/travelcatalog/TravelCatalogImpl.java @@ -57,6 +57,9 @@ public class TravelCatalogImpl implements TravelCatalogSearch, SearchCallback{ @Reference protected Search carSearch; + + @Reference + protected Search tripSearch; @Property public String quoteCurrencyCode = "USD"; @@ -86,8 +89,9 @@ public class TravelCatalogImpl implements TravelCatalogSearch, SearchCallback{ flightSearch.searchAsynch(tripLeg); carSearch.searchAsynch(tripLeg); + tripSearch.searchAsynch(tripLeg); - while (responsesReceived < 3){ + while (responsesReceived < 4){ try { synchronized (this) { this.wait(); @@ -116,8 +120,10 @@ public class TravelCatalogImpl implements TravelCatalogSearch, SearchCallback{ Object callbackID = requestContext.getServiceReference().getCallbackID(); System.out.println(callbackID); - for(int i = 0; i < items.length; i++ ){ - searchResults.add(items[i]); + if (items != null) { + for(int i = 0; i < items.length; i++ ){ + searchResults.add(items[i]); + } } responsesReceived++; |