aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Entity Beans and Bean Managed Transactions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Entity Beans and Bean Managed Transactions" Watch "Entity Beans and Bean Managed Transactions" New topic
Author

Entity Beans and Bean Managed Transactions

Jeff Gaer
Ranch Hand

Joined: Jun 04, 2001
Posts: 99
I'm confused by the Sun J2EE tutorial on entity beans and transactions. In the summary it states
"Table 37 lists the types of transactions that are allowed for the different types of enterprise beans. An entity bean MUST use container-managed transactions"

But then table 37 shows:
Bean TypeContainerManagedBean-Managed
JTAJDBC
Entity Y N Y
Session Y Y Y
Message-Driven Y Y N/A

So are bean managed transactions allowed for Entity Beans or not. According to the the text entity beans must use Container managed, but the table suggests that they can directly manage transactions using JDBC, just that they can't utilize the userTransaction from the context. I would guess this is the correct answer since unless something prevents the Bean from accessing a JDBC connection, the container does not have to have knowledge of the transactions managed by the RDB.

Sun Certified Java Programmer Java 2<P>Jeff Gaer
Jeff Gaer
Ranch Hand

Joined: Jun 04, 2001
Posts: 99
sorry about the formating on that post
here is the url to the summary page in question
http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Transaction5.html#63099
and another attempt at the table
Bean Type..........ContainerM...BeanManaged
................................JTA..JDBC
Entity...............Y..........N... Y
Session..............Y..........Y... Y
Message-Driven.......Y..........Y...N/A
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Entity Beans and Bean Managed Transactions
 
Similar Threads
Container Managed or Bean Managed
why entity bean cannot manage own transtaction while session beans can do this ?
Usertransaction and Entity Beans
CMP versus CMT
Container Managed or Bean Managed