Skip to content
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

Define CDI scopes for all Jakarta REST types #952

Open
spericas opened this issue Apr 12, 2021 · 4 comments
Open

Define CDI scopes for all Jakarta REST types #952

spericas opened this issue Apr 12, 2021 · 4 comments
Milestone

Comments

@spericas
Copy link
Contributor

Most of these definitions are straightforward, but still need to be clearly stated in the spec. For next major release.

@spericas spericas added this to the 4.0 milestone Apr 12, 2021
@jamezp
Copy link
Contributor

jamezp commented Nov 18, 2022

Does this include adding @Stereotype to the annotations like @Path and @Provider?

@pdudits
Copy link

pdudits commented Aug 9, 2023

I want to point out the corner case, that it is possible to have multiple Rest Applications in single deployment unit.
So things that are global to rest application, such as providers would not have a standard CDI scope, but would require custom scope instead.

@jamezp
Copy link
Contributor

jamezp commented Aug 9, 2023

That is a good point. In #1158 there is a point in the API with the question:

Review support for Application subclasses: zero or more? zero or one?

The answer to that will have impact on this.

That said there are likely ways around it in the implementation. If more than one Application is defined, you wouldn't be able to just inject with a generic @Inject Application application;, but you could specific the specific application. Assuming the implementation supports that.

@jansupol
Copy link
Contributor

Having more Application supported has additional impacts. Right now, the providers registered to the Application are only available by that application. But if more Applications take place, the providers could be visible by both Applications, especially when the providers are CDI beans, as the CDI environment is shared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants