On 2011-1-26, at 上午9:06, barakka wrote:
Hello,
I've just noticed that using the IssuedTokenInterceptorProvider
along with
WS-RM breaks support for RM.
In particular, the problem is the following: the
IssuedTokenOutInterceptor
in the client stores the TOKEN and TOKEN_ID in the endpoint
(message
.getExchange().get(Endpoint.class).put(SecurityConstants.TOKEN_ID,
tok.getId()), line 147 in CXF 2.3.1). On the other hand, the
RMManager keeps
a map between the endpoints the reliable endpoints created. The key
of the
map is the Endpoint itself. Adding the token to the EndPoint changes
is
hashcode (as the endpoint is a map itself and its hashcode depends
on its
entries). As such, when the modified EndPoint is looked up in the
EndPoint-RME map, it is not found, and new RME is created and the
sequence
gets out of synch.
I was not able to understand why the token is stored in the
endpoint, as it
seems it never gets read from it (and, moreover, it is already
stored in the
token store). I've tried a modified version of the interceptor that
does not
store the token (nor the token id) and everything seems to work
correctly,
including the RMManager which is not able to complete the sequence.
Would it be safe to remove those lines? Should I create a JIRA issue
for
this and provide a patch?
Yeah, sounds like a bug.
Please create a JIRA issue and append your patch there.
Thanks
Freeman
Best,
Riccardo.
--
View this message in context:
http://cxf.547215.n5.nabble.com/IssuedTokenInterceptorProvider-breaks-ReliableMessaging-tp3357235p3357235.html
Sent from the cxf-user mailing list archive at Nabble.com.
--
Freeman Fang
------------------------
FuseSource: http://fusesource.com
blog: http://freemanfang.blogspot.com
twitter: http://twitter.com/freemanfang
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org