Articles, Home

Testing Java Applications for Resilience by Simulating Network Problems with Toxiproxy, JUnit and the Docker Maven Plugin

When implementing distributed systems, client-server architectures and simple applications with network related functionalities, everything is fine when we’re in the development or in the testing stage because the network is reliable and the communicating systems are not as stressed as they are in production.But to sleep well we want to validate how resilient we have implemented our systems, how they behave when the network fails, the latency rises, the bandwidth is limited, connections time

Articles, Home

Where Has the Java PermGen Gone?

Prior to JDK8 class metadata and constants would live in an area called the “permanent generation”, contiguous with the Java heap. One problem was that If the class metadata size is beyond the allocated bounds your app would run out of memory.With the advent of JDK8 we no longer have PermGen. The space where it was held has now moved to native memory to an area known as the “Metaspace”.

Articles, Home

JAXB Convert JSON to Java Object Example – HowToDoInJava

Java example to convert JSON to Java Object. You can unmarshal JSON String to Object or JSON file to Object, both. This example uses MOXy along with JAXB to unmarshal JSON to Java object. MOXy implements JAXB allowing developers to provide their mapping information through annotations as well as provide many rich features which JAXB …