You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@manifoldcf.apache.org by Maciej Liżewski <ma...@gmail.com> on 2012/09/03 17:15:20 UTC

ServletListener with full initialization sequence

There is ServletListener in every application but all it does initializing
is call:

ManifoldCF.initializeEnvironment();

but there are other tasks which should be done (at least by one
application):

init database, register and init connectors, register agent, etc:

> ILockManager lockManager = LockManagerFactory.make(tc);
> lockManager.clearGlobalFlag(agentShutdownSignal);
> ManifoldCF.createSystemDatabase(tc);
> ManifoldCF.installTables(tc);
> ManifoldCF.registerThisAgent(tc);
> ManifoldCF.reregisterAllConnectors(tc);


- run agents as separate thread periodically calling:

> ManifoldCF.startAgents(tc);


Those are only in jetty-launcher Main method and are needed to run
Manifold. Without those running application without embedded jetty (and
jetty-launcher) is impossible.

My proposition is to provide separate (non-default) ServletListener for
this task to maintain backward compatibility. If someone wishes to launch
manifold in application server has just to change single line in web.xml.

Re: ServletListener with full initialization sequence

Posted by Karl Wright <da...@gmail.com>.
How does this proposal deal with the API service and the authority
service?  There are three independent web applications in ManifoldCF
at this time, and a process that does the actual crawling.

>>>>>>
Those are only in jetty-launcher Main method
<<<<<<

Please examine the scripts under multiprocess-example.  This differs
from the single-process example in that all the web applications are
broken out and are expected to run in a JVM different from the
crawler.  The single-process example is simply a way of running all of
these under one process.

>>>>>>
Without those running application without embedded jetty (and
jetty-launcher) is impossible.
<<<<<<

That's not true.   Please read up on how ManifoldCF is run in a
multiprocess environment.  You are looking at the single-process
example, and that is useful, but is not how many people use the
system.

We do not expect, at this time, for people to want to run the entire
ManifoldCF application as one single web application under Tomcat.  If
that is your goal, we can try to provide such a deployment model, but
since it is a fair bit of work it would be important to understand why
you believe this is a requirement.

Karl

On Mon, Sep 3, 2012 at 11:15 AM, Maciej Liżewski
<ma...@gmail.com> wrote:
> There is ServletListener in every application but all it does initializing
> is call:
>
> ManifoldCF.initializeEnvironment();
>
> but there are other tasks which should be done (at least by one
> application):
>
> init database, register and init connectors, register agent, etc:
>
>> ILockManager lockManager = LockManagerFactory.make(tc);
>> lockManager.clearGlobalFlag(agentShutdownSignal);
>> ManifoldCF.createSystemDatabase(tc);
>> ManifoldCF.installTables(tc);
>> ManifoldCF.registerThisAgent(tc);
>> ManifoldCF.reregisterAllConnectors(tc);
>
>
> - run agents as separate thread periodically calling:
>
>> ManifoldCF.startAgents(tc);
>
>
> Those are only in jetty-launcher Main method and are needed to run
> Manifold. Without those running application without embedded jetty (and
> jetty-launcher) is impossible.
>
> My proposition is to provide separate (non-default) ServletListener for
> this task to maintain backward compatibility. If someone wishes to launch
> manifold in application server has just to change single line in web.xml.