• Post Reply Bookmark Topic Watch Topic
  • New Topic

concept of transaction  RSS feed

 
Ricky Wang
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Because each transaction has non-trivial overhead, you might think it's best to perform as many operations in a single transaction as possible to minimize the per-operation overhead."
The foregoing was said by Brian Goetz in his article,"Understanding JTS --Balancing safety and performance"
What my question is that what did he mean by per-operation overhead ?
Every reply world be appreciated.
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
He means that if you access an entity bean outside of a session bean or JTA transaction scope, that each operation on that bean (getting each individual attribute value) has a substantial overhead because each operation is its own transaction. That means that the transaction must be started and committed, and in fact usually results in a SQL SELECT statement for each transaction to load the current values of the bean's attributes from the database.
Kyle
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!