ASF Bugzilla – Attachment 35766 Details for
Bug 62175
Infinite recursive session PersistentManager.swapIn loop with OOM
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Refactoring part three to make fix more readable
0004-Extract-code-to-reactivate-Session-into-private-meth.patch (text/plain), 2.33 KB, created by
Felix Schumacher
on 2018-03-14 13:44:12 UTC
(
hide
)
Description:
Refactoring part three to make fix more readable
Filename:
MIME Type:
Creator:
Felix Schumacher
Created:
2018-03-14 13:44:12 UTC
Size:
2.33 KB
patch
obsolete
>From 449e5eba6e5b75586a452ee8a73ac97c8a63fa65 Mon Sep 17 00:00:00 2001 >From: Felix Schumacher <felix.schumacher@internetallee.de> >Date: Wed, 14 Mar 2018 09:40:31 +0100 >Subject: [PATCH 4/5] Extract code to reactivate Session into private method > >--- > .../catalina/session/PersistentManagerBase.java | 29 ++++++++++++---------- > 1 file changed, 16 insertions(+), 13 deletions(-) > >diff --git a/java/org/apache/catalina/session/PersistentManagerBase.java b/java/org/apache/catalina/session/PersistentManagerBase.java >index 8f525384e7..939719221d 100644 >--- a/java/org/apache/catalina/session/PersistentManagerBase.java >+++ b/java/org/apache/catalina/session/PersistentManagerBase.java >@@ -718,19 +718,7 @@ public abstract class PersistentManagerBase extends ManagerBase > } > > if (session != null) { >- if(log.isDebugEnabled()) >- log.debug(sm.getString("persistentManager.swapIn", id)); >- >- session.setManager(this); >- // make sure the listeners know about it. >- ((StandardSession)session).tellNew(); >- add(session); >- ((StandardSession)session).activate(); >- // endAccess() to ensure timeouts happen correctly. >- // access() to keep access count correct or it will end up >- // negative >- session.access(); >- session.endAccess(); >+ reactivateLoadedSession(id, session); > } > } > } >@@ -744,6 +732,21 @@ public abstract class PersistentManagerBase extends ManagerBase > > } > >+ private void reactivateLoadedSession(String id, Session session) { >+ if(log.isDebugEnabled()) >+ log.debug(sm.getString("persistentManager.swapIn", id)); >+ >+ session.setManager(this); >+ // make sure the listeners know about it. >+ ((StandardSession)session).tellNew(); >+ add(session); >+ ((StandardSession)session).activate(); >+ // endAccess() to ensure timeouts happen correctly. >+ // access() to keep access count correct or it will end up >+ // negative >+ session.access(); >+ session.endAccess(); >+ } > > private Session loadSessionFromStore(String id) throws IOException { > try { >-- >2.13.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 62175
:
35763
|
35764
|
35765
| 35766 |
35767
|
35768