Guillaume Smet (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HV-1779 (
https://hibernate.atlassian.net/browse/HV-1779?atlOrigin=eyJpIjoiNzI0ZTI1...
)
Re: hibernate-validator unnecessarily calls the thread-unsafe
CachingJPATraversableResolverForSingleValidation in hibernate-core when validating (
https://hibernate.atlassian.net/browse/HV-1779?atlOrigin=eyJpIjoiNzI0ZTI1...
)
CachingJPATraversableResolverForSingleValidation is not thread safe because it's not
supposed to be. It's used to wrap the underlying TraversableResolver for a single
validate call.
It's all done automatically so you do not need to care about this.
I don't know exactly what's happening in your case and it would be hard to say
without a reproducer but you can for sure define your own traversable resolver to avoid
using the default ones. The JPA one is automatically chosen if you have a JPA
implementation around. If you are not validating entities, it's indeed better to avoid
using it.
You can find a good example of that in Quarkus for instance:
*
https://github.com/quarkusio/quarkus/blob/master/extensions/hibernate-val...
*
https://github.com/quarkusio/quarkus/blob/master/extensions/hibernate-val...
Also some interesting read in the doc:
*
https://docs.jboss.org/hibernate/stable/validator/reference/en-US/html_si...
*
https://docs.jboss.org/hibernate/stable/validator/reference/en-US/html_si...
(
https://hibernate.atlassian.net/browse/HV-1779#add-comment?atlOrigin=eyJp...
) Add Comment (
https://hibernate.atlassian.net/browse/HV-1779#add-comment?atlOrigin=eyJp...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100126- sha1:82783e0 )