aspose file tools
The moose likes EJB and other Java EE Technologies and the fly likes Ejb Transactions Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "Ejb Transactions" Watch "Ejb Transactions" New topic
Author

Ejb Transactions

Robin Ranga
Greenhorn

Joined: May 29, 2006
Posts: 25
Difference between Bean Managed transactions and container managed transactions.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

One type is managed by the Bean, the other by the container. I'll leave you to guess which is which. Simple as that.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Ali Aman
Greenhorn

Joined: Jun 05, 2006
Posts: 7
the Entity bean has some abstract functions in the EJBObject interface...

Example create, remove etc...

By simply providing the primary key as an argument i.e.
create(primary_key) the container automaticaly inserts a record in a table.. similarly there is another function remove thru which one can simply call the function like this... remove(primary_key) and the container would remove the record in the table...

However if the developer wishes to perfrom these transactions by running sql scripts he uses bean managed transactions and codes it thus called Bean Managed Trasactions.
Sri Ram
Greenhorn

Joined: Apr 04, 2006
Posts: 10
@ Ali Aman

I think the definition what u gave is for the difference between CMP(and BMP beans

CMP == Container Managed Persistence

BMP == Bean Managed Persistence

Transaction is something similar to the Database transaction,if u wanna write any transaction code in your bean using the services of JTS or JTA you go for Bean Managed Transaction

and when u allow the container to manage the same its called Container managed Transaction

The transaction attribute of the bean is defined in the transaction type tag in the ejb-jar.xml (Deployment descriptor)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ejb Transactions
 
Similar Threads
Doubt in stateful session bean
MDB tx rollback question
2 phase commit using EJB
Security & transaction management in EJB
Hibernate Session.beginTransaction with JBoss