Oki DZ wrote:
>
> On Wed, 18 Jul 2001, Gabriel Bucher wrote:
> > I think we should ask the avalon guys about turn on/off blocks... Avalon manage
> > all the services and I think it should enough to specify in the manifest.mf if
> > it is a service (block) or not. I think it is maybe a bug in the current version
> > of avalon we use!
>
> initialize() in James.java:
> imapSystem = new SimpleSystem();
> imapSystem.configure(conf.getChild("imapHost"));
> imapSystem.contextualize(context);
> imapSystem.compose(compMgr);
> if (imapSystem instanceof Initializable) {
> ((Initializable)imapSystem).initialize();
> }
> compMgr.put("org.apache.james.imapserver.IMAPSystem",
> (Component)imapSystem);
> getLogger().info("Using SimpleSystem.");
> imapHost = (Host)
> Class.forName(imapHostClass).newInstance();
> //imapHost = new JamesHost();
> imapHost.configure(conf.getChild("imapHost"));
> imapHost.contextualize(context);
> imapHost.compose(compMgr);
> if (imapHost instanceof Initializable) {
> ((Initializable)imapHost).initialize();
> }
> compMgr.put("org.apache.james.imapserver.Host",
> (Component)imapHost);
> getLogger().info("Using: " + imapHostClass);
>
> As I understand it, the snippet code above sets up the IMAP server and
> it's storage. So I think, it would be possible to select which service to
> be run during James start-up; to prevent a service to be started, just
> bypass its initialize() (and compose() if any), in James.java. And the
> flags to init can be defined in the config.xml;
>
> I'm not so clear (yet) how Phoenix working though; I defined my Block in
> James' assembly.xml, my Block got loaded (meaning: its initialize() got
> invoked) during Phoenix start-up. Could it be some differences between
> blocks and components in Avalon parlance? ie: blocks got automatically
> initialized and composed, but components' initialize() and compose()
> should be invoked by some other entities.
>
Yes - blocks get automatically run by Phoenix. Before we split James
into multiple blocks it was straightforward to specify what services
were run. I haven't had time to play with current set-up for that.
The IMAP code generally needs some attention, so I wouldn't rely on it
for examples.
And, yes, components within blocks should be set up by their block, I
think.
Charles
> Well, I don't know... quickly looking up the POP3Server.java, it's not a
> block, but an AbstractService....
>
> Oki
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]