@Override public void clearAndSet(Collection<ContextualInstance<?>> setOfInstances) { // bound context can be multithreaded, in such case we perform locking BoundBeanStore boundBeanStore = getBeanStore(); boundBeanStore.clear(); for (ContextualInstance<?> contextualInstance : setOfInstances) { BeanIdentifier id = getId(contextualInstance.getContextual()); LockedBean lock = null; try { if (isMultithreaded()) { lock = boundBeanStore.lock(id); } getBeanStore().put(getId(contextualInstance.getContextual()), contextualInstance); } finally { if (lock != null) { lock.unlock(); } } } } }
@Override public void clearAndSet(Collection<ContextualInstance<?>> setOfInstances) { // bound context can be multithreaded, in such case we perform locking BoundBeanStore boundBeanStore = getBeanStore(); boundBeanStore.clear(); for (ContextualInstance<?> contextualInstance : setOfInstances) { BeanIdentifier id = getId(contextualInstance.getContextual()); LockedBean lock = null; try { if (isMultithreaded()) { lock = boundBeanStore.lock(id); } getBeanStore().put(getId(contextualInstance.getContextual()), contextualInstance); } finally { if (lock != null) { lock.unlock(); } } } } }
@Override public void clearAndSet(Collection<ContextualInstance<?>> setOfInstances) { // bound context can be multithreaded, in such case we perform locking BoundBeanStore boundBeanStore = getBeanStore(); boundBeanStore.clear(); for (ContextualInstance<?> contextualInstance : setOfInstances) { BeanIdentifier id = getId(contextualInstance.getContextual()); LockedBean lock = null; try { if (isMultithreaded()) { lock = boundBeanStore.lock(id); } getBeanStore().put(getId(contextualInstance.getContextual()), contextualInstance); } finally { if (lock != null) { lock.unlock(); } } } } }
@Override public void clearAndSet(Collection<ContextualInstance<?>> setOfInstances) { BoundBeanStore boundBeanStore = getBeanStore(); // for instance lazily initialized conversation scope may be active but have null here if (boundBeanStore != null) { boundBeanStore.clear(); for (ContextualInstance<?> contextualInstance : setOfInstances) { // bound context can be multithreaded, in such case we perform locking BeanIdentifier id = getId(contextualInstance.getContextual()); LockedBean lock = null; try { if (isMultithreaded()) { lock = boundBeanStore.lock(id); } getBeanStore().put(getId(contextualInstance.getContextual()), contextualInstance); } finally { if (lock != null) { lock.unlock(); } } } } } }
@Override public void clearAndSet(Collection<ContextualInstance<?>> setOfInstances) { BoundBeanStore boundBeanStore = getBeanStore(); // for instance lazily initialized conversation scope may be active but have null here if (boundBeanStore != null) { boundBeanStore.clear(); for (ContextualInstance<?> contextualInstance : setOfInstances) { // bound context can be multithreaded, in such case we perform locking BeanIdentifier id = getId(contextualInstance.getContextual()); LockedBean lock = null; try { if (isMultithreaded()) { lock = boundBeanStore.lock(id); } getBeanStore().put(getId(contextualInstance.getContextual()), contextualInstance); } finally { if (lock != null) { lock.unlock(); } } } } } }
} finally { if (lock != null) { lock.unlock();
} finally { if (lock != null) { lock.unlock();
} finally { if (lock != null) { lock.unlock();
} finally { if (lock != null) { lock.unlock();
} finally { if (lock != null) { lock.unlock();