J2EE

One of the most interesting aspects of data binding is how Sun places it within the J2EE picture. As Sun is prone to do, APIs like JAXB get folded into larger products’ APIs; in fact, this is how JAXP made it into the latest version of the Java 2 Enterprise Edition. While this doesn’t add any new functionality to the API, it certainly does make it more readily available, especially for those developers using J2EE who may not have yet found a need for data binding. The J2EE implications of data binding are certainly of interest to all enterprise developers.

Data Binding in Enterprise Applications

Some of the most relevant applications for data binding turn out to work with configuration data and messaging. In the first situation, reading XML configuration files becomes trivial with data binding and allows you to avoid writing a lot of SAX or DOM code for a relatively simple purpose. The second situation, messaging, uses data binding to quickly convert between an XML format and Java instance data and back again. Both of these use cases turn out to be prevalent in enterprise applications. In fact, most common uses of data binding end up being prime candidates for enterprise applications. As a result, it’s no surprise that J2EE is almost certain to see JAXB added to its laundry list of features.

The interesting aspect of the inclusion of JAXB is that it allows tighter integration between other enterprise components. While it is certainly possible to include additional APIs in your ...

Get Java & XML Data Binding now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.