java - Spring self injection for Transactions -


in spring can't call @transactional method same instance, because of aop-proxy thing. nice idea make self injection , call method self proxy instance? see drawbacks?

it totally ok. there jira ticket supporting feature using @autowired annotations. it's fixed in spring 4.3+ versions. xml-based configuration or using @resource annotation it's working in earlier versions.

you can see discussion bellow ticket. @transactional one of use case this:

particularly interested in @async , @transactional use cases.


Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -