AnsweredAssumed Answered

Asynchronous tasks

Question asked by agatap on Jun 26, 2008
I need to do a job asynchronously - I have a webscript that is notified that a (big) document is ready for upload. I don't want to block the webscript thread with the big upload.
So I decided to create a "requestnode" - which extends the sys:base node, store meta-data there, and have a custom behavior triggered when the "requestnode" is created.
My behavior is a Java class, that implements the NodeServicePolicies.OnCreateNodePolicy for my custom type.
So far so good, I get my behavior triggered … but it happens in the webscript thread, ie before executeImpl method returns  :cry:  :cry:  :cry:
That was not what I wanted.
My impression was that the behaviors / policies were an event model.
So my question is: how can I implement a custom behavior, that happens asynchronously?

Best,
Agata

Outcomes