Performing a FlyWay migration with Quarkus and Thorntail

This second tutorial about FlyWay will show you how to run a Migration using Quarkus and Thorntail using PostgreSQL Database. Flyway is an open-source library that lets you to automate version-based database migrations. Flyway records of all applied migrations into your RDBMs so that it can detect and execute the required migration steps to update … 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

How Wildfly uses the expression evaluator to evaluate attributes

In WildFly expressions are mechanism that enables you to support variables in your attributes. A typical usage is that you want the value of attribute to be resolved using System or Environment properties. An example expression is: ${jboss.bind.address.management:127.0.0.1} This means that the value should derive from a system property named jboss.bind.address.management and if it is … 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

3 ways to create Microprofile applications

Microprofile applications can be used in a large variety of contexts. In this tutorial we will learn how to use its API in the most common runtime environments. Configuring Microprofile API with Thorntail Thorntail offers a modern approach to packaging and running Java EE applications, including just enough of the environment to “java -jar” your … Read more

How to count records in JPA using a NamedQuery

Counting Records using a JPQL Query defined in a @NamedQuery Here is a quick tip which shows how you can count your Database records using a NamedQuery in JPA. Here is the Named Query: @NamedQuery(name=”Orders.countAll”, query=”SELECT COUNT(o) FROM Orders o”) Then, you can run the Named Query from any class which has access to the … 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

Provisioning WildFly with Galleon

No doubt the simplest way to install WildFly is by unzipping the zip files from the distribution and run it. On the other hand, if you want to be able to provision, update and customize your WildFly server distribution, keep reading this article we will talk about Galleon! Galleon is the latest tool which you … 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