0 Replies Latest reply on May 11, 2008 4:24 AM by Drew Kutchar

    Application Scoped POJO vs Stateless Session Bean

    Drew Kutchar Newbie

      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 {
          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?