I have problem with rollback, I have 3 Stateless SessionBean (SBA, SBB, SBC) and 2 CMP EntityBean (EBA, EBB). EBA called by SBA, EBB called by SBB and both SBA and SBB called by SBC. I use 'required' and put ctx.setRollBackOnly() in SBC (method X).
In method X, First I save the data via SBA and SBB, then I check the data that I've saved, is that true or not. For example in EBB I save data='v'(primary key is key='l'). This is unallowed, so I throw an Exception. The transaction is rolledback, I check the database and that's true, there's no data.
But the problem is when I repeat those step with data='x' (this is allowed (primary key is also key='l')) the programm still throw an error because it still read that data='v'. It seems that the old object primary key is still exist?
Can anyone there give me some solution of this problem?
I Use Jboss 3.0.4
Doesn't anyone there experience my problem with Rollback?