The XsdUtils class uses a static SimpleDateFormat object to format date
objects (see below). According to JDK:

>>>
Synchronization

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. 
<<<

We did observe strange exceptions from that class when the code runs in
multi-threaded environment. This forces us to put a hard sync. on unmarshal
ManagementEvent objects. 

Can this be fixed quickly?

-thanks




------
public class XsdUtils
{
    //
    // Used to format dates in the XMLSchema dateTime format
    //
    private static DateFormat _FORMATTER = 
        new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
    

-- 
View this message in context: 
http://www.nabble.com/XsdUtils.getLocalTimeString-not-thread-safe-tp21673971p21673971.html
Sent from the Muse User mailing list archive at Nabble.com.

Reply via email to