Change context to RequestScoped
Is it possible to remove @jakarta.enterprise.context.ApplicationScoped from the generated class? Both on the client and server sides. I need the classes to be @RequestScoped instead.
Hmm it's if we implement such a feature so one can opt-in to @RequestScoped instead:
- Add a new build-time, codegen property to use request scoped
- Read this property in the template file and add a conditional there
Application scope should be the default one. Feel free to send a PR.
What about generating with @Dependent? Then the scope is bound to the bean injecting it?
What about generating with
@Dependent? Then the scope is bound to the bean injecting it?
+1
To solve it from server side we need to change the apicurio-codegen project. I created an issue https://github.com/Apicurio/apicurio-codegen/issues/310
The apicurio generates interfaces, the implementation can use the proper scope.
@ricardozanini @hbelmiro This is being labeled as Stale.
@ricardozanini @hbelmiro This is being closed due to inactivity.