I have been looking at Prepare Itinerary to be made up of the following tasks:
1> Search Itinerary -- Use SLSB (search data would be in httpsession for web client; for application client -- storing search data is not a problem); 2> Booking Itinerary -- Use SFSB
Search Itinerary consists -- first search followed by second search (which comprises of search for flights within 1 hour of the selected flight and cost less than the same ) would be shown; User selects the flights; till user select seats;
Booking Itinerary -- Store the selected flight data and seat information in the Session Bean. check if user account created, if not force him to create; Check if user logged in, if not force him to login; compute price; save itinerary;
As I draw sequence diagram ...i am not getting convinced about trigerring the need for user login/ user account creation screen /process from stateful session bean. Can anybody point me to any url or share any thoughts on invoking JSP from stateful session bean and then getting the control back???
I have almost started feeling that stateful session is required only bez of these alternative flows, as otherwise one could have managed just with the stateless session bean.
In which case the entire controlling logic for Prepare Itinerary would be sitting in the Controller Servlet...right.
But i am really curious (even from the point of view of understanding ...not just from solving this assignment) how could one address this requirement of bringing up the login / create customer profile screens if one were to go ahead with using stateful session bean instead of using Http Session. Java Ranchers....pls. share your thoughts. how could one manage with the controlling logic? where could the controlling logic be sitting then?