yasson
yasson copied to clipboard
cache JsonProvider result in JsonBindingBuilder
trafficstars
implement ticket #333
Another complexity I just realized is that the Jsonb interface has a close() method on it, which will complicate the ability to share instances. I don't have a clean solution to this problem at the moment, but have 2 ideas in mind (neither of which are ideal)
- Store a reference count in our
JsonBindingimplementation and the count goes up once for every new shared instance that gets passed out, and the count goes down once each time close() gets called on an instance. When the count gets to 0 the instance is fully closed. This approach seems nice but it would render the performance optimization useless for the typical "get -> use -> close" scenario - Allow an instance to be "reopened" after it is closed. This would be fine for the non-CDI case where
close()is a no-op, but is not possible in CDI environments where beans are destroyed upon close
Hi @Simulant87 , your build is failing on copyright job in our pipeline. Currently there is an issue with that on our side. See PR #365 . Please when this PR is merged, just rebase on it and everything should be fine.