Anybody got a local copy of jboss tutorial that they could send me: [EMAIL PROTECTED] cheers, Gerardo -----Original Message----- From: Raffael Herzog [mailto:[EMAIL PROTECTED]] Sent: Monday, April 30, 2001 3:59 PM To: [EMAIL PROTECTED] Subject: Re: R: [JBoss-user] LOCKING-WAITING - what does it mean? / Transactio ns "Bordet, Simone" <[EMAIL PROTECTED]> wrote: > > The background: When someone accesses the site, the first thing to > > be done is to determine the language. There are two lists and one > > set to do this: The list of languages the user would like t have, > > the list of languages that are registered in the server and a set > > of available languages. So each request leads to a findAll() on > > the Language bean. If someone accesses the site the first time, > > this means 17 requests (two frames and 15 images), all of which > > kick off a findAll(). > > > > To make it more simple (this is on the top of my TODO list), I > > just declared the transaction policy for *all* methods as > > "Required". Is this the reason for these LOCKING-WAITING messages? > > The reason is that since you are accessing the same bean from 2 > different transaction context (ie normally 2 different clients), the > calls are serialized (ie one goes on, the other waits until the > first finishes). When calls are serialized, you get the > LOCKING-WAITING message, but this is normal. Yup, I thought it was... just wanted to be sure. > Probably the best thing you can do is to add a public boolean > isModified() method to your beans. JBoss checks the return value of > this method and if false, skips unnecessary DB accesses. The > performance gain can be huge, on this list has been reported to be > up to 30 times (but of course depends on the cases). All the above > works if commit option A is used, which is the JBoss default. WOW! The performance gain is just amazing! 15 images get loaded and transferred in less than a second, if the beans are still cached, in about 2-3 secs if not. Now I'll just have to optimize the caching parameters... Thanks! -- (o_ Raffael Herzog //\ [EMAIL PROTECTED] V_/_ http://www.raffael.ch May the penguin be with you! _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
