On 24 Dec 2010, at 09:34, Philipp Bärfuss wrote:
> > Few ideas: > - make a http request to the home page and test the status code (200) I think the install/upgrade pages will return 200 too. > - extend our listener and register that one instead of the standard listener. > Once magnolia is started you set your own flag Some stuff happens asynchronously, so it's not 100% sure either. But if you start in magnolia.update.auto=true, a request will only be served after the listener is done, so this is back to a simple http ping, why not. > Note: if you can access the jsp (in case it is in the same webapp) you can be > sure the Magnolia started up and should be able to serve content > > Cheers > - Philipp > > On 23.12.2010, at 22:22, Danilo Ghirardelli wrote: > >> >> Hi Magnmolians, >> I have to create a simple jsp page for our system administrator, that checks >> the status of Magnolia webapp. This page would not be a Magnolia page but a >> separate jsp outside Magnolia but in the same container/webapp. >> Obviously if no page is served by Magnolia, that means there was some >> problem... :-) But the jsp have to be independent. My idea was to write a >> listener or something like that, that would wait for initialization and if >> everything works fine sets a value in the application context. The jsp would >> then simply read/print the value if available. >> The problem is the "if everything works fine" part. How can I tell >> programmatically that Magnolia loaded successfully? Is there a specific >> event for initialization ended successfully? Or should I simply trust that >> if my custom module (which is the last to be loaded) is initialized >> correctly then everything is working fine? Is there something somewhere in >> Magnolia that tells me the system was initialized correctly (except to load >> a page and see)? >> >> Obviously this won't guarantee against, for instance, filter misconfigured >> or error in the cache configuration, or other similar problem, I need just a >> "formal" check that Magnolia loaded fine. Any idea is welcome. >> >> Regards, Danilo. >> >> >> ---------------------------------------------------------------- >> For list details see >> http://www.magnolia-cms.com/home/community/mailing-lists.html >> To unsubscribe, E-mail to: <[email protected]> >> ---------------------------------------------------------------- > > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <[email protected]> > ---------------------------------------------------------------- ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
