XDR
XDR

Reputation: 4490

Does Jackson modify ObjectMappers returned from a JAX-RS ContextResolver<ObjectMapper>?

Does Jackson modify ObjectMappers returned from a JAX-RS ContextResolver<ObjectMapper>?

i.e., if my ContextResolver<ObjectMapper> has a private ObjectMapper om field, should its getContext(Class) method return om.copy(), or just om?

Upvotes: 0

Views: 127

Answers (1)

Alexey Gavrilov
Alexey Gavrilov

Reputation: 10853

You should return just om. As far as I can see from the code, once the JAX-RS provider locates an ObjectMapper it deals with object reader and object writer instances which are fully thread safe.

StaxMan, please correct me if I'm wrong.

Upvotes: 0

Related Questions