title: What is the difference between @Inject and @EJB
body: <p>I'm currently learning the new Java EE 6 component models and am confused with the latest dependency injection mechanism. So here are my questions:</p>
  
  <p>1) What is the difference between @Inject and @EJB</p>
  
  <p>2) If I have a simple POJO that contains another POJOs (which one of them is the DAO code), what would be the better choice: @Inject or @EJB?</p>
  
  <p>Can I mix @Inject and @EJB?</p>
  
  <p>An example would be: </p>
  
  <ul>
  <li><p>ClassA implements InterfaceA and has
  an instance of ClassA_Adaptor</p></li>
  <li><p>ClassA_Adaptor implements InterfaceAB
  and has an instance of ClassB</p></li>
  <li><p>ClassB implements InterfaceB and has
  an instance of ClassB_Adaptor and an
  instance DAO_ClassB</p></li>
  <li><p>ClassB_Adaptor implements InterfaceB
  and has an instance of ClassC</p></li>
  <li><p>ClassC implements InterfaceBC and has
  an instance of WebService_ClassC</p></li>
  <li><p>DAO_ClassB will use JPA 2.0
  (@PersistenceContext)</p></li>
  </ul>
  
  <p>I'd like to inject all of them including the DAO and the WebService.</p>
  
  <p>3) Is it a bad approach to only use transactional for certain operations but not for all? </p>
  
  <p>As an example: Some methods in DAO_ClassB are your typical query, while other methods are "write" methods. Is it bad to not wrap the "READ" methods with transaction?</p>
  
  <p>To my understanding, the DAO_ClassB can be wrapped with transaction using @EJB (inject the DAO_ClassB and make all methods transactional). How can I control it?</p>
  
  <p>Sorry if some of the questions are confusing because I know only bits and pieces of the Java EE 6 new component model.</p>