tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bip Thelin <>
Subject Re: JDBCStore package for Tomcat 4.x
Date Fri, 13 Apr 2001 22:57:18 GMT
"Craig R. McClanahan" wrote:
> [...]
> - Would it be possible to flesh out the rest of the JavaDoc comments?
>   I would like us to maintain the high quality level of JavaDocs that
>   Tomcat 4 is known for :-)


> - Would it be possible to parameterize the SQL statements used to
>   access the database?  The idea would be that we can adapt to different
>   table and column names (like JDBCRealm does on the authentication side).

Attatched is a slightly refactored JDBCStore with a "stub implementation" of
a Connection pooled implementation. However before I change to much regarding
specifying columns for the table I want to have som input on the following things.

As it is implemented now everything is saved as a Blob so if you wan't to check
if the session is invalid or is expired you have to retrive all data and iterate
through every blob and make them into a session and THEN see if they are valid or not.

I would like to propose that we save additional data in the database. The table would
then look something like following:
    [int      ID]           The ID for this session
    [boolean  ISVALID]      True if this session is valid
    [int      MAXINACTIVE]  The Max inactive attribute
    [Blob     SESSION]      The session object

Then you could have a StoredProcedure if you want to that checks for timedout sessions
and delete/invalidate them. The StoreProcedure way of doing is of course not the default
behavior. I can now check every session for validity in the select query without having
to retrieve the data.



View raw message