Hey everyone,
I have decided not to abandon the default marshalling of events using XStream. Instead, I have opted for the use of @XStreamAlias annotations for my classes. However, I have found that the only way that I am able to make sure that these annotations work is that I have to use my own custom serializer. I am looking for feedback to my approach, and if there are any other ideas of how I can get this to work in a more clean fashion.
I chose to extend the XStreamEventSerializer. Inside of this, I am just calling getXStream().processAnnotations(Event.class) for all of the event classes. This adds the labor of every time I create a new event, I have to remember to add it to this class. This custom serializer is then injected into my event store. If anyone has any suggestions on how to clean this up, that would be great.
Thanks
Carlus