0 Replies Latest reply on Jan 22, 2007 8:03 PM by Krishna Attravanam

    Atomic Operations

    Krishna Attravanam Newbie

      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 {

      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