From Java EE to Google App Engine to GigaSpaces, the idea of developing against a middleware or "infrastructure" API is well established in the Java world.
But these are fixed environments. With the (re-)advent of virtualization, it is now becoming feasible to package and rapidly provision your own environment, custom-designed to meet your application's needs.
As the big middleware vendors are realizing, it is not just possible to create such Virtual Appliances, but necessary: a production app's setup inevitably includes more than just a couple of EARs.
Here, we'll look at the current state of cloud and middleware deployment tooling, examine possible future developments and draw parallels between deployment and related processes.
(more...)
Tags: cloud, deployment automation, virtual appliance
Filed under Deployment, Java, Middleware, Oracle, Virtualization, websphere | 4 Comments »
In a recent post, XebiaLabs' CTO Vincent Partington discussed some important organizational topics you will want to address while introducing deployment automation using Deployit.
Preparing your organization is, of course, crucial to getting maximum possible benefits from deployment automation. A few technical considerations also apply when introducing Deployit, and here we'd like to go into these so that you can be sure your infrastructure is ready when it comes to carrying out your first fully automated deployment.
(more...)
Tags: Deployit
Filed under Deployment, Middleware, Process, Xebia Labs | No Comments »
Recently, I put together a Spring demonstration for jclouds, the Java cloud library. This quickly turned into unexpected multi-dimensional experiment in integrating Guice, Google App Engine and Spring, but after much trial-and-error I finally came across a configuration that does the trick - or at least works1 as well as seems possible on GAE. (more...)
Tags: GAE, Google App Engine, Guice, Javaconfig, jclouds, Spring
Filed under Amazon Webservices, Frameworks, Java, Spring | 4 Comments »
Static calls, final classes, objects created in test code: there are few things some of the current mocking frameworks cannot handle. Using powerful approaches like bytecode instrumentation or custom class loaders, these libraries make code that was previously a 'no go' area amenable to unit testing. This, moreover, in an elegant and convenient manner that will feel familiar to developers used to 'standard' mocking frameworks.
The question is: does such power perhaps come with hidden dangers? Might it be possible that the ability to test more could actually result in less code quality?
(more...)
Tags: mocking, testability
Filed under Java, TDD, Testing | 5 Comments »
Some while back I was preparing a presentation on mocking and testing frameworks for Java. As part of the aim was to demonstrate some real, running code, I ended up spending quite some time copying, pasting, extending and correcting various examples gleaned from readmes, Javadoc, Wiki pages and blog posts. Since then, this codebase has been extended with various new features I've come across, and I've often referred to it for experiments, as a helpful reference, and suchlike.
I imagine this kind of "live" reference could also be useful to others, so I thought I'd share it. (more...)
Filed under Frameworks, Java, TDD, Testing | 13 Comments »

I've just come back from Devoxx 09 in Antwerp, Belgium, a conference that will probably become known as the one in which closures sneaked back in to Java 7.
Whilst I didn't feel any particular urge to return for the day 3, there was more than enough interesting material, both technical and abstract, in the first two days for me to chew on. Here some thoughts and comments on my personal "slice" of Devoxx.
(more...)
Tags: conference, devoxx
Filed under Java | 1 Comment »
In the careers of most Spring/Hibernate developers I know, there sooner or later comes a point of no escape...they have to write a Hibernate user type. The first one is usually of the copy'n'paste variety, and by and large works perfectly well.
But when things are no longer going quite as expected - Hibernate is ignoring changes to items managed by the user type, for instance - it often becomes apparent that one doesn't sufficiently understand how these user type thingies are supposed to work. At least, that's what happened to me.
In this post, we'll be dissecting the Hibernate UserType interface, explaining the relationships between the various methods, and developing a set of base user types that capture common use cases. (more...)
Tags: Hibernate user type
Filed under Hibernate, JPA, Java | 7 Comments »
Recently, I was writing an Annotation Processor for the @Composite project. In good TDD fashion, that first and foremost meant writing some tests.
Although I in the end come across something that was fairly workable, it was trickier than one might have hoped for.
Tags: annotation processor, Java, model api, Testing
Filed under Java, Testing | 1 Comment »
Some months ago I attended a presentation at which Wilfred Springer demonstrated his very cool Preon binary codec library. Defining binary file formats in Preon requires quite a lot of fairly repetitive sets of annotations, and during a chat after the talk Wilfred mentioned (in fact, he blogged about it) how much more convenient it would be if one could just define "shortcuts":
@RequiredEnumProperty(column = "AGENT")
for
@NotNull @Column(name = "AGENT") @Enumerated(EnumType.STRING)
for instance - and use those instead. Sort-of "macro annotatations" for Java, if you like.
A thought that has presumably also occurred to many frequent users of Hibernate, JAXB or other annotation-heavy frameworks.
Well, it took me rather longer than the couple of days it would probably have taken a developer of Wilfred's skill, but finally @Composite is here! (more...)
Tags: annotation, composite, Java, macro
Filed under Java, Spring | 6 Comments »


Last week I attended JAX '09, the Java User Conference in Mainz, Germany.
Or rather "conferences", because once you're there JAX is indistinguishable from something called SOACON and the Eclipse Forum Europe, which officially take place in parallel. (more...)
Tags: Agile, conference, Eclipse Forum, JAX, SOACON
Filed under Agile, Eclipse, General, Java, OSGi | 4 Comments »