Hi
Thanks for giving me an opportunity for forum post. The problem is that I
was using BMT rather CMT, now the issue is solved with the help of this link
http://piotrnowicki.com/2012/11/types-of-entitymanagers-application-managed-entitymanager/
The following code :
@Resource(name="TransactionManager")
private UserTransaction utx;
public void edit(T entity) throws IllegalStateException,
SecurityException, SystemException {
EntityManager em = getEntityManager();
try{
utx.begin();
em.setFlushMode(FlushModeType.COMMIT);
em.joinTransaction();
em.merge(entity);;
utx.commit();
}
catch(Throwable e)
{
e.printStackTrace();
utx.rollback();
throw new IllegalStateException(e);
}
}
works in tomcat7.
Regards
Sentil
--
View this message in context:
http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/how-to-use-deltaspike-with-JTA-and-tomcat7-tp4658539p4658654.html
Sent from the Apache DeltaSpike Incubator Discussions mailing list archive at
Nabble.com.