How to bootstrap Hibernate without the persistence.xml file

Why? JPA relies heavily on the persistence.xml configuration file, and the standard API to bootstrap a JPA provider programmatically requires too much boilerplate code. While in a typical enterprise application, providing a persistence.xml file is not really an issue, this requirement doesn’t get along with unit testing, especially when tests are completely isolated and they need to validate different aspects of JPA or Hibernate. That was an issue that I bumped into when writing test cases for the High-Performance Java Persistence book. All my tests need to be isolated, and not all… Read More

High-Performance Java Persistence – Chapter 9 – Hibernate Connection Management

Part 2, Chapter 9 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 how to handle connections in Hibernate and how to monitor their usage as well as the statement that gets automatically generated, and the table of contents looks like this:

High-Performance Java Persistence – Chapter 8 – Why JPA and Hibernate matter

Second part, Chapter 8 Now that the first part of my book is published, it’s time to focus on the second part, which covers both JPA and Hibernate. From now on, every new chapter is going to be released right after it’s completed, so the reader doesn’t have to wait for the whole part to be finished to get access to new chapters. Table of content This chapter aims to remind the reader why Hibernate has its place in high-performance data access, and the table of contents looks like this:

High-Performance Java Persistence – Part One

The journey Four months, one week and two days and 114 pages; that’s how much it took to write the first part of the High-Performance Java Persistence book. As previously stated, the book is developed in an Agile fashion. Each part represents a milestone, which is accompanied by a release. This way, the readers can get access to the book content prior to finishing the whole book (which might take a year or so).