Use the QName of a service as part of the cache key
Conflicts:
rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/ab06aaec
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/ab06aaec
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/ab06aaec
Branch: refs/heads/2.7.x-fixes
Commit: ab06aaec07034e736d4452e75543432c008bc727
Parents: 827cf6b
Author: Colm O hEigeartaigh <[email protected]>
Authored: Mon Mar 3 12:35:24 2014 +0000
Committer: Colm O hEigeartaigh <[email protected]>
Committed: Mon Mar 3 12:46:36 2014 +0000
----------------------------------------------------------------------
.../cxf/ws/security/policy/interceptors/NegotiationUtils.java | 6 +-----
.../main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java | 6 +-----
2 files changed, 2 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/ab06aaec/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/NegotiationUtils.java
----------------------------------------------------------------------
diff --git
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/NegotiationUtils.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/NegotiationUtils.java
index 82aee34..b236395 100644
---
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/NegotiationUtils.java
+++
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/NegotiationUtils.java
@@ -19,7 +19,6 @@
package org.apache.cxf.ws.security.policy.interceptors;
-import java.math.BigInteger;
import java.util.Collection;
import java.util.List;
@@ -67,7 +66,6 @@ import
org.apache.ws.security.conversation.ConversationException;
import org.apache.ws.security.handler.WSHandlerConstants;
import org.apache.ws.security.handler.WSHandlerResult;
import org.apache.ws.security.message.token.SecurityContextToken;
-import org.apache.xml.security.utils.Base64;
/**
* This is a collection of utility methods for use in negotiation exchanges
such as WS-SecureConversation
@@ -114,9 +112,7 @@ public final class NegotiationUtils {
TokenStoreFactory tokenStoreFactory =
TokenStoreFactory.newInstance();
String cacheKey = SecurityConstants.TOKEN_STORE_CACHE_INSTANCE;
if (info.getName() != null) {
- int hashCode = info.getName().toString().hashCode();
- cacheKey +=
- "-" +
Base64.encode(BigInteger.valueOf((long)hashCode));
+ cacheKey += "-" + info.getName().toString();
}
tokenStore = tokenStoreFactory.newTokenStore(cacheKey,
message);
info.setProperty(SecurityConstants.TOKEN_STORE_CACHE_INSTANCE,
tokenStore);
http://git-wip-us.apache.org/repos/asf/cxf/blob/ab06aaec/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java
----------------------------------------------------------------------
diff --git
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java
index 5407a4e..5e1b967 100644
---
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java
+++
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java
@@ -18,7 +18,6 @@
*/
package org.apache.cxf.ws.security.wss4j;
-import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -34,7 +33,6 @@ import org.apache.ws.security.WSConstants;
import org.apache.ws.security.WSSecurityEngineResult;
import org.apache.ws.security.WSSecurityException;
import org.apache.ws.security.cache.ReplayCache;
-import org.apache.xml.security.utils.Base64;
/**
* Some common functionality that can be shared between the WSS4JInInterceptor
and the
@@ -100,9 +98,7 @@ public final class WSS4JUtils {
ReplayCacheFactory replayCacheFactory =
ReplayCacheFactory.newInstance();
String cacheKey = instanceKey;
if (info.getName() != null) {
- int hashCode = info.getName().toString().hashCode();
- cacheKey +=
- "-" +
Base64.encode(BigInteger.valueOf((long)hashCode));
+ cacheKey += "-" + info.getName().toString();
}
replayCache = replayCacheFactory.newReplayCache(cacheKey,
message);
info.setProperty(instanceKey, replayCache);