Hey,
> I sometimes get LOCKING-WAITING messages when someone accesses my
> site. Everything works as expected, but these messages are still
> there.
Normal behavior, don't worry.
> 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.
> And while I'm at it: What's the performace gain to be expected if
> I set the transaction policy for read methods (find*, get*) to
> "NotSupported"?
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.
HTH,
Simon
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user