These days I’ve discovered a nice feature of CDI. What do you make of this code? Instance indicates that a single object is injected, but that’s quite the case. In my case the program uses the Instance like so: Obviously, @Inject Instance<IValidator> does something completely different than @Inject IValidator.
I’m big into CDI, but I’m not fond of application servers at all. So I’m bound to find out how to configure how to activate the CDI magic on a simple servlet container like Tomcat. That shouldn’t be too difficult. Mind you, it’s easy to run Weld (which happens to be the reference implementation of […]
Spring Boot stirred up the Java world. Developers always put up stoically with slow server start-ups, long deployment times and difficult server configurations. Those times seem to come to an end. There’s only so much coffee you can drink during the breaks. The disadvantage of Spring Boot is it uses Spring, excluding roughly half of […]
Recently I reported about Spring Boot (see Application Servers are dead! (Sort of)), an interesting approach to embed your application server into your application instead doing it the other way round. However, Spring Boot is a fairly new technology, so the documentation is still work in progress. Most of the documentation is great, but there […]
A small addition to JavaEE 7 makes Design by Contract a lot more attractive to Java programmer. The idea is to annotate your method and / or the parameters of your methods with annotations. The most common case is @NotNull, indicating a particular parameter of a method must not be until. Prior to JEE 7 […]
Oops. We did it again. We heeded the consultants advice once again. You shouldn’t do that, you know. Not thoughtlessly, that is. It’s all right to call a consultant and listen to his advice. But don’t you follow his advice blindly. If he’s a good consultant, most of his advice is good. But every once […]