Hi, I'm currently finishing up the Avalon Component support in Turbine for our next release. In this we will have a service which allows Turbine to act as a Component Manager which can start up and serve Avalon components to a Turbine application.
Our first user should be the Torque (http://db.apache.org/torque) project which is used by the Turbine Security and Scheduler subsystems. For this, it is absolutely necessary that the Torque component gets initialized at startup time of Turbine. We can control the sequence of the startup so that the Component Manager is initialized before any Torque user is. However, the other services rely on Torque being initialized and ready. In our component manager we basically do (we still use ECM, so bear with us. ;-) ) Configuration sysConfig = builder.buildFromFile(sysConfigFilename); Configuration roleConfig = builder.buildFromFile(roleConfigFilename); DefaultRoleManager roles = new DefaultRoleManager(); DefaultContext context = new DefaultContext(); ExcaliburComponentManager manager = new ExcaliburComponentManager(); roles.configure(roleConfig); manager.contextualize(context); manager.setRoleManager(roles); manager.configure(sysConfig); manager.initialize(); After this, everything should be set. Our component (Torque) is defined as public class TorqueComponent extends AbstractLogEnabled implements Configurable, Initializable, Contextualizable, Startable { [...] } However, it does not get initialized and started. :-( Only when I explictly lookup the component from the manager, it gets initialized and started up. So this looks like some sort of "lazy init" to me, which is fine, but bites the Torque/Turbine folks, because the access to the component happens via a 'bypass' with static facade classes and not directly through the Avalon Component (yes, it's a design error and it's ugly but it is how it is and it will be fixed in a later version of Torque but we can't do this right now). Is there any way to get 'around' this lazy init? I'd like to get the TorqueComponent initialized and started right when the container is initialized. Is this possible with another container? Regards Henning -- Dipl.-Inf. (Univ.) Henning P. Schmiedehausen INTERMETA GmbH [EMAIL PROTECTED] +49 9131 50 654 0 http://www.intermeta.de/ Java, perl, Solaris, Linux, xSP Consulting, Web Services freelance consultant -- Jakarta Turbine Development -- hero for hire --- Quote of the week: "Never argue with an idiot. They drag you down to their level, then beat you with experience." --- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
