Shipping Fallback Scripts with "nomodule"

All recent browsers come with good support for WebComponents, ES 6 and ES 6 modules, so you can develop and ship a web application without any build, or transpilation steps (even without npm), and generate a fallback script on e.g. Jenkins and deliver it with the script nomodule attribute:

See you at "Build to last" effectively progressive applications with webstandards only -- the "no frameworks, no migrations" approach, at Munich Airport, Terminal 2 or effectiveweb.training (online).


Web Apps, SPA, PWA with vanilla Java Script (ES 6+), CSS 3 and WebStandards only. As simple as possible, but not simpler. See you at: (Progressive) Web apps, Single Page Apps and WebStandards airhacks workshops at MUC airport, Winter Edition

airhacks.fm the podcast:

Stay in touch: airhacks.news.

Unidirectional Dataflow with WebComponents, async fetch and CustomEvents

Separating backend access (HTTP communication) and the presentation using asynchronous fetch API, Web Components,CustomEvents and a bit lit-html:

See you at "Build to last" effectively progressive applications with webstandards only -- the "no frameworks, no migrations" approach, at Munich Airport, Terminal 2 or effectiveweb.training (online).


Web Apps, SPA, PWA with vanilla Java Script (ES 6+), CSS 3 and WebStandards only. As simple as possible, but not simpler. See you at: (Progressive) Web apps, Single Page Apps and WebStandards airhacks workshops at MUC airport, Winter Edition

airhacks.fm the podcast:

Stay in touch: airhacks.news.

A Lean "Core Insurance As A Service" (Java EE / Jakarta EE / MicroProfile) Startup--airhacks.fm podcast

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

The #50 airhacks.fm episode with Matthias Reining (@MatthiasReining) about:

the tech11 "Core Insurance Platform as a Service" startup, the technology choices in product development, and productivity with Java EE, Jakarta EE, MicroProfile and WebComponents / WebStandards
is available for download.

See you at Web, MicroProfile and Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.


Web Apps, SPA, PWA with vanilla Java Script (ES 6+), CSS 3 and WebStandards only. As simple as possible, but not simpler. See you at: (Progressive) Web apps, Single Page Apps and WebStandards airhacks workshops at MUC airport, Winter Edition

airhacks.fm the podcast:

Stay in touch: airhacks.news.

Quarkus JAX-RS Service With CORS Support

quarkus.io ships with the undertow web server and built-in Cross-Origin Resource Sharing (CORS) support. To activate the CORS filter you only have to set a single property (quarkus.http.cors=true).

In this screencast I built a web application from scratch and accessed the backend using the Fetch API with and without activated CORS:

See you at Web, MicroProfile and Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.


Web Apps, SPA, PWA with vanilla Java Script (ES 6+), CSS 3 and WebStandards only. As simple as possible, but not simpler. See you at: (Progressive) Web apps, Single Page Apps and WebStandards airhacks workshops at MUC airport, Winter Edition

airhacks.fm the podcast:

Stay in touch: airhacks.news.

Payara, "java.lang.NoSuchMethodError: com.google.common.collect..." Problem and Solution

Payara Server loads own libraries / jars like e.g. Google's Guava first. In case your application uses a recent feature (e.g. a method) in a newer version of such a library, you will get an exception like:

Caused by: java.lang.NoSuchMethodError: com.google.common.collect.Sets$SetView.iterator()Lcom/google/common/collect/UnmodifiableIterator;

Turning off the class loader delegation solves the problem:


<?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE payara-web-app PUBLIC "-//Payara.fish//DTD Payara Server 4 Servlet 3.0//EN" "https://docs.payara.fish/schemas/payara-web-app_4.dtd">
    <payara-web-app error-url="">
    <class-loader delegate="false"/>
</payara-web-app>

However, a code refactoring and the removal of the dependency from the pom.xml and using Java 8+ / Java EE features only will make your WARs thinner and docker deployments faster:

See you at Web, MicroProfile and Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.


Web Apps, SPA, PWA with vanilla Java Script (ES 6+), CSS 3 and WebStandards only. As simple as possible, but not simpler. See you at: (Progressive) Web apps, Single Page Apps and WebStandards airhacks workshops at MUC airport, Winter Edition

airhacks.fm the podcast:

Stay in touch: airhacks.news.

Productive Java EE, MicroProfile, AI and Deep Learning--airhacks.fm podcast

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

The #49 airhacks.fm episode with Pavel Pscheidl (@PavelPscheidl) about:
Java EE's productivity, successful projects and overview about AI supervised and unsupervised learning algorithms.
is available for download.

See you at Web, MicroProfile and Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.


