Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>From <a href="http://static.springsource.org/spring/docs/2.0.x/reference/transaction.html" rel="noreferrer">http://static.springsource.org/spring/docs/2.0.x/reference/transaction.html</a></p> <blockquote> <p><strong>The Spring team's recommendation is that you only annotate concrete classes with the <code>@Transactional</code> annotation, as opposed to annotating interfaces.</strong> You certainly can place the <code>@Transactional</code> annotation on an interface (or an interface method), but this will only work as you would expect it to if you are using interface-based proxies. The fact that annotations are <em>not inherited</em> means that if you are using class-based proxies then the transaction settings will not be recognised by the class-based proxying infrastructure and the object will not be wrapped in a transactional proxy (which would be decidedly <em>bad</em>). So please do take the Spring team's advice and only annotate concrete classes (and the methods of concrete classes) with the <code>@Transactional</code> annotation.</p> <p><em>Note: Since this mechanism is based on proxies, only 'external' method calls coming in through the proxy will be intercepted.</em> This means that 'self-invocation', i.e. a method within the target object calling some other method of the target object, won't lead to an actual transaction at runtime even if the invoked method is marked with <code>@Transactional</code>!</p> </blockquote> <p>(Emphasis added to the first sentence, other emphasis from the original.)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload