I'd like to use the Hessian (Java) serialization and need to create a SerializerFactory
with custom serializers (to handle BigInteger
). Can I create one of these and share it among threads?
views:
100answers:
2
+2
A:
If you look at the source code, then you can notice that SessionFactory stores created serializers in a HashMap, and HashMap is not a thread-safe object. There is an intresting post about it.
So, the answer to your question is "no".
Superfilin
2009-09-24 20:56:00
+1
A:
It appears this has been fixed for a while now. They now use ConcurrentHashMap.
http://bugs.caucho.com/view.php?id=1588
04-06-07 15:16 ferg Fixed in Version => 3.1.1
depsypher
2010-09-26 19:29:10