How to manage the lifecycle of a Quarkus application

CDI Events allow beans to communicate so that one bean can define an event, another bean can fire the event, and yet another bean can handle the event.Let’s see how we can take advantage of this to manage the lifecycle of a Quarkus application. Start from a basic Quarkus project: mvn io.quarkus:quarkus-maven-plugin:1.3.2.Final:create \ -DprojectGroupId=com.sample \ … Read more

Messaging with Quarkus – part one: JMS Messaging

Quarkus includes several options for sending and consuming aysnchronous messages. In this two-parts tutorial we will learn how to send messages using the JMS API, which is well-known to Java Enterprise developers. In the next tutorial we will check out how to use Reactive Messaging to handle messages through the mediation of a Bus. JMS … Read more

Quarkus book is out!

I’m glad to announce Packt Publishing just published my latest book “Hands-On Cloud-Native Applications with Java and Quarkus: Build high performance Java microservices on Kubernetes” !   Build robust and reliable Java applications that works on modern infrastructure such as containers and cloud using the latest features of Quarkus 1.0 Key Features Build applications with … Read more

Securing Quarkus with Elytron Database Realm

Quarkus security includes several extensions from Elytron. In this tutorial we will learn how to use the Database Realm Authentication with a simple REST Service. Our project will perform authentication against the H2 in-memory database. In order to bootstrap our project we will need the following extensions mvn io.quarkus:quarkus-maven-plugin:1.0.0.CR1:create \ -DprojectGroupId=com.mastertheboss \ -DprojectArtifactId=quarkus-jdbc-realm \ -DclassName=”com.mastertheboss.SecuredResource” … Read more

How to run WildFly on AWS EC2

In this tutorial I’ll show you how you can install Wildfly application server on Amazon EC2 instance. The pre-requesite is that you have already your Amazon account available, so you are ready to launch a new Instance: In the next Window, choose one of the available Images, for example a RHEL 8: You will have … Read more

Clustering WildFly on Openshift using WildFly Operator

Do you want to learn how to start quickly a WildFly cluster running on Openshift using WildFly Operator? then keep reading the rest of this article! First of all, what is an Operator? In essence, an Operator is a standard method of packaging, deploying and managing a Kubernetes application. With OpenShift 4, everything is deployed … Read more

Using Servlet Context in Quarkus

Quarkus includes the undertow extension, therefore it’s fully capable of delivering Servlet applications. In this example, we will show how to use the ServletContext in a REST Application. One challenge is that you cannot @Inject the ServletContext directly as you would do it in a Jave EE environment. Nevertheless you can count on the JAX-RS … Read more

Scheduling periodic Tasks in Quarkus

Quarkus does not provide support for EJB therefore you cannot rely on EJB Timers to schedule simple tasks. However, thanks to the extension quarkus-scheduler it is very simple to add this functionality. Let’s create a simple project with Quarkus Maven plugin: mvn io.quarkus:quarkus-maven-plugin:0.19.1:create \ -DprojectGroupId=com.sample \ -DprojectArtifactId=demo-scheduler \ -DclassName=”com.sample.CountEndpoint” \ -Dpath=”/count” \ -Dextensions=”scheduler” By the … Read more

How to deploy an application on Openshift using a Binary Build

In this short tutorial we will see how to deploy an Enterprise applications on Openshift (The Kitchensink demo) using a Binary Build, therefore having as input just the local WAR file. In most cases you can create applications on Openshift using the S2I (Source to Image) process using as input for your Templates a remote … Read more

Creating an Ajax front-end to a Quarkus REST application

In this article we will check out how query a REST Service running with Quarkus with a minimal Ajax and jQuery client. Quarkus applications can be quickly bootstrapped using the Maven or Gradle plugin available. The plugin will generate a minimal project structure with a sample REST Endpoint and the Quarkus’s Maven dependencies included in … Read more