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

Raise warning when Interception code fails [SPR-15308] #19872

Closed
spring-projects-issues opened this issue Mar 2, 2017 · 2 comments
Closed

Raise warning when Interception code fails [SPR-15308] #19872

spring-projects-issues opened this issue Mar 2, 2017 · 2 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link
Collaborator

Muhammad opened SPR-15308 and commented

Spring AOP Annotations (typically @Transactional) not working as expected when being called on a method from the same class or called on a non-public (using default spring/springboot configurations).

Most of the time developers (including me) forget about it (or even didn't expect such behaviour at all)

It would be so much gentle if spring log at some INFO+ level about the @Transactional annotation is there but without any affect cause to unsatisfied condition.


No further details from SPR-15308

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

I'm afraid there is not much we can do here: An @Transactional method may get invoked from both externally and within the class, only having an effect in the former case (in proxy mode). For the within-class case, by definition, we cannot intercept the call... so we cannot log a specific warning here either. So on annotation introspection, we cannot cleanly differentiate between valid and invalid cases here... and on invocation, we don't get the chance to intercept the invalid cases to begin with.

@spring-projects-issues
Copy link
Collaborator Author

Muhammad commented

Clear now, Thanks for your time.

@spring-projects-issues spring-projects-issues added status: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement in: core Issues in core modules (aop, beans, core, context, expression) labels Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants