• 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

Info about clustering

 
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a servlet which authenticates the user while he is logging in.If another person logs in with the same name , the first user will be displayed a message saying that the same user has logged on in another machine with the same login(The same scenario as in Yahoo messenger and AOL chat).
For this to achieve I am using HTTPSession to know the username who all have logged on
If I use clusters for load balancing and failover, whether my info in HTTPSession will be validated(replicated) for all the servers in the cluster so that any point of time only one user with the same username can log on.
Its urgent
Thanx in advance
 
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mary,
This might depend on your clustering implementation, but I don't think that the session is typically shared across servers. For this to work, you might need to use some kind of persistent storage instead, like a database, to store your state.
-Mirko

Originally posted by Mary, Cole:
Hi,
I have a servlet which authenticates the user while he is logging in.If another person logs in with the same name , the first user will be displayed a message saying that the same user has logged on in another machine with the same login(The same scenario as in Yahoo messenger and AOL chat).
For this to achieve I am using HTTPSession to know the username who all have logged on
If I use clusters for load balancing and failover, whether my info in HTTPSession will be validated(replicated) for all the servers in the cluster so that any point of time only one user with the same username can log on.
Its urgent
Thanx in advance


 
Mary Cole
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mirko Froehlich
Thanx for the reply.
Even if I have a persistent storage mechanism like Database how can we achieve this.

My assumption is this----
As soon as the user logs on, lemme say that a field in my table will have value "Y".
My doubt is , what if the user closes the browser without log out or what if the browser crashes.
My field will still have value of "Y" as the servlet is in memory.
Do reply
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic