/** * Destroys the context */ protected void destroy() { ContextLogger.LOG.contextCleared(this); final BeanStore beanStore = getBeanStore(); if (beanStore == null) { throw ContextLogger.LOG.noBeanStoreAvailable(this); } for (BeanIdentifier id : beanStore) { destroyContextualInstance(beanStore.get(id)); } beanStore.clear(); }
ContextualInstance<T> beanInstance = beanStore.get(id); if (beanInstance != null) { return beanInstance.getInstance(); try { if (multithreaded) { lock = beanStore.lock(id); beanInstance = beanStore.get(id); if (beanInstance != null) { return beanInstance.getInstance(); if (instance != null) { beanInstance = new SerializableContextualInstanceImpl<Contextual<T>, T>(contextual, instance, creationalContext, serviceRegistry.get(ContextualStore.class)); beanStore.put(id, beanInstance);
@Override public void cleanup() { super.cleanup(); beanStore.clear(); }
@Override public void destroy(Contextual<?> contextual) { if (!isActive()) { throw new ContextNotActiveException(); } checkContextInitialized(); if (contextual == null) { throw ContextLogger.LOG.contextualIsNull(); } final BeanStore beanStore = getBeanStore(); if (beanStore == null) { throw ContextLogger.LOG.noBeanStoreAvailable(this); } BeanIdentifier id = getId(contextual); ContextualInstance<?> beanInstance = beanStore.remove(id); if (beanInstance != null) { RequestScopedCache.invalidate(); destroyContextualInstance(beanInstance); } }
ContextualInstance<T> beanInstance = beanStore.get(id); if (beanInstance != null) { return beanInstance.getInstance(); try { if (multithreaded) { lock = beanStore.lock(id); beanInstance = beanStore.get(id); if (beanInstance != null) { return beanInstance.getInstance(); if (instance != null) { beanInstance = new SerializableContextualInstanceImpl<Contextual<T>, T>(contextual, instance, creationalContext, serviceRegistry.get(ContextualStore.class)); beanStore.put(id, beanInstance);
/** * Destroys the context */ protected void destroy() { ContextLogger.LOG.contextCleared(this); final BeanStore beanStore = getBeanStore(); if (beanStore == null) { throw ContextLogger.LOG.noBeanStoreAvailable(this); } for (BeanIdentifier id : beanStore) { destroyContextualInstance(beanStore.get(id)); } beanStore.clear(); }
@Override public void cleanup() { super.cleanup(); beanStore.clear(); }
@Override public void destroy(Contextual<?> contextual) { if (!isActive()) { throw new ContextNotActiveException(); } checkContextInitialized(); if (contextual == null) { throw ContextLogger.LOG.contextualIsNull(); } final BeanStore beanStore = getBeanStore(); if (beanStore == null) { throw ContextLogger.LOG.noBeanStoreAvailable(this); } BeanIdentifier id = getId(contextual); ContextualInstance<?> beanInstance = beanStore.remove(id); if (beanInstance != null) { RequestScopedCache.invalidate(); destroyContextualInstance(beanInstance); } }
ContextualInstance<T> beanInstance = beanStore.get(id); if (beanInstance != null) { return beanInstance.getInstance(); try { if (multithreaded) { lock = beanStore.lock(id); beanInstance = beanStore.get(id); if (beanInstance != null) { return beanInstance.getInstance(); if (instance != null) { beanInstance = new SerializableContextualInstanceImpl<Contextual<T>, T>(contextual, instance, creationalContext, serviceRegistry.get(ContextualStore.class)); beanStore.put(id, beanInstance);
/** * Destroys the context */ protected void destroy() { ContextLogger.LOG.contextCleared(this); final BeanStore beanStore = getBeanStore(); if (beanStore == null) { throw ContextLogger.LOG.noBeanStoreAvailable(this); } for (BeanIdentifier id : beanStore) { destroyContextualInstance(beanStore.get(id)); } beanStore.clear(); }
@Override public void cleanup() { super.cleanup(); beanStore.clear(); }
@Override public void destroy(Contextual<?> contextual) { if (!isActive()) { throw new ContextNotActiveException(); } checkContextInitialized(); if (contextual == null) { throw ContextLogger.LOG.contextualIsNull(); } final BeanStore beanStore = getBeanStore(); if (beanStore == null) { throw ContextLogger.LOG.noBeanStoreAvailable(this); } BeanIdentifier id = getId(contextual); ContextualInstance<?> beanInstance = beanStore.remove(id); if (beanInstance != null) { RequestScopedCache.invalidate(); destroyContextualInstance(beanInstance); } }
ContextualInstance<T> beanInstance = beanStore.get(id); if (beanInstance != null) { return beanInstance.getInstance(); try { if (multithreaded) { lock = beanStore.lock(id); beanInstance = beanStore.get(id); if (beanInstance != null) { return beanInstance.getInstance(); if (instance != null) { beanInstance = new SerializableContextualInstanceImpl<Contextual<T>, T>(contextual, instance, creationalContext, serviceRegistry.get(ContextualStore.class)); beanStore.put(id, beanInstance);
/** * Destroys the context */ protected void destroy() { ContextLogger.LOG.contextCleared(this); final BeanStore beanStore = getBeanStore(); if (beanStore == null) { throw ContextLogger.LOG.noBeanStoreAvailable(this); } for (BeanIdentifier id : beanStore) { destroyContextualInstance(beanStore.get(id)); } beanStore.clear(); }