Articles Tagged ‘tools’

Terminal Based Progress Bar for Java Applications

Sunday, March 31st, 2019

Recently I needed to add a progress bar to a Java based terminal/console application and I used a specific library that I’d like to demonstrate in the following snippet.

(more…)

Annotation based Kubernetes and Openshift Manifests for Java Applications with ap4k

Thursday, February 28th, 2019

Writing our manifest files for Kubernetes / Openshift often forces us to edit xml, json and yml files by hand.

A new library, ap4k allows to specify metadata for these manifest files directly in our Java code using annotations.

In the following short example I am going to demonstrate how to generate manifest files using Maven and ap4k.

(more…)

Analyzing Java Applications on the Fly with Arthas

Wednesday, October 31st, 2018

Arthas created by Alibaba is a tool that allows developers to connect to running Java applications without stopping them or suspending threads for debugging the application from the console.

It offers features like monitoring invocation statistics, searching for classes and methods in the classloaders, view method invocation details (like parameters), show the stack trace of a method invocation, monitor system metrics and others.

In the following examples I’m going to demonstrate some of these features applied to a running web application.

(more…)

Microbenchmarks with JMH / Java Microbenchmark Harness

Monday, October 2nd, 2017

Writing microbenchmarks for parts of our applications is not always easy – especially when the internals of the virtual machine, the just-in-time-compiler and such things are coming into effect.

Java Microbenchmark Harness is a tool that takes care of creating JVM warmup-cycles, handling benchmark-input-parameters and running benchmarks as isolated processes etc.

Now following a few short examples for writing microbenchmarks with JMH.
(more…)

Object Graph Mapping by Example with Neo4j OGM and Java

Monday, July 18th, 2016

When integrating a Neo4j database into a Java application a developer often needs to map nodes and edges of the graph to corresponding Java classes of the domain model.

Neo4j OGM eases this work and allows us to map our domain objects to the graph database using simple annotations – similar to the Java Persistence API (JPA) for relational database management systems.

In the following tutorial I’d like to demonstrate how to use Neo4j OGM to build a simple train timetable planner and a permission system mapping between graph, nodes, edges and POJOs.

(more…)

Search
Tags
Categories