Thomas Andraschko created DELTASPIKE-805:
--------------------------------------------
Summary: Provide utils method to check if an context is active or
not
Key: DELTASPIKE-805
URL: https://issues.apache.org/jira/browse/DELTASPIKE-805
Project: DeltaSpike
Issue Type: Improvement
Components: Core
Reporter: Thomas Andraschko
Assignee: Thomas Andraschko
Fix For: 1.3.0
public boolean isContextActive(Class<? extends Annotation> clazz)
{
try
{
BeanManager beanManager =
BeanManagerProvider.getInstance().getBeanManager();
if (beanManager.getContext(clazz) == null ||
!beanManager.getContext(clazz).isActive())
{
return false;
}
}
catch (ContextNotActiveException cnae)
{
return false;
}
return true;
}
Any idea where i could add this method?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)