Posts tagged Java (6)

A Look at Virtual Threads in a Jakarta EE Managed Context

Upcoming Java 21 brings a bunch of new features, including very interesting progress in concurrency. There are two main improvements – virtual threads and structured concurrency.

In this article, we discuss incoming usage of these enhancements inJakarta EE (formerly Java EE, now an open source project maintained by the Eclipse Foundation), a set of specifications that enables the worldwide community of Java developers to work on cloud native Java enterprise applications. Jakarta Concurrency is the concrete specification describing the expected behaviour.

The support in Jakarta EE is currently under development, details may change in the final implementation.

Keep Up With Java Platform Changes Through The Java Almanac

Oracle, together with the Java Community over the last few years, have changed the release cadence of the Platform. With biannual releases, the Java of today is a remarkable departure from Java 8. With all the rapid advancement of the language comes the problem of keeping up as a developer.

Thankfully, Java Champions Marc R. Hoffmann and Cay S. Horstmann came up with the Java Almanac website. JA is a great resource that gives you both a summary and detailed overview of changes on the Java Platform from Java 1.0 to Java 22.

The changes are organised in a tabular format with details, links to the respective API and a helpful comparison page. It also has a download page with options to download from any of the JDK distros. All in all, Java Almanac is a great resource to keep abreast of the new release cadence of the Java Platform. 

Exploring Java Records In A Jakarta EE Context

Java Records, one of the major highlights of the Java 16 release, provides a concise and immutable way to define classes for modelling data. This conciseness lends itself useful in a typical Jakarta EE application that can have a number of layers that need to share data. For example the data layer might want to return a subset of a given data set to a calling client through a data projection object. The REST layer might want to have separate entities for server and client side among others. This blog post explores the adoption of Java Records in a Jakarta EE application as a data transfer and projection object.

To Lombok Or To DeLombok?

The Lombok project is a Java library that aims at “spicing up your java.” Started back in 2009, it consists mostly of annotations that can be used on Java classes to generate helpful constructs like getters and setters. It aims at freeing you from writing quite a number of the ceremonial boilerplate code that you sometimes need to write as part of your everyday use of Java. 

How To Consume and Return Data In YAML In Jakarta REST

YAML is a simple, human-friendly data serialization language for all programming languages. It is the main format for working with Docker. As a language agnostic format, there are many bindings for all the major programming languages. You can easily consume and return data in the YAML format in your Jakarta REST application using message body readers and writers.

How to prevent runtime type erasure using GenericEntity in Jakarta REST in Jakarta EE 10

Java generics is a great feature that allows you to have compile time checks for generics. However, due to historical reasons of backward compatibility, type information for generics is erased at runtime. A lot of the time this shouldn’t be of much concern. But there are a few cases where type information is needed at runtime for some kind of decision. 

One such situation is in Jakarta REST when the jakarta.ws.rs.core.Response object is used to return a generic collection of a specific type. For example the code below shows the creation and return of a Response object that has a list of HelloEntity as the return payload to the client. 

🔥NoSQL Persistence on The Jakarta EE Platform With Google Firestore🔥

SQL isn't your only option! 
 
Document NoSQL databases store data as document objects, much like JSON objects. Google Firestore is a document database, a NoSQL database offering from Google’s Firebase service. You store your data in documents that are collected into collections.

This guide will introduce you to incorporating Firestore NoSQL database into your Jakarta EE application.

5 Jakarta EE (Formerly Java EE) Myths That Need To Die

The Jakarta EE Platform has come a long way since its debut as J2EE back the days of Sun Microsystems. Over the years, it has had its fair share of challenges. A natural consequence of this is that some notions about the platform arising from some of the past challenges that may have been true about past iterations have stuck. This blog post aims to dispel some of these deeply rooted misconceptions about the Jakarta EE Platform, especially after the last major release.

Payara at the JakartaOne Livestream

The JakartaOne Livestream is a huge event in the Jakarta EE and MicroProfile calendar. Organised by the Eclipse Foundation, it is a one-day virtual conference for developers and technical business leaders.

It brings insight into the current state and future of Jakarta EE and related technologies focused on developing cloud-native Java applications.