[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
Tue Mar 24 14:20:22 EDT 2009
[ https://jira.jboss.org/jira/browse/JBSEAM-4038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12458882#action_12458882 ]
Joshua Davis commented on JBSEAM-4038:
--------------------------------------
Three simple ideas for fixing this:
1. Synchronized blocks on the static 'df' variable. Though this might cause some slowness in highly concurrent environments like ours.
2. Local variable for 'df'. Might be a little slower.
3. Thread local for 'df'. More memory, but troughput is retained.
We'll submit a patch soon.
> 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
>
> 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