cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kelven Yang <>
Subject Re: inheritable componentContexts
Date Wed, 17 Apr 2013 17:21:58 GMT

On 4/16/13 11:55 PM, "Prasanna Santhanam" <> wrote:

>On Tue, Apr 16, 2013 at 09:43:47AM -0700, Kelven Yang wrote:
>> On 4/16/13 1:15 AM, "Prasanna Santhanam" <> wrote:
>> >This is probably a question for the Spring community but I'll ask here
>> >anyway. Every so often when the changes I find
>> >that I have to fix up 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
>> 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
>> 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

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.



View raw message