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

Provide ArC version of javax.enterprise.inject.spi.Unmanaged #2378

Closed
mkouba opened this issue May 9, 2019 · 9 comments
Closed

Provide ArC version of javax.enterprise.inject.spi.Unmanaged #2378

mkouba opened this issue May 9, 2019 · 9 comments
Labels
area/arc Issue related to ARC (dependency injection) pinned Issue will never be marked as stale

Comments

@mkouba
Copy link
Contributor

mkouba commented May 9, 2019

ArC does not fully support some parts of the CDI SPI such as AnnotatedType, InjectionTarget. However, we should be able to inject unmanaged instances. We should provide an ArC version of Unmanaged.

@tandraschko
Copy link
Contributor

@mkouba
Copy link
Contributor Author

mkouba commented Aug 12, 2019

Hi @tandraschko, no progress yet. Anyway, the BeanProvider#injectFields() method is not a good example. First of all the name is misleading because it also invokes initializer methods. Furthermore, if a @Dependent bean instance is injected it is never destroyed correctly. This is fine unless the @Dependent bean declares a @PreDestroy callback. Finally, the InjectionTarget is primarily designed to create and destroy instances of the bean, to perform dependency injection and lifecycle callbacks and not only to inject an existing instance.

@tandraschko
Copy link
Contributor

@mkouba yep, i understand
i generell i can't use Unmanaged in this case as JSF artifacts provides wrapping via constructors.

What could be a good alternative?
Loop all methods and manually invoke PostConstruct/PreDestory and also loop a fields for Injection points and try to get them via CDI.current()?

@stale
Copy link

stale bot commented Nov 13, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you!
We are doing this automatically to ensure out-of-date issues does not stay around indefinitely.
If you believe this issue is still relevant please put a comment on it on why and if it truly needs to stay request or add 'pinned' label.

@stale stale bot added the stale label Nov 13, 2019
@tandraschko
Copy link
Contributor

not out-of-date ;)

@stale stale bot removed the stale label Nov 13, 2019
@gsmet gsmet added the pinned Issue will never be marked as stale label Nov 13, 2019
@dufoli
Copy link
Contributor

dufoli commented Aug 25, 2021

@mkouba can I help on this one. I want to discover arc and it seems a good way to take one ticket on it. I have start to implement interface but it is hard to understand use case, So I think I will add a test to check how it expect to work.

@mkouba
Copy link
Contributor Author

mkouba commented Aug 26, 2021

Hi @dufoli, that would be great! However, I don't think this is a good "first issue" ;-). @manovotn @Ladicek guys do you remember a good ArC-related starter issue?

@manovotn
Copy link
Contributor

manovotn commented Aug 26, 2021

Hmm, the list can be filtered on GH like this: https://github.com/quarkusio/quarkus/issues?page=1&q=is%3Aissue+is%3Aopen+label%3A%22area%2Farc%22

An easier one is perhaps this one with inheritance rules -. #41
But that's a lot of spec-checking, test writing etc to even get an idea about what should and shouldn't work...

You can pick whichever you like though, it mainly depends on how brave you are :-D

@manovotn
Copy link
Contributor

manovotn commented Sep 3, 2021

After discussion with @mkouba and @Ladicek, we have decided to not implement this feature. Details can be seen in the comments of this PR.

@manovotn manovotn closed this as completed Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/arc Issue related to ARC (dependency injection) pinned Issue will never be marked as stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants