Hi Team

We were using tomEE, but we want to migrate to tomcat, because of its more
lightweight than tomEE, tomEE is my favis. I looked at the JTA implementaion
in tomcat, it suggests atomikos/ JTOS for jta implementation in tomcat,I was
able to configure atomikos+ hibernate + tomcat, but the transaction like
em.merge, em.remove, or em.persist not working,it does not even logs in the
update / insert / delete hibernate queries when invoked these methods with
em. Please let me know what could be the root cause of it. Please lemme know
how do i configure deltaspike.

The code snippet :

  @Transactional //Commented for the time being
  @TransactionAttribute(TransactionAttributeType.REQUIRED)
    public void edit(T entity) throws IllegalStateException,
SecurityException, SystemException {
       EntityManager em =  getEntityManager();
try{    
            em.setFlushMode(FlushModeType.COMMIT);
            T e = em.merge(entity);; // Does not makes a transaction query -
update / delete / insert when hibernate logging is on
/*
<property value="true" name="hibernate.show_sql"/> in persistence.xml
*/
em.flush(); // Throws exception transaction is required
       }
       catch(Exception e)
       {
           e.printStackTrace();
           throw new IllegalStateException(e);
       }
 
    }

Regards
Sentil



--
View this message in context: 
http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/how-to-use-deltaspike-with-JTA-and-tomcat7-tp4658539p4658650.html
Sent from the Apache DeltaSpike Incubator Discussions mailing list archive at 
Nabble.com.

Reply via email to