We modeled and tested various combinations of entity beans and used session-wrapped transactions to cure/avoid most race conditions. We noticed though, that there are still ways to get into deadlock states.
We cured our remaining deadlocks by selecting MySQL (and thus InnoDB) and using the built-in database deadlock detection and rollback mechanism to detect and recover from the occassional race. (To do this requires you set your default table types to InnoDB with XDoclet.) Other important things we noted was that we had to set the MySQL/InnoDB detection time to a reasonable number (10 seconds for us) and then we had to ensure that there was a sufficient number of threads in the datasource pool <min-pool-size> and <max-pool-size> to handle the worst-case load. An insufficient number of threads in the DS pool will cause a deadlock that can't be broken since there is no thread to perform a rollback. The 10 second timer (or whatever is reasonable for you) ensures that you notice the deadlock in a timely fashion in order to correct it. Too low a timer setting, and you cause un-necessary rollbacks, too high a setting, and you get the exception you noted above. Getting large loads to run is a slow and difficult job. I can only generalize on issues seen and corrected. If you can post more details about your specific situation, maybe I can suggest more things to look at. Other quirks that got us into trouble was the J-Groups and tree-cache. It was noted that the J-Groups multi-casting method can be problematic in that in high traffic farms, the switches tend to toss lower prioroity traffic such as broadcasts and multicasts. You may want to measure the traffic levels on your network interfaces and look at your network stats to ensure that traffic discard is not a contibutor to the scenario. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3840358#3840358 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840358 ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
