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

@TransientReference results in @Dispose method being called multiple times #27906

Closed
sixcorners opened this issue Sep 13, 2022 · 2 comments · Fixed by #27914
Closed

@TransientReference results in @Dispose method being called multiple times #27906

sixcorners opened this issue Sep 13, 2022 · 2 comments · Fixed by #27914
Assignees
Labels
area/arc Issue related to ARC (dependency injection) kind/bug Something isn't working
Milestone

Comments

@sixcorners
Copy link

Describe the bug

If I use TransientReference the injected bean gets disposed more than once.

Expected behavior

Produced beans should be disposed once and only once.

Actual behavior

Produced beans are disposed of multiple times if TransientReference is used.

How to Reproduce?

  1. Have a produce method require a different TransientReference bean that has a dispose method.
  2. Watch that bean get disposed multiple times.

Output of uname -a or ver

Linux fivecorners 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "17.0.4" 2022-07-19 OpenJDK Runtime Environment (build 17.0.4+8-Ubuntu-122.04) OpenJDK 64-Bit Server VM (build 17.0.4+8-Ubuntu-122.04, mixed mode, sharing)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.12.2.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63) Maven home: /home/sixcorners/.m2/wrapper/dists/apache-maven-3.8.6-bin/67568434/apache-maven-3.8.6 Java version: 17.0.4, vendor: Private Build, runtime: /usr/lib/jvm/java-17-openjdk-amd64 Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "5.15.0-46-generic", arch: "amd64", family: "unix"

Additional information

example.zip

@sixcorners sixcorners added the kind/bug Something isn't working label Sep 13, 2022
@mkouba mkouba self-assigned this Sep 14, 2022
@mkouba mkouba added area/arc Issue related to ARC (dependency injection) and removed triage/needs-triage labels Sep 14, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Sep 14, 2022

/cc @manovotn

mkouba added a commit to mkouba/quarkus that referenced this issue Sep 14, 2022
- remove the transient dependent instance from the parent creational
context when the invocation completes
- fixes quarkusio#27906
@mkouba
Copy link
Contributor

mkouba commented Sep 14, 2022

@sixcorners Thanks for reporting! The issue should be fixed in #27914.

mkouba added a commit to mkouba/quarkus that referenced this issue Sep 15, 2022
- remove the transient dependent instance from the parent creational
context when the invocation completes
- fixes quarkusio#27906
@quarkus-bot quarkus-bot bot added this to the 2.14 - main milestone Sep 19, 2022
@gsmet gsmet modified the milestones: 2.14 - main, 2.12.3.Final Sep 19, 2022
gsmet pushed a commit to gsmet/quarkus that referenced this issue Sep 19, 2022
- remove the transient dependent instance from the parent creational
context when the invocation completes
- fixes quarkusio#27906

(cherry picked from commit bcffcb4)
gsmet pushed a commit to gsmet/quarkus that referenced this issue Sep 20, 2022
- remove the transient dependent instance from the parent creational
context when the invocation completes
- fixes quarkusio#27906

(cherry picked from commit bcffcb4)
igorregis pushed a commit to igorregis/quarkus that referenced this issue Oct 16, 2022
- remove the transient dependent instance from the parent creational
context when the invocation completes
- fixes quarkusio#27906
igorregis pushed a commit to igorregis/quarkus that referenced this issue Oct 16, 2022
- remove the transient dependent instance from the parent creational
context when the invocation completes
- fixes quarkusio#27906
igorregis pushed a commit to igorregis/quarkus that referenced this issue Oct 16, 2022
- remove the transient dependent instance from the parent creational
context when the invocation completes
- fixes quarkusio#27906
igorregis pushed a commit to igorregis/quarkus that referenced this issue Oct 17, 2022
- remove the transient dependent instance from the parent creational
context when the invocation completes
- fixes quarkusio#27906
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) kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants