Re: Multiple browser windows sharing the same session - dirty hack solution

2006-05-11 Thread David Ron
I think that you first have to define what you mean when you say, 
"logged in".  When a person closes the browser window, have they logged 
out?  How does Tomcat know this?  Or, does the logout occur when the 
session is garbage collected?


So, without knowing what "logged in" really means, how can you know if a 
person is actually logged in or not?


--David Ron

Peter Hubbard wrote:


Quite simply, if you have already logged in to the system, you get
kicked out until later. Like so:

HttpSession session = request.getSession(true);
   
if (session.getAttribute("details")!=null)

{
log.warn("Already logged in.");
redirect="/errors/alreadyloggedin.jsp";
}
else
{
session.setAttribute("details", client);
redirect = "/portal/portal.jsp";
} 



This gets me out of the problem of multiple logins through the same
browser window (Firefox and Opera) or the same PC (IE) having their
session information confused.

I've not found any other ways around this problem, or solutions of how
to allow individual browser windows and tabs to have individual session
data. Is there a real solution for this, and if so could some kind soul
please point me in the right direction?

Thanks

 



--
David Ron
IT Director - BandMerch
5126 Clareton Drive #140
Agoura Hills, CA 91301
877-502-3728 x5201
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Database Persistance And Session Replication

2006-06-09 Thread David Ron

Hey everybody,
I would like to configure Tomcat for both session replication across
 > 3 servers and database session persistence.  The database persistence
lags several seconds which is why I don't think that I can simply
replicate sessions over many servers using the database.

I can get the sessions to persist to the database using
org.apache.catalina.session.PersistentManager, and I can get session to
replicate in memory using
org.apache.catalina.cluster.session.DeltaManager, but how to I use both
at the same time?


Here is server.xml with the in-memory replication that works:




  



  

  















  
  

  

----

--
David Ron
IT Director - BandMerch
5126 Clareton Drive #140
Agoura Hills, CA 91301
877-502-3728 x5201
[EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]