Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 343615

Summary: Enhancement: Add ability to refresh JAXBContext based on metadata changes
Product: z_Archived Reporter: Blaise Doughan <blaise.doughan>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipselink.oxm-inbox
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Core - Fix
none
MOXy - Fix
none
Core - Fix (Phase 1)
none
MOXy - Fix (Phase 1)
none
Core - Fix (Phase 2)
none
MOXy - Fix (Phase 2)
none
Core - Fix (Phase 2)
none
MOXy - Fix (Phase 2)
none
MOXy - Test Cases
none
Core - Fix (Phase 2)
none
MOXy - Test Cases
none
Core - Fix (Phase 2)
none
MOXy - Test Cases none

Description Blaise Doughan CLA 2011-04-21 16:06:20 EDT
This enhancement will introduce the ability to refresh a live JAXBContext with new metadata.
Comment 1 Blaise Doughan CLA 2011-04-21 16:12:35 EDT
Created attachment 193878 [details]
Core - Fix
Comment 2 Blaise Doughan CLA 2011-04-21 16:13:26 EDT
Created attachment 193879 [details]
MOXy - Fix
Comment 3 Blaise Doughan CLA 2011-04-26 16:44:09 EDT
Created attachment 194104 [details]
Core - Fix (Phase 1)

In Phase 1:
- Introduced a new inner class on XMLContext called XMLContextState
- XMLContextState is responsible for holding onto all of an XMLContext's state, when the refresh is implemented this will allow a single object to be swapped.
- All of an XMLContexts operations are based on an instance of XMLContextState.  If the XMLContextState were to be swapped, the operation would continue against the same XMLContextState it started with.
Comment 4 Blaise Doughan CLA 2011-04-26 16:46:36 EDT
Created attachment 194105 [details]
MOXy - Fix (Phase 1)

In Phase 1:
- Introduced a new inner class on JAXBContext called JAXBContextState
- JAXBContextState is responsible for holding onto all of an JAXBContext's state, when the refresh is implemented this will allow a single object to be swapped.
- All of a JAXBContexts operations are based on an instance of JAXBContextState.  If the JAXBContextState were to be swapped, the operation would continue against the same JAXBContextState it started with.
- Introduced a new inner class on JAXBContext called JAXBContextInput
- JAXBContextInput now contains the logic for creating a JAXBContext (atleast the state), that was previously the responsibility of JAXBContextFactory.
Comment 5 Blaise Doughan CLA 2011-04-27 10:47:04 EDT
Phase #1 - Checked into trunk at rev:  9266
Comment 6 Blaise Doughan CLA 2011-04-27 10:49:52 EDT
Created attachment 194164 [details]
Core - Fix (Phase 2)
Comment 7 Blaise Doughan CLA 2011-04-27 10:50:16 EDT
Created attachment 194165 [details]
MOXy - Fix (Phase 2)
Comment 8 Blaise Doughan CLA 2011-05-11 14:07:43 EDT
Created attachment 195400 [details]
Core - Fix (Phase 2)
Comment 9 Blaise Doughan CLA 2011-05-11 14:08:01 EDT
Created attachment 195401 [details]
MOXy - Fix (Phase 2)
Comment 10 Blaise Doughan CLA 2011-05-11 16:34:48 EDT
Created attachment 195428 [details]
MOXy - Test Cases
Comment 11 Blaise Doughan CLA 2011-05-12 14:42:08 EDT
Created attachment 195522 [details]
Core - Fix (Phase 2)
Comment 12 Blaise Doughan CLA 2011-05-12 14:42:29 EDT
Created attachment 195523 [details]
MOXy - Test Cases
Comment 13 Blaise Doughan CLA 2011-05-12 15:26:16 EDT
Created attachment 195533 [details]
Core - Fix (Phase 2)
Comment 14 Blaise Doughan CLA 2011-05-12 15:29:02 EDT
Created attachment 195534 [details]
MOXy - Test Cases
Comment 15 Blaise Doughan CLA 2011-05-12 15:32:26 EDT
Fix checked into trunk at rev:  9371

Code reviewed by:  Matt MacIvor

Fix Details:
- Added a refeshMetadata method to JAXBContext
- Added accessors for XMLContextState on xmlContext
- XMLBinder now copies the XMLContext passed to it, to protect itself from a refresh.
Comment 16 Eclipse Webmaster CLA 2022-06-09 10:33:10 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink