Hello,
1) First, in the glassfish logs: how can I see the begining of a transaction (the begin marker) and the end of a transaction (the end marker). I have enable the FINEST level for JTA, JTS and JPA. From what I have seen, it seems that the transaction begins with "TX beginTransaction, status=STATUS_ACTIVE" and ends with "TX beforeCompletion callback, status=STATUS_ACTIVE".
Can you confirm ?
2) In one of a session bean with default transactional attribute, I have the following code:
methodA( myEntityA); // update one attribute of myEntityA
myEntityA.setOneAttribute(); // update another attribute of myEntityA
myEntityB = methodB(); // retreive myEntityB which has no links with myEntityA
myEntityA.setAnotherAttribute(myEntityB.getXXXX()); //update another attribute of myEntityA
myEntityA.setAnotherOneAttribute(); //update another one attribute of myEntityA
Then the method returns.
In the log I saw 2 SQL updates for my EntityA ( one linked to methodA( myEntityA) and myEntityA.setOneAttribute(), the other linked to myEntityA.setAnotherAttribute(...) and to myEntityA.setAnotherOneAttribute()) where I expect to have only one SQL update !
Do you know why ?
Regards.
[Message sent by forum member 'franos13' (franos13)]
http://forums.java.net/jive/thread.jspa?messageID=268568