`@Blocking` on resource is ignored if implementing an OpenAPI-generated interface
See original GitHub issueDescribe the bug
When generating interfaces from a OpenAPI defintion file via https://github.com/OpenAPITools/openapi-generator, all Jax-RS annotations are added to the interface so you don’t have to repeat them in your actual resource that implements the interface.
If you decide that you need @Blocking
, you have to put it in the interface to have it recognized.
Expected behavior
Since blocking or not is an implementation detail, I should not be forced to put this in the (generated) resource interface.
Actual behavior
As soon as a resource implements an interface that contains alls the Jax-RS annotations, @Blocking
on the actually implemented methods (or the resource class) is ignored.
To Reproduce
https://github.com/quarkusio/quarkus-quickstarts/compare/main...famod:issue-15940
Steps to reproduce the behavior:
- git clone https://github.com/famod/quarkus-quickstarts.git
- git switch issue-15940
- cd getting-started-reactive
- mvn verify (no error)
- remove
@Blocking
fromReactiveGreeting.greeting()
- mvn verify (error regarding IO thread)
Configuration
quarkus.datasource.db-kind=h2
quarkus.datasource.username=sa
quarkus.datasource.password=sa
quarkus.datasource.jdbc.url=jdbc:h2:mem:test_quarkus;DB_CLOSE_DELAY=-1
Environment (please complete the following information):
Output of uname -a
or ver
Linux XXX 4.19.128-microsoft-standard #1 SMP Tue Jun 23 12:58:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Output of java -version
openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.10+9)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.24.0, JRE 11 Linux amd64-64-Bit Compressed References 20210120_910 (JIT enabled, AOT enabled)
OpenJ9 - 345e1b09e
OMR - 741e94ea8
JCL - 0a86953833 based on jdk-11.0.10+9)
(also happens with HotSpot)
GraalVM version (if different from Java)
Quarkus version or git rev
1.12.2
Build tool (ie. output of mvnw --version
or gradlew --version
)
Apache Maven 3.6.3
Additional context
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (11 by maintainers)
https://github.com/quarkusio/quarkus/pull/15987 should take care of it
YW!