Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333681 - Enhancement: Add XmlListeners (similar to JPA's EntityListeners)
Summary: Enhancement: Add XmlListeners (similar to JPA's EntityListeners)
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 333683
Blocks:
  Show dependency tree
 
Reported: 2011-01-06 13:38 EST by Blaise Doughan CLA
Modified: 2022-06-09 10:25 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Blaise Doughan CLA 2011-01-06 13:38:07 EST
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);

   }
Comment 1 Wolfgang Werner CLA 2011-12-14 10:16:39 EST
I'd very much like this to be implemented.

The current way of "just implementing a method with the correct signature" is not intuitive.
Comment 2 Eclipse Webmaster CLA 2022-06-09 10:25:38 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink