users@glassfish.java.net

Update database using Entity manager in a web service

From: <forums_at_java.net>
Date: Thu, 11 Nov 2010 20:56:40 -0800

 I tried to update my db table using Entity manager.

My code was

TableName obj = em.find(TableName.class,TableNameId);

obj.setName("Test");

em.getTransaction().begin();   *<<Exception : Cannot use an
EntityTransaction while using JTA*

em.getTransaction().commit();

em.close();

How can I update db table using Entity manager????

Z there a way to overcome this problem????


--
[Message sent by forum member 'xcyclops40']
View Post: http://forums.java.net/node/716769