Synchronizing data displayed by two instances of my app
Synchronizing data displayed by two instances of my app
- Subject: Synchronizing data displayed by two instances of my app
- From: Denis Stanton <email@hidden>
- Date: Fri, 2 Apr 2004 14:09:57 +1200
Can anyone tell me if there is a simple time limit that determines how
long it will take for changes made to a database by one instance of my
application to show up for users of another instance?
I have an application that keeps track of vehicle rentals. It is run
in-house by small company - no pubic access. The server is typically
running two instances of the application. Sometimes two staff members
will be looking at the chart that displays bookings in a calendar
format at the same time. If one makes (and saves) a change and the
other user happens to have a session on the other instance the change
won't show up. Of course they are clicking the Update button, which
fetches the data items, but they don't get the changed values because
EOM is feeding cached data rather than getting the latest from the
database. Understandably they find this disconcerting, especially at
peak times when reservations are in demand.
Is there a simple automatic time limit after which a fetch will force a
read of the database? If so, Is there a simple way to set this limit
to be shorter?
Alternatively, is my only option to precede the update with
refreshAllObjects(), or similar?
I found a posting by Jonathan Rochkind on this subject, but I'm afraid
it leaves me confused. If these refresh/refault/refetch methods ignore
inserted, deleted or updated objects (are there any other kinds?) what
on earth do they do?
On 18/11/2003, at 10:27 AM, email@hidden wrote:
> Looking at the documentation now, it appears that refreshAllObjects()
> is
> basically a replacement for refaultAllObjects(). In fact, I can't
> figure
> out what the heck the difference between refreshAllObjects() and
> refaultAllObjects() is.
>
> Wait, okay. refaultAllObjects() will not effect inserted, deleted or
> updated objects. refreshAllObjects() will do exactly the same thing
> with
> non-modified objects as refault..., and it will ignore deleted and
> inserted objects just like refault... BUT: Will do the 'right' thing
> with updated objects, instead of ignoring them like the refault...
> method.
What must I do to be sure of getting current data? I have found that
the users have been logging out and in again in the hope of forcing an
update, but of course this only works if they connect to the instance
that already knows about the data change.
Denis
(Using WebObjects 5.2.3 on Mac OS X)
Denis Stanton
email@hidden
Home: +64 9 533 0391
mobile: +64 21 1433622
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.