-
Notifications
You must be signed in to change notification settings - Fork 77
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
ApplicationScoped bean not invokded in @PostConstruct #834
Comments
I think this is related to #424 |
From the javadoc of
The injected scheduled executor service should be ready for the |
There's nothing wrong, you just have to understand that a normal scoped bean is initialized lazily, on the first invocation to any of its methods. You could replace |
Ladislav is right. |
@manovotn Omnifaces has an annotation |
We could add something like |
How would you implement this short of bytecode generation? |
We might be able to implement it differently though. Gather all the occurrences for this, remember those beans as type/qualifiers and after starting the container, we would have to trigger their creation. This can be basically done by resolving them and, assuming lazy init, we'd need to trigger creation of proxied beans. In Weld terms, this should be doable through one of the APIs we already have. If we want that, we should have a dedicated issue for it - this one can IMO be closed as the initial question was answered, right @hantsy? |
Alternatives:
|
Is there an seperate issue to track this? |
I've created #835, so let's shift the discussion regarding this feature there. Closing this issue as the original question was answered. |
Describe the bug
I tried to update an EJB singleton to a CDI application. I created an issue on concurrency but it was considered an issue of CDI, see: jakartaee/concurrency#656
The original EJB
@Singleton
beans with a@Startup
annotation.The converted CDI bean is like the following.
It does not work, there are no exceptions, and no useful information is provided to tell developers what is wrong.
However I changed to observing the CDI
Startup
event, and it worked.Expected behavior
It should work as expected, or explain what is wrong.
The text was updated successfully, but these errors were encountered: