Dependency Injection – Method call

Hi there, this is the second part of the article about (Dependency Injection – Field vs Constructor vs Method). In the comments I was hinted that I forgot to mention the 5th way of dependency injection, the injection of behavior when a method is called and I was asked if I can give some example when […]

 

1
Kudos
Don't
move!

Read more

Dependency Injection – Field vs Constructor vs Method

Hi, today I would like to discuss in short different ways of injecting dependencies into your classes. In general you have the following three options for injection directly into fields/attributes via explicit setter methods via explicit constructor parameters Field injection This type of injection instruments some kind of reflection mechanism for injecting the required dependencies into the class. […]

 

0
Kudos
Don't
move!

Read more

Strategies to migrate from an DAO library

In this post I will discuss several strategies to handle the following situation: You’re working on a legacy project that uses a company library with DBOs and DAOs for accessing the database. But the generator for this library is broken and you have to make changes to the DBOs and/or DAOs. Basic cases You will face the following three basic […]

 

1
Kudos
Don't
move!

Read more

Creating beautiful release notes with git, gradle and markdown

During the last days I asked myself how to generated releases notes from information that are available in commit  / tag messages from git. The decisions My first approach was to create the list of changes directly from the commit messages, but this approach has multiple drawbacks. The commit messages must be written very disciplined […]

 

3
Kudos
Don't
move!

Read more

Released : CDIProperties – v.1.0.0

logo-cdi-properties

Inspired by the tutorial about writing CDI extensions I wrote several days ago I created a CDI extension which targets exactly this topic CDIProperties This handy library enables a CDI (in a standalone or application server environment) application to directly inject properties from a property file. It’s extensible via an SPI, so that you can […]

 

0
Kudos
Don't
move!

Read more

Tutorial: Writing your own CDI extension

cdi_word_cloud_white

Today I will show you how to write a CDI extension. CDI provides a easy way for extending the functionality, like adding own scopes, enabling java core classes for extension, using the annotation meta data for augmentation or modification, and much more. In this tutorial we will implement an extension that will inject properties from […]

 

1
Kudos
Don't
move!

Read more

Using CDI standalone

Today I will show you how to use CDI in your appplication, when you don’t have the a JEE server. CDI is the Context and Dependency Injection, as defined in the JSR-346 (CDI 1.1) and JSR-299 (CDI 1.0). It is a powerful and lightweight mechanism that provides dependency injection, contextual lifecycles, events, decorators and interceptors. But […]

 

5
Kudos
Don't
move!

Read more

DataFX – @Named support (accepted)

During the christmas and new year holidays I implemented the @Named feature for DataFX. It’s already accepted and merged into the validation branch of DataFX (Thanks to Hendrik Ebbers). This feature enables a user to inject different instances of a bean into a controller, distinguished by a resource name via @Named annotation. You can, for […]

 

0
Kudos
Don't
move!

Read more