| Hi Aritz Bastida, Thanks for the very detailed report. Unfortunately, I don't think there's much we can do:
- the JPA API doesn't give us access to the ValidationMode. And even if it did, it's per persistence unit and I don't think we have a way to get the PersistenceUnit managing an entity from the API.
- the code in WebLogic looks very suboptimal and there's nothing we can do about it. Maybe you can try opening a support case? This code should definitely be made as fast as possible as it's called for every property.
We don't have much of a choice anyway as the behavior of the JPATraversableResolver is defined by the Bean Validation spec and is triggered by the presence of JPA in the classpath. I thought maybe we could try to determine if an object is an entity before triggering this behavior but unfortunately, I don't see anything in the JPA API to do so. That being said, as it seems you are stating you don't use validation on your entities, my advice would be to define a custom TraversableResolver returning true for both methods. You can do so either via the programmatic API or via the validation.xml configuration file. Do you see anything else we could do? If not I'm going to close this issue. |