jaxb XML marshaling need to format date differently
<p>We have a requirement to format the date fields differently during XML returned from jax-rs webservice.</p>

<p>ex.</p>

<pre><code>Class Dates {
    Date date1; //in xml this date must be in format dd-mon-yyyy
    Date date2; // in xml this date must be in format dd-mm-yyyy hh:ss sss
} 
</code></pre>

<p>we tried XMLAdapter but we are not able to identify if it is for field date1 or date2 </p>

<p>please advise. if there are any other filters or events I can use</p>