- 2
- 0
- 约5.11千字
- 约 5页
- 2017-08-21 发布于河南
- 举报
java中如何处理事务(How to handle the affairs of Java)
java中如何处理事务(How to handle the affairs of Java)
A transaction is a unit of work of the following attributes:
Atomic (ATOMICITY): a transaction to be completely free of ambiguity of the two finished or withdrawn. There is an error in any operating conditions, constitute the affairs of all the effect of the operation must be undone, data should be rolled back to a previous state.
Consistency (CONSISTENCY): a transaction should protect all the invariant properties defined in the data (e.g., integrity constraints). After completing a successful transaction, the data should be in a consistent state. In other words, a transaction should convert the system from one consistent state to another consistent state. For example, in the case of relational databases, all integrity constraints of a consistent transaction will be defined in the data protection.
Isolation (ISOLATION): in the same environment may have multiple concurrent execution, and each transaction should be expressed as independent executive. Serial execution of a series of transactions with concurrent effect should execute them. This requires two things:
In a transaction execution process, data center (possibly inconsistent) state should not be exposed to all other affairs.
Two concurrent transactions should not operate on the same data. Database management systems typically use locks to implement this feature.
Persistent (DURABILITY): a complete transaction effect should be persistent.
This property is called the ACID property, guarantee a transaction is never complete, the data is never inconsistent, the concurrent transaction is independent, a transaction effect is lasting.
EJB transaction model
The EJB framework does not require any specific transaction service (such as JTS) or transaction management protocol. However, the standard javax.transaction.UserTransaction interface of JTS exposed to enterprise bean. The following paragraphs discuss the coding requirements of the interface definition of transaction.
您可能关注的文档
- c语言程序设计的基本方法和技巧(The basic methods and techniques of C language program design).doc
- c语言程序设计期末考试复习题及答案(C language program design final exam review questions and answers).doc
- c语言程序设计课后习题答案(C Language Program Design after-school exercise answers).doc
- c语言程序设计试题(C language program design test).doc
- c语言程序设计课后题答案(C language programming exercises answer).doc
- c语言程序设计(清华郑莉 安颍莲)chap9(C programming language (Tsinghua Zheng Lian Ying Lian) chap9).doc
- c语言笔试冲刺复习资料 计算机二级 培训机构内部资料(C language written sprint review information on computer two level training institutions internal data).doc
- c语言程序设计课程设计-学生成绩管理系统(C programming language course design - student achievement management system).doc
- c语言程序设计2(C language program design 2).doc
- c语言第一次讲义(C language is the first lecture).doc
原创力文档

文档评论(0)