> -----Original Message-----
> From: "Anton Tagunov" [mailto:[EMAIL PROTECTED]
>
> class MyContainerExtension implements ContainerExtension
> {
>     public amendConfig( MutableConfiguration node )
>     {
>          MutableConfigration b1 = node.createChild( "b" );
>          b1.setValue( 1 );
>          MutableConfiguratin b2 = node.createChild( "b" );
>          b2.setValue( 2 );
>     }
> }
> 
> this way MyContainerExtension has not dependency on _any_
> configuration implementation. And the tree is homogenous.
 
I see your issue.  Yet couldn't you resolve this by using your
MutableConfigurationFactory to change the above method to:

 class MyContainerExtension implements ContainerExtension
 {
     public amendConfig( MutableConfiguration node )
     {
          MutableConfigration b1 = m_mcf.newInstance("b");
          b1.setValue( 1 );
          MutableConfiguratin b2 = m_mcf.newInstance("b");
          b2.setValue( 2 );
     }
 }

I suppose part of the issue is that DefaultConfiguration does not have a
createChild() method and doesn't really need one since it's a concrete
class.  MutableConfiguration is an interface and thus a factory method to
create new instances of the implementation (without having to actually)
could be useful, but not absolutely required.

I'm a +0 on adding this to the interface.

J. Aaron Farr
  SONY ELECTRONICS
  DDP-CIM
  (724) 696-7653

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to