Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stateful Session Bean as VLH for flight search

 
Sam Day
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am implementing the Flight Search Service using the Value List Handler pattern. I have a FlightIteratorEJB as a Stateful Session Bean and this EJB uses a DAO to search for flights.
The reason of using SFSB as the Value List Handler is that the SFSB can cache the search results for each client and help in pagination.

But since we have several users that would perform searching for flights, I am debating if creating a SFSB for each client would be a good idea.

Anyone implemented the flight search as a SFSB? How would you justify this design to be scalable?

Any other design ideas on this would be helpful. Thanks.
 
giuseppe fanuzzi
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think that this design is good, but better if your sfsb is a facade for a flightServiceSearch (simple java object) that acts as the true valueListHandler.
 
Sam Day
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks..
one more question-> For swing clients, where could the handle to the SFSB be stored. can it be in the Buisness Delegate in some static variable?
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you considered a serivce locator ?

If you have concerns over performance due to SFSB then you might consider caching the results in the user's session. Either way its your solution and if you feel confident about it, go for it
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One more thing. Your name "sdrocks" does not comply to javaranch naming standards. Please provide a first and last name before a moderator is on your tail
 
giuseppe fanuzzi
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

one more question-> For swing clients, where could the handle to the SFSB be stored. can it be in the Buisness Delegate in some static variable?

The handle will be stored in the sfsb, then convert the handle in a string, encapsule it and pass this string to client. so if the client have to use again (indirectly) the handle it will pass back that string to the sfsb.

it's more simple to design it than explain
 
Sub swamy
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Isn't this an approach to access EJB directly from thick client ? Dont we have to consider the security aspect here ?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"sdrocks",
Welcome to JavaRanch!

We're pleased to have you here with us here on the ranch, but there are a few rules that need to be followed. One, as John has mentioned, is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious. Initials are OK for the first and middle names but not the last. You can change it here
 
Andrew Thomas Betencourt
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn't use the SFSB in my project. I chose a architecture that divided the "control" task between the type of clients. I preferred to remove the load of session user control in application server and swing client machines.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic