views:

100

answers:

2

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?

+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
+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