-
1. Re: Defining OSGi Capabilities for Specific SwitchYard Functionality
kcbabo Aug 29, 2014 9:36 AM (in response to rcernich)This sounds like a sensible approach to me. I haven't used the require-capability support in Karaf, so can't comment on whether this will work though. :-)
-
2. Re: Defining OSGi Capabilities for Specific SwitchYard Functionality
rcernich Aug 29, 2014 11:40 AM (in response to kcbabo)Keith Babo wrote:
This sounds like a sensible approach to me. I haven't used the require-capability support in Karaf, so can't comment on whether this will work though. :-)
And that's the $64,000 question, isn't it?
-
3. Re: Defining OSGi Capabilities for Specific SwitchYard Functionality
rcernich Sep 5, 2014 5:51 PM (in response to rcernich)I've prototyped this OSGi capability stuff and it can be found on the following branches on github:
rcernich/core at osgi-capabilities · GitHub
rcernich/components at osgi-capabilities · GitHub
rcernich/quickstarts at osgi-capabilities · GitHub
rcernich/release at osgi-capabilities · GitHub
I didn't really declare any capabilities in core, other than transform and validate (because I was trying to fix an issue with transforms), but I could see creating various capabilities related to core functionality. I've wrapped all the generic "engine" stuff into a core, org.switchyard capability, which is provided by the SwitchYard extender bundle (i.e. switchyard-karaf-deploy). I've added capabilities for each component bundle as well (e.g. org.switchyard.component.camel.cxf). I modified the CXF quickstart to use the capabilities, which really just amounts to making sure all those related bundles are activated prior to the quickstart.
You'll notice some comments around org.switchyard.serial, which is a capability which provides a serialization impl, in this case one based on jackson. I think a better way to go is to register a service for this capability and have it resolve that way (as opposed to using capabilities).
Next steps:
I'd like to see about creating a SwitchYardBundleClassLoader which aggregates the applications bundle or CDI classloader with the bundle classloaders for each required capability. I thin this should allow us to remove the dynamic imports that we're declaring today.
Let me know what you think,
Rob