I hope there is easy solution of my problem but...
I have session bean and entity beans (CMP).
In session bean there is a method GENERATE_NEW
where I'm removing some entity beans (findForDate) in this method:
Collection to_remove = entityLocalHome.findForDate(mydate);
That method (in stateless session bean) has transaction property: required (container style).
But there is a chance that two calls come in the same moment and then I can (and I'Ve already got it) recieve en exception - Entity Not Found (it happens when first call already removes entity but second tries to do this again... there is no refresh of the collection with entities).
What should I do? How to have some kind of: WAIT statement... (I suppose it can be done by setting transaction isolation to serialization - but how? give me some ideas... or maybe it can be solved in other way). Please - I'm jboss doc subscriber but I couldn't find any info about that...
BTW: Jboss 3.2.0