Re: Wait for the triggerEvent to finish

2014-07-16 Thread Dmitry Gusev
In your logs can you see if your methods invoked in the same thread or not? Look at thread ids On Wednesday, July 16, 2014, Boris Horvat wrote: > In my logs I could see that method that was triggered by the triggerEvent() > was still running when onSuccess event was handled. So I got the impress

Re: Wait for the triggerEvent to finish

2014-07-16 Thread Lance Java
So far, you have not given us enough detail to help. Please show us how the form is being submitted and the serverside event handler. On 15 Jul 2014 23:45, "Boris Horvat" wrote: > In my logs I could see that method that was triggered by the triggerEvent() > was still running when onSuccess event

Re: Wait for the triggerEvent to finish

2014-07-15 Thread Boris Horvat
In my logs I could see that method that was triggered by the triggerEvent() was still running when onSuccess event was handled. So I got the impression that triggerEvent method is not blocking...but if it is then my problem is somewhere else I guess, right? On Sun, Jul 13, 2014 at 7:02 PM, Dmitry

Re: Wait for the triggerEvent to finish

2014-07-13 Thread Dmitry Gusev
Hi Boris, resources.triggerEvent() is a blocking operation, so all callbacks will be invoked during this call. Hence it's not clear what you mean by saying "refresh is faster then processing of the event". Can you tell us who is calling the triggerEvent method? And what are you trying to do by

Re: Wait for the triggerEvent to finish

2014-07-13 Thread Boris Horvat
How can one wait on the client side? Where can I read up a bit about that? I was always under the impression that onSucess event is triggered automatically after the form is submitted it (it is simply part of the chain) so how can I state at the client side proceed with the processing but wait till

Re: Wait for the triggerEvent to finish

2014-07-12 Thread Lance Java
The proper way to solve this is to wait on the client. Only trigger onSuccess after the first event has finished. It's hard to help much more without a bit more info. If that's not possible (I doubt) then you can wait serverside. The first event could put an AtomicBoolean or CountDownLatch onto th

Wait for the triggerEvent to finish

2014-07-12 Thread Boris Horvat
Hi everyone, I have a component that triggers the event, once the event is triggered, it will go to OnSuccess method that will try to refresh the zone as you can see below private CaptureResultCallback triggerEvent(Object value, Object[] context) { CaptureResultCallback callback = new Ca