• 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
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

A client having a transaction context calls a method on bean A?

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am preparing for 895 exam with mock exam. I usually see that said "A client having transaction context call a method on bean A(notSupported)" in their question.
I am confuse that how can a client go with a transaction context ?Or it means it call from other bean?? thanks.
 
Bartender
Posts: 2124
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"How can a client go with a transaction context?"
The container will create a transaction context for the client. Developers don't need to worry about how the container creates a transaction context.

For example, a Foo bean has a foo() method. This foo() method calls Bar bean's bar() method. The client invokes foo() method. If the transaction attribute is REQUIRE, the container creates a transaction context , txn A for foo()'s execution. If bar's transaction attribute is NOT_SUPPORT, the container will suspend txn A transaction context, creates an unspecific transaction context txn B for bar()'s execution.


You may want to read Head First EJB chapter 9 about transaction for reference.
 
range ke
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bean A with transaction attributes of "NotSupported" for all its methods.
Bean B with transaction attributes of "Mandatory" for all its methods.  
 A client having a transaction context calls a method on bean A

i am not going copy all wording from mock exam since it is not for distribution
i am confuse why "A client having a transaction context" ?

client ---(here)--->Method A ----->Method B

is that question means transaction context auto created in "here"?
if yes, the wording is misleading to me.
I thought it means inject or create a transaction context in client side.

thanks for your reply




 
Creator of Enthuware JWS+ V6
Posts: 3398
312
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please QuoteYourSources.
 
range ke
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you Frits Walraven

This is come from www.enthuware.com
 
Frits Walraven
Creator of Enthuware JWS+ V6
Posts: 3398
312
Android Eclipse IDE Chrome
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


is that question means transaction context auto created in "here"?


No, it means that there is a client that is already running inside a transaction. Note that a "client" can also refer to another EJB. If this client-EJB has all the defaults (container-managed, transaction attribute REQUIRED) it means that every method runs with a container-managed transaction. If this client-EJB now calls bean A it has an existing transaction context.

Does this make it clearer?
 
range ke
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
that client means "client-ejb" instead of "client side"
thank you Frits Walraven again, enthuware do help me a lot
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic