Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Entity Beans and Bean Managed Transactions

 
Jeff Gaer
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jeff Gaer
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic