[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - DB Atomic commit operations
akrishmohan
do-not-reply at jboss.com
Tue Jan 23 13:49:08 EST 2007
Hi I have a scenario in which I need to treat DB commit of 2 rows as one atomic operation. How do I achieve this using CMT?
Any tips would be useful.
Basically I have something like this.
public class TestMDBean implements MessageListener {
@PersistenceContext
private EntityManagerFactory emf;
@UserTransaction utx;
private UserTransaction utx;
private void updateLog() {
//populate a pojo entity here in a collection. The collection has 2 objects corresponding to the two rows in the table. Roll back if a single commit fails.
}
I am not sure what kind of transaction strategy I need to use here.
Let me know
Cheers
K
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005432#4005432
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005432
More information about the jboss-user
mailing list