| Summary: | Enhancement: Add XmlListeners (similar to JPA's EntityListeners) | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Blaise Doughan <blaise.doughan> |
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> |
| Status: | NEW --- | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | wolfgang.werner+eclipsebugs |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
| Bug Depends on: | 333683 | ||
| Bug Blocks: | |||
I'd very much like this to be implemented. The current way of "just implementing a method with the correct signature" is not intuitive. The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |
The XmlListener provides a mechanism to have the lifecycle event methods on an external class. @XmlListeners({CustomerDebugListener.class, AnotherListener.class}) public class Customer { } public class CustomerDebugListener { @XmlBeforeUnmarshal public void preUnmarshal(Unmarshaller, Object parent, Customer child); @XmlAfterUnmarshal public void postUnmarshal(Unmarshaller, Object parent, Customer child); @XmlBeforeMarshal public boolean preMarshal(Marshaller, Customer child); @XmlAfterMarshal public void postMarshal(Marshaller, Customer child); }