You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Tiago Batista <ts...@ua.pt> on 2010/11/05 19:30:59 UTC

StoreBase implementation

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


Re: StoreBase implementation

Posted by Mark Thomas <ma...@apache.org>.
On 05/11/2010 14:30, Tiago Batista wrote:
> 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?

Create a bugzilla entry and add your patch so it doesn't get lost.

Mark



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