How to understand Spring's transaction management

坏嘻嘻
Release: 2018-09-14 14:40:10
Original
1617 people have browsed it

This article will show in detail how Spring Data MongoDB accesses the MongoDB database.

Springis a lightweightJ2EEbased onJAVAThe application framework

is based onJava: the bottom layer is implemented by theJavalanguage

Lightweight: lower resource consumption and faster running speed

J2EEFramework: serving the entireJ2EEDevelopment process

webThe hierarchical design structure of the program

Presentation layer/View layer/Weblayer (Servlet/JSP,Struts2,...)

Logic layer/Business layer

Data layer/Persistence layer (JDBC,Hibernate3

(Understand)Service layer, domain model layer

Springis very powerful and can serveJ2EEEvery level in the development process

1. What is a transaction

Success will only occur if all tasks are successful. As long as one fails, it will not succeed

2. Characteristics of transactions

3 Reading problems will occur if isolation is not considered

4 Solve the reading problem

(1) Set the isolation level

Spring transaction management api

1 .Two ways of spring transaction management

The first one: programmatic transaction management (implementation by writing code)

The second one: declarative transaction management

(1) Implementation based on xml configuration files

#Spring Data MongoDB in action

The above is the detailed content of How to understand Spring's transaction management. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!