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
Mirko Froehlich
Ranch Hand
Joined: Aug 21, 2000
Posts: 114
posted
0
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
Joined: Dec 02, 2000
Posts: 362
posted
0
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
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.