Handle asynchronous results of external dependencies in Akka actors

While writing the example source code for a former post using the cake pattern to manage external dependencies in Akka actors I ended up with the following test failure:

Testing of cakes in Akka actors

External dependencies in Akka actors using the cake pattern

Introduction

Akka actors hide external dependencies stored in local members from the ouside world because the actor can only get instanciated through the actor system. This is very useful when you think about decoupling logic as well as distributing the actors over several nodes. The instanciation and execution responsibility stays fully in control of the actor system. But this advantage has some drawbacks when you think about unit testing an actor. Because all members and functions are hidden to the test case, there is no way to access the external dependencies nor to create mock objects for those dependencies. Therefore there are several "test safe" patterns to handle external dependencies in Akka actors. I will wrap up some possibiltities and explain a concrete pattern in detail.

Erweiterungen bei play-airbrake, errbit-android

Ausgangslage

Wir setzen seit einiger Zeit für unsere Applikationen den Errbit Fehlersammler ein. Errbit ist eine self-hosted Webapplikation mit derselben Schnittstelle wie Airbrake. Damit Fehler einer Applikation dem Errbit-Server oder Airbrake.io gesendet werden können, verwendet man eine Bibliothek, die diese Schnittstelle zur Verfügung stellt.

Messages compiler for Play 2 Scala

Motivation

In Play almost everything is evaluated at compile time. We thought why not add the conf/messages to the set of compiled sources and resources. So this simple Play plugin compiles the keys in conf/messages to valid Scala code. Instead of using string literals to refer to property keys, we can now use Scala literals. Misspelt keys are no longer an unnoticed issue and result in a compilation error.

NTLM Webservice Authentisierung in JBoss 7.1

Allgemein

Im JBoss 7.1 sind Teile des Apache CXF Frameworks integriert, primär für die Unterstützung der WS-Policy Attribute. Standard JAX-WS Elemente werde von JBossWS unterstützt.

TegoChallenge 2013

TegoChallenge 2013

Github Gist Short Codes for Silverstripe CMS

Gists provide a beautiful way of including formatted source code on a web page. The only thing you need to do is to embed the JavaScript described here: Github embedded Gists

Galettes & Crêpes

Am Donnerstag, 2 Februar 2012 führten wir zum 4. Mal unser Apéro für Kunden, Partner und Freunde durch. Wie in jedem Jahr haben wir uns eine kleine kulinarische Überraschung überlegt. Nach Raclette, einem winterlichen Grill und Chili con carne haben wir uns in diesem Jahr für Galettes und Grêpes entschieden.

Bean Binding and Mockito Part 2

Remember my previous blog entry about creating compile/refactoring save ui binding based on Mockito and BeansBinding?

Today we'd like to make some improvements to the previous prototype. Mainly we'd like to add support for binding nested properties like

Bean Binding and Mockito

A very technical project on which we are working at the moment consist of refactoring a rich client (direct jdbc-DB access) into a thin-/rich-client connected to a JavaEE service layer. We've got the challenge to introduce a couple of new architectural patterns. One of the challenges is to bind the service model data to the swing based gui elements. Sure, there exists a well known bean-binding [1] project hosted on jgoodies [2] to automatically bind two properties of different objects against each other. This would look like this:

1 2