You could use the DefaultConfigurationBuider create the
inital configuration from a file.
public Configuration getConfiguration( File path )
throws Exception
{
DefaultConfigurationBuilder builder =
new DefaultConfigurationBuilder( );
InputStream is = context.getResourceAsStream( path );
return builder.build( is ) ;
}
Then pass the configuration or particular child in that
configuration to your object using the Configurable interface.
...
File myFile = new File( "demo.config" );
Widget widget = new Widget();
Configuration config = getConfiguration( myFile );
widget.configure( config );
Steve.
> -----Original Message-----
> From: Kieffer, Guillaume [mailto:[EMAIL PROTECTED]
> Sent: Monday, 10 December, 2001 16:09
> To: '[email protected]'
> Subject: Configuration....
>
>
> ...:-( My question was not well asked.
>
> It should be: How to refer to the configuration file when the component
> which needs to be configured is not a phoenix Block ???
>
>
> > Cheers, Guillaume.
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>