2 Replies Latest reply on Oct 9, 2010 11:18 AM by Ondrej Zizka

    Why a simple @Stateless depends on EJBTimerService?

    Ondrej Zizka Master

      Hi,

       

      please why this

       

      import javax.annotation.Resource;
      import javax.ejb.Stateless;
      import javax.ejb.LocalBean;
      
      @Stateless
      @LocalBean
      
      public class MySessionBean {
      
          private int injectedValue = 0;
          
          @Resource
          public void setInjectedValue(int injectedValue) {
              this.injectedValue = injectedValue;
          }
      
      }
      

       

      depends on the EJBTimerService?

       

      18:07:06,918 WARN  [ResourceHandler] Not injecting injectedValue, no matching enc injector env/org.jboss.qa.simpleejb31.MySessionBean/injectedValue found
      18:07:06,923 INFO  [JBossASKernel] Created KernelDeployment for: SimpleEJB-31.jar
      18:07:06,925 INFO  [JBossASKernel] installing bean: jboss.j2ee:jar=SimpleEJB-31.jar,name=MySessionBean,service=EJB3
      18:07:06,925 INFO  [JBossASKernel]   with dependencies:
      18:07:06,925 INFO  [JBossASKernel]   and demands:
      18:07:06,925 INFO  [JBossASKernel]      jboss.ejb:service=EJBTimerService
      18:07:06,925 INFO  [JBossASKernel]   and supplies:
      18:07:06,925 INFO  [JBossASKernel]      jndi:MySessionBean/remote
      18:07:06,925 INFO  [JBossASKernel] Added bean(jboss.j2ee:jar=SimpleEJB-31.jar,name=MySessionBean,service=EJB3) to KernelDeployment of: SimpleEJB-31.jar
      

       

      AS 6 M2. Might happen in the older versions too, haven't tried.

       

      Thanks, Ondra