-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
@Observes @BeforeDestroyed(?Scoped.class) does not work in the same bean and the same scope #46108
Comments
@tandraschko you are using |
Yep, but placed in a abstract superclass |
Ok, this is easy to reproduce and the reception setup plays no part in it. The culprit seems to be that we first invalidate context state and only then proceed to notify observers. The problem is, this code seems very deliberate, probably due to context propagation scenarios. |
FTR, there is also a similar issue with |
@manovotn so confirmed bug? |
Yes, I think this should work. |
Thanks man! :) |
@manovotn In which version is it available now? |
|
@tandraschko FTR, I found out this is still an issue with session context from Undertow extension - #46363 This is because of the context implementation (at least I think so). I am looking into how to fix that properly. |
Describe the bug
It seems when its observed by a application scoped bean, the
@Observes
works fine like here:https://github.com/manovotn/quarkus/blob/ed08d10bcf5d6635a76574cf149c5e2a42d45ae9/extensions/undertow/deployment/src/test/java/io/quarkus/undertow/test/sessioncontext/ObservingBean.java
However, when its observed from a bean inside the same scope, it doesnt work:
Doesnt matter if Session or RequestScoped
Expected behavior
should be called
Actual behavior
is not called
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: