diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2008-08-11 06:39:21 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2008-08-11 06:39:21 +0000 |
commit | 4fcefa96cd256eb7d5720324d596ff1272f5b183 (patch) | |
tree | ea582991071391189c82461081b782b1cdea1c00 /sandbox/travelsample | |
parent | 716d910defb4185bfad19ba6eb29a88ce445e65d (diff) |
Make the search service OneWay
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@684645 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/travelsample')
3 files changed, 11 insertions, 6 deletions
diff --git a/sandbox/travelsample/common-contribution/src/scatours/common/Search.java b/sandbox/travelsample/common-contribution/src/scatours/common/Search.java index 4686e9306b..705753972e 100644 --- a/sandbox/travelsample/common-contribution/src/scatours/common/Search.java +++ b/sandbox/travelsample/common-contribution/src/scatours/common/Search.java @@ -30,6 +30,6 @@ import org.osoa.sca.annotations.Remotable; public interface Search { TripItem[] searchSynch(TripLeg tripLeg); - // TODO - Use to run searches in parallel @OneWay + @OneWay void searchAsynch(TripLeg tripLeg); } diff --git a/sandbox/travelsample/travel-contribution/src/scatours/travel/TravelImpl.java b/sandbox/travelsample/travel-contribution/src/scatours/travel/TravelImpl.java index e4a641e1e5..e5cc0cae8f 100644 --- a/sandbox/travelsample/travel-contribution/src/scatours/travel/TravelImpl.java +++ b/sandbox/travelsample/travel-contribution/src/scatours/travel/TravelImpl.java @@ -87,7 +87,9 @@ public class TravelImpl implements TravelSearch, SearchCallback, TravelBooking{ while (responsesReceived < 3){ try { - this.wait(); + synchronized (this) { + this.wait(); + } } catch (InterruptedException ex){ // do nothing } @@ -114,7 +116,9 @@ public class TravelImpl implements TravelSearch, SearchCallback, TravelBooking{ responsesReceived++; try { - this.notifyAll(); + synchronized (this) { + this.notifyAll(); + } } catch (Exception ex) { } } diff --git a/sandbox/travelsample/ui-contribution/scatours.html b/sandbox/travelsample/ui-contribution/scatours.html index 3ac053f059..54ee0c6b3d 100644 --- a/sandbox/travelsample/ui-contribution/scatours.html +++ b/sandbox/travelsample/ui-contribution/scatours.html @@ -206,7 +206,7 @@ <img src="scatours.png" border="0" /> <div id="scatours"> <form name="travelForm"> - <h3><div id="tripId"></h3> + <h3>Search for hotels, flights and cars</h3> <br/> <table border="0"> <tr> @@ -233,16 +233,17 @@ <td/> </tr> </table> + <br/> <input type="button" onClick="searchPackages()" value="SearchPackages"> <input type="button" onClick="searchHotels()" value="Search Hotels"> <input type="button" onClick="searchFlights()" value="Search Flights"> - <input type="button" onClick="searchHotels()" value="Search Cars"> + <input type="button" onClick="searchCars()" value="Search Cars"> </form> <form name="tripForm"> <h3>Search Results</h3> <div id="searchResponse"></div> <br> - <h3>You Trip</h3> + <h3><div id="tripId"></h3> <div id="tripItems"></div> <br> <div id="totalPrice"></div> |