Friday, 29 October 2010

Send your developers to JAX!

Last month I, and a number of developers from IBM's Hursley labs, went to JAX London; I'm delighted to say that we were a gold sponsor this year. I was going to write about the conference before but sadly I didn't get to see (m)any of the sessions because I was responsible for  the IBM demo area and spent most of my time talking to people about what IBM does with OSGi.

In between talking to people, my view of the conference was mainly looking at the other sponsor's stands. So, here are some observations based on what I saw:

  1. This is a great UK conference to sponsor if you want to reach Java developers.
  2. The busiest stands were the ones that had tools demos and/or were able to sell interesting stories about  work that they were involved in - or they were hiring :-)
If you are going to sponsor a developer conference, which I strongly recommend,  send your developers to run the stand....or at least your tech sales people. Don't send the salesmen. Seriously, no-one will walk away from this conference with a bunch of orders - you won't close a sale here. The aim is inspire people with a vision of how working with you and your products will make their life easier, more profitable and more fun (in a tech sort of way) - that message will get back to the people with hard cash. Trust me.

Here's my favourite image  from the conference - taken at about 19:00 by a slightly wobbly photographer - I have appropriated the Microsft stand - which was looking a little lonely.


By the way, I am a recovering Windows user - I've been free for nearly three years now, so it took me several beers to get this close....

Wednesday, 20 October 2010

Testing bundles with PAX Exam

For integration testing OSGi bundles there is pretty much only one option - it's PAX Exam.  This week, as part of preparing a talk for ApacheCon I decided I wanted to have a simple 'HelloWorld' test showing the use of PAX Exam. It was all pretty straightforward - except for one thing that took hours to resolve - I thought the one thing might be worth mentioning.

I use Maven to build with, the application I was trying to write a test for was a stand alone version of this OSGi Blueprint Hello World sample. The application is pretty trivial and so is the test case. I used Craig Walls' tutorial to get me started.


So, what was the problem? This was what happened when I ran 'mvn install' in my test project in an attempt to run my test case:





I had no idea why anything was looking for com/sun/jdmk/jmxtools/1.2.1/jmxtools-1.2.1.jar, it certainly wasn't something I'd specified as a dependency in the project pom. Eventually, after much searching around, I looked at the Apache Aries default-parent pom and noted that some 'exclusions' had been added to the pax-logging section. I copied the same exclusions into my test project's pom and everything just worked.  The relevant sections of the pom are highlighted below:


























Hope this helps - apart from that small problem I really like PAX Exam :-)