Home » Author Archives: Bozhidar Bozhanov (page 2)

Author Archives: Bozhidar Bozhanov

Bozhidar Bozhanov
Senior Java developer, one of the top stackoverflow users, fluent with Java and Java technology stacks - Spring, JPA, JavaEE, as well as Android, Scala and any framework you throw at him. creator of Computoser - an algorithmic music composer. Worked on telecom projects, e-government and large-scale online recruitment and navigation platforms.

Spring-Managed Hibernate Event Listeners

jboss-hibernate-logo

Hibernate offers event listeners as part of its SPI. You can hook your listeners to a number of events, including pre-insert, post-insert, pre-delete, flush, etc. But sometimes in these listeners you want to use spring dependencies. I’ve written previously on how to do that, but hibernate has been upgraded and now there’s a better way (and the old way isn’t ...

Read More »

Installing Java Application As a Windows Service

java-logo

It sounds like something you’d never need, but sometimes, when you distribute end-user software, you may need to install a java program as a Windows service. I had to do it because I developed a tool for civil servants to automatically convert and push their Excel files to the opendata portal of my country. The tool has to run periodically, ...

Read More »

Why I Prefer Merge Over Rebase

git-logo

There are many ways to work with git. The workflows vary depending on the size of the team, organization, and on the way of working – is it distributed, is it sprint-based, is it a company, or an open-source project, where a maintainer approves pull requests. You can use vanilla-git, you can use GitHub, BitBucket, GitLab, Stash. And then on ...

Read More »

Dirty Hacks Are OK

software-development-2-logo

In practically every project you’ve used a “dirty hack”. setAccessbile(true), sun.misc.Unsafe, changing a final value with reflection, copy-pasting a class from a library to change just one line of wrong code. Even if you haven’t directly, a library that you are using most certainly contains some of these. Whenever we do something like that, we are reminded (by stackoverflow answers ...

Read More »

A Beginner’s Guide to Addressing Concurrency Issues

software-development-2-logo

Inserts, updates and deletes. Every framework tutorial starts with these and they are seen as the most basic functionality that just works. But what if two concurrent requests try to modify the same data? Or try to insert the same data that should be unique? Or the inserts and updates have side-effects that have to be stored in other tables ...

Read More »

How To Read Your Passport With Android

android-logo

As I’ve been researching machine readable travel documents, I decided to do a little proof-of-concept on reading ePassports using an NFC-enabled smartphone (Android). The result is on GitHub, and is based on the jMRTD library, which provides all the necessary low-level details. As I pointed out in my previous article, the standards for the ePassports have evolved a lot throughout ...

Read More »

Software Can’t Live On Its Own

software-development-2-logo

We’re building software in hope that some day we’ll leave it and it will live on its own. Or with minor supervision. But the other day when my father asked me to dig an old website, I did some thinking and realized auto-pilot software is almost never the case. Software is either being supported, or is abandonware, or is too ...

Read More »

Setting Up Distributed Infinispan Cache with Hibernate and Spring

jboss-hibernate-logo

A pretty typical setup – spring/hibernate application that requires a distributed cache. But it turns out not so trivial to setup. You obviously need cache. There are options to do that with EhCache, Hazelcast, Infinispan, memcached, Redis, AWS’s elasticache and some others. However, EhCache supports only replicated and not distributed cache, and Hazelcast does not yet work with the latest ...

Read More »

Microservices Use Cases

software-development-2-logo

A few months ago I wrote a piece in defence of monoliths and then gave a talk about it. Overall, one should not jump to microservices, because the overhead and risk are much higher than any professed benefits. But there I left out some legitimate use cases for microservices. These use cases may not be “typical” microservices, but they mostly ...

Read More »

Testing: Appetite Comes With Eating

software-development-2-logo

I’ve written a lot about testing. Some tips on integration tests, some how-tos, some general opinions about tests. But I haven’t told my “personal story” about testing. Why are tests needed should be obvious by now. It’s not all about finding bugs (because then you can use an excuse like “QAs will find them anyway”), it’s about having a codebase ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns