-
1. Re:
schrouf Feb 27, 2004 11:12 AM (in response to zapa)I am not sure, but the problem might be that there is more than one transaction triggered by your successive entity access. The retrived data is only valid during the transaction it was initialy fetched in. If (e.g. by a call to another method) a new transaction is started afterwards, the application server marks your 'old' data as out-of date and throws as exception.
What are your transaction settings for your entity beans ? Required, RequiresNew, ... ? Maybe declaring some of your methods as "read-only" might help...
My first step for clarifying your problem cause would be to wrap the your failing entity access into one single user transaction (your entity beans should use "Required" transaction attribute). This should ensure that all of your entity data access runs within the same single transaction ! -
2. Re:
zapa Feb 27, 2004 11:48 AM (in response to zapa)I have wrapped the code in a user transaction , following also another thread from here and it seems to be working , thanks