Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Ejb Transactions

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Difference between Bean Managed transactions and container managed transactions.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One type is managed by the Bean, the other by the container. I'll leave you to guess which is which. Simple as that.
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@ 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)
 
No matter. Try again. Fail again. Fail better. This time, do it with this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic