This is related to the performance issues discussed in the thread
Performance with many small requests.
When I reworked my servlet to synchronize only on pieces that needed to
be synchronized, rather than on the entire request processing routine, I
am now throwing an exception when parsing a
Hello,
Date formats are not synchronized. It is recommended to create separate
format instances for each thread. If multiple threads access a format
concurrently, it must be synchronized externally.
This is from the reference of JDK API.
2009/5/11 David kerber dcker...@verizon.net
This is
From: David kerber [mailto:dcker...@verizon.net]
Subject: Trouble parsing datetime strings
Declared at the class level, I have:
private static final SimpleDateFormatsdfFullDateTime = new
SimpleDateFormat( -MM-dd HH:mm:ss );
Oops. Read the fine print for SimpleDateFormat
2009/5/11 David kerber dcker...@verizon.net:
This is related to the performance issues discussed in the thread
Performance with many small requests.
When I reworked my servlet to synchronize only on pieces that needed to be
synchronized, rather than on the entire request processing routine, I
Konstantin Kolinko wrote:
...
As the JavaDoc says
http://java.sun.com/javase/6/docs/api/java/text/SimpleDateFormat.html
Date formats are not synchronized. It is recommended to create
separate format instances for each thread
You may either create a new instance of SimpleDateFormat each time,
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
David,
On 5/11/2009 10:22 AM, David kerber wrote:
From the quick
reading I did, I imagine that will give me a bit of a performance hit
compared to using ThreadLocal, but since I've never used the ThreadLocal
pattern before, I didn't want to try