I made the following observations during the migration to 7.0.0, caused by the change to Johnzon for JAXB. I am curious whether these are intentional, still bugs, or my fault:
Modifying JAXB annotations It appears to me that modifications in my JAXB annotations (like @XmlRootElement) only take effect after restarting the server. Auto-deploying won't notice those changes. (Although it notices other annotation changes like javax.ws.rs.) Just reloading the app via the TomEE manager console doesn't work either. Is there a way to have those annotations processed at every deployment? JAXB annotations in inner classes For small JAXB-annotated DTOs that are only relevant for one web service operation, I'd like to define them as inner classes of the class using them. However, JAXB annotations appear not to be processed in an inner class. Is that right? Getters and setters of JAXB annotated classes Even if I declare @XmlAccessorType(XmlAccessType.FIELD), it appears that JAXB annotations only take effect if the class has getters and setters. (I didn't try with getters only or setters only.) In particular for the aforementioned DTO classes, these are superfluous. Any way to do without them? Nested objects don't get serialized An attribute where A is also JAXB annotated, doesn't lead to a nested JSON structure, no matter whether I put @XmlElement or @XmlElementWrapper in front or not. (I also tried with List instead of Set.) Are there any limitations yet, or any not yet documented annotations to write? Documentation of available options and their (de)serializing effect The change in wrapping (discussed in http://tomee-openejb.979440.n4.nabble.com/JsonGenerationException-after-migrating-to-7-0-0-tc4678684.html) and the failure concerning nested objects makes me suspicious of that Johnzon thing. How are we to know what it accepts and how it reacts to which annotation if it's nowhere documented? (The "documentation" in http://johnzon.apache.org/ is a joke.) Unless there exists complete and reliable documentation of such a library, it should be thrown out of the application server, as it's obviously not mature yet for production environments. -- View this message in context: http://tomee-openejb.979440.n4.nabble.com/Johnzon-bugs-or-features-tp4678708.html Sent from the TomEE Users mailing list archive at Nabble.com.
