Fast and stateless API authentication with Spring Security

Spring Security is very mature and widely used security framework for Java based web applications. It works perfectly with minimal configuration and following successful login returns JSESSIONID cookie which allows to re-authenticate client’s consecutive calls as long as session doesn’t expire. Would Spring Security work and perform equally well for securing stateless APIs used for non-browser clients, such […]

Continue Reading

Unit testing and Date equality

Date equality is one of those things which could be painful to deal with when writing unit tests. If you are reading this post, I guess you came across this problem at some point in time 🙂 There are different approaches that could be taken to make tests pass consistently when java.util.Date is used as part […]

Continue Reading

Transactions (mis)management: how to kill your app

In this article I’m going to write about  transactions propagation. I will demonstrate how poorly designed application and misunderstanding of transactions propagation may cause your application to crash. Well, in fact I should say how to saturate connection pool and deadlock your database layer, but there is no much difference. The effect would be same – application would become unresponsive when trying to access and […]

Continue Reading

Provisioning multi-VM infrastructures with Vagrant and shell provisioner

There are different ways of creating virtual machines (VM) for either dev, qa or production environments. If you need to create one-off VM, doing it manually with VirtualBox, KVM or any other virtualization software is pretty straight forward. If you want to have a repeatable process and ‘cut’ VMs to different specifications, you may want […]

Continue Reading