Assume we have a certain bean (for example a DAO) that will be used concurrently with many threads but will not have any class fields, only fields injected using @In (such as EntityManager)
An example
class SomeDAO { @In EntityManager entityManager; public Item getItem(int id) { return em.find(Item.class, id); } }
How would you implement this? What's the pros/cons of using an Application Scoped POJO vs a Stateless Session Bean?
I know Seam uses an invocation time IoC for Stateless Session Beans, is that true for POJOs too,or POJOs use good ol' instantiation time IoC?
Thanks,
Drew