In a mixed environment like that, you might run into the situation where you want to access a class defined in an OSGi bundle from within your existing JBI SU. To allow you to that without having to add the JAR to your SU (effectively adding a second definition of the same class to the container), you can now reference an OSGi bundle as a shared library directly from your SU xbean.xml file using osgi:<bundle symbolic name>.
An example: you have a nice Camel InterceptStrategy implementation in an OSGi bundle and you're using that in a lot of your OSGi based Camel routes. You can now reuse the same code in a JBI SU for servicemix-camel by adding this snippet to your xbean.xml or camelContext.xml
<classpath>
<library>osgi:my.intercept.bundle.symbolic.name</library>
</classpath>

4 comments:
憂能傷身,保重哦!.........................
Hi Gert,
Great feature. Hope to be part of the SMX4.x documentation for end users.
Regards,
Charles
Hi Gert,
Great feature. Hope to be part of the SMX4.x documentation for end users.
Regards,
Charles
TAHNKS FOR YOUR SHARING~~~VERY NICE.................................................
Post a Comment