Announcement Announcement Module
No announcement yet.
Setup xstream autodetectAnnotations for JobExecutionContext serializer Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Setup xstream autodetectAnnotations for JobExecutionContext serializer

    I can't find any configuration for this, is there a way to setup xstream autodetectAnnotations for the JobExecutionContext serializer ?

    I have a hibernate object with relations and when I try to store it in ExecutionContext I got exceptions.

    Try to add the @XStreamOmitField annotation for the fields but it seems that xstream ignoring them completely.

  • #2
    I made a custom build for myself and hard-coded it in
    XStreamExecutionContextStringSerializer class init() method


    and works fine


    • #3
      Xstream autoAnnotation is not thread safe

      Please be aware that Xstream auto annotation feature is not thread safe. Also it is not guaranteed that you can unmarshall xml in this way (if you didn't marshalled before it will not know about those annotations). It's better to use the processAnnotation method with a recursive classpath reader utility.