Hi,

That’s why for big or background processes, I create dedicated 
ObjectStoreCoordinator using :

ERXObjectStoreCoordinator _tmpObjectStoreCoordinator = new 
ERXObjectStoreCoordinator(true);

WOSession _localSession = new WOSession(_tmpObjectStoreCoordinator);
_localSession.setSelectedUtilisateur(_localSession.getUtilisateurSystem());
_localSession.defaultEditingContext().setUndoManager(null);
_localSession.defaultEditingContext().lock();

and opening with :

_localSession.defaultEditingContext().unlock();
_localSession.defaultEditingContext().dispose();
_localSession.terminate();

_tmpObjectStoreCoordinator.dispose();

It’s perfect for analysis and export ; for updates, don’t forget to refresh 
updated objects in DefaultEOObjectStore

Have a nice day,

Jérémy

Le 30 janv. 2024 à 17:27, OCsite via Webobjects-dev 
<Webobjects-dev@lists.apple.com> a écrit :

Hi guys,

I've got logs from one of our installations with a pretty weird problem.

We just happen to log immediately before ec.saveChanges() gets called; and we 
happen to have a 
DatabaseContextDelegate.databaseContextWillPerformAdaptorOperations, which logs 
out soon as it is called.

In this one log, the delay betw. those two logs — ie., the time saveChanges 
spends before the delegate method is called — repeatedly grows up to almost a 
minute (!) After some time the problem disappears and saving works normally; 
and then it occurs again. There's no other log around (most other threads wait 
on the OSC lock anyway), and with our app it so happens there's only one item 
in the adaptor op array to be inserted or updated.

Once or twice there even has been nothing to save at all (ie., no changes in 
the EC when saveChanges was called), but even so, saveChanges took almost a 
minute before it returned. Can't be 100 % sure, but most probably, it was the 
very same problem; it is highly probable thus it does not depend on the 
enterprise objects being saved, but on something else.

It never happened in any other installation of the same application, including 
my development one and our test one.

Have you ever bumped into something like that? Any idea what might be the 
culprit and how to hunt the bug?

Thanks a lot,
OC

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/jeremy.deroyer%40ingencys.net

This email sent to jeremy.dero...@ingencys.net

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

This email sent to arch...@mail-archive.com

Reply via email to