1 Reply Latest reply on Jul 10, 2011 1:01 AM by Ro Chap

    The @EJB vs @Inject

    Ro Chap Newbie

      Hi,


      In the Weld Translator example, the Translator EJB is injected using the @EJB annotation:



      public class TextTranslator implements Serializable { 
      
         private SentenceParser sentenceParser; 
      
         @EJB private Translator translator; 
      
         @Inject public TextTranslator(SentenceParser sentenceParser) { 
            this.sentenceParser = sentenceParser; 
         }
      }





      Would it be possible to use the @Inject annotation instead?