Skip to content

Conversation

geoand
Copy link
Contributor

@geoand geoand commented May 15, 2025

This essentially handles the case where such a listener
is added on private method of a CDI EntityListener class.
When the listener is a @Singleton we can safely transform
the private method to package private, but when it's
@ApplicationScoped there is nothing we can do
(as any transformation we apply is invisible to Arc
when it creates the Client Proxy class), so we
therefore fail the build (with an actionable error
message).

geoand added 2 commits May 15, 2025 09:24
This essentially handles the case where such a listener
is added on private method of a CDI EntityListener class.
When the listener is a @singleton we can safely transform
the private method to package private, but when it's
@ApplicationScoped there is nothing we can do
(as any transformation we apply is invisible to Arc
when it creates the Client Proxy class), so we
therefore fail the build (with an actionable error
message).

Closes: quarkusio#24340
@quarkus-bot quarkus-bot bot added the area/hibernate-orm Hibernate ORM label May 15, 2025
Copy link

quarkus-bot bot commented May 15, 2025

/cc @gsmet (hibernate-orm)

@geoand
Copy link
Contributor Author

geoand commented May 15, 2025

The reason I picked this is up is that the last day or so I am going through old issues and seeing what can be done about them

@geoand geoand requested a review from yrodiere May 15, 2025 08:05
Copy link
Member

@yrodiere yrodiere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you!

@geoand
Copy link
Contributor Author

geoand commented May 15, 2025

🙏🏽

@geoand geoand added the triage/waiting-for-ci Ready to merge when CI successfully finishes label May 15, 2025
Copy link

quarkus-bot bot commented May 15, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 3da3ff8.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.

@geoand geoand merged commit f2fa3c8 into quarkusio:main May 15, 2025
47 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.24 - main milestone May 15, 2025
@quarkus-bot quarkus-bot bot added kind/bugfix and removed triage/waiting-for-ci Ready to merge when CI successfully finishes labels May 15, 2025
@geoand geoand deleted the #24340 branch May 15, 2025 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CDI injection does not work on entity listeners if the listener method is private

2 participants