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.
Java EE
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
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.
How to Upload and Download Files with a Servlet
This article will illustrate how to upload files using the Jakarta Servlet API. We will also learn how to use a Servlet to download a File that is available remotely on the Server.
How to upgrade WildFly JSF version with Galleon
This article will teach you how to add MyFaces 4 (or newer) support to your WildFly installation using Galleon features pack. At the end of it, you will be able to complete the upgrade of your JSF implementation in no time!
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.
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.
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.
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.