1 Reply Latest reply on Dec 16, 2011 10:29 AM by Roger Mori

    more problems with injection

    gebuh Newbie

      I've had problems in the past trying to inject entityManager, outside of entityHome I cannot do it.  I can use Component.getInstance, but not injection.  I still have no reason or solution to this problem.
      I just use the workaround.  But now I have something THAT doesn't even work for.  WTH am I doing wrong? 
      I created a Quartz Scheduler and a processor.  The scheduler is annotated with:



      @Name("controller")
      @Scope(APPLICATION)
      @AutoCreate
      @Startup



      The schedule method is:



      @Create
          public void scheduleTimer() {
               log.debug("starting quartz timer");
      //         quartzTestTriggerHandle = ((TqiEmailNotificationProcessor)Component.getInstance("tqiEmailNotificationProcessor"))
      //              .testQuartzTestTimer(TqiEmailNotificationProcessor.EXPIRATION_DATE, TEST_INTERVAL);
               // TODO WTF???? WHY CAN'T I INJECT THIS????!!!!
               quartzTestTriggerHandle =
                    tqiEmail.testQuartzTestTimer(TqiEmailNotificationProcessor.EXPIRATION_DATE, TEST_INTERVAL);
           }



      The processor is annotated with:



      @AutoCreate
      @Name("tqiEmailNotificationProcessor")
      @Scope(ScopeType.APPLICATION)



      But starting my server fails because tqiEmail is always null.  No matter how I do the annotation.
      My application is deployed in a WAR I'm using POJOs
      This is getting beyond ridiculous.  Are there some obscure Seam rules that I'm missing?  I've tried with and without a constructor, nothing.
      I'm using seam2.2, jboss 5.1