title: Hibernate Read-Only Transaction
body: <p>The Hibernate <a href="http://docs.jboss.org/hibernate/orm/4.2/quickstart/en-US/html/ch02.html" rel="noreferrer">docs</a> show this example:</p>
  
  <pre><code>session = sessionFactory.openSession();
  session.beginTransaction();
  List result = session.createQuery( "from Event" ).list();
  for ( Event event : (List&lt;Event&gt;) result ) {
      System.out.println( "Event (" + event.getDate() + ") : " + 
          event.getTitle() );
  }
  session.getTransaction().commit();
  session.close();
  </code></pre>
  
  <p>Why is it necessary to perform the <code>session.getTransaction().commit()</code> even though the Event list was merely printed out?</p>