On Wed, 8 Aug 2001, Serge Knystautas wrote:
> Right now there's now way to do this at runtime. We are partially hoping
> that Avalon will support reloading of the server app, but I was thinking we
I think you don't have to wait the feature to be supported by Avalon.
Currently, James (James.class) request the services provided by Avalon in
its initialize() method; eg: the request for MailStore and UsersStore.
After the object references gotten from the service blocks, _then_ they
are configured. So I think configuring the servicing blocks when James is
already running is possible. What you need to have is a method in
James.class that does the reconfiguration. There must be some ways to
shutdown the reconfigured services, though. For spool repositories, I
don't think there would be much problem; you can just request a new
(to be reconfigured) one from Avalon.
Problems may arise on the threads that are dependent on the repositories;
such as the spool manager. It's a thread, and has several other depending
threads (eg: RemoteDelivery mailet) which are always busy running. There
must be ways to properly stop those threads, and the sequence of which
threads should be stopped first. But since threads are interruptible, I
think all you need to do is to have a proper way to do the cleanup in the
InterruptedException try-block (eg: returning the db connection to the
pool).
> may go ahead and add this for just the mailets, since really we don't want
> the entire application to restart, just the mailet processing configuration.
> We'd have to take a custom class loader so we could reload these easily, and
Some tweaking in James.class would do the trick, I guess.
> maybe at some point even support automatic compilation for changed classes,
> and other things that web application servers do.
Yes, just like Tomcat does.
Oki
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]