• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Business Tier Design Approach

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic