Hi, I'm using Jboss 3.2.6.  We use:
<locking-policy>org.jboss.ejb.plugins.lock.NoLock</locking-policy>
in our system for performance issues.  However, it creates persistency problems.

There is a bean with a function like this:
1) check if entry "abc" exist, save result in a flag
2) add "abc" to the table
3) if flag is true, add one to the counter.  otherwise, don't change the counter

This works fine most of the time.  However, if two events try to add the same 
entry "abc" at the same time, they both get the "true" flag after step one.  As 
a result, the counter was incremented twice instead of once.  Is there any way 
I can tell jboss that, step 1 and 3 must be ran exclusively, or somehow, block 
other transaction that's trying to read the table to prevent the dirty read? or 
there is a setting I can use for this particular bean to prevent the dirty read?

Any help or suggestion would be highly appreciated.  Thanks.

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

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


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to