Announcement Announcement Module
Collapse
No announcement yet.
@Transactional only on public methods? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • @Transactional only on public methods?

    The @Transactional annotation seems like such a great idea, but I'm curious to know why it's only allowed on public methods. Is this an artifical limitation? Are there any plans to remove this limitation in the future? I didn't find anywhere in the docs that mentioned the reasoning behind it.

    Thanks in advance.

    nathan

  • #2
    That is the way proxy based AOP works. A proxy is generated and only external method calls are being intercepted, external method calls can (normally) only be public methods.

    Check chapter 6 of the reference guide for an explanation of the proxy mechanism. Chapter 6.6 is the one for more information

    Comment

    Working...
    X