title: Spring Data Jpa / Hades Transaction Behaviour
body: <p>From <a href="http://static.springsource.org/spring-data/data-jpa/docs/current/reference/html/#transactions" rel="nofollow noreferrer">Spring Data JPA reference</a> (previously <a href="http://hades.synyx.org" rel="nofollow noreferrer">Hades</a>),</p>
  
  <blockquote>
    <p>CRUD methods on repository instances
    are transactional by default.</p>
  </blockquote>
  
  <p>If a method covers more than one repository, example:</p>
  
  <pre><code>@Transactional
  public void addRoleToAllUsers(String roleName) {
      Role role = roleRepository.findByName(roleName);
      for (User user : userRepository.readAll()) {
          user.addRole(role);
          userRepository.save(user);
      }
  }
  </code></pre>
  
  <p>The reference states</p>
  
  <blockquote>
    <p>The transaction configuration at the
    repositories will be neglected then as
    the outer transaction configuration
    determines the actual one used.</p>
  </blockquote>
  
  <p>The behavior <strong>inner transactions will be neglected</strong> is a default spring transaction behavior or actually explicitly handled by Spring Data JPA? </p>