tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tam <>
Subject Johnzon - bugs or features?
Date Wed, 01 Jun 2016 07:49:04 GMT
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 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

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
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 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

View this message in context:
Sent from the TomEE Users mailing list archive at

View raw message