1 Reply Latest reply on Aug 15, 2012 3:06 PM by Ashok Mollin

    Complex dependencies and Fuse Bundles (FAB)

    arun.parihar Newbie



      I apologies for a lengthy question here. When I try to work with a fuse bundle it raises a lot of question in my head if it can simply my life while converting applications into FABs.


      I am in requirement of turning a war application into Fuse bundle. I have been successful in packaging it up as jar and deploy as OSGI bundle after having to add required imports which was a gigantic effort to figure out, as application uses external packages through reflection as well.


      Next, I am trying to package it again as jar but with no modification in MANIFEST.MF for import-package (assuming Fuse should do it for me, and that is the idea behind Fuse Bundle vs OSGI Bundle?) and install as FAB. The bundle installs and I can see that Fuse have tried to figure out and added required packages to be imported in the MANIFEST.MF.


      But the bundle gives error when tried to start, while complaining about not being able to resolve some dependency. I could see that the particular dependency is also imported by Servicemix bundle but with resolution as optional. I am not sure if a Fuse bundle works this way but this makes me assume that the Fuse tries to import the packages imported by required bundles as well into the new dependent bundle?


      I could get past this problem by marking the imported package's resolution as optional, as the same case in the Servicemix bundle's MANIFEST for this package.


      But as a result I caught up in another "could not resolve dependency" problem. I can see that this particular dependency is already exported by another bundle but with different version.


      On the premise of the fact/observation that, here Fuse only tries to figure out the required import-package for my application, why does it go wrong in marking the correct resolution or the version for the required packages?


      I would like to know if there are configuration options/flags which might alter the way Fuse writes into MANIFEST file while installing a FAB or any kind of hint which can show a FAB is of more convenience than an OSGI bundle.


      Thanks in advance for your input!