Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
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 The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Transactions" Watch "Transactions" New topic


Yogender Butola

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.
I agree. Here's the link:
subject: Transactions