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”

Advertisements

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 
10.2.1.1 The assigned generator 
10.2.2 The legacy UUID generator
10.2.2.1 The newer UUID generator 
10.2.3 Numerical identifiers
10.2.3.1 Identity generator 
10.2.3.2 Sequence generator 
10.2.3.3 Table generator
10.2.3.4 Optimizers 
10.2.3.4.1 The hi/lo algorithm
10.2.3.4.2 The default sequence identifier generator
10.2.3.4.3 The default table identifier generator 
10.2.3.4.4 The pooled optimizer 
10.2.3.4.5 The pooled-lo optimizer
10.2.3.5 Optimizer gain 
10.2.3.5.1 Sequence generator performance gain
10.2.3.5.2 Table generator performance gain 
10.2.3.6 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.

Conferences

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.

Enter your email address to follow this blog and receive notifications of new posts by email.