This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Transactions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Transactions" Watch "Transactions" New topic
Author

Transactions

Yogender Butola
Greenhorn

Joined: Jul 19, 2004
Posts: 12
Can we have a scenario where One bean is using programmatic transaction and other is using declarative transaction, considering both the beans are running under the same transaction.
Brian Tinnel
Ranch Hand

Joined: Aug 25, 2003
Posts: 69
The only time a mix like that can be in the same transaction is if the bean using programmatic transactions calls the one using declarative transactions. If you do it the other way around (declarative calling progammatic), the first transaction is suspended. Also, the method called in the declarative transaction bean must be declared to be Required or Supports.

I hope this makes sense.
 
 
subject: Transactions