Java Dockerfile.

Docker – what’s not to like?
Here’s a docker file that installs Java 8 over an Ubuntu base.
It also installs Git and Maven. It takes a little while to build but does provide a full JDK with git and maven.

To help remove unwanted images and stop any and all running containers here are two bash scripts.

Execution Statistics.

Recently I needed to find a way of logging the execution statistics of a number of methods in Java classes. The execution statistics included such things as number of invocations per unit of time, the longest and shortest execution time, the accumulated execution time per method etc. This needed to be done in a non-intrusive way – i.e. no direct modification of the code under examination. This type of orthogonal processing what AspectJ is designed for. A way to use AspectJ for this is now described. The steps are Setup Maven pom.xml with the required dependencies and the AspectJ build Read More

Configuring an Embedded Tomcat Instance.

An ongoing project I’m working on involves setting up SAML based Single Sign On (SSO). At the core of this task is a legacy REST system that uses Netty and has its own http request dispatch system along with a tightly coupled persistence framework. Essentially the system does not have an application server that could have been used to process SAML’s Web Browser profile – a widely used means of obtaining authorisation from a SAML Identity Provider (IdP). I decided to investigate running Tomcat in embedded mode and so be able to use it for handling SAML messages. So this Read More

ˆ Back To Top