Working with JSON Arrays using Jakarta JSON API

JSON arrays are a fundamental data structure in JSON, used to store collections of values or objects. Java provides the JsonArray and JsonArrayBuilder classes from the Jakarta JSON API to efficiently create, manipulate, and parse JSON arrays. It also provides methods to parse a JSON Array into a Java Collection. In this tutorial we will see both options with practical examples

Read more

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