[jboss-jira] [JBoss JIRA] Commented: (JBAS-7627) Injectiing TimerService or Session context fails

Carlo de Wolf (JIRA) jira-events at lists.jboss.org
Mon Jan 18 05:00:50 EST 2010


    [ https://jira.jboss.org/jira/browse/JBAS-7627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12506552#action_12506552 ] 

Carlo de Wolf commented on JBAS-7627:
-------------------------------------

TimerService references must be injected from java:comp/TimerService (EJB 3.0 / 3.1 16.14), so it appears Weld is looking up the wrong thing.

> Injectiing TimerService or Session context fails
> ------------------------------------------------
>
>                 Key: JBAS-7627
>                 URL: https://jira.jboss.org/jira/browse/JBAS-7627
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: EJB3, Weld/CDI
>    Affects Versions: JBossAS-6.0.0.M1
>         Environment: Windows Vista x86_64, JDK1.6.0_17
>            Reporter: Nikolay Elenkov
>            Assignee: Carlo de Wolf
>
> Injection using @Resource fails with this exception:
> java.lang.RuntimeException: Error resolving property asyncTest against base null
> 	org.jboss.weld.el.AbstractWeldELResolver.getValue(AbstractWeldELResolver.java:120)
> 	org.jboss.weld.integration.webtier.jsf.ForwardingELResolver.getValue(ForwardingELResolver.java:51)
> 	javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
> 	com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
> ...
> caused by
> java.lang.RuntimeException: Error looking up java:/comp/env/weldtest.weldjsf.AsyncTest/timerService in JNDI
> 	org.jboss.weld.injection.spi.helpers.AbstractResourceServices.resolveResource(AbstractResourceServices.java:38)
> 	org.jboss.weld.util.Beans.injectEEFields(Beans.java:692)
> 	org.jboss.weld.bean.ManagedBean$1$1.proceed(ManagedBean.java:218)
> 	org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:51)
> Code:
> @Stateless
> public class AsyncTest {
>     @Resource
>     private TimerService timerService;
>    @Resource
>    private SessionContext sessionContext
> According to Nicklas Karlsson this is a 'bug in the integration where JBoss reports to Weld on which EJB:s are available where' (see forum link)
> 	

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list