Ok, can you create a ticket for this? I will then create a branch and start adding directories as described in my earlier post.
Karl On Tue, Sep 4, 2012 at 8:34 AM, Maciej Liżewski <[email protected]> wrote: > Ok. I did look and multiprocess and there is one issue - every part of > manifold is then run in separate java VM. This is what I would like to > avoid and run all parts (crawler-ui, authorization and api) as applications > in single application server. We have got sindle machine for java > applications and all of them must be run in single Tomcat instance to avoid > splitting memory between different java VMs. > > Like I said - I was able to achieve this simply by adding two separate > ServletListeners: one for authorization and api applications that > initializes ManifoldCF and connectors, and one for crawler-ui which also > runs connecotors processing in separate thread. > > I can use this configuration on my own, but I was thinking that there can > be someone else in similiar situation. > > > > 2012/9/4 Karl Wright <[email protected]> > >> If you do decide you really want a combined web application that does >> everything, this is how I'd do it: >> >> (1) Create a new directory in framework, which contains the build >> materials needed for your combined web application, called >> "combined-service". >> (2) Include a class that contains the equivalent of your patch code. >> Or, you could also create a "framework/combined-classes" directory to >> build a jar, similar to the framework/xxx-servlet packages. >> (3) Include a web.xml in your combined-service area that invokes the >> correct ServletContextListener for your >> web application. >> >> If you really want to go ahead with this project, please create a >> ticket that covers it, titled something like "provide a combined web >> application encapsulating all ManifoldCF processes and services". >> >> Karl >> >> On Tue, Sep 4, 2012 at 6:15 AM, Karl Wright <[email protected]> wrote: >> > Here was my response from yesterday: >> > >> > 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 Tue, Sep 4, 2012 at 5:38 AM, Maciej Liżewski >> > <[email protected]> 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, 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. >>
