Introduction In this article, we are going to see how we can use the LazyConnectionDataSourceProxy with Spring Data JPA to acquire the database connection as late as possible and, therefore, reduce transaction response time. For an introduction to how Spring transactions manage database connections, check out this article as well. Service Layer Connection Management Let’s consider we have the following…
#connection
4 posts
25 Oct 2024
29 Apr 2023
Introduction In this article, we are going to see how Spring handles transaction and database connection management. I decided to write this article because this topic has been requested recurringly by the students taking my High-Performance Java Persistence training. Spring TransactionInterceptor In order to provide declarative transaction management, Spring uses AOP (Aspect-Oriented Programming), and methods annotated with the @Transactional annotations…
11 Jan 2023
Introduction In this article, we are going to see the overhead of acquiring a new connection when using YugabyteDB and why connection pooling is mandatory for performance. Acquiring a database connection using JDBC To interact with a database system, first, we need to acquire a database connection. And, when using Java, we need to obtain a Connection object from the…
21 Feb 2017
Welcome to the jOOQ Tuesdays series. In this series, we’ll publish an article on the third Tuesday every other month where we interview someone we find exciting in our industry from a jOOQ perspective. This includes people who work with SQL, Java, Open Source, and a variety of other related topics. I’m very excited to … Continue reading jOOQ Tuesdays:…