Re: Are Properties re-read after a scheduled re-start?
Re: Are Properties re-read after a scheduled re-start?
- Subject: Re: Are Properties re-read after a scheduled re-start?
- From: Chuck Hill <email@hidden>
- Date: Tue, 21 Jul 2009 20:41:00 -0700
On Jul 21, 2009, at 8:38 PM, Paul Hoadley wrote:
On 22/07/2009, at 12:41 PM, Chuck Hill wrote:
On Jul 21, 2009, at 8:08 PM, Andrew Lindesay wrote:
Hi Chuck;
Wouldn't it just be one trip at startup?
Ah I thought he was going to check the state of the "property"
each time somebody attempts to logs on so he could turn login on
and off.
I am not too clear myself on what the requirements are.
Andrew's got it. This is all I am after:
1. An app (optionally) starts up in a state where non-superuser
logins are blocked.
2. A superuser logs in, does any housekeeping, then turns logins on
for non-superusers.
3. A superuser might later turn non-superuser logins back off for
some reason.
At the moment, I have implemented this by:
1. Properties contains a property indicating the start-up state:
acceptLogins=false
2. (A superclass of) Application reads this, stores it in an ivar,
and provides acceptLogins() so that DirectAction.loginAction() can
decide who to let in.
3. A superuser can change the state with
Application.setAcceptLogins(boolean).
This works fine, _except_ that the state needs to persist across
scheduled re-starts. I will look at storing the state in the
database instead.
Restarts and multiple instances, no? Otherwise they would need to
login to each instance.
Chuck
--
Chuck Hill Senior Consultant / VP Development
Learn WO at WOWODC'09 East in Montréal this August!
http://www.wocommunity.org/wowodc09/east
http://arstechnica.com/apple/news/2009/07/webobjects-sliced-from-106but-prognosis-of-death-premature.ars
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden