RE: JDBC Session Persistence in a cluster problem/question

2006-01-10 Thread Gary Blomquist

I am looking into this as well.  It appears that you must use sticky
sessions with the Persistent Manager/JDBC store to get failover to work.
However, it also appears that due to the asyncronous persisting of the
sessions, you might still lose some session data.  

I have written a manager that will store sessions syncronously.
However, I haven't yet figured out how to develop functionality to read
the sessions in if they are dirty based on last access time.  I am
attempting to develop this by extending rather than modifying Tomcat. (I
have made a couple of related posts.)

Gary Blomquist

-Original Message-
From: Paul Smith [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 10, 2006 1:45 AM
To: users@tomcat.apache.org
Subject: JDBC Session Persistence in a cluster problem/question

From: [EMAIL PROTECTED]
Subject:JDBC Session persistence in a cluster
problem/question
Date:   10 January 2006 5:42:51 PM
To:   [EMAIL PROTECTED]

[For context, Tomcat 5.5.12]

Hello all,

I'm having a bit of trouble understanding exactly what the capabilities
are of the whole PersistenceManager and how it saves session data.
here's what I we have configured in server.xml:

Host name=localhost appBase=foo 
 Context path=/ docBase=${catalina.home}/app/mel/ 
  Manager
className=org.apache.catalina.session.PersistentManager 
 Store
className=org.apache.catalina.session.JDBCStore
  
connectionURL=jdbc:inetdae7:tower.aconex.com? 
database=paulamp;user=sqlamp;password=sql
 driverName=com.inet.tds.TdsDriver
 sessionIdCol=session_id
 sessionValidCol=valid_session
 sessionMaxInactiveCol=max_inactive
 sessionLastAccessedCol=last_access
 sessionTable =tomcat_sessions
 sessionAppCol = app_name
 sessionDataCol = session_data
 /
  /Manager
 /Context
 /Host

Sessions are persisting, as we can see the new rows being added to the
DB.  Fine, great.

However in our test cluster environment we have noticed that session
variables (strings, Integers) are being lost during the failover to
the other node in the cluster.  From looking at the Javadoc of the
PersistentManager and other related info on the net, I can't see
anywhere where it indicates that the Session is persisted to the DB when
the session is updated/modified/addedto.  It seems to only have settings
that set how long to wait before saving to the persistence store.

1). Am I correct in my understanding so far?
2) . If so, is this design because of the likely performance impact of
all these session changes, and the somewhat unlikely case of the server
going down in the first place.
3). do I have any options here?  We really do need a pretty seamless
failover with session information being kept in sync as it failsover to
the other node in the cluster.

cheers,

Paul Smith


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



FW: JDBC Session Persistence in a cluster problem/question

2006-01-10 Thread Gary Blomquist
 
If you used the syncronous persistent manager I posted with sticky
sessions I think you would not lose data on failover.  However, I just
developed it and have barely tested it at all.  I was hoping for some
feedback from the list.

Gary

-Original Message-
From: Gary Blomquist [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 10, 2006 3:08 PM
To: Tomcat Users List
Subject: RE: JDBC Session Persistence in a cluster problem/question


I am looking into this as well.  It appears that you must use sticky
sessions with the Persistent Manager/JDBC store to get failover to work.
However, it also appears that due to the asyncronous persisting of the
sessions, you might still lose some session data.  

I have written a manager that will store sessions syncronously.
However, I haven't yet figured out how to develop functionality to read
the sessions in if they are dirty based on last access time.  I am
attempting to develop this by extending rather than modifying Tomcat. (I
have made a couple of related posts.)

Gary Blomquist

-Original Message-
From: Paul Smith [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 10, 2006 1:45 AM
To: users@tomcat.apache.org
Subject: JDBC Session Persistence in a cluster problem/question

From: [EMAIL PROTECTED]
Subject:JDBC Session persistence in a cluster
problem/question
Date:   10 January 2006 5:42:51 PM
To:   [EMAIL PROTECTED]

[For context, Tomcat 5.5.12]

Hello all,

I'm having a bit of trouble understanding exactly what the capabilities
are of the whole PersistenceManager and how it saves session data.
here's what I we have configured in server.xml:

Host name=localhost appBase=foo 
 Context path=/ docBase=${catalina.home}/app/mel/ 
  Manager
className=org.apache.catalina.session.PersistentManager 
 Store
className=org.apache.catalina.session.JDBCStore
  
connectionURL=jdbc:inetdae7:tower.aconex.com? 
database=paulamp;user=sqlamp;password=sql
 driverName=com.inet.tds.TdsDriver
 sessionIdCol=session_id
 sessionValidCol=valid_session
 sessionMaxInactiveCol=max_inactive
 sessionLastAccessedCol=last_access
 sessionTable =tomcat_sessions
 sessionAppCol = app_name
 sessionDataCol = session_data
 /
  /Manager
 /Context
 /Host

Sessions are persisting, as we can see the new rows being added to the
DB.  Fine, great.

However in our test cluster environment we have noticed that session
variables (strings, Integers) are being lost during the failover to
the other node in the cluster.  From looking at the Javadoc of the
PersistentManager and other related info on the net, I can't see
anywhere where it indicates that the Session is persisted to the DB when
the session is updated/modified/addedto.  It seems to only have settings
that set how long to wait before saving to the persistence store.

1). Am I correct in my understanding so far?
2) . If so, is this design because of the likely performance impact of
all these session changes, and the somewhat unlikely case of the server
going down in the first place.
3). do I have any options here?  We really do need a pretty seamless
failover with session information being kept in sync as it failsover to
the other node in the cluster.

cheers,

Paul Smith


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


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



JDBC Session Persistence in a cluster problem/question

2006-01-09 Thread Paul Smith

From: [EMAIL PROTECTED]
Subject:JDBC Session persistence in a cluster problem/question
Date:   10 January 2006 5:42:51 PM
To:   [EMAIL PROTECTED]

[For context, Tomcat 5.5.12]

Hello all,

I'm having a bit of trouble understanding exactly what the  
capabilities are of the whole PersistenceManager and how it saves  
session data.  here's what I we have configured in server.xml:


   Host name=localhost appBase=foo 
Context path=/ docBase=${catalina.home}/app/mel/ 
 Manager  
className=org.apache.catalina.session.PersistentManager 
Store  
className=org.apache.catalina.session.JDBCStore
 
connectionURL=jdbc:inetdae7:tower.aconex.com? 
database=paulamp;user=sqlamp;password=sql

driverName=com.inet.tds.TdsDriver
sessionIdCol=session_id
sessionValidCol=valid_session
sessionMaxInactiveCol=max_inactive
sessionLastAccessedCol=last_access
sessionTable =tomcat_sessions
sessionAppCol = app_name
sessionDataCol = session_data
/
 /Manager
/Context
/Host

Sessions are persisting, as we can see the new rows being added to  
the DB.  Fine, great.


However in our test cluster environment we have noticed that session  
variables (strings, Integers) are being lost during the failover to  
the other node in the cluster.  From looking at the Javadoc of the  
PersistentManager and other related info on the net, I can't see  
anywhere where it indicates that the Session is persisted to the DB  
when the session is updated/modified/addedto.  It seems to only have  
settings that set how long to wait before saving to the persistence  
store.


1). Am I correct in my understanding so far?
2) . If so, is this design because of the likely performance impact  
of all these session changes, and the somewhat unlikely case of the  
server going down in the first place.
3). do I have any options here?  We really do need a pretty seamless  
failover with session information being kept in sync as it failsover  
to the other node in the cluster.


cheers,

Paul Smith