What You Can Do With EJB3 (part one)
As this article shows EJB 3.0 is definitely a major improvement over EJB 2.x. In particular the support for dependency injection is particularly valuable but does it extend to non-EJB classes?
I stopped writing monolithic session beans a long time ago. I would, for example, want to move the query to find the items into a repository class (see domain-driven design), e.g. ItemRepository.getItemSummaries() . The session bean would then be configured with the repository through dependency injection. I would also want to configure the ItemRepository with the EntityManager through dependency injection. I can do this today with JDO/Hibernate and Spring/PicoContainer. Can I do this with EJB 3.0?
Also, what about being able to test the persistent classes outside of the container as you can today with JDO or Hibernate? e.g with test cases that use Hsqldb and DbUnit?