There's been a few changes made in the last 24 hours that simplify the work required to write a JBI compliant component using servicemix-common.
Firstly there's a new base class you can use, DefaultComponent, which merges the functionality from BaseComponent and BaseLifecycle together into a single simple class; which can also deal with endpoints being configured via xbean and auto-create a ServiceUnit and a deployer etc. Secondly the jbi-maven-plugin can now copy the DefaultBootstrap class into your components jar (the bootstrap class needs to be inside the component's jar and not be dependent on any other library to avoid classloader issues in JBI) - so you just need to omit the <bootstrapClass> element and the maven plugin will do the rest for you. So now writing fully JBI components is a relatively simple matter of writing a component which derives from DefaultComponent and provides one or more Endpoint implementation classes. To get a feel for how this fits together, I refactored the servicemix-saxon component (apologies if I've broken anything but the test cases do seem to work still :). I've also started a port of the file component to servicemix-file (currently only writing is supported - I'll have a go at supporting polling etc later today). Am wondering if we can simplify any further; we could maybe add a helper facade above this maybe - but this certainly reduces the amount of code required to write new, well behaved JBI components. -- James ------- http://radio.weblogs.com/0112098/