aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes About non-transactional client in EJB in Action (2nd edition) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "About non-transactional client in EJB in Action (2nd edition)" Watch "About non-transactional client in EJB in Action (2nd edition)" New topic
Author

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

Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 813
    
    1
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

Joined: Jul 20, 2005
Posts: 10289
    
168

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.

[My Blog] [JavaRanch Journal]
Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 813
    
    1
Thanks. So, will the container determine if the client is transactional or non transactional?
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10289
    
168

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: About non-transactional client in EJB in Action (2nd edition)