Nice work. It seems much more easier to write a JBI component now. Only two classes for a simple Service Engine with support for SU deployment is really nice :)
For the file component, I think the case is a bit different, as it is a binding engine. So we may add more features like endpoint resolution support, etc ... Btw, I guess that it would be better for such a BC to provide two different endpoints implementation (<file:consumer /> and <file:provider />) and also support in/out MEPs (so maybe we need more than two endpoints, need to think about it). We may also want to support soap, but I guess it' s not so useful for file base interactions. Further refactoring for JBI BCs may be needed to provide sensible implementations of endpoint resolution. It also reminds me that the BC archetype needs to be finished. On 10/3/06, James Strachan <[EMAIL PROTECTED]> wrote:
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/
-- Cheers, Guillaume Nodet