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

Romain Manni-Bucau commented on TOMEE-1874:
-------------------------------------------

+1, we should likely add a Lock to AppContext and use that at deploy and 
undeploy times

> Do not inject CDI if the application is being undeployed
> --------------------------------------------------------
>
>                 Key: TOMEE-1874
>                 URL: https://issues.apache.org/jira/browse/TOMEE-1874
>             Project: TomEE
>          Issue Type: Bug
>            Reporter: Andy Gumbrecht
>            Priority: Minor
>
> Somewhere around StatelessInstanceManager.createInstance there should be 
> check a check to see if the application is being undeployed.
> The following stacktrace snippet is written to the logs multiple times during 
> an undeploy, as the pool tries to fill.
> at 
> org.apache.webbeans.util.InjectionExceptionUtil.throwUnsatisfiedResolutionException(InjectionExceptionUtil.java:60)
>       at 
> org.apache.webbeans.container.InjectionResolver.getInjectionPointBean(InjectionResolver.java:250)
>       at 
> org.apache.webbeans.inject.AbstractInjectable.inject(AbstractInjectable.java:76)
>       at 
> org.apache.webbeans.inject.InjectableField.doInjection(InjectableField.java:65)
>       at 
> org.apache.webbeans.portable.InjectionTargetImpl.injectFields(InjectionTargetImpl.java:208)
>       at 
> org.apache.webbeans.portable.InjectionTargetImpl.inject(InjectionTargetImpl.java:194)
>       at 
> org.apache.webbeans.portable.InjectionTargetImpl.inject(InjectionTargetImpl.java:184)
>       at 
> org.apache.openejb.cdi.CdiEjbBean$EjbInjectionTargetImpl.inject(CdiEjbBean.java:388)
>       at org.apache.openejb.BeanContext.inject(BeanContext.java:1660)
>       at org.apache.openejb.BeanContext.newInstance(BeanContext.java:1489)
>       at 
> org.apache.openejb.core.stateless.StatelessInstanceManager.createInstance(StatelessInstanceManager.java:207)
>       at 
> org.apache.openejb.core.stateless.StatelessInstanceManager.access$200(StatelessInstanceManager.java:72)
>       at 
> org.apache.openejb.core.stateless.StatelessInstanceManager$StatelessSupplier.create(StatelessInstanceManager.java:151)
>       at 
> org.apache.openejb.core.stateless.StatelessInstanceManager$StatelessSupplier.create(StatelessInstanceManager.java:127)
>       at org.apache.openejb.util.Pool$Replace.run(Pool.java:847)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>       at java.lang.Thread.run(Thread.java:745)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to