Hi all !

I am having troubles designing a specific need.
I would like to add a progress bar for long running tasks.
I found that ERXLongResponse and its task could be a good thing for me (more flexible than the WOLongResponsePage).

Here is what I understood from such a process :
I need to create a new editing context in the performAction since it runs in a separate thread
I need to lock it

My issue is that I want to do my long task in a child editing context (I don't want to commit changes to the db but in the child ec).
So I used this call : 
EOEditingContext ec = new EOEditingContext(childContext);

But if I lock such an editing context, I get a deadlock when my session is restored.
I am using MultiEcLockManager (at least its integrated in my code in case I want to use it ;-) ) AND ProjectWonder
Since I use project wonder I think my ECs are ERXECs (my session extends ERXSession)

I am a bit confused about all those locking issues.

I have nothing against just using ProjectWonder and its ERXEC, if I do so, do I still need to lock/unlock the ec (defaultEditingContext().lock() ?) in session's awake/sleep?
Would I have the same benefits as using MultiEcLockManager?
Does an ERXEC created from a ERXEC.newEditingContext(); call needs locking if its used in a separate thread ?
Is there anything different if the call is ERXEC.newEditingContext(childContext); ?
In general, when does an EC needs to get locked manually (supposing we have er.extensions.ERXEC.defaultAutomaticLockUnlock = false) ?

Thanks to anyone who could help !

Fabrice


www.easyshadow.com


International Corporate Consulting

Palais de la Scala

1 avenue Henri Dunant

Suite 1155

MC - 98000 Monaco


Skype: fabrice.pipart

Tel.  +377 97 98 21 04 (direct)

Fax. +377 97 70 88 07



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

This email sent to [email protected]

Reply via email to