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-issuemaster opened this issue Mar 2, 2017 · 2 comments
Closed

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

spring-issuemaster opened this issue Mar 2, 2017 · 2 comments

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented Mar 2, 2017

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-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Mar 3, 2017

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-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Mar 3, 2017

Muhammad commented

Clear now, Thanks for your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.