Chuck,

On 26. 11. 2014, at 0:10, Chuck Hill <[email protected]> wrote:

> The EOGlobalID is the same but the inserted state is captured in the EC.  How 
> hard would it be to re-create the whole set of objects to be saved in a 
> different EC?
> 
> Hmmm.... another option, if this one fails. Thanks!
> 
> By the way, the multi-instanceness brought consequences I did not quite 
> foresee. E.g., the application sometimes imports CSV, doing these steps:
> 
> 1. keep-track-of-old-records
> 2. read-in-CSV-and-create-new-records
> 3. delete-old-records
> 4. save
> 
> If two instances do this at once, hilarity ensues: all the old records of the 
> slower instance are deleted by the quicker one before the slower one gets to 
> save -- but after it started, so it tries to delete them itself, too; thus 
> _all_ the deletion operations of the slower instance one-by-one fail, throw 
> an exception, make me to 'forgetObject' and try again. Great.
> 
> I must be missing something pretty obvious -- there must be a considerably 
> better approach to this :-O
> 
> In cases like this, I have created a second application that does this sort 
> of processing and only allow a single instance of that to run.

Can't do that, alas -- any user of any instance must be able to do that.

> Otherwise, you can create a locking table in the database and get the lock 
> before importing and release it when done.  I use a separate application if 
> there is a lot of background daemon type processing to do.

Hmmm, I guess the locking table looks like a best solution -- thanks again!

All the best,
OC

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to