Win a copy of Head First Android this week in the Android forum!
  • 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 ...
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Al Hobbs
  • salvin francis

session state storage revisited !!

Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I have been reading threads in the forum about the session state storage mechanisms. A common approach is to store state in SFSB's -in ejb tier- (flights reserved, user Id, etc..) and store that beans's handle in web tier.(httpSession).
I would like to bring an other approach and I would like to know your opionions on this..

Instead of storing session in EJB tier I would like to store it web tier.
I think state replication (scability) is better and faster for web containers than ejb containers and storing state in EJB tier results as less scability than storing state in web tier. (Web containers geared better for session replication than EJB container.) I got this notion after reading some books on the issue (J2EE design and programming by Rod Johnson). And It makes sense. EJB is a beast and you do not need it at all for little tasks (fecthing date from db.) If you are using EJB one should have a need for distributed application and some proof of his/her need.

The swing client (whether applet or java application) can store the state on its own memory (on the client machine). I think there is no need to store state on the server for this types of clients. And the swing client can access EJB tier thru a servlet. Messages can be passed as XML documents between the swing client and the servlet.(the only overhead will be XML parsing, etc). Because directly accesing EJB tier will expose our business logic to everbody.And It will introduce firewall issues.

Instead, I would assume using web tier for all types of clients (using servlet) and storing session state on the web tier for web clients. (userId, flight information.) and I would assume to keep session state on the cliet itself for swing clients.

Has anybody any opionions on this.? I want to get to the facts instead of Sun's promotions and marketings.


    Bookmark Topic Watch Topic
  • New Topic