Hi,
The CXF interceptor should be stateless, so I don't think you can put
this lock logic in interceptors.
And for your question why unlock() not get invoked sometime, that
could be that there's an exception before MyOutInterceptor get
invoked, so there's no easy way to guarantee that the unlock() always
get invoked if you put the lock logic into interceptors.
If you have to use this lock logic I suggest you save the lock in
Message.
Freeman
On 2012-5-9, at 下午3:23, Jerome Revillard wrote:
Dear all,
For our product, we created 2 specific interceptors (1 in and one
out). The
goal of those 2 interceptors is to "lock" some objects which will be
used
during the web service operation.
The InInterceptor is like this:
The OutInterceptor is like that:
As we consider that more than 1 operation can be handle in the same
time for
the same 'lockObject', the lock() and unlock() operation increase or
decrease an integer:
The problem that we are facing here is that, some time (we did not
manage to
catch it), the unlock() operation is not called and the system stay
locked.
Can somebody please tell me where the mistake is ? The goal is to be
100%
sure that the unlock operation will be call exactly 1 time (not 0
nor more)
if the lock operation has been called in the input interceptor.
Thanks for your help.
Best,
Jérôme
--
View this message in context:
http://cxf.547215.n5.nabble.com/Interceptors-behaviour-tp5696667.html
Sent from the cxf-user mailing list archive at Nabble.com.
---------------------------------------------
Freeman Fang
FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042