Avoiding Port Collisions by Launching Multiple Quarkus Instances in DEV Mode

Quarkus started in development (quarkus:dev) mode with a JAX-RS endpoint exposed, opens two ports: (http) 8080 and (debug) 5005 per default.

You will have to assign distinct ports for every new launched instance. The http port is configurable in the application.properties: quarkus.http.port=8282 or environment entries (not suitable for our purpose), the debug port can be changed (-Ddebug=6000) or deactivated from the command line only: mvn compile -Ddebug=false quarkus:dev

Early 2021 Java, Web, Architecture Events, Conferences And Workshops

  1. WeAreDevelopers conference: 2021: Familiar APIs on Kickass Runtimes #slideless [online event]
    conference session 20 Jan 2021
  2. airhacks.tv: #83rd airhacks.tv Questions and Answers [online event]
    live questions and answers show 8 Feb 2021
  3. JavaLand conference: Timesaving Metrics - In The Clouds #slideless [online event]
    conference session 16 Mar 2021
  4. airhacks.live: Monoliths, Microservices, Serverless, Event-Driven,(...) Architectural Styles [online event]
    live, interactive, virtual workshop 16 Mar 2021
  5. airhacks.live: Building Event-Driven Applications with Streams, Logs and Messages [online event]
    live, interactive, virtual workshop 23 Mar 2021
  6. airhacks.live: Best Practices, Hacks and Frontend Patterns with Vanilla Web Components, redux and lit-html [online event]
    live, interactive, virtual workshop 15 Apr 2021
  7. airhacks.live: Building Mobile Apps with Vanilla Web Components, redux and lit-html [online event]
    live, interactive, virtual workshop 6 May 2021

microprofile.training: Java 14 to Java 15 Update and MP REST Client CXF to RESTEasy Migration

Update from Java 14 with --enable-preview to Java 15, fixing Apache CXFs:

java.lang.IllegalAccessError: class org.apache.cxf.microprofile.client.MicroProfileClientProviderFactory$$Lambda$345/0x0000000800c309b0 tried to access protected method 'int org.apache.cxf.jaxrs.provider.ProviderFactory.compareCustomStatus(org.apache.cxf.jaxrs.model.ProviderInfo, org.apache.cxf.jaxrs.model.ProviderInfo)' (org.apache.cxf.microprofile.client.MicroProfileClientProviderFactory$$Lambda$345/0x0000000800c309b0 and org.apache.cxf.jaxrs.provider.ProviderFactory are in unnamed module of loader 'app'

by switching from cxf-rt-rs-mp-client to resteasy-client-microprofile.

A free bonus video from the microprofile.training video course:

Also checkout the corresponding repository: github.com/adambien/microprofile.training.

Java CLI Apps, Builds and jbang--airhacks.fm podcast

Subscribe to airhacks.fm podcast via: spotify| iTunes| RSS

The #122 airhacks.fm episode with Max Rydahl Andersen (@maxandersen) about:
creating Java Command Line Applications with and without jbang, new ways to launch and build Java applications with minimal requirements, how jbang happened, combining quarkus and jbang, and building serverless applications with quarkus and jbang
is available for

Future.works: The Feel of Next Generation Java Cloud Native Runtimes

Building a Java backend service with familiar APIs on a next generation runtime:

Web Components in 2021, MicroProfile vs. Jakarta EE, Authentication, Monoliths vs. Microservices, Bulkheads--or 83rd airhacks.tv

The very first airhacks.tv 2021 episode with the following topics:

"Vanilla Web Components in 2021, MicroProfile vs. Jakarta EE, authentication and authorization, Java monoliths vs. microservices, hazelcast, bulkheads and executor services, the role of patterns, popularity of NetBeans, SpringBoot on Quarkus"

...is available:

Any questions left? Ask now: https://gist.github.com/AdamBien/a149e756cbdf591cd817a060a182d755 and get the answers at the next airhacks.tv.

Fixing ES 6+ Import Autocompletion in Visual Studio Code

The default Visual Studio Code configuration for autocompletion of ES 6 imports "javascript.preferences.importModuleSpecifierEnding" is set to "auto" and is therefore unpredictable.

With the change to: "javascript.preferences.importModuleSpecifierEnding":"js" Visual Studio Code generates valid ES 6 imports. This is particular useful in vanilla Web Component applications:

Java and The Constructive Approach to Innovation--airhacks.fm podcast

The #121 airhacks.fm episode with Sharat Chander (@Sharat_Chander) about:
Mobile Java, Sun Microsystems, NetBeans, Oracle, JavaONE and the constructive approach to innovation
is available for

Vanilla WebComponents, MicroProfile, Jakarta EE 8, ExecutorServices, GoF Patterns, NetBeans--or 82nd airhacks.tv

Topics and questions for the very first airhacks.tv in 2021:

  • The role of vanilla WebComponents in 2021
  • Java, MicroProfile, Jakarta EE in 2021
  • Authentication and authorization with Gluu or Keycloak
  • Jakarta EE 8 monoliths and Hazelcast on Payara vs. microservices
  • Creating managed executor services programmatically in GlassFish / Payara
  • Multiple vs. single executor services in an application
  • The role of GoF patterns
  • Popularity of NetBeans [blog comment]
  • SpringBoot with Quarkus [blog comment]

Any questions left? Ask now: https://gist.github.com/AdamBien/e4d79cfb19dd3525d36262499525a3e1 and get the answers at the next airhacks.tv.

Ask questions during the show via twitter mentioning me: https://twitter.com/AdamBien (@AdamBien),using the hashtag: #airhacks or built-in chat at: airhacks.tv.

You can join the Q&A session live each first Monday of month, 8 P.M at airhacks.tv

Java: An Endless List of Random Booleans

This snippet generates an endless / limited (to ten in this example) list of booleans:


import java.util.stream.Stream;
import java.util.stream.Collectors;

//...
var randomBooleans = Stream.
                    generate(Math::random).
                    limit(10).
                    map(r -> r > 0.5).
                    collect(Collectors.toList());

System.out.println(randomBooleans);

...or (thanks to @RUAmentalist):


import java.util.Random;
//...
var randomBooleans = new Random().
                    ints(10).
                    mapToObj(r -> r > 0.5).
                    collect(Collectors.toList());
System.out.println(randomBooleans);

Prints: [true, false, true, false, false.... The output should be different each time :-)

Online Workshops
...the last 150 posts
...the last 10 comments
License