I would like to switch to using fluent registration for most things rather than configuration files, but also have the ability specify add/ replace components via configuration.
The monorail project has a sample container implementation here.http:// www.castleproject.org/monorail/documentation/trunk/integration/windsor.html However there seems to be a slight problem with this approach. The StartableFacility and MonorailFacility and possibly others do not work properly if registered after the component is registed in the config file rather than in the code. The reason it seems is that the windsor container installs all components in the configuration in base constructor before the WebAppContainer constructor has a chance to run and the ComponentRegisterd/ComponentModelCreated events are not recieved by the facility if the facility is added after the component has been installed. It seems then that it would be necessary to install the facilities before the configuration file is parsed. The default installer seems to register facilities in configuration before installing any components in the configuration but the question then is how to install facilities in code before loading the components in the configuaion file. I was thinking perhaps I could create the container, add facilities and then use install to load the configuration but this too seems to have some problems since some facilities have additional configuration it doesn't seem that I can preregister all facilities prior to installation of the configuration file. Ideally, I was wanting to create a custom facility to perform the default component registration and using facility configuration to specify assemblies to search type and/or other administrative settings and configuration overrides. And ideally, if no configuration is specified then the code would automatically add the default registration facility and use the default conventions to search for components, but it seems the facilities need added via the configuration file rather then code otherwise ComponetRegistered events don't get recieved. How have others handled this? Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---
