• Post Reply Bookmark Topic Watch Topic
  • New Topic

help!!Everyone  RSS feed

 
asheet anand
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everyone,
could you please tell me what we mean when we say
"Enterprise javabeans cannot directly access the transcation manager.container has the responsibility of managing transcations."
what exactly we mean by "transcations" here??
is it transcations with the database.
also please tell me how container will managed them.
thanks
asheet
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by asheet anand:
what exactly we mean by "transcations" here??
is it transcations with the database.
also please tell me how container will managed them.

It is transactions with the database and everything else that supports them In your EJBs, you can access various databases and message queues, all of which support transactions. You, as EJB developer, can determine that all of this has to happen in the context of one single, distributed transaction.
It depends on the transaction properties you set in the EJB descriptor, but generally, the container manages this transaction as follows. If the EJB method call returns normally, the transaction is committed (using a two-phase commit for a distributed transaction). If, on the other hand, an unexpected error occurs (some flavour of RuntimeException is thrown or your EJB calls EJBContext.setRollbackOnly()), the transaction is rolled back.
- Peter
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!