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. 

Returning Beautiful Validation Error Messages In Jakarta REST With Exception Mappers

All non-trivial enterprise applications have some sort of constraints on the data the application processes. These constraints could range from the simplest to the most complex custom built types. The default validation API on theJakarta EEPlatform, Jakarta Bean Validation has excellent out of the box support for constraining bean fields. Then with its @Valid annotation, you can trigger automatic validation of constrained objects in certain points of an application. 

🔥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.

Payara Hackathon - Build an app with Jakarta EE 10 and Payara Platform

We are excited to announce that registrations are now open forPayara Hackathon, running 2-6 March 2023. 

Build an app with Jakarta EE 10 and Payara Platform for a chance to win £3,000 in prize money for the winner, with £2,000 and £1,000 prizes for runners up. 

Get your work reviewed by our judging panel of Java and Jakarta EE experts including Java Champions Ivar Grimstad and Otavio Santana.

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 is Part of the MicroProfile Working Group!

Payara is part of the MicroProfile Working Group! 

MicroProfile is a set of Enterprise Java APIs and technologies, designed to help with the challenge of building microservices architectures in Java. 

The MicroProfile Working Group develops these APIs in a collaborative process, and is comprised of passionate individuals, and representatives from different vendors and Java User Groups. 

Join our Webinar: Leave GlassFish Problems Behind: A Guide to Migrating Away From GlassFish

If you’re running GlassFish in your production or development environment and are worried about the lack of support, infrequent application server releases, security issues, lack of bug fixes and patches – then migrating off GlassFish might be the best option for you.

In this webinar (register here), Fabio Turizo (Head of Payara Service Team), together with Jon Weatherhill (Payara Customer Support Team), will explain all the things you need to consider in order to make a migration as smooth as possible.