IoT Notification: How to implement a notification system

This article describes how to implement an IoT notification system. A notification is a way we can use to send alarms or other kinds of information to users. This post details, step by step, how to build an IoT notification system using a few lines of code and integrating existing cloud platforms. The aim is to send a notification to ...

Read More »

Writing end to end test for a microservices architecture

One of the main aspects of microservices architecture is that the application is formed as a collection of loosely coupled services each one deployable independently and communicated each other with some kind of light protocol. It is because of microservices architecture is a distributed system that makes writing end to end tests really hard. Suppose next simple example provided by ...

Read More »

DataSource Routing with Spring @Transactional

spring-interview-questions-answers

I was inspired by Carl Papa’s use of aspects with the Spring Framework to determine the DataSource to use (either read-write or read-only). So, I’m writing this post. I must admit that I have long been familiar with Spring’s AbstractRoutingDataSource. But I did not have a good idea where it can be used. Thanks to Carl and team, and one ...

Read More »

Power Up Your Data Model With Projections

spring-interview-questions-answers

Introduction Data models can be tricky. Modelling can be even harder. Sometimes information that should go into a database table isn’t necessarily what we want to go out to every piece of code. And like so many other times, Spring comes to the rescue. A little feature called projection helps us to map data with only a few lines in ...

Read More »

20 Years Of Java

Twenty years ago in a Zurich apartment two momentous things happened. My daughter took her first steps and a young post doctoral researcher (her dad) took his first steps with Java.  It is really hard to fully understand what Java was back then.  These where the days in which TCL was all the rage and Java had some slightly strange ...

Read More »

Java 9 at a glance

To many Java 9 may seem to be a maintenance release that pushes forward project Jigsaw that couldn’t make it in Java 8. But along with the new module system in the JDK and a number of internal changes associated with it Java 9 brings also a number of cool new stuff to the developer’s toolbox. Here are the highlights: ...

Read More »

Run code on startup with Play and Scala

Depending on various projects, sometimes there is the need to execute some actions on initialization just before our application starts to serve requests. It was a common practice to call the functions that we wanted to get executed through GlobalSettings, however it is not recommended. The other way around to achieve this is to implement a class which will be ...

Read More »

Integration tests with Maven

Implementing unit tests with maven is something ordinary and most of us are familiar with the project structure and where the unit tests reside. However Integration tests are a different case and most of times they have pretty different requirements. For example it is ok to have your unit tests operate on a h2 in memory database but when it ...

Read More »

Transactional exception handling in CDI

java-interview-questions-answers

In Java EE, exceptions that are raised during the execution of a transactional business method cause the transaction to rollback. However, this is only the case for system exceptions, that is, runtime exceptions, which are not declared in the method signature. For application exceptions, that is, checked exceptions, or any exception annotated with @ApplicationException, the transaction is not automatically rolled ...

Read More »