Making the bootstrap loader "just another ClassLoader"

Andrew Phillips

Recently, I was tweaking MultiSPI to add the following class loading fallback logic:

if (threadContextLoader != null) {
} else if (systemLoader != null) {
} else {

and realized that it's not immediately evident how to do this in a uniform way. But actually, it's quite simple...getting a ClassLoader object for the bootstrap loader is just a couple of lines of code.
 Read more

How the quest for transaction timeout’s did cost me money

Kris Geusebroek

At our project the focus is at making the application stable and controllable. So instead of building cool new features
we are spending our time making sure the application is able to run stable in the production environment.

After the first few issues the so called 'Transaction timeout' issue raised it's ugly head.
Every now and then the application threw an exception due to a transaction timeout.
This was very strange since the timeout was set to 30 seconds and the complete processing of the whole
application was done in less than 2 seconds (spread over more than 1 transaction).
 Read more

MultiSPI - consuming service provider interfaces in 2011

Andrew Phillips

Implementing a Java SPI isn't a particularly 2011 experience1. Creating a correctly-named text file in META-INF/services, making sure it is correctly packaged and remembering to keep it up to date when you refactor is sufficiently annoying and error-prone that there are at least a couple of utils that aim to make this easier.

At XebiaLabs, however, we're not just the implementors of our plugin SPI. We also write the deployment engine that consumes these plugins. And unfortunately, there isn't much out there to help you read, load and verify services. Hence MultiSPI.
 Read more

You have just been deconfluenced

Wilfred Springer

Before you start wondering, 'deconfluencing' is not a word you can lookup in Merriam Webster. Perhaps it should be. It certainly is something I needed, and eventually ended up creating myself.

 Read more

Which Generic Swallow

Jeroen van Erp

Scene opens...
An idyllic landscape unfolds before our eyes, in yonder distance we see a figure approaching us. He goes by the name of Arthur, King of the Britons...
 Read more

Web performance in seven steps; Step 6: Tune based on evidence

Jeroen Borgers

Last time I blogged about the relevance of monitoring and diagnostics in production to solve incidents quickly and prevent future problems. This time I'll talk about tuning based on evidence.

If an application turns out to be too slow, tuning can provide a solution. Tuning can take place on multiple levels. Adding hardware can be a cheap solution. However, when you add hardware at a place where the bottleneck is not located, this has little use.
 Read more

The XML Instance Gamut

Wilfred Springer

If you happen to be in the business of writing software serving XML documents or consuming XML documents - and if you read this post, then there is a fair chance you are - then there is always one big challenge: how do you make sure your service or client is capable of dealing with all of the XML documents you could possibly expect to be passed around?

And if you happen to come from the test-driven world, the answer is obviously: by testing it. However, if you try to do that, things might be harder than you expect at first.

What about schemas?

 Read more

Organizing Archetypes

Wilfred Springer

Maven archetypes are an excellent way of allowing people to create instances of a particular type of project without having them to know or worry about all of the peculiarities and details. (And the latest incarnations of the Maven Archtetype Plugin are actually way better than I realized: somewhere down the line, they introduced the ability to use Velocity templates for parameterizing the output. Nice!)
 Read more

Web performance in seven steps; Step 4: Test continuously

Jeroen Borgers

Last time I blogged about the importance of representative performance testing. Having production-like properties for hardware, OS, JVM, app server, database, external systems and simulated user load are essential to prevent bad performance surprises when going live. In addition, I described how cloud computing can be utilized to generate high loads on-demand without having to worry about the infrastructure.

Continuous performance testing
With a representative test as one of the last steps before going live we prevent that expensive bad-performance surprises will pop up in production. However, the same surprises will pop-up, only earlier and with less impact. To save costs and prevent large architectural refactoring, it is crucial to test for performance as soon as possible. This is just like any other software defects and Quality Assurance: the later in the development process defects are detected, the more costly these defects are.

At a popular web shop I had the following challenge:  Read more

Testing Annotation Processors

Andrew Phillips

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.

 Read more