Scroll to top

Hibernate

Posted by JBT
December 17, 2018

Hibernate bootstrapping

In this article, I will introduce you the new native bootstrapping API of Hibernate 5.

Read More
Posted by JBT
August 19, 2015

Connection Pooling with Hibernate 4

We have arrived at a state with Hibernate 4 where we can change the database behind the system to go for production usage (so H2 databases are out of the question).

Now it is time to look at connection pooling, because the default connection pooling mechanism of Hibernate is rudimentary and is provided only for development and testing usage.

Read More
Posted by JBT
August 17, 2015

Multi-tenancy with Hibernate 4

Multi-tenancy indicates an approach in software development where a single application simultaneously serves multiple clients. These clients are also called tenants. This approach is very common in Software as a Service (SaaS) solutions.

Read More
Posted by JBT
August 15, 2015

Concurrency control with Hibernate 4

Most of the time it is OK to simply let the database do the work of concurrency control, however sometimes you can encounter an application where you need to take over. In this article I will give a brief introduction to optimistic and pessimistic concurrency control.

Read More
Posted by JBT
August 15, 2015

Auditing with Hibernate 4

In this article I will give you a brief introduction to Entity auditing with Hibernate, or to be more specific with Hibernate Envers which is since some 3.x version part of the Hibernate core.

Read More
Posted by JBT
August 8, 2015

Caching with Hibernate 4

If you have a bigger application you think about performance and how you can improve it. Caching is one way to do this because it enables fewer queries going to the database. Querying the database is always a performance impact because it is an I/O operation. And I/O operations are much slower than operations using only the applications memory.

Read More
Posted by JBT
August 5, 2015

Batch execution with Hibernate 4

In this article I will give you a brief introduction to Hibernate batch processing.

Read More
Posted by JBT
July 12, 2015

Hibernate 4 with Query languages

After the introduction into Hibernate 4 which included mapping relationships and inheritance let's dig a bit deeper and see how we can reach stored data in the database.

Read More
Posted by JBT
July 12, 2015

Entity relations with Hibernate 4

Last time I introduced annotations instead XML configuration. Now I will dig deeper and show how you can create entity relations and map them to the database.

If you look at the Book entity in the example you might think: "Why store the authors of a book as a String?" and you are right. This makes querying for books by authors almost impossible -- or at least not as performant as it could be. And a typo between two entries can make it even worse.

Read More
Posted by JBT
July 12, 2015

Hibernate 4 Database configuration

In the previous articles I have shown you how to get started with Hibernate 4: create entities, manage relations and inheritance and how to query the stored data.

However every time I used an in-memory database which means that every time you stop the application the inserted data vanishes.

Read More