Posts about Java

An introduction to a simple utility to make life of developers and applications administrators easier, when it comes to debugging out of memory errors

Java 8's standard library introduces an Optional class used to represent the optional presence of a value in a type and discourage the use of null to represent optionality. Unfortunately, it is broken, and in being broken it actively encourages the use of null.

Sometimes I need to be hit in the head with an axe to find a solution to a problem that has been bugging me forever. A minimal Java container has been on my wish list since I found out about Docker and I've been writing about running Java in Docker for sometime already.

In this video you'll see me use the pre-release version of Docker Machine (0.3.0) to deploy a 3 node swarm on Digital Ocean and use label constraints to deploy our Java based enterprise Git server Stash and PostgreSQL.

Forewarned is forearmed, or so the saying goes. This means in the event of an incident, it's always best to have as much logging information available for diagnosis and remediation as is reasonable.

During my tour of duty providing support for our Tomcat and Java based behind-the-firewall apps, a common concern was the effect of updating Java or the JVM in the host after installing the product, and how it may affect a running production system. As some operating systems will auto-update system libraries such as Java with little notice, this risks loss of service from mission-critical apps in the unlikely case of a Java breaking change. Another common scenario that comes up is a case where a specific Java version is required for the app, which may not match the default version installed in the host. In this case, we'll want to specify a Java path to override any environment variable set at the host level to ensure consistent app behaviour. Finally, admins who wish to deploy multiple apps that require different versions of Java will be able to invoke them on the same host, each with the correct JVM.