0 Replies Latest reply on Jan 25, 2007 3:34 AM by Stefano Gallina

    Manage data into a transaction

    Stefano Gallina Newbie

      Hello everybdy,

      i have a method in a Session EJB which creates a record ( using an Entity EJB CMP type).
      After creating the record i call a Find method to check if there are some special data into a table and then i do something else.
      The situaion is :

      -- Method in the Session EJB

      -- Create a record (TestEntity, Entity CMP) into the Table TEST

      -- call Find method of the Entity EJB TestEntity to chec if the are
      records inside the table TEST

      -- do something

      -- End of the Method in the Session EJB

      Well, i noticed that, inside the transaction ( managed by the Session EJB) when i call the Find method the RECORD (inserted before in the Table TEST) exists.
      So, if the table TEST is initially empty the Find method finds a Record; if the something goes wrong and the transaction fails, the table TEST get back empty.
      Is it right, or this is only a JBoss beahaviour ?