Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
EclipseLink/Development/379706
< EclipseLink | Development
Design Documentation: objectIdentitityCycleDetection
In the current JAXB RI, developed by Sun, there are a series of "proprietary" JAXB extensions that are available to provide advanced JAXB functionality outside of the JAXB spec (these extension classes reside in the com.sun.xml.bind package).
The Marshaller property com.sun.xml.bind.objectIdentitityCycleDetection can be 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.
Example
Marshaller m = jaxbContext.createMarshaller(); m.setProperty("com.sun.xml.bind.objectIdentitityCycleDetection", false);