Task #216 (new)
Opened 18 years ago
Last modified 17 years ago
Hide OmeroContext methods by splitting class and using BeanPostProcessor
Reported by: | jamoore | Owned by: | jamoore |
---|---|---|---|
Priority: | minor | Milestone: | GatherReqs |
Component: | Configuration | Version: | 3.0-M3 |
Keywords: | spring,context,customization | Cc: | |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | n.a. |
Sprint: | n.a. |
Description
Currently OmeroContext extends ConfigurableApplicationContext as this was the easiest way to have it injected directly. Attempts to use delegation failed with ClassCastExceptions because instead the delegate (non-OmeroContext.class) were injected.
Instead, we could create an OmeroContext interface, implementors of which could delegate to ConfigurableAppCtx. Then, instead of marking classes ApplicationContextAware we could mark them OmeroContextAware and an OmeroContextAwareProcessor could inject the OmeroContext. (A mouth full)
See: http://www.springframework.org/docs/reference/beans.html#beans-factory-customizing
Change History (2)
comment:1 Changed 18 years ago by jmoore
- Milestone changed from Unscheduled to 3.0-M4
- Summary changed from Hide OmeroContxt methods by splitting class and using BeanPostProcessor to Hide OmeroContext methods by splitting class and using BeanPostProcessor
comment:2 Changed 17 years ago by jmoore
- Milestone changed from 3.0-Beta2 to GatherReqs
Similar to #232, we need to know who all will be writing services.