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
Similar content being viewed by others
Notes
- 1.
Technically, there is a description element in many of the elements, just as there are in most of the standard schemas in Jakarta 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
© 2022 The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature
About this chapter
Cite this chapter
Jungmann, L., Keith, M., Schincariol, M., Nardone, M. (2022). XML Mapping Files. In: Pro Jakarta Persistence in Jakarta EE 10. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-7443-9_13
Download citation
DOI: https://doi.org/10.1007/978-1-4842-7443-9_13
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-7442-2
Online ISBN: 978-1-4842-7443-9
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)