title: Transaction not getting committed
body: <p>Working on a Spring 5 and Hibernate Project. Using Spring for bean management, transaction and MVC. The changes are not getting committed to database though i can see the insert statement in the log. There is no error. There is no issue with select statements. I could login into the application. Below are my configurations:</p>
  <p>framework.xml:</p>
  <pre><code>    &lt;context:component-scan base-package=&quot;com.test&quot; &gt; 
          &lt;context:exclude-filter expression=&quot;org.springframework.stereotype.Controller&quot; type=&quot;annotation&quot;/&gt; 
      &lt;/context:component-scan&gt; 
      
      &lt;bean id=&quot;sessionFactory&quot;
          class=&quot;org.springframework.orm.hibernate5.LocalSessionFactoryBean&quot;&gt;
          &lt;property name=&quot;dataSource&quot; 
            ref=&quot;dataSource&quot;/&gt;
          &lt;property name=&quot;configLocation&quot;&gt;
              &lt;value&gt;classpath:hibernate.cfg.xml&lt;/value&gt;
          &lt;/property&gt;
          &lt;property name=&quot;jtaTransactionManager&quot; ref=&quot;transactionManager&quot; /&gt;
          
      &lt;/bean&gt;
      &lt;bean id=&quot;atomikosTransactionManager&quot; class=&quot;com.atomikos.icatch.jta.UserTransactionManager&quot; init-method=&quot;init&quot; destroy-method=&quot;close&quot;&gt;
          &lt;property name=&quot;forceShutdown&quot; value=&quot;false&quot; /&gt;
      &lt;/bean&gt;
   
      &lt;bean id=&quot;atomikosUserTransaction&quot; class=&quot;com.atomikos.icatch.jta.J2eeUserTransaction&quot;&gt;
          &lt;property name=&quot;transactionTimeout&quot; value=&quot;300&quot; /&gt;
      &lt;/bean&gt;
      
       &lt;!--  
      &lt;bean id=&quot;HibernateTransactionManager&quot; class=&quot;org.springframework.orm.hibernate5.HibernateTransactionManager&quot;&gt;
      &lt;property name=&quot;sessionFactory&quot; ref=&quot;sessionFactory&quot;&gt;&lt;/property&gt;
      &lt;/bean&gt;
      --&gt;
        
      &lt;bean id=&quot;transactionManager&quot; class=&quot;org.springframework.transaction.jta.JtaTransactionManager&quot; &gt;
      &lt;property name=&quot;transactionManager&quot;&gt;&lt;ref bean=&quot;atomikosTransactionManager&quot;  /&gt;&lt;/property&gt;
      &lt;property name=&quot;userTransaction&quot;&gt;&lt;ref bean=&quot;atomikosUserTransaction&quot;  /&gt;&lt;/property&gt;
      &lt;/bean&gt;
       
      &lt;tx:annotation-driven transaction-manager=&quot;transactionManager&quot; proxy-target-class=&quot;false&quot;/&gt;
  </code></pre>
  <pre><code>In the above configuration, i excluded the controllers as they are loaded using a different mvc related config files.
  
  The service classes were annotated with @Transactional.
  
  I tried without JTA with plain HibernateTransactionManager also. The transactions are not getting committed.
  The below entry is also for hibernate to use JTA as transaction manager
  </code></pre>
  <pre><code>hibernate.transaction.jta.platform to org.hibernate.engine.transaction.jta.
  platform.internal.AtomikosJtaPlatform and  
     hibernate.transaction.coordinator_class to jta
  </code></pre>
  <pre><code>I am using getCurrentSession for getting hibernate session.
  
  I have to use Atomikos as JTA transaction manager as the development has to be happen in servlet container.
  </code></pre>
  <p>Thanks in advance for any help to find the gap in the configuration or any other issues..</p>