• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
range ke
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • 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.
 
Himai Minh
Ranch Hand
Posts: 1361
7
  • Mark post as helpful
  • send pies
  • 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
  • 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




 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2536
113
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please QuoteYourSources.
 
range ke
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you Frits Walraven

This is come from www.enthuware.com
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2536
113
Android Chrome Eclipse IDE
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic