How does aggressive connection release work in Hibernate

Hibernate connection providers

Hibernate needs to operate both in Java EE and stand-alone environments, and the database connectivity configuration can be done either declaratively or programmatically.

To accommodate JDBC Driver connections as well as RESOURCE_LOCAL and JTA DataSource configurations, Hibernate defines its own connection factory abstraction, represented by the org.hibernate.engine.jdbc.connections.spi.ConnectionProvider interface.

public interface ConnectionProvider 
    extends Service, Wrapped {

    public Connection getConnection() 
        throws SQLException;

    public void closeConnection(Connection connection) 
        throws SQLException;
    public boolean supportsAggressiveRelease();

Continue reading “How does aggressive connection release work in Hibernate”

High-Performance Java Persistence – Chapter 10 – Mapping Types and Identifiers

Part 2, Chapter 10

Every new chapter of my book is released right after it’s being completed, so the reader doesn’t have to wait for the whole part to be finished to get access to new material.

Table of content

This chapter explains the core mapping elements used by Hibernate and details the basic type and the identifier generators.

10. Mapping Types and Identifiers 
10.1 Types
10.1.1 Primitive types
10.1.2 String types 
10.1.3 Date and Time types
10.1.4 Numeric types
10.1.5 Binary types 
10.1.6 UUID types 
10.1.7 Other types
10.1.8 Custom types 
10.2 Identifiers
10.2.1 UUID identifiers The assigned generator 
10.2.2 The legacy UUID generator The newer UUID generator 
10.2.3 Numerical identifiers Identity generator Sequence generator Table generator Optimizers The hi/lo algorithm The default sequence identifier generator The default table identifier generator The pooled optimizer The pooled-lo optimizer Optimizer gain Sequence generator performance gain Table generator performance gain Identifier generator performance 

Continue reading “High-Performance Java Persistence – Chapter 10 – Mapping Types and Identifiers”

I just joined the Hibernate team at RedHat

Hibernate Developer Advocate

Today is my first day working as a Developer Advocate for the Hibernate ORM project at RedHat. My job consists in helping the community getting the most out of Hibernate. This is really exciting since I can continue the work that I started when I came out with this blog.

If we take the 2015 Java Ecosystem Report issued by Dzone, Hibernate has a 63.9% market share. There are millions of Java developers depending on a relatively small team for delivering their favorite JPA implementation. So, this job carries lot of responsibility when you think about it.

Giving answers

You’ll find me on the Hibernate forum or Stack Overflow, trying to get the best answer for your questions.

Improving documentation

Documentation is extremely important to every open source project, and we want to align it with the latest development achievements (the 4.x and 5.x branches).
Improving the Hibernate documentation is really a full-time project but, when thinking of how much impact it has on the community, it’s worth all the effort.

Fixing issues

I look forward to helping my team addressing any reported issue in a timely fashion. Hibernate is a very complex framework and providing backward compatibility for so many features is really a tough job. Any extra help is always welcome.


From now on, you’ll probably see me at Java conferences, where I plan on talking about Hibernate, data access best practices and high-performance Java persistence.

All in all, there is a lot of work to do, and I am looking forward to helping our Hibernate community.

Subscribe to our Newsletter

* indicates required
10 000 readers have found this blog worth following!

If you subscribe to my newsletter, you'll get:
  • A free sample of my Video Course about running Integration tests at warp-speed using Docker and tmpfs
  • 3 chapters from my book, High-Performance Java Persistence, 
  • a 10% discount coupon for my book. 
Get the most out of your persistence layer!