Home » Java » Enterprise Java (page 4)

Enterprise Java

How to Convert a Java Object into a JSON String

java-interview-questions-answers

When learning how to write Java-based software, one of the first snags developers hit is how to connect their code with other software. This is usually where JSON comes in. While you might be a wizard with Java,  JSON is another animal. Regardless, this blog post explains all you need to get the job done. What is a Java Object?  ...

Read More »

Recent Drools DMN open source engine performance improvements

We are always looking to improve the performance of the Drools DMN open source engine. We have recently reviewed a DMN use-case where the actual input population of Input Data nodes varied to some degree; this highlighted a suboptimal behavior of the engine, which we improved in recent releases. I would like to share our findings! Benchmark development As we ...

Read More »

Kogito, ergo Rules — Part 1: Bringing Drools Further

The Kogito initiative is our pledge to bring our business automation suite to the cloud and the larger Kubernetes ecosystem. But what does this mean for our beloved rule engine, Drools? In this post we introduce modular rule bases using rule units: a feature that has been experimental for a while in Drools 7, but that will be instrumental for ...

Read More »

Enhanced CDI contexts & bulkheads with MicroProfile Context Propagation

java-interview-questions-answers

When using CDI with asynchronous execution methods, such as a ManagedExecutorService, it’s traditionally not possible to access all of CDI’s scopes that were active in the originating thread. MicroProfile Context Propagation enables to define and pass thread execution contexts to completion stages where our code can access various CDI contexts despite being executed asynchronously. Additionally, Context Propagation allows to create ...

Read More »

Chicken and egg – resolving Spring properties ahead of a test

spring-interview-questions-answers

Consider a service class responsible for making a remote call and retrieving a detail: 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 ... public class CitiesService {     private final WebClient.Builder webClientBuilder;     private final String baseUrl;       public CitiesService(             WebClient.Builder webClientBuilder,             @Value("${cityservice.url}") String baseUrl) {         this.webClientBuilder = webClientBuilder;         this.baseUrl = baseUrl;     } ...

Read More »