When an application uses enterprise beans in the business tier, it may be preferable to implement a session bean that uses the ValueListHandler. In this case, the session bean simply fronts an instance of a ValueListHandler. Thus, the session bean may be implemented as a stateful session bean to hold on to the list handler as its state, and thus may simply act as a facade
Since the Value List Handler is a session bean, it may appear as a specialized Session Facade. However, in isolation, it is a specialized session bean rather than a specialized Session Facade. A Session Facade has other motivations and characteristics, and it is much coarser grained.
1/ What's your feeling about the need to return to the database or not for each page, or to get the entire resultset in one pass and to scroll to list only?
2/ What will be the kind of objects returned? In Petstore the objects returned are of type Page that are whether Category or Product or Item. In our case it won't be only flights but rather more complex objects, ie sequence of connecting flights from one city to another.
3/ How could the list be presented in the case of a round-trip and the necessity to display both outbound and return FlightSequence objects. How does'it it impact the design?
4/ Is there neccessity to deal with the relationship between city and the many airports that can serve a city, or should it be considered as something hidden by the searching mechanism used, ie the SQL request that will be performed by the DAO, which we don't have to deal with either.
5/ Transactional requirements for this search? In Petstore transcation attribute is required!!!
And this can be stored inside 2 lists (inbound and outbound) and the flightVO will then contain these lists.
My thinking is the size of this VLH won't be huge as these are returning flight search result for a small airline(limited no of flights)
Why two lists? Can you not keep a flag in each TO which indicates the same so that when you display results you know whether it is in/outbound?Any specific motivation for keeping two lits?
I hope you mean the same when you refer to FlightTO/VO.
If yes , then as per core J2EE Patterns you should be returning something like List which contains xxxTO objects.I think you are doing the same.
But to indicate whether a flight belongs to outbound /inbound ,my idea was to keep another param in TO like isRoundTrip rather than keeping seperate lists like inbound/oubound.