Details
-
Type:
New Feature
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Labels:None
-
Number of attachments :
Description
Based on my own usage I have found JAXB nice for object binding, but most often used in conjunction with a streaming parser.
Typical use case is one where root element (and possibly one or two intermediate levels) are handled using "raw" streaming parser, and binding is done on per-subtree basis. Since StaxMate is ideally designed to support such efficient streaming access, it would seem natural fit to use StaxMate with JAXB. Currently this can be done only by getting direct access to underlying stream reader, and then tweaking it, but it should be easy to add explicit support.
The main (only?) problem is that of having to maintain JDK 1.5 as the baseline, i.e. not mandating inclusion of JAXB API (either by requiring api jar or using JDK 1.6 or above). This can be solved by using data mapper/converter interface and providing JAXB-based implementation. Thus JAXB api jar is needed for compiling StaxMate, but only needed during runtime if functionality is used.
This would also allow easy pluggability of alternate data binding libraries as need arises.