1 Reply Latest reply on Jan 26, 2013 1:47 PM by Ales Justin

    @Inject in Custom JBoss Module

    jbossuser123 jboss123 Newbie

      I have the following in a custom module:



          import javax.inject.Inject;

          import org.slf4j.Logger;





          private Logger logger;





      In my module.xml i have the following dependencies:




           <module name="javaee.api"/>

           <module name="org.slf4j"/>

           <module name="javax.inject.api"/>

           <module name="javax.api"/>







      The logger above is never set however if i do the following i can create the logger:

      Logger logger2 = LoggerFactory.getLogger(this.getClass());



      Does CDI work in Custom modules or am i missing something here?