As we all know SingleDateFormat is not
thread safe. I have a project where I created a static instance of SimpleDateFormat and multiple MDBs are using the instance to format a
String to a Date type. I got the following exception at times:
For input string: ""
- java.lang.NumberFormatException.forInputString(Unknown Source)
- java.lang.Long.parseLong(Unknown Source)
- java.lang.Long.parseLong(Unknown Source)
- java.text.DigitList.getLong(Unknown Source)
- java.text.DecimalFormat.parse(Unknown Source)
- java.text.SimpleDateFormat.subParse(Unknown Source)
- java.text.SimpleDateFormat.parse(Unknown Source)
- java.text.DateFormat.parse(Unknown Source)
EJB is known to be thread safe. I am using the SingleDateFormat in an EJB, why I am getting this exception?
Thanks
[ November 01, 2006: Message edited by: Elinor Chang ]