Don't lock by default in org.apache.cxf.jaxrs.model.AbstractResourceInfo#getProxyMap
@@ -177,6 +177,13 @@ public abstract class AbstractResourceInfo {
@SuppressWarnings("unchecked")
private <T> Map<Class<?>, Map<T, ThreadLocalProxy<?>>> getProxyMap(String prop, boolean create) {
+ // Avoid synchronizing on the bus for a ConcurrentHashMAp
+ if (bus.getProperties() instanceof ConcurrentHashMap) {
+ return (Map<Class<?>, Map<T, ThreadLocalProxy<?>>>) bus.getProperties().computeIfAbsent(prop, k ->
+ new ConcurrentHashMap<Class<?>, Map<T, ThreadLocalProxy<?>>>(2)
+ );
+ }
+
Object property = null;
synchronized (bus) {
property = bus.getProperty(prop);
