Home > Article > Web Front-end > How to understand Spring's transaction management
This article will show in detail how Spring Data MongoDB accesses the MongoDB database.
•Spring is a lightweight J2EE based on JAVA The application framework
– is based on Java: the bottom layer is implemented by the Java language
–Lightweight: lower resource consumption and faster running speed
–J2EEFramework: serving the entire J2EEDevelopment 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
•Spring is very powerful and can serve J2EE Every 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 actionThe 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!