| Summary: | Avoid Spring DM overriding TCCL of scoped applications | ||
|---|---|---|---|
| Product: | [RT] Virgo | Reporter: | Glyn Normington <glyn.normington> |
| Component: | runtime | Assignee: | Glyn Normington <glyn.normington> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | dmitry |
| Version: | unspecified | ||
| Target Milestone: | 3.5.0.M01 | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
| Bug Depends on: | 360671 | ||
| Bug Blocks: | 361635 | ||
|
Description
Glyn Normington
(In reply to comment #0) Aha! Moment! I would vote for a special OsgiApplicationContextCreator in addition to ContextClassLoaderProvider. This way virgo will be in full control of the ApplicationContext creation. There is also few spring 3.x missing features in spring dm that can be implemented if OsgiApplicationContextCreator is managed by Virgo. Namely BeanDefinitionRegistryPostProcessor that was added in spring 3.x. (In reply to comment #1) Sounds good. A patch, or even a suggestion of where to start, would be gratefully received. Although I work for SpringSource, my brain is far too small to fit in Spring and its best practices. ;-) Kernel commit 7c7c26987a56cbd812eaa098a513d0be211636a6 introduces an OsgiApplicationContextCreator for the user region. Currently, this simply extends DefaultOsgiApplicationContextCreator and delegates createApplicationContext to super. Kernel commit 1f4aaf837ba7431b54d958fc89920787494b70c7 sets a ContextClassLoaderProvider which preserves existing TCCLs. SyntheticContextTCCLIntegrationTests now passes and is enabled. Documentation commit ed5a500af21c94d4caf1de04bc36444aeeb26ddf removes the corresponding known issue. Note that this fix affects certain applications that rely on the bug. See bug 368781 for an example. I added a migration note ([1]) to alert users to this. [1] http://wiki.eclipse.org/Virgo/Community/Migrating_from_3.0.x_to_3.5.0#Thread_Context_Class_Loading_with_PARs_and_Scoped_Plans |