JAX-B

Print the objectives

  Take a beta test

This exam is focused on the version 2.0 of the JAXB API.
This exam assumes that the exam taker has a good knowledge of XML-Schemas and the XML- Technology. Most of the questions uses Schemas, but there are not questions which covers schema details.
This is addressed in another exam.
Note that there are no questions about specific implementations.
Note that minimal XPath knowledge is required to define extern binding declarations, but there should be no XPath specific questions on the exam.
There are only questions about features which are describes in the specification provided by Sun Microsystems(C).
  Released  Beta  Frozen  

General  2 questions

Describe the Schema-Compiler.
Describe the Schema-Generator.
Identify the two ways of unmarshalling:
  • Structural
  • Flexible
Describe the function of a Binder.
2 81 2

Design  2 questions

Describe the three ways of mapping schemas to the data model of an application.
  • out to in
  • meet in the middle
  • in to out
Identify the disadvantages and advantages of each of these ways.
Identify the advantages and disadvantages of flexible mapping of a xml document.
Identify the advantages and disadvantages of separating the xml processing layer from the business layer.
Identify the advantages of split an XML-Document in multiple messages for further processing.
1 17 0

Binder  2 questions

Identify the abilities of the Binder Component.
Write code that uses the Binder Component to
  • updateXML and updateJAXB
  • marshal and unmarshals both XMLRootElements and other Elements.
  • uses the method getXMLNode and getJAXBNode
0 23 0

JAXBContext  2 questions

Describe the responsibilities of the JAXBContext
Write code that instantiates and uses a JAXBContext correctly.
Identify the fact that a JAXBContext is very expensive to create and therefore thread safe.
0 40 0

JAXBElement<T>  2 questions

Use the methods
  • isNil
  • isGlobalScope
  • isTypeSubstituated
  • getName
  • getScope
  • getDeclaredType
to examine XML content representation at runtime.
0 19 0

Marshaller  2 questions

Write code that sets properties on the Marshaller.
Obtain a Marshaller Component.
Write code that marshals POJOS to XML files.
Write code that marshals POJOS to other XML API's.
Use the class JAXBElement to marshal objects which are not top level objects in the JAXBContext.
0 35 0

Unmarshaller  2 questions

Obtain a Unmarshaller Component programatically.
Write code to read POJOS from a XML file.
Write code to read POJOS from other XML API's.
Write code to read POJOS from an URL object.
Use the JAXBElement to unmarshal objects from an XML file that uses type substitution.
Unmarshal POJOs that are not XMLRootElements.
Unmarshal only parts of a xml document to POJOS.
Identify the behavior of the Unmarshaller if it uses flexible marshaling.
0 34 0

Validation  2 questions

Use a Schema on both the Marshaller and the Unmarshaller component.
Write code that uses the class ValidationEvent to detect errors and failures.
Write code that defines own ValidationEventHandler classes.
Identify the fact that a FATAL_ERROR should always lead to the cancelation of the processing process.
Write code that uses the Class ValidationEventCollector to collect events.
1 21 0

Callbacks  1 question

Write code that inherits from the classes Unmarshaller.Listener and Marshaller.Listener
Write code that defines Listeners in the POJO classes that should be represented as XML
3 13 0

ObjectFactory  1 question

Use the class ObjectFactory to create objects which currently resides in the table of the JAXBContext.
Identify the fact that the class ObjectFactory is created by the Schemacompiler.
0 14 0

XML-Schema to Java  6 questions

Identify the two types of scheme bindingconfigurations :
  • inline
  • extern
and their advantages and disadvantages
Identify the four scopes:
  • global
  • scheme
  • element
  • component
on which binding declarations can be declared.
Identify which binding declaration takes precedence if there are defined more than one on different scopes.
Write code that uses the methods of the class javax.xml.bind.DataTypeConverter for converting types with the javaType binding declaration.
Write code that defines own methods for the attributes parse/print of the javaType binding declaration.
use the binding declarations:
  • jaxb:collectionType
  • jaxb:package
  • jaxb:class
  • jaxb:property
  • jaxb:javadoc
  • fixedAttributeAsConstantProperty
  • choiceContentProperty
  • typeSafeEnumBase
  • typeSafeEnumMemberName
  • enableJavaNamingConventions
  • generateElementClass
  • generateValueClass
  • localScoping
  • factoryMethod
  • elementName
  • generateElementProperty
  • baseType
  • javaType
  • typeSafeEnumClass
  • typeName
0 30 0

Java to XML-Schema  6 questions

Use the following annotations to define mapping to a scheme from a Java type.
  • XmlElement
  • XmlAttribute
  • XmlValue
  • XmlTransient
  • XmlAccessorOrder
  • XmlAccessorType
  • XmlElementRef
  • XmlRootElement
  • XmlType
  • XmlEnum
  • XmlEnumValue
  • XmlAnyAttribute
  • XmlAnyElement
  • XmlID
  • XmlIDREF
1 77 0

JAXBIntrospector  1 question

Use the methods of the class to introspect JAXBObjects and be aware of the impact of using a JAXBElement.
0 16 0

Exam information

  • 46 minutes
  • 31 questions (430)
  • 78% required
  • +3 √
  • - 10  points
  • 15 day delay
  • status: under construction
  • bonus: 2.0x

Exam leader

Top contributors