-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combination Hibernate Validation advice to use @ApplicationScoped does not work. #18763
Comments
Quarkus |
This is expected. You made your If you make it |
I understand.. but I think the behavior on JBOSS looks different that in Quarkus (our validators are shared). That is portability issue. I'll check if I can adapt in JBOSS as well. I can't find where, but I read somewhere that the advice was to use Besides this example, I could not get non |
I would really like to, but #18587 is blocking me. |
I really don't know about that, but I'd suggest to trust @gsmet over other random suggestions as he's the project lead for Hibernate Validator and also responsible for its maintenance in JBoss server ;-) |
Well, It's definitely not recommended if you need different |
Fix quarkusio#18763 (cherry picked from commit 0efb8fe)
Describe the bug
If there are multiple occurrences of a custom annotation, it seems that there's only one initialized. This is not the case in for instance JBOSS and leads to unexpected behavior.
I also tried @singleton, same result.
Expected behavior
The annotation is initialized with the correct annotation proxy instance before the
isValid
is executed.Actual behavior
It is not. First come, first serve.
How to Reproduce?
https://github.com/sjaakd/reproducer_hv
Steps to reproduce:
http://localhost:8080/reproducer/q/swagger-ui/#/default/example
Note the validated
Request
:The validator implementation is supposed to select the injected dao if
defaulState
is not set.Output of
uname -a
orver
No response
Output of
java -version
java 11
GraalVM version (if different from Java)
Quarkus version or git rev
1.12.1.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)maven, intellij
Additional information
none
The text was updated successfully, but these errors were encountered: