Home » Java

Java

Constraint Streams – Modern Java constraints without the Drools Rule Language

Traditionally, to scale out with OptaPlanner, you had to learn DRL. No more. With the new Constraints Streams API, inspired by Java 8 Streams and SQL, you can now write your constraints in Java (or Kotlin or Scala) and still benefit from incremental calculation. Underneath, Constraints Streams (CS) still use the powerful Drools engine. We also still fully support score ...

Read More »

Qute Templates with Quarkus

java-interview-questions-answers

Quarkus ships with its own templating engine, Qute, which already includes an interesting set of features. In the following video, I’m showing the basic usage of action-based MVC with JAX-RS that forwards our requests to HTML templates. To try out Qute yourself, have a look at the following resources: Example projectQute Templating Engine GuideQute Reference Guide Published on Java Code ...

Read More »

Quarkus on OpenJ9 JVM & resource consumption

java-interview-questions-answers

Besides the native mode, Quarkus also runs well in JVM mode which comes with its own advantages. You can use an alternative JVM, such as OpenJ9 which gives you better resource consumption. In the following video I’ll show how easy it is to swap the JVM. In the video, I’m using the Docker image adoptopenjdk/openjdk14-openj9 in one of the latest ...

Read More »

Quickly creating URIs with UriBuilder

java-interview-questions-answers

If you have access to the JAX-RS API and an implementation in your projects (many do), then you can use JAX-RS’ UriBuilder to conveniently create URIs via builder pattern using resolvable placeholder. Have a look at the following example: 1 2 3 4 5 6 7 String host = System.getProperty("host", "localhost"); String port = System.getProperty("port", "8080");   URI uri = ...

Read More »

Quarkus’ additional (non-standard) CDI features

java-interview-questions-answers

Quarkus supports CDI (Contexts and Dependency Injection) 2.0, but not all of it, only the most common features. However, Quarkus does include some non-standard features that can come in quite handy to developers which I want to show in the following video. Whether or not you’re familiar with CDI, if you use Quarkus you should have a look at the ...

Read More »

Invoking Secure WCF SOAP Service using SoapUI – Part 1, The service

java-interview-questions-answers

In this saga divided into three-part, I will demonstrate how to use the SoapUI API tool to invoke a secured SOAP service. Firstly, I will focus on creating a service where in the next posts it will serve as the system under test. The access to the resource in this service is maintained using Basic Authentication transport security mechanisms. One of many provided by ...

Read More »

Spring Boot tests with Testcontainers and PostgreSQL, MySQL or MariaDB

Testcontainers is a Java library that allows integrating Docker containers in JUnit tests with ease. In a Containerized World, there is little sense to complicate the tests configuration with embedded databases and services. Instead, use run your services in Docker and let the Testcontainers manage this for you. In this blog post you will learn how to configure Testcontainers to ...

Read More »

All You Need To Know About UI Testing

Let’s start with a question. What is the first thing that a user interacts with on a website? The interface, of course. The look and feel of the website is the first thing that creates the “First Impression” on the users. An interactive web application can make or break the deal for users, this is why more and more people ...

Read More »

Complete Guide To Selenium Locators In Protractor (Examples)

While testing the functionality for your website, especially web elements such as radio button, text boxes, drop-down, etc., you need to make sure that you are able to access these elements. Selenium locators serve this exact purpose, by using this command we can identify these web elements, DOM (Document Object Model), to perform Selenium test automation through our scripts. These ...

Read More »