-
1. Re: Real basic one
norman.richards Feb 6, 2007 2:21 PM (in response to viniciuscarvalho)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
jazir1979 Feb 6, 2007 4:43 PM (in response to viniciuscarvalho)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 Feb 6, 2007 5:18 PM (in response to viniciuscarvalho)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.