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, to maintain backward
compatibility) ServletListener for this task. If someone wishes to launch
manifold in application server has just to change single line in web.xml.

Reply via email to