/** * Gets an active context of the given scope. Throws an exception if there are no active contexts found or if there are too many matches * * @throws IllegalStateException if there are multiple active scopes for a given context * @param scopeType The scope to match * @return A single active context of the given scope * @see javax.enterprise.inject.spi.BeanManager#getContext(java.lang.Class) */ @Override public Context getContext(Class<? extends Annotation> scopeType) { Context activeContext = internalGetContext(scopeType); if (activeContext == null) { throw BeanManagerLogger.LOG.contextNotActive(scopeType.getName()); } return activeContext; }
/** * Gets an active context of the given scope. Throws an exception if there are no active contexts found or if there are too many matches * * @throws IllegalStateException if there are multiple active scopes for a given context * @param scopeType The scope to match * @return A single active context of the given scope * @see javax.enterprise.inject.spi.BeanManager#getContext(java.lang.Class) */ @Override public Context getContext(Class<? extends Annotation> scopeType) { Context activeContext = internalGetContext(scopeType); if (activeContext == null) { throw BeanManagerLogger.LOG.contextNotActive(scopeType.getName()); } return activeContext; }
/** * Gets an active context of the given scope. Throws an exception if there are no active contexts found or if there are too many matches * * @throws IllegalStateException if there are multiple active scopes for a given context * @param scopeType The scope to match * @return A single active context of the given scope * @see javax.enterprise.inject.spi.BeanManager#getContext(java.lang.Class) */ @Override public Context getContext(Class<? extends Annotation> scopeType) { Context activeContext = internalGetContext(scopeType); if (activeContext == null) { throw BeanManagerLogger.LOG.contextNotActive(scopeType.getName()); } return activeContext; }
/** * Gets an active context of the given scope. Throws an exception if there * are no active contexts found or if there are too many matches * * @throws IllegalStateException if there are multiple active scopes for a given context * @param scopeType The scope to match * @return A single active context of the given scope * @see javax.enterprise.inject.spi.BeanManager#getContext(java.lang.Class) */ @Override public Context getContext(Class<? extends Annotation> scopeType) { Context activeContext = internalGetContext(scopeType); if (activeContext == null) { throw BeanManagerLogger.LOG.contextNotActive(scopeType.getName()); } return activeContext; }
/** * Gets an active context of the given scope. Throws an exception if there are no active contexts found or if there are too many matches * * @throws IllegalStateException if there are multiple active scopes for a given context * @param scopeType The scope to match * @return A single active context of the given scope * @see javax.enterprise.inject.spi.BeanManager#getContext(java.lang.Class) */ @Override public Context getContext(Class<? extends Annotation> scopeType) { Context activeContext = internalGetContext(scopeType); if (activeContext == null) { throw BeanManagerLogger.LOG.contextNotActive(scopeType.getName()); } return activeContext; }
/** * Gets an active context of the given scope. Throws an exception if there are no active contexts found or if there are too many matches * * @throws IllegalStateException if there are multiple active scopes for a given context * @param scopeType The scope to match * @return A single active context of the given scope * @see javax.enterprise.inject.spi.BeanManager#getContext(java.lang.Class) */ @Override public Context getContext(Class<? extends Annotation> scopeType) { Context activeContext = internalGetContext(scopeType); if (activeContext == null) { throw BeanManagerLogger.LOG.contextNotActive(scopeType.getName()); } return activeContext; }
@Override public void deactivate() throws ContextNotActiveException { if (!isRequestContextActive()) { throw BeanManagerLogger.LOG.contextNotActive(RequestScoped.class); } if (isActivator.compareAndSet(true, false)) { try { requestBeforeDestroyedEvent.fire(toString()); requestContext.invalidate(); requestContext.deactivate(); } finally { requestDestroyedEvent.fire(toString()); } } }
@Override public void deactivate() throws ContextNotActiveException { if (!isRequestContextActive()) { throw BeanManagerLogger.LOG.contextNotActive(RequestScoped.class); } if (isActivator.compareAndSet(true, false)) { try { requestBeforeDestroyedEvent.fire(toString()); requestContext.invalidate(); requestContext.deactivate(); } finally { requestDestroyedEvent.fire(toString()); } } }
@Override public void deactivate() throws ContextNotActiveException { if (!isRequestContextActive()) { throw BeanManagerLogger.LOG.contextNotActive(RequestScoped.class); } if (isActivator.compareAndSet(true, false)) { try { requestBeforeDestroyedEvent.fire(toString()); requestContext.invalidate(); requestContext.deactivate(); } finally { requestDestroyedEvent.fire(toString()); } } }
@Override public void deactivate() throws ContextNotActiveException { if (!isRequestContextActive()) { throw BeanManagerLogger.LOG.contextNotActive(RequestScoped.class); } if (isActivator.compareAndSet(true, false)) { try { requestBeforeDestroyedEvent.fire(toString()); requestContext.invalidate(); requestContext.deactivate(); } finally { requestDestroyedEvent.fire(toString()); } } }
@Override public void deactivate() throws ContextNotActiveException { if (!isRequestContextActive()) { throw BeanManagerLogger.LOG.contextNotActive(RequestScoped.class); } if (isActivator.compareAndSet(true, false)) { try { requestBeforeDestroyedEvent.fire(toString()); requestContext.invalidate(); requestContext.deactivate(); } finally { requestDestroyedEvent.fire(toString()); } } }