• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Stateful Session Bean as VLH for flight search

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic