cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prasanna Santhanam <...@apache.org>
Subject Re: inheritable componentContexts
Date Tue, 07 May 2013 05:38:55 GMT
On Wed, Apr 17, 2013 at 10:21:58AM -0700, Kelven Yang wrote:
> 
> 
> On 4/16/13 11:55 PM, "Prasanna Santhanam" <tsp@apache.org> wrote:
> 
> >On Tue, Apr 16, 2013 at 09:43:47AM -0700, Kelven Yang wrote:
> >> 
> >> 
> >> On 4/16/13 1:15 AM, "Prasanna Santhanam" <tsp@apache.org> wrote:
> >> 
> >> >This is probably a question for the Spring community but I'll ask here
> >> >anyway. Every so often when the componentContext.xml.in changes I find
> >> >that I have to fix up simulatorComponentContext.xml.in similarly to
> >> >make the beans load appropriately and for the bvt tests to work.
> >> >
> >> >Is there a way similar to the components-premium.xml we had before to
> >> >'inherit' Spring contexts so it's easier to maintain the xmls?
> >> >
> >> >-- 
> >> >Prasanna.,
> >> 
> >> Unfortunately, Spring does not provide an out-of-box solution to inherit
> >> between XML configuration files currently, however it provides the
> >>feature
> >> to merge several independent context files together.
> >> 
> >> What you may do is to have your simulator components in a separated
> >> context XML file and have Spring merge it along with other common
> >>context
> >> files (like we did for applicationContext.xml + componentContext.xml).
> >> 
> >
> >Thanks Kelven, I explored the merging of contexts and it might be
> >unsuitable for my case since I have to override some beans of the
> >applicationContext that are required for the simulator. Specifically
> >the SecondaryStorageDiscoverer needs to be overridden by the
> >SimulatorSecondaryStorageDiscoverer.
> 
> It is possible to build our own context file merging strategies that
> supports overriding, this should simplify the cases where you want most of
> configuration to be in default. You may file an improvement ticket. I
> personally will look into it at a later time after I have finished my
> other tasks.
> 
> -Kelven
> 
Filed: https://issues.apache.org/jira/browse/CLOUDSTACK-2353

-- 
Prasanna.,

------------------------
Powered by BigRock.com


Mime
View raw message