Discussions

General J2EE: Java EE 5: How to inject DAO Impl in Session Bean

  1. This is the first time i'll be working with Java EE 5, I come from a Spring background and was wondering if you can inject a dao implementation into a stateless session bean? I'm using Glassfish 2 UR2 Thanks. Regards, Jan Michael Tan
  2. Well i am also from a spring back ground. I havnt worked on EJB. We use depenency injection to give dependencies. I will also like to know how we can do this in EJB. One more thing i don't know EJB.But worked on Spring. How to get started with EJB.. Thanks
  3. Simply use the @EJB annotation at your dao-declaration in your session bean. /N