avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leandro Rodrigo Saad Cruz <lean...@ibnetwork.com.br>
Subject [PROPOSAL] Changing Configuration
Date Wed, 20 Nov 2002 14:13:53 GMT
Hi all.

I'd like to propose another impl of Configuration and another
SAXConfigurationHandler. He is my motivation.

I have a simple configuration like this

<some_service name="FileUpload">
	<component name="a">
		<>
		</>
		...
		...
	</component>
	<component name="b">
		<>
		</>
		...
		...
	</component>
</some_service>
<some_service name="AnotherOne">
	...
	...
	...
</some_service>

Suppose I want to modify just the configuration for component named 'a',
or the configuration for service named 'AnotherOne'. I'd have to rebuild
all my configuration object just to change a single line, I think that
*if* DefaultConfiguration established a parent-child relationship and
offered ,methods like addChild(int position,Configuration child) we
would be able to replace just the line we wanted. Example

<code>
Configuration willBeChanged = getConfigurationUsingSomeCriteria();
int position = willBeChanged.getPositionAccordingToFather();
Configuration parent = willBeChanged.getParent();
willBeChanged = new DefaultConfiguration();
parent.addChild(position,willBeChanged);
//serialize
</code>

I'm not aware of the consequences of a change like this and I am
proposing this because this is a functionality that I need. Do you need
this too ? Any comments ?


-- 
Leandro Rodrigo Saad Cruz
IT - Inter Business Tecnologia e Servicos (IB)
http://www.ibnetwork.com.br
http://jakarta.apache.org/ojb


--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message