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?
Asked
Active
Viewed 722 times
1

Andrey Adamovich
- 20,285
- 14
- 94
- 132

Dave
- 13,518
- 7
- 42
- 51
2 Answers
2
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".

Andrey Adamovich
- 20,285
- 14
- 94
- 132
2
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
- 1,084
- 11
- 20