[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-4038) Errors in Seam Remoting marshalling a java.util.Date in a highly concurrent environment
Joshua Davis (JIRA)
jira-events at lists.jboss.org
Thu Apr 16 10:12:22 EDT 2009
[ https://jira.jboss.org/jira/browse/JBSEAM-4038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12462586#action_12462586 ]
Joshua Davis commented on JBSEAM-4038:
--------------------------------------
The thread local approach is likely to perform somewhat better:
http://publicobject.com/2006/05/simpledateformat-considered-harmful.html
> Errors in Seam Remoting marshalling a java.util.Date in a highly concurrent environment
> ---------------------------------------------------------------------------------------
>
> Key: JBSEAM-4038
> URL: https://jira.jboss.org/jira/browse/JBSEAM-4038
> Project: Seam
> Issue Type: Bug
> Components: Remoting
> Affects Versions: 2.1.1.GA
> Reporter: Joshua Davis
> Assignee: Shane Bryzak
> Fix For: 2.1.2.CR1
>
> Attachments: JBSEAM-4038.patch
>
>
> We've experienced marshalling errors occasionally when passing a java.util.Date back to JavaScript there are lots of threads issuing requests. This has been tracked down to the server producing an XML response that has garbage/incorrect values in the <date> element.
> The problem is caused by the static 'df' variable in org.jboss.seam.remoting.wrapper.DateWrapper, which is a SimpleDateFormat. In a highly concurrent environment, calls to this SimpleDateFormat will overlap, and since SimpleDateFormat is not thread-safe, it will yield strange results.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list