• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

As i am drawing sequence diagram for prepare itinerary...

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

Thanks in advance.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What.. invoking JSP from stateful session bean ??
 
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

That�s why I think you should not use Statefull Session Beans as controllers. This task (verify whether the user has logged on) is normally handled by a controller servlet.

Please note that I haven�t received my results yet (although I have completed all 3 steps). But I recommend you re-think your controller strategy.
 
veena madhukar
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Veena,

You said:


In which case the entire controlling logic for Prepare Itinerary would be sitting in the Controller Servlet...right.



I agree with you that we need to be careful about the scope of logic which one controller holds.

I'm thinking about the Intercepting Filter, Application Controller and Context Object patterns as being responsible for the authentication and access control for the customer side.

Regards,
Dan
 
veena madhukar
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not very clear about the usage of session bean for booking, if the controlling logic will reside in the controller - servlet class;

Prepare Itinerary = Search Itinerary + Booking Flights (unpaid but price computed saved itinerary);

Any thoughts???
 
My previous laptop never exploded like that. Read this tiny ad while I sweep up the shards.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic