tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: JDBCStore package for Tomcat 4.x
Date Mon, 16 Apr 2001 20:16:25 GMT


On Mon, 16 Apr 2001, Bip Thelin wrote:

> Kief Morris wrote:
> > 
> > [...]
> >
> > I think this is a good way to go about it: it looks like the table name can be configured
> > in the server.xml file. Probably the column names should also maintained as JDBCStore
> > properties for configurability.
> 
> Yes, that's why I wrote the last email to get some feedback on fields needed for the
table.
> I'll implement it so it'll be configurable.
> 
> > The table will need a column for the lastAccessedTime. And the ID column will need
to
> > be something like CHAR, VARCHAR, or BYTE rather than an int.
> 
> Yes, a typo from me. I looked at your latest patches for Persistentmanager and the Managerbase
> and it looks good. However we should come up with some smart solution when working with
JDBCStore,
> the processexpires() in PersistentManagerBase is looking for current sessions then swaping
them
> in and checking if they're valid, if so continue else invalidate. This is fine for FileStore
but
> with JDBCStore this causes each session to be retrieved over the network(or where the
RDBMS is located)
> just to check if the session is valid. Maybe we could add a method to the Store interface,
i.e.
> public boolean isSessionValid(String sessionId) {}.
> 
> What you would gain from this is that each Store is responsible for checking if expired
in
> the way that's best for that particular Store, with JDBC you could do that in a single
select
> statement without having to retrieve the data from the session(Assuming you save the
lastaccesstime in
> the database, I'm currently working on that).
> 
> 	..bip
> 

One of my original thoughts was along this line ... a Store should be
responsible for expiring its own swapped-out sessions.  In practice, you
would have a background thread inside JDBCStore doing this for you.  The
Store would also double check the current status while processing a
load().

Craig



Mime
View raw message