adding ObjectWriterThreadLocal
merging from 2.2