Cheers!

I'm trying to use the CascadingConfiguration as the first configuration
available to my fortress container but it's not working.

The code:

  final FortressConfig config = new FortressConfig();
  config.setContainerClass(PolyethyleneContainer.class);
  config.setContainerConfiguration(buildContainerConfiguration());

<...>

 Configuration buildContainerConfiguration() throws Exception
 {
  DefaultConfigurationBuilder configbuilder = new
DefaultConfigurationBuilder();

  Configuration parent = configbuilder.build(containerConfiguration);

  if (overrideConfiguration == null)
  {
   return parent;
  }
  else
  {
   Configuration base = configbuilder.build(overrideConfiguration);

   CascadingConfiguration containerConfig = new CascadingConfiguration(base,
parent);

   return containerConfig;
  }
 }

I'm aware of the fact that the build method expects a stream or a real
filename, but I don't have it at this time. I only have a URI/Source...

I could transform this uri in a real Source and fetch the stream, but the
container is not constructed yet so I don't have a SourceResolver in hands
and I won't like to create one just for it.

Any ideas?


Best regards

hammett
Meet Polyethylene at http://polyethy.sourceforge.net/





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

Reply via email to