tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tiago Batista <tsbati...@ua.pt>
Subject StoreBase implementation
Date Fri, 05 Nov 2010 18:30:59 GMT
Hello all

I have been trying to develop an alternative session manager that uses
the JDBC store as a backend for a private project.

I noted after a while that although the StoreBase only depends on the
Manager interface, it later (around line 170) casts the manager to
PersistentManager without a single check...

I understand that at the moment, the persistent manager is the only
manager that uses this store, but could you consider something like this
for inclusion? This removes the explicit need for the PersistentManager,
while maintaining functionality, and in my opinion keeping legibility.

if ( manager.findSession( keys[i] ) != null ) {
    // recycle old backup session
    session.recycle();
} else {
    // expire swapped out session
    session.expire();
}

Thoughts?

Tiago


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message