Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 368482 - MOXy IDResolver is not "drop-in" replacement for RI IDResolver
Summary: MOXy IDResolver is not "drop-in" replacement for RI IDResolver
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Rick Barkhouse CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 359251
  Show dependency tree
 
Reported: 2012-01-12 14:53 EST by Rick Barkhouse CLA
Modified: 2022-06-09 10:03 EDT (History)
0 users

See Also:


Attachments
Patch - code changes (trunk) (24.49 KB, patch)
2012-02-28 12:20 EST, Rick Barkhouse CLA
no flags Details | Diff
Patch - test changes (trunk) (13.37 KB, patch)
2012-02-28 12:20 EST, Rick Barkhouse CLA
no flags Details | Diff
Patch - code changes (trunk) (25.26 KB, patch)
2012-02-28 13:49 EST, Rick Barkhouse CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Barkhouse CLA 2012-01-12 14:53:40 EST
When using the Sun JAXB implementation, users specified a custom IDResolver as follows:

unmarshaller.setProperty("com.sun.xml.bind.IDResolver", new MyIDResolver());
or
unmarshaller.setProperty(IDResolver.class.getName(), new MyIDResolver());

where IDResolver is com.sun.xml.bind.IDResolver, and MyIDResolver is an implementation of that interface.

For MOXy, an equivalent interface was created, org.eclipse.persistence.jaxb.IDResolver, and the user's custom resolver class must implement that MOXy interface.

If we want the user to be able migrate to MOXy from the Sun JAXB without having to change any code at all, we will have to include the com.sun.xml.bind interface in MOXy as well, so that we can use it in our own code.  We will then have to ask the user to implement a Sun interface to get the benefits of this feature.

We have the same issue with the upcoming NamespacePrefixResolver -- how are we going to handle these?


MOXy IDResolver - Bug 360249
Comment 1 Rick Barkhouse CLA 2012-01-26 11:27:15 EST
Our requirement is that EclipseLink be a drop in replacement for the Sun implementation, with no additional work for the user to continue using their current IDResolver code, so we must also support com.sun.xml.bind.IDResolvers reflectively.
Comment 2 Rick Barkhouse CLA 2012-02-28 12:20:10 EST
Created attachment 211751 [details]
Patch - code changes (trunk)
Comment 3 Rick Barkhouse CLA 2012-02-28 12:20:38 EST
Created attachment 211752 [details]
Patch - test changes (trunk)
Comment 4 Rick Barkhouse CLA 2012-02-28 13:49:34 EST
Created attachment 211757 [details]
Patch - code changes (trunk)
Comment 5 Rick Barkhouse CLA 2012-02-28 15:29:02 EST
Fixed in both trunk and 2.3, reviewed by mmacivor.
Comment 6 Eclipse Webmaster CLA 2022-06-09 10:03:30 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink