r/foojay • • 1d ago

Token budgets for Spring AI: the problems I didn't expect

Thumbnail
foojay.io
2 Upvotes

On Foojay, Ujjwal Tiwari explains why counting requests is the wrong unit for LLM apps. One HTTP request can trigger forty paid model calls in a tool loop, and a rate limiter only sees one request.

The article covers Token Allowance, a Spring Boot starter that puts token and dollar budgets on Spring AI ChatClient calls, per user, tenant or session, with a cap on model calls per request. It also explains the harder parts: where the advisor check has to sit relative to ToolCallingAdvisor, a race in check-then-call budgeting and how reservations fix it, why costs are stored as micro-dollars in a long, and how OpenAI and Anthropic report input tokens differently.

https://foojay.io/today/building-token-budgets-for-spring-ai-the-problems-i-didnt-expect/

No hashtags are needed, but this fits #SpringAI #Java


r/foojay • • 1d ago

No-Boilerplate, Warning-Free and Reproducible Builds on Maven 4

Thumbnail
foojay.io
2 Upvotes

We just published an article by Lenny Primak on what changes in daily work with Maven 4. It explains why Maven 4 warns about unlocked plugin versions and how a base POM locks them without a plugin section in your project. It also covers using properties instead of plugin configuration, building multi-module projects without mvn install, parallel builds with mvnd and the build cache, and the Maven Wrapper.

Read it here: https://foojay.io/today/no-boilerplate-maven-4-builds/

Maven #Java #BuildTools


r/foojay • • 1d ago

On reviewing AI-generated code: control is partitioned, not lost

Thumbnail
foojay.io
4 Upvotes

We just published a new article on Foojay by Nicolas Frankel. He argues that reviewing every line an AI agent writes does not scale, since agents produce code faster than anyone can read it and defect detection drops as review volume grows.

He compares this to two earlier moments when developers stopped reading: garbage collection in the JVM and open source dependencies. In both cases, control moved to tooling and observation. His proposal is that tools own the mechanical checks, while humans own intent, boundaries, and irreversible changes. He also lists what tools can't see and shares the guardrails he uses in his own flow.

Link: https://foojay.io/today/reviewing-ai-generated-code/


r/foojay • • 1d ago

When an agent dies after saying yes: handling a worker that vanishes after AGREE

Thumbnail
foojay.io
2 Upvotes

We published a post by Mauro Mura on what happens in a Contract Net setup when a worker gets kill -9 after the manager awarded it a job. After AGREE the protocol only allows INFORM or FAILURE, and a dead process sends neither.

The article covers the application code in a job dispatcher built on Agenor:

  • A deadline stored in the job's database row, set to twice the worker's estimate plus a margin
  • A check on attempt, assignee and state, so a late result doesn't count
  • Writing the row first, then sending the AGREE
  • A cap of three attempts, so a job that kills its worker doesn't take down every worker

It also has steps to run the demo with Java 21, Maven and Docker or Podman.

https://foojay.io/today/when-an-agent-dies-after-saying-yes/


r/foojay • • 2d ago

Finally final: embracing JEP 500 and what it means for serializers

Thumbnail
foojay.io
3 Upvotes

On Foojay we published an article by Harald Krake about JEP 500, Prepare to Make Final Mean Final. Since JDK 26, writing a final field through deep reflection still works but prints a warning. A future release will switch the default to deny, and the same call will then throw an IllegalAccessException.

The article explains what this means for serializers, which have long relied on reflection to fill final fields. Harald shows how Tentackle's TRIP protocol now never writes a final field. Only the edges that close a cycle need to be mutable, and everything else can go through a constructor, as records do.

https://foojay.io/today/finally-final-embracing-jep-500/


r/foojay • • 2d ago

Jakarta EE 11 no longer ships an umbrella JAR

Thumbnail
foojay.io
6 Upvotes

On Foojay, Lenny Primak explains that jakarta.jakartaee-api in Jakarta EE 11 is now just a POM that lists the specification JARs. In EE 10, the umbrella JAR held 2,440 class files that were also on the classpath through the individual spec JARs. That caused JPMS split packages and OSGi problems. The article covers why an empty placeholder JAR is still published on Maven Central, how the Platform, Web Profile and Core Profile now depend on each other, and why existing builds keep working without changes.

Link: https://foojay.io/today/jakarta-ee-11-umbrella-jar/

Java #JakartaEE #Maven


r/foojay • • 2d ago

The 148 ms worst-case latency was waiting, not work

Thumbnail
foojay.io
1 Upvotes

On Foojay, Arkadiusz Przychocki looks into a 148 to 178 ms worst request that kept showing up for the Exeris arm of his single-row read benchmark. The JVM never stopped for anything close to that, and the longest GC pause was 23 ms. In a closed-loop wrk run, the mean it reported was 5.61 ms, while Little's law caps the real mean at 2.25 ms. Measured open-loop at a declared rate, the worst request was about 26 ms.

The article also covers a correctly configured open-loop run that still reported a 2.4 s p99 for a stack whose real tail was about 2 ms, with two heavyweight JVMs resident on the same box. The author explains what he changed in the harness afterwards and what it still does not catch.

Written by Arkadiusz Przychocki

https://foojay.io/today/the-148-ms-was-waiting-not-work/

benchmarking #java #performance


r/foojay • • 2d ago

What Java4Shell Teaches About Patching Java at AI Speed

Thumbnail
foojay.io
3 Upvotes

We just published a new article on Foojay by Miles Dawborne. It looks at what four Java runtime updates between October 20 and November 17 say about the year ahead. Java has had a security update every month since July, and the article cites 118 Java CVEs fixed so far in 2026.

It explains why a published fix now starts the clock for attackers, and how teams are changing their CI/CD and DevSecOps pipelines in response. The recommendations include keeping a live JVM inventory, using one golden JDK base image per Java version, rebuilding automatically on release, keeping a runtime regression suite, rolling out progressively with rollback, having a mitigation path ready, and defining "done" as verified in the running JVM.

https://foojay.io/today/what-java4shell-teaches-about-patching-java-at-ai-speed/

Java #Security #DevSecOps


r/foojay • • 3d ago

Driving FFmpeg from Java without deadlocks or broken files

3 Upvotes

We just published an article by Mark Santos on running FFmpeg from Java with ProcessBuilder. The code looks fine on a ten-second test clip, then hangs on a ten-minute file. The cause is the stderr pipe: it has a 64 KiB buffer, and once FFmpeg fills it, FFmpeg blocks and waitFor never returns.

The article explains three ways out: Redirect.DISCARD, INHERIT or to(file), redirectErrorStream(true), and reading stdout and stderr at the same time with a virtual thread. It also shows how to map ffprobe JSON onto records with Jackson. All examples were run on OpenJDK 21 and 27, and the test media comes from FFmpeg's own generators.

Author: Mark Santos

Read it here: https://foojay.io/today/driving-ffmpeg-from-java/


r/foojay • • 3d ago

Feature Toggles in Java, Without the If-Else

2 Upvotes

We just published an article by Kamran Zafar on how feature toggles tend to make code worse over time. The usual if (features.isEnabled(...)) pattern spreads across the codebase, multiplies code paths, fails silently on typos, and makes removal tedious.

The article explains a design approach that needs no library: toggle at a seam by putting each version behind an interface, decide in exactly one router class, make removal a deletion, keep feature names as constants and check them at startup, and treat toggle evaluation as infrastructure with a defined failure mode.

https://foojay.io/today/feature-toggles-in-java-without-the-if-else/


r/foojay • • 3d ago

Java4Shell: are we exposed? Steve Poole on an AI-assisted JVM vulnerability

1 Upvotes

We published an article by u/Steve Poole on Java4Shell (CVE-2026-114938), a memory corruption bug in HotSpot's accelerated Base64 decoder. Fixes shipped on 17 November. Calif found it by pointing OpenAI Codex at HotSpot for about 200 dollars of tokens.

The article explains what has to line up to be vulnerable: the runtime build, an x86-64 CPU with AVX-512 VBMI and BW, and attacker-controlled data reaching java.util.Base64.Decoder. Crashing a JVM is easy, full RCE is hard.

Steve also built two container images, one with a full JDK and one with a jlink runtime, and ran Syft, Trivy and Grype on them. Syft loses build details on the jlink image, and Trivy finds no JVM component at all.

https://foojay.io/today/java4shell-are-we-exposed/


r/foojay • • 3d ago

Keeping a Spring Boot service's structure in a YAML model instead of hand-written layers

1 Upvotes

On Foojay we published an article by Richard Kim, who leads ElastiCORE, an Apache-2.0 Gradle plugin that generates a Spring Boot application from a YAML model of a business domain.

Using the pet store sample, he explains how the model helps when the architecture or stack changes. Switching layered to hexagonal to ddd, Spring Boot 3.5 to 4.0, and Java to Kotlin took settings changes only, and the REST calls gave the same answers. The generator is also deterministic, so output keeps the same structure whichever AI assistant or prompt edited the model. Hand edits survive regeneration through a three-way merge. One caveat: layered does not enforce states and owner checks.

https://foojay.io/today/one-yaml-model-for-spring-boot-architecture-ai-coding-bi/


r/foojay • • 3d ago

AMD contributed a HIP backend to Tornadovm. First GPU vendor betting on java running on GPUs

Thumbnail
github.com
6 Upvotes

r/foojay • • 4d ago

Evaluating Java AI Agents with Harness Evals

2 Upvotes

On Foojay, Geertjan Wielenga explains how to use harness-evals, an Apache 2.0 licensed evaluation framework from Harness, to test agents built with Spring AI or LangChain4j. The tool is written in Python, but it can target a Java agent through an HTTP endpoint.

The article covers:

  • Metrics scored from 0.0 to 1.0 across five dimensions: correctness, groundedness, safety, trajectory and performance
  • Goldens, EvalCases, Metrics and Targets
  • A Spring AI controller, a goldens.jsonl file and a YAML eval config using an LLM judge
  • OpenTelemetry in both directions, including turning production traces into eval cases and exporting scores with OtlpSink
  • Privacy notes on capturing prompt and response content in traces

https://foojay.io/today/evaluating-java-ai-agents-with-harness-evals/


r/foojay • • 4d ago

Java4Shell (CVE-2026-114938): is your JVM running the vulnerable Base64 intrinsic?

1 Upvotes

We just published a new article on Foojay by Garth Patil about Java4Shell, a bug in the code HotSpot generates for java.util.Base64.Decoder, not in any library. It only affects some processors, so the same image can be safe on one host and exploitable on the next.

The article explains what the intrinsic is, how to check the CPU flags and the running JDK with jcmd, and how to turn it off with -XX:-UseBASE64Intrinsics so the flag actually reaches the process. It also covers mixed fleets, replace-not-append behavior in env variables like JAVA_OPTS_APPEND, and packaging traps when rolling out a patched runtime. The examples come from Keycloak.

Read it here: https://foojay.io/today/java4shell-jvm-base64-intrinsic/


r/foojay • • 4d ago

Interview with Libán Bande González: Going Beyond CSS in JavaFX

12 Upvotes

On Foojay, u/FrankCodeWriter interviewed Libán Bande González, a developer from Cuba who builds business management desktop applications with JavaFX. He wrote the book Skinning JavaFX Applications, which teaches the Control-Skin architecture and shows how to use it to restyle existing controls and build new ones from scratch.

The interview covers why CSS alone wasn't enough for his projects, for example, with glassmorphic panels, and how that led to the book. He also explains Vitra, a UI library of new controls built with skins, how it differs from AtlantaFX, and Celestia, a set of micro-interactions for JavaFX nodes.

Read the full interview: https://foojay.io/today/interview-with-liban-bande-gonzalez-skinning-javafx-applications/

#JavaFX #Java


r/foojay • • 4d ago

When Postgres is the wrong place to traverse the graph

2 Upvotes

We at Foojay published an article by Andrey Minogin on deep graph searches, like finding level-N friends or tier-N parts in a bill of materials. Recursive CTEs in Postgres hit the O(b^D) wall as branching factor and depth grow, and Postgres cannot do a true depth-first search, so the frontier keeps growing in memory.

The article explains moving the traversal into application memory: a depth-first search over an in-memory graph using primitive collections (HPPC) instead of boxed Java types, which can cut memory use up to 10 times. It also covers early filtering, visited-sets, and concurrent updates.

https://foojay.io/today/when-postgres-is-the-wrong-place-to-traverse-the-graph/


r/foojay • • 5d ago

Which Java build are you running? "21" is not a full answer

2 Upvotes

On Foojay we published a new article by u/FrankCodeWriter. He asked Java developers at JFall which version they run. Most said 21 or 25, but almost nobody knew which build.

The article explains why the build matters more than the version, using the October 2026 quarterly update with 53 CVEs, two out-of-cycle releases and the November 17 monthly update. It shows how to read java -version, compare it with the release notes, and check how many CVEs your build is missing. It also covers Docker images, package managers and keeping an inventory of which JDK runs where.

Frank works for Azul, which sponsors Foojay. The advice applies to any OpenJDK build.

https://foojay.io/today/which-java-build-are-you-running/


r/foojay • • 5d ago

Codename One now runs on embedded Linux, and the UI drew a gauge in 18 MB with no GPU

4 Upvotes

On Foojay we published an article by Shai Almog about running Codename One on embedded Linux with one Java or Kotlin codebase. It covers two flavors: a UI flavor for something like a POS terminal, and a headless backend flavor for something like a robot vacuum.

