[
https://issues.apache.org/jira/browse/DELTASPIKE-805?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thomas Andraschko updated DELTASPIKE-805:
-----------------------------------------
Description:
public boolean isContextActive(Class<? extends Annotation>
scopeAnnotationClass)
{
try
{
BeanManager beanManager =
BeanManagerProvider.getInstance().getBeanManager();
if (beanManager.getContext(scopeAnnotationClass) == null ||
!beanManager.getContext(scopeAnnotationClass).isActive())
{
return false;
}
}
catch (ContextNotActiveException cnae)
{
return false;
}
return true;
}
Any idea where i could add this method?
was:
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?
> 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>
> scopeAnnotationClass)
> {
> try
> {
> BeanManager beanManager =
> BeanManagerProvider.getInstance().getBeanManager();
> if (beanManager.getContext(scopeAnnotationClass) == null ||
> !beanManager.getContext(scopeAnnotationClass).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)