users@glassfish.java.net

Does the wirte operation of EM must be executed in a transaction?

From: <glassfish_at_javadesktop.org>
Date: Tue, 01 Jul 2008 02:27:08 PDT

Hi,
I have a question about Entity Manager,
does the wirte data opertion(such as persiste/remove) must
be executed in a transaction?
In the BMT ejb bean, does the EntityManager.persiste() method
 must be a JTA transaction or in the { em.getTransaction.begin
().....em.getTransaction.commit() }?
if not, does the EntityManager.persiste() will not wirte to data
to database?
I checked the JPA specification, did not find the instruction.

Thanks,
henrry_china
[Message sent by forum member 'henrry_china' (henrry_china)]

http://forums.java.net/jive/thread.jspa?messageID=283581