Serialization Context on thread local has been a very nice solution to handle marshalling of ProtostreamId and ProtostreamPayload.
These classes have the issue that for one of each could correspond more then one ProtocolBuffer message type.
In contrast new Infinispan transactions flush all the transaction changes just before transaction completion, so it seems that we can't use thread local anymore if we want support them.
See the issue https://hibernate.atlassian.net/browse/OGM-1494.
We've figured out an alternative solution:
*The main idea is to have a unique global serializzation context, containing all marshallers, and using the message Protocol Buffer type instead java Class to choose the right one.*