XML & Web services: SCA and OSGi
Hi All, I am trying to understand if the SCA specs allow for (or prevent) the implementation of an SCA module's component to be a class within an OSGi bundle? For example, if you have an SCA container that is itself managed as an OSGi bundle. Can an SCA module running within that SCA container have a Java component that is pointing to a Java implementation within a different OSGi bundle than the SCA container itself? Such a setup would be very useful as it would allow for all the benefits of OSGi to apply to SCA components with a Java implementation. Cheers, Reza
The SCA specs in themselves do not preclude a component class from existing within an OSGi bundle. In fact this is exactly what we are doing in the newton project - http://newton.codecauldron.org However there are some extra addressing considerations at runtime when it comes to locating the bundle that is to supply the class. In a hierarchical model you can always rely on the class to be available somewhere in your classpath and there should only be one version of that class. In a peer classloader model it is necessary to find the correct path to that bundle from potentially a number of different bundle providers. i.e. just the classname is not enough you also need to know which bundle version supplies the class that is required. This requires extensions to the SCA documents but this does not break from the SCA spec because the SCA schema definition supports multiple extension points via the use of "any" in most of the key areas. Regards, Dave
Hi All,SCA is a very flexible specification. Simple answer is yes, you can do this and still be spec compliant. PJ Murray, CodeFutures Software Data Access Objects and Service Data Objects
I am trying to understand if the SCA specs allow for (or prevent) the implementation of an SCA module's component to be a class within an OSGi bundle?