The reason why you don't want to use synchronized methods is that a
synchronized block can only be executed by one thread at a time. Every other
thread wanting to access this method will be blocked during this time (well,
basically). So you want to try to keep the synchonized blocks as small as
an entire method synchronized?
I understand that synchronization implies a performance penalty, but I
wasn't sure what the advantage to using synchronized blocks over
synchronized methods was.
Erik
Tobias Dittrich wrote:
The reason why you don't want to use synchronized methods
, but not both.
There have been issues with this in the past: searching the list
archives may yield more information.
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Tobias Dittrich [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 2:35 AM
To: Tomcat Users List
Subject
Hi,
I have the following problem on tomcat 4.1.18: I defined a
ServletContextListener in the web.xml for my webapp so I can do some
initializing stuff when my webapp is startet. Now when I start tomcat
everything is just fine, the Listener gets notified and starts my config.
But after a few
Hi,
thanks for the answer, now I think I know where I got wrong. Listener
elements are tomcat server extensions rather than web app elements. But this
leads to my next question: how can I define web app sepcific listeners?
My goal is to have some application wide global jobs like reading
Hello there,
I have a problem with the Listener element inside a Context element
in the server.xml configuration file. I always get a ClassNotFound
Exception for the class I specify in the attribute className when I
try to start catalina.
I defined a Listener like this:
Host name=localhost
Yes the class is in the right directory corresponding to it's package. The
whole thing just works abolutely fine if I link the
webapps/myapp/WEB-INF/classes/com directory into commons/classes, so chances
are the problem is not locatet in my app. I already dived a bit deeper into
the subject but I