osgi

OSGi in action

This review is about OSGi in action from Richard Hall, Karl Pauls, Stuart McCulloch, and David Savage from Manning Publications. Facts 11 chapters, 548 pages, $49.99Covers OSGi R4.2 Pros Easy step-by-step learning approachCovers many OSGi pitfallsUse-case study included Cons Too much material 😉 Conclusion I tried once or twice to tackle OSGi on my own, without much success. I purchased the book in order to remedy the situation and I wasn’t disappointed: it’s a rich m

security

Trust stores and Java versions

My debugging contest of the week happened to take place on a IBM AIX system. The bug happened when we upgraded from Java version 1.4 to version 6 (which I admit is a pretty big step). Suddenly, an old application stopped working and its log displayed NoSuchAlgorithmException. A bit of context: when Java applications have to connect to hosts with SSL over HTTP, they must trust the host - it’s the same as when you browse a site with HTTPS. If the site can provide a SSL certificate that can

vaadin

Announcing More Vaadin

During the writing of 'Learning Vaadin', I had many themes I wanted to write about: components data, SQL container filtering, component alignment and expand ration, separation of concerns between graphic designers and developers, only to name a few. Unfortunately, books are finite in space as well as in time and I was forced to leave out some interesting areas of Vaadin that couldn’t fit in, much to my chagrin. Give the success of 'Learning Vaadin', I’ve decided to create a site tha

autowiring CDI spring

CDI worse than Spring for autowiring?

Let’s face it, there are two kinds of developers: those that favor Spring autowiring because it alleviates them from writing XML (even though you can do autowiring with XML) and those that see autowiring as something risky. I must admit I’m of the second brand. In fact, I’d rather face a rabbied 800-pounds gorilla than use autowiring. Sure, it does all the job for you, doesn’t it? Maybe, but it’s a helluva job and I’d rather dirty my hands than let some cheap

unit testing

Shoud you change your design for testing purposes?

As Dependency Injection frameworks go, the standard is currently CDI. When switching from Spring, one has to consider the following problem: how do you unit test your injected classes? In Spring, DI is achieved through either constructor injection or setter injection. Both allow for simple unit testing by providing the dependencies and calling either the constructor or the desired setter. Now, how do you unit test the following code, which uses field injection: public class MyMainClass { @

Strategies to improve your knowledge

If you’ve got a professional attitude regarding your developer career, chances are you’re looking to improve your knowledge, whether it’s language-related or framework-related (or even process-related but it is more far-fetched). So far, I found the following ways to do so, each step bringing deeper knowledge than the former: The first strategy when you want to learn about something is to read about it. This is the easiest, since there are so many resources available online. Th

Swing

Properly closing Swing windows

There are many subjects one has to know when working with Swing and one of them is window closing. A beginner pass through some steps (and yes, I consider myself a beginner in Swing) and here are those I experienced myself. Hiding is default In the first step, you realize that by clicking the cross in the title bar, the window only disappears. It’s not disposed of, and if it’s your main application’s window, that’s bad because it means you’ve lost any handle on t

CDI Weld

Managing unmanaged beans in CDI

During these (much deserved) vacations, I worked on a pet project of mine which uses CDI with the Weld implementation and SLF4J with the Logback implementation. The terms of the problem were very simple:  Iwanted the logs of my application to be displayed in a Swing table, i.e. a Logback appender had to write in a table. The table was managed in CDI but the appender was not: this was no surprise since many older-generation frameworks have a lifecycle management on their own. Prior-to-JEE6 Servl