Discussion:
JavaMonitor to start a blocking application?
John Pollard
2018-10-09 10:41:55 UTC
Permalink
Hello WOers,
I use JavaMonitor for a number of web apps just fine.
I have another app that is a WO app but it isn’t an event driven web app; when it runs is just gets on with a never ending task.
Is there an easy way to use JavaMonitor to just start this when the machine first boots up, but not try to check it is still alive (no heartbeats)?
This would be a bit easier than using cron for me.
I suppose ideally I would like the app to be responsive to JavaMonitor so it can be shown to be alive / be killed & restarted, whilst also doing its never ending task. Is it possible to do this with a background thread in my ERXApplication class or will that now work nicely with EOF etc.
Thanks
John
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (Webobjects-***@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/uoh8%40ml-in.narkive.net

This email sent to ***@ml-
Jesse Tayler
2018-10-09 11:46:46 UTC
Permalink
Why not just start the instance in your startup script and blow WO off —

I suspect long tasks may prevent the heartbeat and that might be hard to run, otherwise, there’s no trouble with monitor starting and app and leaving it alone…

I’m not sure about backgrounding tasks, but I’m sure it would not be that hard to get working if it really doesn’t throw heartbeats in the first place which I don’t know if it does or not.
Post by John Pollard
Hello WOers,
I use JavaMonitor for a number of web apps just fine.
I have another app that is a WO app but it isn’t an event driven web app; when it runs is just gets on with a never ending task.
Is there an easy way to use JavaMonitor to just start this when the machine first boots up, but not try to check it is still alive (no heartbeats)?
This would be a bit easier than using cron for me.
I suppose ideally I would like the app to be responsive to JavaMonitor so it can be shown to be alive / be killed & restarted, whilst also doing its never ending task. Is it possible to do this with a background thread in my ERXApplication class or will that now work nicely with EOF etc.
Thanks
John
_______________________________________________
Do not post admin requests to the list. They will be ignored.
https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (Webobjects-***@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/uoh8%40ml-in.narkive.net

Thi
Paul Yu
2018-10-09 13:35:05 UTC
Permalink
John

Have you looked are Quartz? I don’t remember if Wonder has that framework or not.

Paul
Post by John Pollard
Hello WOers,
I use JavaMonitor for a number of web apps just fine.
I have another app that is a WO app but it isn’t an event driven web app; when it runs is just gets on with a never ending task.
Is there an easy way to use JavaMonitor to just start this when the machine first boots up, but not try to check it is still alive (no heartbeats)?
This would be a bit easier than using cron for me.
I suppose ideally I would like the app to be responsive to JavaMonitor so it can be shown to be alive / be killed & restarted, whilst also doing its never ending task. Is it possible to do this with a background thread in my ERXApplication class or will that now work nicely with EOF etc.
Thanks
John
_______________________________________________
Do not post admin requests to the list. They will be ignored.
https://lists.apple.com/mailman/options/webobjects-dev/pyu%40mac.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (Webobjects-***@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/uoh8%40ml-in.narkive.net

This email sen
Klaus Berkling
2018-10-09 14:26:57 UTC
Permalink
Yes. Wonder has Quartz. Works nicely handling monthly billing and user reminder emails.

Sent from my phone.
John
Have you looked are Quartz? I don’t remember if Wonder has that framework or not.
Paul
Post by John Pollard
Hello WOers,
I use JavaMonitor for a number of web apps just fine.
I have another app that is a WO app but it isn’t an event driven web app; when it runs is just gets on with a never ending task.
Is there an easy way to use JavaMonitor to just start this when the machine first boots up, but not try to check it is still alive (no heartbeats)?
This would be a bit easier than using cron for me.
I suppose ideally I would like the app to be responsive to JavaMonitor so it can be shown to be alive / be killed & restarted, whilst also doing its never ending task. Is it possible to do this with a background thread in my ERXApplication class or will that now work nicely with EOF etc.
Thanks
John
_______________________________________________
Do not post admin requests to the list. They will be ignored.
https://lists.apple.com/mailman/options/webobjects-dev/pyu%40mac.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
https://lists.apple.com/mailman/options/webobjects-dev/webobjects%40berkling.us
John Pollard
2018-10-09 14:34:49 UTC
Permalink
Thanks all for replies.
Giles Palmer also recommended ScheduledExecutorService directly so I have good options to look at.
I realise I don’t need to use JavaMonitor, but it keeps things managed in one place.
Thanks
John
Post by Klaus Berkling
Yes. Wonder has Quartz. Works nicely handling monthly billing and user reminder emails.
Sent from my phone.
John
Have you looked are Quartz? I don’t remember if Wonder has that framework or not.
Paul
Post by John Pollard
Hello WOers,
I use JavaMonitor for a number of web apps just fine.
I have another app that is a WO app but it isn’t an event driven web app; when it runs is just gets on with a never ending task.
Is there an easy way to use JavaMonitor to just start this when the machine first boots up, but not try to check it is still alive (no heartbeats)?
This would be a bit easier than using cron for me.
I suppose ideally I would like the app to be responsive to JavaMonitor so it can be shown to be alive / be killed & restarted, whilst also doing its never ending task. Is it possible to do this with a background thread in my ERXApplication class or will that now work nicely with EOF etc.
Thanks
John
_______________________________________________
Do not post admin requests to the list. They will be ignored.
https://lists.apple.com/mailman/options/webobjects-dev/pyu%40mac.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
https://lists.apple.com/mailman/options/webobjects-dev/webobjects%40berkling.us
Tim Worman
2018-10-16 18:40:20 UTC
Permalink
+1

I’ve been using Quartz for some time - outside of Wonder. So, I have yet to even check the Wonder integrations. I’ve had no problems using Quartz with WOMonitor though.

In my generalized Application class I have a method:

_checkQuartzJobStatusAndShutdown

which is called whenever Application.refuseNewSessions or Application.terminate are called. So, actions you take from WOMonitor can be integrated in to safely stop any current job triggers/schedules that might be running.

Tim
UCLA GSE&IS
Post by Klaus Berkling
Yes. Wonder has Quartz. Works nicely handling monthly billing and user reminder emails.
Sent from my phone.
Post by Paul Yu
John
Have you looked are Quartz? I don’t remember if Wonder has that framework or not.
Paul
Post by John Pollard
Hello WOers,
I use JavaMonitor for a number of web apps just fine.
I have another app that is a WO app but it isn’t an event driven web app; when it runs is just gets on with a never ending task.
Is there an easy way to use JavaMonitor to just start this when the machine first boots up, but not try to check it is still alive (no heartbeats)?
This would be a bit easier than using cron for me.
I suppose ideally I would like the app to be responsive to JavaMonitor so it can be shown to be alive / be killed & restarted, whilst also doing its never ending task. Is it possible to do this with a background thread in my ERXApplication class or will that now work nicely with EOF etc.
Thanks
John
_______________________________________________
Do not post admin requests to the list. They will be ignored.
https://lists.apple.com/mailman/options/webobjects-dev/pyu%40mac.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
https://lists.apple.com/mailman/options/webobjects-dev/webobjects%40berkling.us
_______________________________________________
Do not post admin requests to the list. They will be ignored.
https://lists.apple.com/mailman/options/webobjects-dev/lists%40thetimmy.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (Webobjects-***@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/uoh8%40ml-in.narkive.net

This email sent

Loading...