The difference between hibernate transactions and spring transactions (GO)

Source: Internet
Author: User

Spring transaction:

For traditional transactional processing based on a particular transactional resource, such as JDBC-based database access, spring does not have any effect on it, so we can successfully write and run such code. At the same time, spring also provides some auxiliary classes that we can choose to use, which simplifies the traditional database operation process, saves the workload to some extent, and improves the coding efficiency.
Spring shows great value for parameterized transaction management of dependent containers. Spring itself is a container, but spring is much lighter and smaller relative to the EJB container. We can implement container-based transaction management (essentially,Spring's transaction management is based on dynamic AOP) through spring without paying any other price.




Hibernate transaction:

Hibernate is a lightweight object encapsulation of JDBC, and hibernate itself does not have the transaction processing function, Hibernate's transaction is actually the transaction package of the JDBC or the jtatransaction package. The specific analysis is as follows:

Hibernate transaction can be configured with jdbctransaction or Jtatransaction depending on your configuration in hibernate.properties

The difference between hibernate transactions and spring transactions (GO)

Related Article

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.