views:

130

answers:

2

Is there a way you can tell windsor container to reload a component if its configuration is changed in the XML file without having to restart the web application?

+1  A: 

See this to change a component's config at runtime. With this technique you can fetch the config from any file or even a database if you want.

Mauricio Scheffer
A: 

Some points:

  1. If you have the Windsor configuration in the Web.config and you change/touch the file, the Web app. will restart itself automatically.
  2. In any case you'll need some kind of a restart mechanism if you change the Windsor configuration - the dependencies between components and the already created singleton instances might force you to dispose of the old Windsor container before creating a new one with the new configuration, which in turn might affect your system - so the "reloading" is not as simple as it sounds. The safest thing to do is to restart your app.
Igor Brejc

related questions