Abstract
Back in the early days, after the release of Java SE 5, there was a quiet, and sometimes not-so-quiet, debate about whether annotations were better or worse than XML. The defenders of annotations vigorously proclaimed how annotations are so much simpler and provide in-lined metadata that is co-located with the code that it is describing. The claim was that this avoids the need to replicate the information that is inherent in the source code context of where the metadata applies. The XML proponents then retorted that annotations unnecessarily couple the metadata to the code, and that changes to metadata should not require changes to the source code.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Technically, there is a description element in many of the elements, just as there are in most of the standard schemas in Java EE, but they have little functional value and will not be mentioned here. They might be of some use to tools that parse XML schemas and use the descriptions for tooltips and similar actions.
- 2.
It is possible, and even probable, that vendors will process the mapping files in the order that they are listed, but this is neither required nor standardized.
- 3.
Some have argued that these kinds of tuning exercises are precisely why XML should be used to begin with.
- 4.
The provider may pick one at random or throw an exception at startup time and disallow it altogether.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2018 Mike Keith, Merrick Schincariol, Massimo Nardone
About this chapter
Cite this chapter
Keith, M., Schincariol, M., Nardone, M. (2018). XML Mapping Files. In: Pro JPA 2 in Java EE 8. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-3420-4_13
Download citation
DOI: https://doi.org/10.1007/978-1-4842-3420-4_13
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-3419-8
Online ISBN: 978-1-4842-3420-4
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)