title: JAXB Class Instance Listener
body: <p>What is the way to specify Class Instance based JAXB Listener (as in Entity Bean) like : afterUnmarshall , beforeMarshall but on every class instance based (by implementing any interface or by annotation).</p>
  
  <pre><code>@XmlRootElement(name = "Person")                            // Edited
      public class Person {
          protected String name; //setter getter also implemented
  
          void beforeMarshall(){
           //..........
          }
  
          void afterUnmarshall (){  // by implementing any interface or by annotation
           //..........
          }
   } 
  </code></pre>