I have come across a problem that generates a create after find race condition 
in a multi user enviornment:

  I have an Entity Bean whose pk is an self generated integer, but there is a 
field named 'refNo' which should be unique as well.
  When using this entity, there is a use case that need to synchronize the 
information of this entity from 2 servers.
  To sync the entity, a simple logic is used: find the entity using refNo, if 
not found -> create the entity; otherwise update the entity.
  This does not work when multiple thread is doing the same job, multiple 
Entities with same refNo is created sometimes.

Has anybody meet this problem?  Any workaround on this?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3936490#3936490

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3936490


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to