Hibernate transaction attributes

Source: Internet
Author: User
Transactions are also an important aspect of access to the persistence layer of Hibernate. Hibernate not only provides support for local transactions, but also allows the use of container-managed global transactions. Hibernate

Transactions are also an important aspect of access to the persistence layer of Hibernate. Hibernate not only provides support for local transactions, but also allows the use of container-managed global transactions. Hibernate

Transactions are also an important aspect of access to the persistence layer of Hibernate. Hibernate not only provides support for local transactions, but also allows the use of container-managed global transactions. Hibernate has the following attributes about transaction management.

Hibernate. transaction. factory_class: specifies the type of the transaction factory used by Hibernate. The attribute value must be a direct or indirect subclass of TransactionFactory.

Jta. UserTransaction: the property value is a JNDI name. Hibernate uses JTATransactionFactory to obtain JTA UserTransaction from the application server.

Hibernate. transaction. manager_lookup_class: the attribute value should be a TransactionManagerLookup class name. This class is required when JVM-level caching is used or when hilo generator policy is used in JTA environments.

Hibernate. transaction. flush_before_completion: Specifies whether the Session automatically refreshes data (flush) to the underlying database after the transaction is completed. This attribute value can only be true or false. Now it is better to use Session management related to Context.

Hibernate. transaction. auto_close_session: Specifies whether to automatically close the Session after the transaction ends. This attribute value can only be true or false. Now it is better to use Session management related to Context.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.