ChristopherSchultz commented on issue #154: Don't serialize 
CrawlerSessionManagerValve into session attributes
URL: https://github.com/apache/tomcat/pull/154#issuecomment-480940752
 
 
   Perhaps the title of this PR should be "don't place 
CrawlerSessionManagerValve into session, place data-holder only" and it will 
make more sense.
   
   I think this idea _does_ make sense. There is no reason to put a Valve into 
the session.
   
   But the implementation doesn't actually stop anything from being serialized: 
those two big maps are still serialized along with the rest of the stream. What 
you are avoiding is serializing the class loader which is happening because of 
the Valve itself.
   
   You should not serialize the whole session mapping into a single session. 
You shouldn't have to serialize _anything_, actually. The session already knows 
its own session id.
   
   The trick is that the CrawlerSessionManagerValve needs to be notified if a 
session is terminated.
   
   Instead of storing something in the session, CrawlerSessionManagerValve 
should instead be changed to be an `HttpSessionListener` which won't be 
serialized when the session is written-out. It has the added benefit of being 
simpler than the current code.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to