<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Franck Pachot on JAVAPRO International</title><link>https://javapro-en.svenruppert.com/authors/franck-pachot/</link><description>Recent content in Franck Pachot on JAVAPRO International</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Thu, 18 Dec 2025 07:00:01 +0000</lastBuildDate><atom:link href="https://javapro-en.svenruppert.com/authors/franck-pachot/index.xml" rel="self" type="application/rss+xml"/><item><title>No Deadlocks in MongoDB: Atomic Documents and Retries with Spring Data MongoDB</title><link>https://javapro-en.svenruppert.com/no-deadlocks-in-mongodb-atomic-documents-and-retries-with-spring-data-mongodb/</link><pubDate>Thu, 18 Dec 2025 07:00:01 +0000</pubDate><guid>https://javapro-en.svenruppert.com/no-deadlocks-in-mongodb-atomic-documents-and-retries-with-spring-data-mongodb/</guid><description>&lt;p&gt;Deadlocks are frequent in SQL databases, as normalization and two-phase locking (2PL) require locking multiple tables or rows during DML operations. Numerous use cases share them, and transactions might access data in a different order, resulting in circular waits and deadlocks. While databases can detect them, they can&amp;rsquo;t prevent or resolve deadlocks, as the application determines what is run and in what order. The best the database can do is cancel one statement or transaction, and let the application rollback and retry, which can reduce performance as systems wait several seconds before getting notified. As Oracle Database makes clear in the error log: &amp;ldquo;&lt;em&gt;It is a deadlock due to user error in the design of an application or from issuing incorrect ad-hoc SQL&lt;/em&gt;.&amp;rdquo; Most RDBMS use pessimistic locking to avoid conflicts, but deadlocks are unavoidable, and locking can increase latency. For instance, by default, DB2 waits 10 seconds for deadlock detection, SQL Server waits 5 seconds, Oracle waits 3 seconds, and YugabyteDB and PostgreSQL wait 1 second. These delays impact latency, but deadlock prevention remains the application&amp;rsquo;s responsibility. The only way to entirely prevent deadlocks is by avoiding locks altogether, as in MongoDB, which provides lock-free ACID transactions.&lt;/p&gt;</description></item><item><title>Java and Databases: From SQL to JPA and NoSQL</title><link>https://javapro-en.svenruppert.com/java-and-databases-from-sql-to-jpa-and-nosql/</link><pubDate>Thu, 19 Jun 2025 07:00:02 +0000</pubDate><guid>https://javapro-en.svenruppert.com/java-and-databases-from-sql-to-jpa-and-nosql/</guid><description>&lt;p&gt;Over the past 30 years, Java has significantly changed the way applications interact with databases. In the early days, Java applications typically used a client/server model and a three-tier architecture, where SQL statements were often embedded as string literals within the application. These statements were sent to databases through straightforward interfaces such as JDBC.&lt;/p&gt;
&lt;p&gt;As programming paradigms shifted towards Object-Oriented Programming (OOP), Java developers began to integrate business logic more seamlessly into data structures. This move represented a shift from purely database-centric models to application-first designs. This transition enabled data abstraction through application programming interfaces (APIs), allowing SQL database tables and rows to be represented as classes and objects within the application. As a result, data sharing and persistence also evolved, moving from strictly normalized relational tables to document-oriented databases that align more closely with object-oriented structures and specific use cases.&lt;/p&gt;</description></item></channel></rss>