3 Replies Latest reply on Feb 6, 2007 5:18 PM by Gavin King

    Real basic one

    Vinicius Carvalho Apprentice

      Hello there! After a long period of resistance I decided to adopt seam in our company, I was waiting, and seam really seams to be the right choice. Ok, so I've just started reading the documentation, and just ordered the book. One thing that is really looking kinda weird is the fact that presentation + business be merged (action + slsb). I know there are rare cases where the web-tier is separate from the ejb-tier, but they do exist. and in that case what happens? Should I use a different model?

      Regards

        • 1. Re: Real basic one
          Norman Richards Master

          If you need them separate, make the separate. Inject the business components into the web components. Easy. Of course, 95% of the projects that do this find that their web components are just shallow proxies to their business components and they just wasted time and complicated their architecture for no clear business gain.

          Actually, in a Seam application, what you generally HOPE happens is that your presentation logic mostly goes away leaving you primarily with just business components.

          • 2. Re: Real basic one
            Daniel Young Novice

            If you implement a seperate business layer using EJBs, be aware that you may lose the advantages of Seam-managed persistence contexts. Somebody correct me if I'm wrong on that?? That would mean implementing your own strategy for avoiding lazy initialisation exceptions, and all the joy associated with that, etc.

            A POJO service layer where you pass the entity manager around to the method calls may be the answer there - and you could always put EJBs in front of that very trivially if you wanted to.

            The EJB3 spec does talk about extended persistence contexts propagating down in EJB calls, but we had no success with that.

            • 3. Re: Real basic one
              Gavin King Master

               

              If you implement a seperate business layer using EJBs, be aware that you may lose the advantages of Seam-managed persistence contexts. Somebody correct me if I'm wrong on that??


              No, that's not really correct. You can still use a seam-managed PC if you want.