Using Hibernate Annotations in JPA Projects on WildFly

Hibernate annotations play a key role in mapping Java objects to database tables in JPA projects running on WildFly. However, integrating these annotations seamlessly requires proper dependencies and configurations to avoid runtime errors. The Issue with Using Hibernate Annotations in WildFly Hibernate annotations are available in Hibernate core project. Therefore, in order to compile your … Read more

Categories jpa

Web services Handler Chains tutorial

Handler Chains play a crucial role in intercepting and processing incoming and outgoing messages. They offer a flexible way to customize and extend the functionality of web services without modifying the core application logic. In this article, we’ll explore what Handler Chains are, how they work, and demonstrate their implementation with a practical example.

Read more

How to use Cookies to persist HTTP Session data

In this tutorial, we will learn how to save and read the HTTP session state in a cookie using Servlets. By utilizing cookies, we can persist session information on the client-side, allowing us to maintain session state even if the user closes the browser or navigates away from the website. This technique can be beneficial … Read more

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

JSON pretty printing in Java

When working with JSON data, readability matters. JSON pretty printing is a technique used to format JSON data in a human-readable manner, making it easier to analyze, debug, and understand. In this tutorial, we’ll explore how to perform JSON pretty printing in Java, leveraging libraries to format JSON for improved readability.

Read more

How to parse JSON in Java

In today’s data-driven world, the ability to effectively parse and process JSON data has become an essential skill for Java developers. This tutorial will guide you through the fundamentals of parsing JSON data using the Jakarta JSON API framework which includes two main models: JSON Processing (JSON-P) and JSON Binding (JSON-B). Binding and Processing JSON … Read more

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