title: spring @Transactional is not rolling back
body: <p>I have a similar piece of code inside a <code>@Service</code>:</p>
  
  <pre><code>@Autowired
  private MyDAO myDAO;
  
  @Transactional
  @Override
  public void m(...) {
      Integer i = null; // this is just to simulate a NPE
      myDAO.saveX(...);
      i.toString(); // throws NullPointerException
      myDAO.saveY(...);
  }
  </code></pre>
  
  <p>This piece of code throws a NPE which is not catched by Spring and so my code is not rolled back. Any idea why is this happening? </p>
  
  <p>I have the same configuration as in other places in my app and in those places it works as expected.</p>
  
  <pre><code>&lt;jee:jndi-lookup id="dataSource" jndi-name="jdbc/MyDataSource"/&gt;
  &lt;bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"&gt;
      &lt;property name="dataSource" ref="dataSource"/&gt;
  &lt;/bean&gt;
  </code></pre>