Dockerized Java EE 8 applications with GlassFish 5.0

GlassFish 5.0 represents the reference implementation of Java EE 8. We can dockerize Java EE 8 applications by using a GlassFish base image, such as the official oracle/glassfish. The Dockerfile of a zero-dependency Java EE 8 application looks like follows: FROM oracle/glassfish:5.0 COPY target/application.war $GLASSFISH_HOME/glassfish/domains/domain1/autodeploy/ A Docker container of that image starts the application server and auto-deploys our application. application.war ...

Read More »

Functional Java by Example | Part 1 – From Imperative to Declarative

Functional Programming (FP) is about avoiding reassigning variables, avoiding mutable data structures, avoiding state and favoring functions all-the-way. What can we learn from FP if we would apply functional techniques to our everyday Java code? In this series called “Functional Java by Example” I will refactor in 8 installments an existing piece of code to see if I can reach ...

Read More »

Java Command-Line Interfaces (Part 30): Observations

This series on parsing command line arguments in Java has consisted of 29 posts published over four months and covering 28 distinct open source libraries available for parsing command line arguments in Java. This post collects some observations that can be made from the first 29 posts in this series and provides some general considerations to make when selecting one ...

Read More »

Set up private blockchain with Ethereum (part 2)

In my previous post I set up a network of two nodes running a private blockchain. In this post I use it to create accounts, mine some ether and browse the blockchain with the Mist browser on my Mac. First I make sure the nodes are up and running. Then I go to the ‘geth’ console that runs on node1. ...

Read More »

The hidden dangers of Process Debt

Most of us involved in software development are familiar with the term “technical debt”. As a quick reminder, it was introduced by Ward Cunningham to describe the phenomenon that occurs when we use code that is easy to implement in the short run instead of applying the best overall solution we have identified. It is by definition a conscious decision ...

Read More »

Java – HashMap in-detail explanation

HashMap works based on hashing algorithm, As per Java doc HashMap has below four constructors, Constructor Description HashMap​() Constructs an empty HashMap with the default initial capacity (16) and the default load factor (0.75). HashMap​(int initialCapacity) Constructs an empty HashMap with the specified initial capacity and the default load factor (0.75). HashMap​(int initialCapacity, float loadFactor) Constructs an empty HashMap with the specified initial ...

Read More »

Secure Your Java App with Spring Security, Thymeleaf, and Okta

spring-interview-questions-answers

Never Build Auth Again – Love building user management? With Okta, you can add social login, multi-factor authentication, and OpenID Connect support to your app in minutes. Create a free developer account today. When you’re building your java app, user management is a critical consideration. It’s common for apps and APIs to partition access to different parts of an application, ...

Read More »