You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2014/09/25 02:06:07 UTC

[Bug 57016] New: PersistentValve deletes sessions right after it creates them

https://issues.apache.org/bugzilla/show_bug.cgi?id=57016

            Bug ID: 57016
           Summary: PersistentValve deletes sessions right after it
                    creates them
           Product: Tomcat 7
           Version: 7.0.53
          Hardware: Macintosh
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: matthauck@gmail.com

PersistentValve is broken as it stands and always delete sessions right after
it creates them.  

cf. the following lines in
https://github.com/apache/tomcat/blob/TOMCAT_7_0_42/java/org/apache/catalina/valves/PersistentValve.java#L178-L179

  store.save(session);
  ((PersistentManager) manager).removeSuper(session);


I have setup my PersistentManager with a JDBCStore, and if I set a breakpoint
between these two lines, I can see the `save` call inserts a row into the
database properly, and then take one step past the `removeSuper` call, and it
deletes the row from the database.

The removeSuper (used by PersistentValve) method has the following comment on
it:
"Remove this Session from the active Sessions for this Manager, but not from
the Store."

The implementation of remove in PersistentManagerBase has the following
comment:
"Remove this Session from the active Sessions for this Manager, and from the
Store."

There is clearly a break in the API here. The PersistentValve is expecting the
PersistentManager.removeSuper to do one thing (which method has a comment
saying it exists only for the sake of PersistentValve, btw.), but
PersistentManagerBase which implements this does a different thing than
expected.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 57016] PersistentValve deletes sessions right after it creates them

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57016

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
                 OS|                            |All

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
Thanks for the report. This is fixed in 8.0.x for 8.0.15 onwards and in 7.0.x
for 7.0.56 onwards.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 57016] PersistentValve deletes sessions right after it creates them

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57016

--- Comment #2 from Matt Hauck <ma...@gmail.com> ---
Wow, that was fast. thanks!

-- 
You are receiving this mail because:
You are the assignee for the bug.

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