3 Replies Latest reply on Dec 22, 2009 10:57 PM by stefanotravelli

    org.jboss.seam.postInitialization

    baz

      Hello,


      i do not fully understand the behaviour of org.jboss.seam.postInitialization. :-(


      It seams to works with EJBs but not with Pojos


      What we have is a pojo (LoadData) where a method is anotated:



           @Observer("org.jboss.seam.postInitialization")
           public void createData() {
                setTranslations();
                insertContracts();
                insertPersons();
                insertServiceCenterFeatures();
                insertCatalogScopes();
                insertAssociations();
          }
      



      The method setTranslations calls an EJB Service (this service calls a pojo dao) which persists data to database. This is working. The other methods are calling pojo daos, and these do not persist to database:-(


      After turning the pojo (LoadData) into a SLSB by defining a local Interface and putting in the @Stateless annotation all Daos persist to database.


      do not persist means: there is no hibernate activity in the log


      do persist means: we can see the insert statements in the log



      Can someone shed some light in here. Why is this not working with pojo Daos. Why must an EJB come in to call the pojo daos?


      Without any clue what is going on here,
      Carsten