Sergey Vladimirov wrote:
Hi, Niklas.1. If you look for Avalon Components Framework - list of interfaces for IoP implementation, you see that configuration of component provides with Configurable interface: public interface Configurable { configure(Configuration config); } so if component is configurable, it configures by itself, but configuration injected in component by configure() method. I think, we can trust avalon-framework workgroup in questions of using IoP pattern.
I think that since Avalon was designed there has happened alot when it comes to IoC (I guess this is also what you mean by IoP, if not could you please explain what you mean by IoP as I'm not familiar with the ackronym). The interface based IoC is, I would say, these days mostly frowed upon as it tightly binds an object to one specific framework. The IoC frameworks that has grown very popular (e.g. Pico/Spring) doesn't put any restrictions on the objects at all, allowing for very easy reuse and flexible configuration in any environment.
2. My opinion, that every component should have the most possible count of getter/setter methods to allow configuration by JMX, for example. But it's is way to change configuration in runtime, but not in init stage.
I don't understand why two ways of doing the same thing would be needed.
3. External developer need to create UserManager and change configuration. If FTPServer is not embedded, he doesn't need to create somethink else. If he need, it's a bug in design or implementation.
I don't think the use case of running FtpServer embedded with existing resources is that uncommon. This is where for example Jetty has been very succesful as it is very easy and flexible to embed.
4. "A developer should be able to inject a DataSource retrived from JNDI or a Pico/Spring configuration without additional wrapping." Just write DBUserManager which support injecting of DataSource and use it. In my application many resources is injected in UserManager and FileSystemManager by @Resource annotation. I don't have problems with it. (But I need to write my own FtpConfigImpl, since I embed FTPServer in my application)
How would I write such a DBUserManager with the current API (without having to implement my own version of the FtpServer specific configuration classes)? I don't see a way of providing anything to the component at initilization besides the simple types that Configuration supports.
/niklas ------- Niklas Gustavsson http://www.protocol7.com mailto:[EMAIL PROTECTED]