Web Apps, SPA, PWA with vanilla Java Script (ES 6+), CSS 3 and WebStandards only. As simple as possible, but not simpler. See you at: (Progressive) Web apps, Single Page Apps and WebStandards airhacks workshops at MUC airport, Winter Edition

airhacks.fm the podcast:

Stay in touch: airhacks.news.

JAX-RS Client / Jersey: HTTP Tracing

To log the HTTP traffic in a JAX-RS client (e.g. in a System Test) with Jersey, you will have to register an instance of LoggingFeature at the Client:


import org.glassfish.jersey.logging.LoggingFeature;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import org.junit.Before;
import org.junit.Test;

public class WorkshopsIT {

private Client client;
private WebTarget tut;

@Before
public void init() {
    this.client = ClientBuilder.newClient().register(logging());
    this.tut = this.client.target("http://localhost:8080/...");
}

LoggingFeature logging() {
    Logger logger = Logger.getLogger(this.getClass().getName());
    return new LoggingFeature(logger, Level.INFO, null, null);
}

@Test
public void request() {
    Response response = this.tut.request(MediaType.APPLICATION_JSON).get();
    assertThat(response.getStatus(), is(200));
    //...
}

The System Test yields:

Running com.airhacks.WorkshopsIT
Aug 09, 2019 8:55:20 AM com.airhacks.WorkshopsIT logging
Aug 09, 2019 8:55:20 AM org.glassfish.jersey.logging.LoggingInterceptor log
INFO: 1 * Sending client request on thread main
1 > GET http://localhost:8080/airhacks/resources/workshops
1 > Accept: application/json

Aug 09, 2019 8:55:20 AM org.glassfish.jersey.logging.LoggingInterceptor log
INFO: 1 * Client response received on thread main
1 < 200
1 < Connection: keep-alive
1 < Content-Length: 23
1 < Content-Type: application/json
1 < Date: Fri, 09 Aug 2019 06:55:20 GMT
{"airhacks":{"workshops":["PWAs","clouds","microservices"]}}

See you at Web, MicroProfile and Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.


Web Apps, SPA, PWA with vanilla Java Script (ES 6+), CSS 3 and WebStandards only. As simple as possible, but not simpler. See you at: (Progressive) Web apps, Single Page Apps and WebStandards airhacks workshops at MUC airport, Winter Edition

airhacks.fm the podcast:

Stay in touch: airhacks.news.

J4K, Quarkus, ThinWAR Startup, EJB, CDI, JavaMail--or 65th airhacks.tv

65th airhacks.tv episode with the following topics:

"j4k conference, Jakarta One, the ThinWAR startup, Quarkus, Java EE security, EJB inheritance vs. CDI, JavaMail in production, DTOs and BCE"
Any questions left? Ask now: https://gist.github.com/AdamBien/a47834f9c6dc4f85fe2de58084ac0246 and get the answers at the next airhacks.tv.

See you at Web, MicroProfile and Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.


Web Apps, SPA, PWA with vanilla Java Script (ES 6+), CSS 3 and WebStandards only. As simple as possible, but not simpler. See you at: (Progressive) Web apps, Single Page Apps and WebStandards airhacks workshops at MUC airport, Winter Edition

airhacks.fm the podcast:

Stay in touch: airhacks.news.

Code Shrinking Techniques with Jakarta EE and MicroProfile--Devoxx.pl

Is it possible to use clouds and microservice architectures to simplify and shrink the codebase with MicroProfile and Jakarta EE?

See you at Web, MicroProfile and Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.


Web Apps, SPA, PWA with vanilla Java Script (ES 6+), CSS 3 and WebStandards only. As simple as possible, but not simpler. See you at: (Progressive) Web apps, Single Page Apps and WebStandards airhacks workshops at MUC airport, Winter Edition

airhacks.fm the podcast:

Stay in touch: airhacks.news.

Quarkus is the Opposite of Wildfly--airhacks.fm podcast

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

The #48 airhacks.fm episode with Dimitris Andreadis (@dandreadis) about:

Distributed Computing, early JBoss days, the benefits of internal JBoss architecture, J2EE, Java EE, Jakarta EE, MicroProfile and JBoss vs. Quarkus
is available for download.

See you at Web, MicroProfile and Java EE Workshops at Munich Airport, Terminal 2 or Virtual Dedicated Workshops / consulting. Is Munich's airport too far? Learn from home: airhacks.io.


Web Apps, SPA, PWA with vanilla Java Script (ES 6+), CSS 3 and WebStandards only. As simple as possible, but not simpler. See you at: (Progressive) Web apps, Single Page Apps and WebStandards airhacks workshops at MUC airport, Winter Edition

airhacks.fm the podcast:

Stay in touch: airhacks.news.

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