java中如何处理事务(How to handle the affairs of Java).docVIP

  • 2
  • 0
  • 约5.11千字
  • 约 5页
  • 2017-08-21 发布于河南
  • 举报

java中如何处理事务(How to handle the affairs of Java).doc

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.

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档