title: Spring managed transactions without @Transactional annotation
body: <p>I'm using Spring annotations to manage my transactions like so:</p>
  
  <pre><code>@Transactional(readOnly = true)
  public class AlertServiceImpl implements AlertService {
  
       private AlertDAO alertDAO;
  
       public List&lt;Alert&gt; getAlerts(){
           List&lt;Alert&gt; alerts = alertDAO.getAlerts();
           return alerts;
       }
  
  }
  </code></pre>
  
  <p>I'm wondering what happens if I forget the annotation:</p>
  
  <pre><code>// Oops! Forgot to use transactional annotation 
  public class AlertServiceImpl implements AlertService {
  
      private AlertDAO alertDAO;
  
      public List&lt;Alert&gt; getAlerts(){
           List&lt;Alert&gt; alerts = alertDAO.getAlerts();
           return alerts;
      }
  
  }
  </code></pre>
  
  <p>When the alertDAO implementation is following:</p>
  
  <pre><code>import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
  
  // no annotation here either
  public class HibernateAlertDAO extends HibernateDaoSupport implements AlertDAO {
  
      public List&lt;Alert&gt; getAlerts(){
           // some implementation details that define queryString
  
           Query query = getSession().createQuery(queryString);
           List&lt;Alert&gt; alerts = query.list();
  
           return alerts;
      }
  
  }
  </code></pre>
  
  <p>It seems like Hibernate allows me to fetch data from database even without the annotation.</p>
  
  <p>What are the consequences of this kind of carelessness and what are the worst case scenarios that could happen?</p>