Jackson FAQ: Thread-Safety

The basic rule of Jackson thread-safety is that factories follow "thread-safe after configuration" philosophy. This means that:

So as long as you first configure such factories from a single thread, and only then use it (from any number of threads), usage will be thread-safe without additional synchronization.

This rule specifically is used for:

Note that more recently some new factory-like classes use "Fluent" pattern, whereby instances are immutable (and thus fully thread-safe!), and differently configured instances are constructed by factory methods. Specifically:

This latter approach is preferred for future development, so new factory types will probably follow same style.


CategoryJackson

JacksonFAQThreadSafety (last edited 2010-09-01 21:15:17 by TatuSaloranta)

Copyright ©2009 FasterXML, LLC