[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Manage data into a transaction
warx
do-not-reply at jboss.com
Thu Jan 25 03:34:18 EST 2007
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 ?
Cheers.
Stefano
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4006240#4006240
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4006240
More information about the jboss-user
mailing list