[ 
https://issues.apache.org/jira/browse/DELTASPIKE-703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14114922#comment-14114922
 ] 

Jozef Hartinger commented on DELTASPIKE-703:
--------------------------------------------

beanManager.getContext(RequestScoped.class).isActive() is not correct as 
getContext() will throw ContextNotActiveException if there is no active context 
object for the given scope

the correct version would be

{code:JAVA}
try {
   return beanManager.getContext(RequestScoped.class).isActive();
} catch (ContextNotActiveException ignored) {
   return false;
}
{code}

> Add #isScopeActive to ContextControl
> ------------------------------------
>
>                 Key: DELTASPIKE-703
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-703
>             Project: DeltaSpike
>          Issue Type: New Feature
>          Components: CdiControl
>            Reporter: Thomas Andraschko
>            Priority: Minor
>
> to allwow e.g.
> ctr.isScopeActive(SessionScoped.class);



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to