On Wednesday, May 09, 2012 05:01:33 PM Jérôme Revillard wrote:
> Le 09/05/2012 16:49, Daniel Kulp a écrit :
> > Right.  But lockObject is an instance variable.  However, there is
> > likely
> > only a single instance of the interceptor.   So, let's say you have two
> > requests coming in:
> > 
> > Request 1 calls  getLockObject() which returns a lock, it locks it
> > (increase to 1) and continues.....
> > 
> > Request 2 comes in, calls getLockObject() which this time returns null.
> > 
> > Now, on Request1 thread, some exception occurs.   In handleFault,
> > lockObject is null, no unlock occurs.  That's really why any lock
> > object that a request uses should be stuck on the message/exchange. 
> > Avoid instance variable if possible.
> 
> Just to be clear: Do you mean that there is only 1 interceptor instance
> for all the requests to a web service ? I was thinking that there was 1
> new instance for each call ?

In general, it is one for all requests to the service.   Depending on how 
it's configured, it could be one for all requests to all services.   So no, 
definitely NOT one instance per call.

Dan


> 
> Best,
> Jerome
> 
> > Dan
> > 
> >> To be a bit more precise, the problem is that, at some point, I get log
> >> messages that says that the lock value is 1, 2, 3 etc... even if there
> >> is no more interaction with the web service. This means that "unlock()"
> >> in one use case is not called... and I cannot identified this use case.
> >> 
> >> What if the Web Service raise an error what is the Output Chain ?
> > 
> > Daniel Kulp
> > [email protected] - http://dankulp.com/blog
> > Talend Community Coder - http://coders.talend.com
-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to