Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343615 - Enhancement: Add ability to refresh JAXBContext based on metadata changes
Summary: Enhancement: Add ability to refresh JAXBContext based on metadata changes
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: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-21 16:06 EDT by Blaise Doughan CLA
Modified: 2022-06-09 10:33 EDT (History)
1 user (show)

See Also:


Attachments
Core - Fix (43.19 KB, patch)
2011-04-21 16:12 EDT, Blaise Doughan CLA
no flags Details | Diff
MOXy - Fix (78.47 KB, patch)
2011-04-21 16:13 EDT, Blaise Doughan CLA
no flags Details | Diff
Core - Fix (Phase 1) (43.04 KB, patch)
2011-04-26 16:44 EDT, Blaise Doughan CLA
no flags Details | Diff
MOXy - Fix (Phase 1) (77.93 KB, patch)
2011-04-26 16:46 EDT, Blaise Doughan CLA
no flags Details | Diff
Core - Fix (Phase 2) (725 bytes, patch)
2011-04-27 10:49 EDT, Blaise Doughan CLA
no flags Details | Diff
MOXy - Fix (Phase 2) (1.49 KB, patch)
2011-04-27 10:50 EDT, Blaise Doughan CLA
no flags Details | Diff
Core - Fix (Phase 2) (1.56 KB, patch)
2011-05-11 14:07 EDT, Blaise Doughan CLA
no flags Details | Diff
MOXy - Fix (Phase 2) (2.24 KB, patch)
2011-05-11 14:08 EDT, Blaise Doughan CLA
no flags Details | Diff
MOXy - Test Cases (16.23 KB, patch)
2011-05-11 16:34 EDT, Blaise Doughan CLA
no flags Details | Diff
Core - Fix (Phase 2) (1.56 KB, patch)
2011-05-12 14:42 EDT, Blaise Doughan CLA
no flags Details | Diff
MOXy - Test Cases (14.30 KB, patch)
2011-05-12 14:42 EDT, Blaise Doughan CLA
no flags Details | Diff
Core - Fix (Phase 2) (2.91 KB, patch)
2011-05-12 15:26 EDT, Blaise Doughan CLA
no flags Details | Diff
MOXy - Test Cases (15.87 KB, patch)
2011-05-12 15:29 EDT, Blaise Doughan CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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