title: Spring + Hibernate = "manual" transactions how-to
body: <p>My webapp (Spring3 + Hibernate3) always worked with services class-annotated with <strong>@Transactional</strong> and this configuration:</p>
  
  <pre><code>&lt;tx:annotation-driven transaction-manager="transactionManager" /&gt;
  
      &lt;bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"&gt;
          &lt;property name="sessionFactory" ref="mySessionFactory" /&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>Now... I'm on Google AppEngine. For some nasty reason I don't know yet, @Transactional does not work. It uses some class in javax.naming, which is not whitelisted. It ends up with:</p>
  
  <blockquote>
    <p>Error creating bean with name 'mySessionFactory': Post-processing of
    the FactoryBean's object failed; nested exception is
    java.lang.SecurityException: Unable to get members for class
    org.hibernate.impl.SessionFactoryImpl</p>
  </blockquote>
  
  <p>Please don't ask me why....  :-\</p>
  
  <p>Using Spring's HibernateTemplate instead of my dao (which uses raw session factory) solved the problem, but I know it's a little obsolete.</p>
  
  <p>So, I want to try using manual old style transactions. Questions:</p>
  
  <ul>
  <li>where? I'd like to keep the transactions in the service layer.</li>
  <li>how? </li>
  </ul>