diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-02 22:30:50 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-02 22:30:50 +0000 |
commit | 0171c408cd3745ec12ab191d05309ba245236172 (patch) | |
tree | bbaf705b47818a7850c5305160b6be6e47123fd7 /sandbox/travelsample/contributions/travelcatalog-contribution/src/main | |
parent | 26a0b619df3a85a84aadd780305a80dc495ef6e1 (diff) |
Add the changes and configuration necessary to allow the full travel sample to run under the control of the domain manager. The domain manager changes rely on some changes in order to run. Namely TUSCANY-3070/3075/3062.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@781189 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/travelsample/contributions/travelcatalog-contribution/src/main')
-rw-r--r-- | sandbox/travelsample/contributions/travelcatalog-contribution/src/main/java/scatours/travelcatalog/TravelCatalogImpl.java | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/sandbox/travelsample/contributions/travelcatalog-contribution/src/main/java/scatours/travelcatalog/TravelCatalogImpl.java b/sandbox/travelsample/contributions/travelcatalog-contribution/src/main/java/scatours/travelcatalog/TravelCatalogImpl.java index 410ff10cfe..4919d2a629 100644 --- a/sandbox/travelsample/contributions/travelcatalog-contribution/src/main/java/scatours/travelcatalog/TravelCatalogImpl.java +++ b/sandbox/travelsample/contributions/travelcatalog-contribution/src/main/java/scatours/travelcatalog/TravelCatalogImpl.java @@ -83,9 +83,23 @@ public class TravelCatalogImpl implements TravelCatalogSearch, SearchCallback{ dynamicHotelSearch.getService().searchAsynch(tripLeg);
flightSearch.searchAsynch(tripLeg);
+
+ while (responsesReceived < 2){
+ try {
+ synchronized (this) {
+ this.wait();
+ }
+ } catch (InterruptedException ex){
+ // do nothing
+ System.out.println("waiting for response");
+ }
+ }
+
carSearch.searchAsynch(tripLeg);
tripSearch.searchAsynch(tripLeg);
+ System.out.println("going into wait");
+
while (responsesReceived < 4){
try {
synchronized (this) {
@@ -93,8 +107,9 @@ public class TravelCatalogImpl implements TravelCatalogSearch, SearchCallback{ }
} catch (InterruptedException ex){
// do nothing
+ System.out.println("waiting for response");
}
- }
+ }
for (TripItem tripItem : searchResults){
tripItem.setId(UUID.randomUUID().toString());
@@ -113,7 +128,7 @@ public class TravelCatalogImpl implements TravelCatalogSearch, SearchCallback{ public void searchResults(TripItem[] items){
RequestContext requestContext = componentContext.getRequestContext();
Object callbackID = requestContext.getServiceReference().getCallbackID();
- System.out.println(callbackID);
+ System.out.println("Asynch response - " + callbackID);
if (items != null) {
for(int i = 0; i < items.length; i++ ){
|