adam-bien.com adam-bien.com

Architectural Frameworks, Interactive Code Review, Kafka and JPA, JPA vs. JDBC, Charsets, RolesAllowed, Transactions, Metrics--or 78th airhacks.tv

Questions and topics (https://gist.github.com/AdamBien/6fb9ae56e83d78d643343013fa1a304d) for the 78th airhacks.tv: Java on RaspberryPI thoughts on Quarkus Hackathlon airhacks.com and airhacks.live 2020 updates architectural frameworks vs. conventions (conventions are explained in Apps with MicroProfile workshop) setup Java environment for a mac JPA vs. JDBC charsets,keyboards and inputs metrics, rest clients and metrics for intra...

adam-bien.com adam-bien.com

The End of Thorntail / WildFly Swarm

Thorntail (aka WildFly Swarm) is discontinued / EoL'ed: "Rightsize Your Services" was Thorntail's slogan, which implied stock Jakarta EE services were oversized. Thorntail's idea was to package your application with "Just Enough Runtime" and save some bits of RAM and disk space. You were in complete control of the packaged libraries with WildFly Swarm / Thorntail, but you had also pick and maintain them. Stock...

adam-bien.com adam-bien.com

Building Applications with MicroProfile

NEW Building applications with MicroProfile (and a bit of Jakarta EE) on-demand 8h, continuous coding, 100 parts workshop is available: microprofile.training. MicroProfile shares infrastructural APIs with Jakarta EE, like e.g. CDI, JAX-RS, JSON-B or JSON-P and comes with significant added value in areas like e.g. observability, robustness, configurability. In this ~8 hour, ~100 parts on-demand airhacks.io workshop, I'm building a...

adam-bien.com adam-bien.com

Upcoming JUGs, Online Conferences, Virtual Workshops

Von Java Entwickler zu Web (Components) / PWA / SPA Guru [online event] JUG Oberpfalz session 17 Jun 2020 https://www.meetup.com/JUG-Oberpfalz/events/268801392/ IBM Cloud Dev: Productivity without Drawbacks and Esoterics with MicroProfile and Jakarta EE #slideless [online event] free conference session 18 Jun 2020 https://ibm-clouddev.bemyapp.com Web For Java Devs [online event] JUG Switzerland session 25 Jun...

adam-bien.com adam-bien.com

Java 14+: Java Record JSON Serialization and Deserialization with JSON-B

To serialize a Java 14 POJR (Plain Old Java Record): public record Developer(int age, String language) { } You can use stock JSON-B Jakarta EE API: import javax.json.bind.Jsonb; import javax.json.bind.JsonbBuilder; import org.junit.jupiter.api.Test; public class JavaTest { @Test public void jsonb() { Jsonb jsonb = JsonbBuilder.create(); var developer = new Developer(25, "java"); var...

adam-bien.com adam-bien.com

Jakarta EE / MicroProfile / Web: Sessions, JUGs and Workshops

Jakarta EE and MicroProfile: a Kickstart with reasonable Practices conference session JAX Online online 26 May 2020 https://jax.de/serverside-enterprise-java/jakarta-ee-and-microprofile-a-kickstart-with-reasonable-practices/ Productivity = Sustainability: How To Build Proper Backends in 2020 #noslides #nomigrations conference session devtalks conference online 12 Jun 2020 https://www.devtalks.ro/agenda/ Web For Java...

adam-bien.com adam-bien.com

Java, Docker, CentOS and Encoding

On Centos 8 a glibc libary update (via e.g. yum update -y), may cause a reset of the locale to: LANG= LC_CTYPE="POSIX" LC_NUMERIC="POSIX" (...) LC_ALL= which causes Java applications to fallback to: java.nio.charset.Charset.defaultCharset() => US-ASCII (and some investigation work to find out the proper name of attendees with non-US characters in their name for the airhacks.live or airhacks.com event registrations...

adam-bien.com adam-bien.com

How To Read A File from JUnit Test

To read the file: src/test/resources/test.file in a unit/integration test, the method Paths.get is useful to set the working directory: import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; import org.junit.Before; import org.junit.Test; public class ReadFileTest { private Path workingDir; ...