In the JAXB RI, developed by Sun, there are a series of "proprietary" extensions that are available to provide advanced JAXB functionality outside of the JAXB spec (these extension classes reside in the com.sun.xml.bind and com.sun.internal.xml.bind packages). This document outlines the new EclipseLink MOXy support for these extensions.

General Features

XML Accessor Factory

Allows the user to write their own logic to be used when setting and getting property values.

Object Identitity Cycle Detection

Used to configure the strategy EclipseLink will use to detect an Object cycle. By default, EclipseLink will use Object identity to determine if a cycle exists; setting this property to false will tell EclipseLink to use the equals() method instead.

Character Escape Handler

Allows the user to provide their own character-escaping logic by supplying their own implementation of the CharacterEscapeHandler interface.

Usage:

marshaller.setProperty("com.sun.xml.bind.marshaller.CharacterEscapeHandler", new MyCharacterEscapeHandler());marshaller.setProperty(org.eclipse.persistence.jaxb.MarshallerProperties.CHARACTER_ESCAPE_HANDLER, new MyCharacterEscapeHandler());

XML Location

Allows the user to specify a property on the JAXB object that will be updated (upon unmarshalling) with that object's XML location information (i.e. the line number, column number, and system ID that points to this object's location in the XML input).