4 Replies Latest reply on Nov 17, 2013 10:37 AM by Ralf Battenfeld

    CDI Injection into a Batch Artifact (ItemReader)

    Ralf Battenfeld Apprentice

      Hi

       

      I am trying to learn the new batch feature using WildFly 8.0.0-Beta1. Is it possible that CDI injections into for example an ItemReader is not supported at the moment?

       

      This is the ItemReader class:

       

      @Named

      public class RcfItemReader extends AbstractItemReader {

       

           // singleton

           @Inject @IRcfTaskProducerQualifier

           TaskProducerBean _taskProducerBean;

         

           @Override

           public BlockingDeque<ITask> readItem() throws Exception {

               return _taskProducerBean.getTasks();

           }

      }

       

      Injection of the Singleton works in other managed beans but not in this scenario.

       

      Regards,

      Ralf