• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About non-transactional client in EJB in Action (2nd edition)

 
Himai Minh
Ranch Hand
Posts: 1295
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On p.174,

REQUIRE is the default and most commonly applicable transaction attribute value. This value specifies that the EJB method must always be invoked within a transaction. If the method is invoked from a non-transactional client, the container will start a transaction before the method is called and finish it when the method complete.


What is meant by non-transactional client?

I think if a client invoke a method annotated by @TransactionAttribute(TransactionAttributeType.REQUIRE), the client is making a new transaction or joining a transaction.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Himai Minh wrote:

What is meant by non-transactional client?



In this context, it refers to a client which isn't already running in a transaction when invoking the EJB method.
 
Himai Minh
Ranch Hand
Posts: 1295
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. So, will the container determine if the client is transactional or non transactional?
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Himai Minh wrote:So, will the container determine if the client is transactional or non transactional?


It checks whether the incoming call has a transaction associated with it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic