Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Business Tier Design Approach

 
Vincenzo Meglio
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
I'm taking Scea Part 2 and I have some doubt:
I need an application service layer behind the session facade (that is implemented with SLSB and SFSB) I can do it with other Sesson bean or with standard POJO ?
What happens to the transaction driven from the facade if I use POJO and the POJO does some JPA operation? If happens a rollback in the SB a roll back is applied to the operation of the called pojo too?

Where can I find such type of Information?
Sorry if my English is not perfect I hope you'll undestand
Enzo
 
J J Wright
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends where you get your EntityManager from. If you use the same persistence context, i.e. the one bound to the transaction, then any changes your POJO makes will not be committed until the transaction commits.

Where can I find such type of Information?


In the EJB specification. You need to understand the relationship between a persistent context and a transaction
 
Vincenzo Meglio
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May you give me some title of some good book? with some example?

Thanks a lot
Enzo
 
J J Wright
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Everything you need to know is there for free in chapter 5 of the EJB 3.0 persistence specification.

If you still want another source. "Pro EJB 3: Java Persistence API" is a good book.
 
Vincenzo Meglio
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But If I follow that way then I need to handle Bean Managed Transaction otherwise if I use An Application Service Layer made of other SB I can use CMT is it right ?
thanks for your patience
Enzo
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic