Writing JPA applications using Java Records

In this article, we’ll explore how Java Records, available since Java 16, can be used in the context of JPA Application. We’ll uncover how Java Records, renowned for their simplicity and immutability, complement the flexibility and expressive querying abilities offered by the Criteria API.

Read more

Categories jpa

How to set a custom initial value for Ids in JPA

In Java Persistence API (JPA), entities require unique identifiers for database records. JPA provides several strategies for generating these identifiers, such as IDENTITY, SEQUENCE, and TABLE. However, there are cases where you might need to set a custom initial value for these identifiers using the Table and Sequence strategy. In this tutorial, we will explore … Read more

Categories jpa

How to debug transactions in WildFly

This article will guide you through the configuration of a Logger that enables you to debug the Narayana Transactions running in WildFly. By the end of it, you will be able to inspect the full lifecycle of a JTA transaction.

Read more

How to run standalone Jakarta Batch Jobs

Jakarta Batch, formerly known as Java Batch, is a specification that provides a standardized approach for implementing batch processing in Java applications. It offers a robust and scalable framework for executing large-scale, long-running, and data-intensive tasks. In this tutorial, we will explore the process of running Jakarta Batch Jobs as standalone Java applications, discussing the … Read more

How to set the Boolean default to true in JPA?

Java Persistence API (JPA) is a widely used technology for object-relational mapping in Java applications. While mapping Java objects to database tables, developers often need to set default values for certain attributes, such as boolean fields. In this article, we will explore different approaches to setting default values for boolean fields in JPA entities.

Read more

Categories jpa

How to create a Custom JSF Converter

In Jakarta Server Faces (JSF), you can use converters to convert data between its model (backend) representation and its view (UI) representation. By default, JSF provides built-in converters for common types such as Integer, Double, Date, etc. However, in some cases, you may need to create a custom converter to handle custom data types or data conversion logic specific to your application. In this tutorial, we’ll create a custom JSF converter to convert a custom object User to and from its string representation in the UI.

Read more

Categories JSF

Jakarta Batch API: Building Scalable Batch Solutions

Batch processing is a crucial component in many enterprise applications that require the execution of repetitive, data-intensive tasks. Jakarta EE Batch provides a standardized and efficient framework for implementing batch processing workflows in Java-based enterprise applications. In this tutorial, we will guide you through the process of running Jakarta EE Batch jobs, exploring the essential steps, configuration, and best practices.

Read more

Using Built-in Converters in JSF Applications

In Jakarta Server Faces (JSF) applications, you often need to convert data between its native format and a format suitable for display or input on the user interface. JSF provides built-in converters that can handle various data types, including dates, numbers, and more. In this tutorial, we will show how to use them.

Read more

Categories JSF