FasterXML / jackson-jaxrs-providers

Multi-module project that contains Jackson-based "old" JAX-RS (ones under `javax.ws.rs`) providers for JSON, XML, YAML, Smile, CBOR formats
Apache License 2.0
111 stars 78 forks source link

Convert `ObjectReaderInjector`/`ObjectWriterInjector` to use new (2.16) pluggable `RecyclerPool` instead of hard-coded one #176

Closed cowtowncoder closed 1 year ago

cowtowncoder commented 1 year ago

Similar to https://github.com/FasterXML/jackson-dataformats-binary/issues/399 (and others) (based on changes for https://github.com/FasterXML/jackson-core/issues/1089) we need to allow re-configuring of recyclers used for recycling ObjectReaderModifier/ObjectWriterModifier instances: mostly for new Project Loom (where ThreadLocal based approach won't work well) but also allow users to use more optimal pooling in general.

Ideally changes would go in 2.16, leaving default impl in use but allowing re-configuration.

cowtowncoder commented 1 year ago

Actually, I forgot what ThreadLocal is used for here: it is not for Object recycling but for "AOP" style injection of modifiers. Hence cannot be simply replaced -- if changes needed, need to think through using something else.