Hi Gusti!

We're using enterprise edition, and we simply created a separate site 
definition for technical pages like "under construction" and this kind of thing.
You could make a separate site definition, and provide a special page in this 
site which you call to check magnolia's status.
Verify the HTTP Status code, but also some content from the page.
Your page could be accessible under a fake hostname "testing.mydomain.com" 
which you configure in the hosts file of the machine sending the requests. That 
way, people not knowing your fake hostname can't normally see your technical 
pages.

By using a site definition within magnolia, the page will only be served if 
magnolia is really running, not in installer mode or after a failed startup.

Regards from Vienna,

Richard





-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] 
Im Auftrag von Grégory Joseph
Gesendet: Freitag, 24. Dezember 2010 11:58
An: Magnolia User-List
Betreff: Re: [magnolia-user] Check successful startup?



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]>
----------------------------------------------------------------





----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to