PLT.15.2.2 reads: The event payload must have a valid JAXB binding, or be in the list of Java primitive types / standard classes of the JAXB 2.0 specification section 8.5.1 or 8.5.2 (except java.lang.Object), and implement java.io.Serializable. Otherwise the setEvent method on the StateAwareResponse must throw a java.lang.IllegalArgumentException.
---- When writing some eventing tests I came across the following issues: 1) I defined an event with a non-primitive payload. The payload class was a direct subclass of java.lang.Object and had two java.lang.Strings as members. Event though I did not annotate the payload class to define any JAXB binding, setEvent() did not throw an exception. I'm not an expert on JAXB, so I'm not sure what "a valid JAXB binding" is, and the event was still processed alright, so this might not have been a problem (although the spec says that setEvent *must* throw IllegalArgumentException). 2) More troubling, at first I had part of the payload class defined with a java.awt.Color member, and JAXB could not serialize it. I'm pretty sure that this would qualify as an invalid JAXB binding. However, the exception was thrown during event processing, not from the setEvent() method. I think that this is probably a violation of the spec. Could someone please verify if these are problems for which I should write testsuite tests? If so, I can create a JIRA issue as well. Also, for the EG: if the portal has to check if the JAXB binding is valid for a payload when setEvent() is called, shouldn't it also be checking to make sure that the payload is compatible with the class specified in the event's definition? Thanks, Ben
