If only one thread and one transaction can be active in an entity bean, which is what the default pessimistic locking does, you obtain the behavior you want.

--
xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark
Chief Technology Officer
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx

Ittay Dror wrote:


i know about this, but that is not what i need. i need to lock the
operations that *use* the entity, not the operations *of* the entity. in
the example i gave, imagine i have a file and i want to add a line with
the properties of the enitity. if i read the properties one by one and
write them to the file, then there's a chance that some other thread
will do the same and the result will be undetermined. basically, i want
to know that while i'm reading / changing the properties of the entity
no other thread is doing the same.







------------------------------------------------------- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing & more. Download & eval WebKing and get a free book. www.parasoft.com/bulletproofapps _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to