Showing entries 1 to 10 of 34
10 Older Entries »
Displaying posts with tag: jpa (reset)
High-Performance Java Persistence Newsletter, Issue 65

Introduction Welcome to a new issue of the High-Performance Java Persistence Newsletter in which we share articles, videos, workshops, and StackOverflow answers that are very relevant to any developer who interacts with a database system using Java. Articles The pick of this week is this article about various online schema migration options that are available in MySQL. Another great read was this one about scaling the One Million Checkboxes website. There are many lessons you can learn from this experiment. One lesson is about the cost of running a high-traffic website. Using... Read More

The post High-Performance Java Persistence Newsletter, Issue 65 appeared first on …

[Read more]
How to batch INSERT statements with MySQL and Hibernate

Introduction In this article, we are going to see how we can batch INSERT statements when using MySQL and Hibernate. While Hibernate has long supported automated JDBC batch inserts, this feature doesn’t work when using the IDENTITY identifier generator strategy. Unfortunately, MySQL doesn’t support SEQUENCE objects, so using IDENTITY is the only reasonable option. Therefore, I’m going to show you a technique you can use to get Hibernate batch INSERT statements for entities that use the IDENTITY generator. Default batch INSERT with MySQL and Hibernate Let’s say we have created the following... Read More

The post How to batch INSERT statements with MySQL and Hibernate appeared first on Vlad Mihalcea.

RevoGain Software Architecture

Introduction In this article, I’m going to show you the RevoGain software architecture. RevoGain is a web application that helps Revolut users calculate their stocks and crypto trading gains, and I started building it at the beginning of September 2021. Hype vs. Reality Have you ever been to a software conference and felt disconnected from all those hyped technologies that were presented so beautifully on stage? I certainly had. Whenever I came back from a software conference and looked at my project codebase, I could see a large gap between what’s being... Read More

The post RevoGain Software Architecture appeared first on Vlad Mihalcea.

High-Performance Java Persistence Newsletter, Issue 22

Introduction Welcome to a new issue of the High-Performance Java Persistence Newsletter in which we share articles, videos, workshops, and StackOverflow answers that are very relevant to any developer who interacts with a database system using Java. Articles From version 2.12, Percona PMM uses Victoria Metrics instead of Prometheus. Victoria Metrics provides better disk I/0 utilization and less memory usage. For more details about this change and its benefits, check out this article. By default, the MySQL JDBC Driver only emulates prepared statements. If you wonder whether server-side prepared statements perform better... Read More

The post High-Performance Java Persistence Newsletter, Issue 22 appeared first on …

[Read more]
The best way to use SQL functions in JPQL or Criteria API queries with JPA and Hibernate

Introduction When executing an entity query (e.g. JPQL, HQL or Criteria API), you can use any SQL function without having to register it as long as the function is passed directly to the WHERE clause of the underlying SQL statement. However, if the SQL function is used in the SELECT clause, and Hibernate has not … Continue reading The best way to use SQL functions in JPQL or Criteria API queries with JPA and Hibernate →

The post The best way to use SQL functions in JPQL or Criteria API queries with JPA and Hibernate appeared first on Vlad Mihalcea.

How to inherit properties from a base class entity using @MappedSuperclass with JPA and Hibernate

Introduction Last week, one of my blog readers asked me of a way to reuse the @Id mapping so that it won’t have to be declared on each an every entity. Because this is a good opportunity to introduce @MappedSuperclass, I decided to answer the question with a blog post. Domain Model Assuming we are … Continue reading How to inherit properties from a base class entity using @MappedSuperclass with JPA and Hibernate →

9 High-Performance Tips when using MySQL with JPA and Hibernate

Introduction Although there is an SQL Standard, every relational database is ultimately unique, and you need to adjust your data access layer so that you get the most out of the relational database in use. In this article, we are going to see what you can do to boost up performance when using MySQL with … Continue reading 9 High-Performance Tips when using MySQL with JPA and Hibernate →

5 Things You Need to Know When Using Hibernate with Mysql

One of the benefits of using JPA and Hibernate is that it provides an abstraction of database-specific dialects and features. So, in theory, you can implement an application, connect it to one of the supported databases and it will run without any code changes.

Hibernate does that really well. But let’s be honest, you didn’t expect that your application will run perfectly with every supported database, did you?

Hibernate handles the most important things. But if you want your application to perform well, you still need to know which database(s) you want to use and adjust your configuration and code accordingly.

In one of the previous posts, I talked about 6 things you need to know if you want to use Hibernate with a PostgreSQL database. And today I want to have a closer look at the MySQL database.

[Read more]
Tab Sweep: jBPM5, Hibernate Logging, Grizzly 2.2.5, Cache and JPA 2.0, Observer Pattern, . . .

Recent Tips and News on Java, Java EE 6, GlassFish & more :

Using Java Persistence API for Java SE 7 Desktop applications in NetBeans 7 (Oracle Learning Library)
Use jBPM5 embedded within a Java EE 6 application (akquinet)
If JAX-RS had an MVC framework? (Mamadou Lamine Ba)
• …

[Read more]
TOTD #150: Collection of GlassFish, NetBeans, JPA, JSF, JAX-WS, EJB, Jersey, MySQL, Rails, Eclipse, and OSGi tips

This is the 150th tip published on this blog so decided to make it a collection of all the previous ones. Here is a tag cloud (created from wordle.net/create) from title of all the tips:

As expected GlassFish is the most prominent topic. And then there are several entries on NetBeans, JRuby/Rails, several Java EE 6 technologies like JPA, JAX-WS, JAX-RS, EJB, and JSF, and more entries on Eclipse, OSGi and some other tecnhologies too. Here is a complete collection of all the tips published so far:

[Read more]
Showing entries 1 to 10 of 34
10 Older Entries »