He benchmarked the same 800 by 480 animated gauge in five toolkits, in software on a Debian arm64 container. Codename One used 18 MB of memory, while a Chromium kiosk used 398 MB. The headless backend served 379,900 requests per second on two cores, 1.3 times Rust's axum. The article also notes that the container ran on an Apple Silicon Mac, so a real board will be slower, and that Slint needs less disk and Qt draws a few more frames.

Link: https://foojay.io/today/embedded-linux-ui-in-18-mb/


r/foojay • • 5d ago

No Programmer Knows Everything: Joseph Ottinger on gaps, teams and interviews

4 Upvotes

On Foojay, we published an article by Joseph Ottinger about the fear that a good programmer must know everything. He points out that a job ad asking for "Java" covers a huge range of topics, and that no one masters all of it.

The article explains that gaps differ. Some are things a person hasn't learned yet, some are strength gaps, some come from priorities, and some come from workplaces where asking questions carries a penalty. It also covers why teams benefit from knowing their gaps, and why Joseph interviews as a conversation, looking for aptitude and people who want to learn and teach.

https://foojay.io/today/no-programmer-knows-everything/


r/foojay • • 5d ago

Reactive Messaging on Quarkus: one stock quote app built in four stages

1 Upvotes

On Foojay, Nicolas Duminil explains MicroProfile Reactive Messaging and its SmallRye implementation through a single application that polls stock quotes, classifies each price movement as UP, DOWN or FLAT, and publishes the signal.

The app starts inside one JVM, then moves to three services communicating through Apache Kafka, and finally adds a fourth service that consumes the signals on virtual threads. The article covers the specification, the acknowledgment strategies and their defaults, what SmallRye adds (Mutiny, @Merge, @Broadcast, the Kafka connector), and how reactive style compares with virtual threads. It also shows the sequence diagram and code of each Maven module, and analyzes the unit and integration tests.

Link: https://foojay.io/today/reactive-messaging-on-quarkus/


r/foojay • • 6d ago

Lottie4J 1.3.0 and 1.4.0 are out, with better parsing and full writing of Lottie files

2 Upvotes

On Foojay, u/FrankCodeWriter covers two Lottie4J releases that came out of work on AnimatorFX, Dirk Lemmermann's application that imports Lottie animations through the library.

1.3.0 loads real-world files that don't follow the spec, such as expressions, unknown layer types and bare number properties. It


r/foojay • • 6d ago

Which JDK are you on and what stops you from upgrading?

2 Upvotes

We asked the Foojay Slack community which JDK they run in production and what holds them back. Dominika Tasarz u/DomFoojay wrote up the 14 replies (not a survey), which ranged from JDK 21 and 25 to one team on 27 and a speaker using 28 early access.

The blockers were mostly not about Java itself. They were about checking that frameworks, libraries and production environments still work together. The article also covers why "LTS only" is not the same as "supported", how Renovate and OpenRewrite help with upgrades, and why quarterly updates are worth checking.

Which JDK are you on, and what keeps you there? Read the article here: https://foojay.io/today/which-jdk-are-you-on-and-what-stops-you-upgrading/


r/foojay • • 7d ago

Shopify Was Wrong and Right to Dump React Native, by Shai Almog

3 Upvotes

On Foojay, we published an article by Shai Almog on Shopify's decision to move its mobile apps off React Native and rewrite them in Swift and Kotlin.

Shai argues that React Native deserved to go because it is a heavyweight UI toolkit, which hands your widgets to the OS and the vendor skin. He cites a Samsung keyboard issue that can hang a text field as one example. His view is that replacing it with two native codebases doubles the costly parts, which are platforms, testing and store churn, and that AI makes each of them worse.

The article also covers the heavyweight versus lightweight toolkit split, and the cold start and crash-free numbers Shopify reported after its rewrite.

Read the full article here: https://foojay.io/today/shopify-was-wrong-and-right-to-dump-react-native/


r/foojay • • 7d ago

Passion Project Contest: share what you built and why, win €500

2 Upvotes

We just published details of the Passion Project Contest, written by Maaike van Putten. It is a free contest for developers who built something because it annoyed them, seemed like a good idea, or simply made them happy. The tech implementation is not judged, and any language or stack is welcome. The focus is on what you made, why, who it helps, and what you learned.

A jury of developers, including Java Champions, picks five projects for a showcase video. Jury and public each count for 50% of the vote, and the winner gets €500. Every entrant gets free access to the live seminar Self-advocacy for developers.

You can enter if you are 18 or older, build software, and live in the EU, EEA, UK, or Switzerland. The deadline is 31 December 2026.

https://foojay.io/today/passion-project-contest/