Table of Contents Solve javax.persistence.RollbackException: Transaction marked as rollbackOnly Ask Abnormal 1. Apply logic 2. Persistence context issues 3. Restraint violations Approach 1. Check application logic 2. Review persistence context management 3. Check for constraint violations 4. Exception handling and logging 5. Reference documentation and community support in conclusion Resolving javax.persistence.RollbackException: Transaction marked as rollbackOnly […]
Tag: persistence
Code implementation of custom persistence layer framework 1
Project structure Describe the project structure of the custom persistence layer framework? . ├── IPersistence │ ├── IPersistence.iml │ ├── pom.xml │ └── src └── IPersistence_test ├── IPersistence_test.iml ├── pom.xml ├── src └── target Specific code sqlMapperConfig.xml configuration file <configuration> <!– Store database configuration information –> <dataSource> <property name=”driverClass” value=”com.mysql.jdbc.Driver”></property> <property name=”jdbcUrl” value=”jdbc:mysql://localhost:3306/zdy_mybatis”></property> <property name=”username” […]
AutoX – Lazy loading of objects and image resources + Storage persistence
AutoX-lazy loading of objects and image resources + Storage persistence 1. Usage scenarios There are many scenarios that require lazy loading. The first time I needed the lazy loading function was when writing a game automation script. I needed to detect the coordinates of an item in advance before subsequent clicks. The item’s position on […]
Redis persistence RDB + master-slave replication principle + Redis persistence AOF
1. RDB for redis persistence Redis provides 2 different forms of persistence. RDB (Redis DataBase) AOF (Append Of File) 1.What is RDB Write a snapshot of the data set in the memory to the disk within a specified time interval, which is also called a Snapshot in the jargon. When it is restored, the snapshot […]
sentinel rule persistence-rule synchronization nacos-the most standard configuration
Official reference document: Dynamic rule expansion · alibaba/Sentinel Wiki · GitHub The code that needs to be modified is as follows: In order to facilitate the integration of nacos in subsequent versions, let’s briefly talk about the integration ideas. 1.Change pom Modify the scope of sentinel-datasource-nacos Will <dependency> <groupId>com.alibaba.csp</groupId> <artifactId>sentinel-datasource-nacos</artifactId> <scope>test</scope> </dependency> Change to <dependency> […]
Redis-3 persistence and master-slave replication
Redis persistence files are divided into two types: dump.rdb and appendonly.aof 1. Redis persistence RDB Redis provides 2 different forms of persistence methods RDB (Redis DataBase) AOF (Append Of File) 1. What is RDB Write a snapshot of the data set in memory to disk within a specified time interval, which is also known as […]
Redis persistence configuration, RDB and AOF configuration instructions
Article directory I. Overview 2. RDB persistence configuration 3. AOF persistence mode configuration If your understanding of Redis is not deep enough, please pay attention to this column. This column includes Redis installation, Redis configuration file description, Redis command and data type description. 1. Overview Redis persistence refers to the process of storing Redis data […]
Redis’s safety net: Master the persistence technology of RDB and AOF [redis Part 4]
Safety net of Redis: Master the persistence technology of RDB and AOF Preface First: What are RDB and AOF? RDB (Redis Database Backup): AOF (Append-Only File): Similarities and differences: Second: In-depth analysis of RDB mechanism working principle: Configuration and triggering: advantage: limitation: Third: In-depth analysis of the AOF mechanism working principle: Configuration and management: rewrite […]
PersistenceDelegate- persistent proxy class
java.beans.PersistenceDelegate – persistent proxy class, persistent delegate Official Document Original Word 1: The persistence agent can control all aspects of object persistence, including: 1. Determine whether an instance can be mutated into another instance of the same class. 2. Instantiate the object by calling a public constructor or public factory method. 3. Perform object initialization. […]