1 Reply Latest reply on Mar 5, 2007 11:49 PM by Gavin King

    Action + Facade + DAO Architecture And Seam

    David Alves Newbie

      Hi!

      I'm building an application usign seam but with a more traditional architecture having an Action layer that uses a facade layer that in turn uses a DAO layer.

      The reason for this is that I have a non-web interface that must also use the EJB tier and I would like to optimize code reuse.

      Usualy the action calls the facade that calls one or more daos.
      The entitymanager is injected normally into the daos.

      It all went well until I needed conversations. Now a conversational Action has an extended type PersistenceContext associated with it and I need to use this one in the DAOs to be able to make commit or rollback over the entire conversation when it ends.

      All the examples I've seen seem to incorporate all the JPA queries in the actions themselves.

      Is it possible to do things my way and still use conversations???