10.12.2012 Views

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

JAXB Architecture<br />

FIGURE 17–1 JAXB Architectural Overview<br />

488<br />

Schema<br />

XML/<strong>Java</strong><br />

Customization<br />

Binding<br />

Declarations<br />

Architectural Overview<br />

Figure 17–1 shows the components that make up a JAXB implementation.<br />

Schema<br />

Generator<br />

Schema<br />

Compiler<br />

Schema to <strong>Java</strong><br />

<strong>Java</strong> to Schema<br />

A JAXB implementation consists of the following architectural components:<br />

■ Schema compiler: Binds a source schema to a set of schema-derived program elements. <strong>The</strong><br />

binding is described by an XML-based binding language.<br />

■ Schema generator: Maps a set of existing program elements to a derived schema. <strong>The</strong><br />

mapping is described by program annotations.<br />

■ Binding runtime framework: Provides unmarshalling (reading) and marshalling (writing)<br />

operations for accessing, manipulating, and validating XML content using either<br />

schema-derived or existing program elements.<br />

<strong>The</strong> JAXB Binding Process<br />

Portable<br />

JAXB-annotated<br />

classes<br />

Object<br />

Factory<br />

Application Code<br />

Application<br />

Figure 17–2 shows what occurs during the JAXB binding process.<br />

<strong>The</strong> <strong>Java</strong> <strong>EE</strong> 5<strong>Tutorial</strong> • June 2010<br />

Package<br />

javax.xml.bind<br />

Annotation-driven<br />

Binding<br />

Framework<br />

Implementation

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!