Leverage Huffduffer from mobile safari (again)

Swiping through my timeline it sometimes happens that I stumble upon a podcast episode that sounds especially interesting. The issue is, I don’t necessarily wanna subscribe to the full thing but only ’d like to listen to that specific episode. While this issue is a solved problem in general (thanks to an awesome service called Huffduffer) it lately became an issue again on my mobile phone (where I tend to consume my timeline) since my beloved huffduffer-workflow stopped working and the all-new shortcuts-app … well, it felt clunky already and over time got even worse. ...

October 25, 2020 · 1 min · schoeffm

JSON-Log Parsing With stern and jq

In many projects we use JSON as log format since it inheritly bears structure and thus is easy to process by log-aggregators (i.e. AWS CloudWatch autom. discovers fields from json just like fluentd). ...

May 7, 2020 · 2 min · schoeffm

Troubleshooting Containerized Java Applications via JMX

When developing JEE applications these days we not only deploy ‘em as containerized apps but (at least in my teams) also use containers for local development. One issue I was confronted with the other day was a performance bug with one of our apps. Back in the days I’d have just fired up VisualVM to connect to the local process causing trouble - but now, the process to attach to doesn’t run locally anymore. ...

May 2, 2020 · 6 min · schoeffm

Towards Flexible Metrics Using SimplyTimed

When revision 2.3 of the microprofile metrics API was release earlier this year it introduced a new metric type called Simple Timer. Granted, with a name like that it’s easy to underestimate this new type - but don’t get tricked by its unspectacular title. Turns out, most of the time (especially in my projects where we also make use of Prometheus) it’s a way better suited and more flexible metric than i.e. its older cousin Timer. ...

March 29, 2020 · 5 min · schoeffm

jq by example

Inspired by a nice tutorial on Baeldung I’ve decided to write done some usual suspects when working with jq. Hence, this is more like a cheatsheet than a regular post. ...

January 29, 2020 · 3 min · schoeffm

Switching JAX-RS serializer in payara

When working with Payara I stumble every once in a while over JSON-serialization issues. Payara v4 uses MOXy as default provider while Payara v5 comes with JsonB-support which apparently makes use of Yasson. Although, after moving from v4 to v5 I’m fine with the JsonB-default it may still be useful to use Jackson as JSON provider instead of the default one (to be honest, many things just worked out-of-the-box with Jackson like reflective access to props (no extra getter necessary) or support for Maps etc....

January 16, 2020 · 1 min · schoeffm

Access Host From Inside a Docker Container

This is more a bookmark than a post - but I’d like to write it down explicitly since everytime I need this I have to google it (and cutting through the false positivies sucks). From 18.03 onwards our recommendation is to connect to the special DNS name host.docker.internal, which resolves to the internal IP address used by the host. This was taken from the docker-for-mac documentation were you can find more details....

January 1, 2020 · 1 min · schoeffm

Ntlm Authentication in Java

Recently I had to integrate a java based application with a web-service that used NTLM authentication. Since this was the first time I came across NTLM I initially had to explore how to deal with that auth-scheme. Luckily, I finally stumbled upon the Authenticator-class in Java and learned that there is build in support for NTLM already....

September 20, 2019 · 4 min · schoeffm

Network Debugging of Containerized Java Apps

The other day, I had the need to look closer into the network communication of a (dockerized) JEE application. My usual tcpdump approach wasn’t applicable though because the traffic was TLS-encrypted.Finally, I ended up with a setup where the app used a man-in-the-middle proxy for all its communication - that proxy transparently re-encrypted the traffic which gave me the chance to inspect every single message exchanged. ...

September 19, 2019 · 3 min · schoeffm

Cors by Example

More often than not CORS mean little more to developers than just getting rid of the infamous browser error in order to continue cranking out features as soon as possible. In other words, it’s not the best understood concept out there. Hence, to shed more light upon the topic, I’d like to give some working examples of CORS setups and show why they work. The more detailed explanation about the backing concepts I relinquish to the excellent MDN documentation if you’d like to dig deeper....

August 30, 2019 · 5 min · schoeffm