tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronald Klop <ronald-mailingl...@base.nl>
Subject Re: getAllClusterSessions gives OptionalDataException
Date Thu, 14 Jul 2011 08:53:06 GMT



Op vrijdag, 8 juli 2011 21:55 schreef Christopher Schultz <chris@christopherschultz.net>:
> 
>   
>  -----BEGIN PGP SIGNED MESSAGE-----
>  Hash: SHA1
>  
>  Ronald,
>  
>  On 7/8/2011 5:33 AM, Ronald Klop wrote:
>  > After some fun with debugging Tomcat on my live server (because I
>  > couldn't reproduce it in test) it looks like a concurrency bug in my
>  > own code.
>  
>  D'oh.
>  
>  > I think I modify a HashMap which is serialized in the session. For
>  > some reason I don't get a ConcurrentModificationException, but in the
>  > byte[] in DeltaManager.handleALL_SESSION_DATA I had a HashMap with
>  > size 5, but I only saw 4 elements which gave the
>  > OptionalDataException. I now use a synchronized map and don't see
>  > the exception anymore (after 1 day of testing, so I don't cheer too
>  > loud yet).
>  
>  Definitely get back to us with an update. It would be nice to know that
>  this problem turned out to be caused by the webapp and not Tomcat in
>  some way.
>  
>  - -chris
>   
>  
> 
> 
>   
 Hi,

 Today we had to do an update during work hours and all sessions were ok. So I consider this
OptionalDataException solved for me.
 It was a not synchronized Map in the session which is updated more frequently now than in
the past and triggered a race condition now.

 Greetings and thanks for responses and tips,

 Ronald.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message