On Thursday 22 June 2006 13:57, kiran bharadwaj wrote: > Hello All, > > Please clarify my following doubts. > > 1) Consider the following scenario > > Bundle A: Import Package: com.osgi.P1;version=1.0.0, > com.osgi.P2;version=1.1.0 Bundle B: Export Package: > com.osgi.P1;version=1.0.0;uses:=P2; > Bundle C: Export Package: com.osgi.P2;version=1.0.0 > Bundle D: Export Package: com.osgi.P2;version=1.1.0 > Bundle A is wired to B then for P1. Does bundle A uses Bundle D or Bundle > C for P2. What is the exact use of uses directive?
Bundle A will be wired with Bundle D, due to the version constraint. And Bundle B will also be wired to Bundle D. The "uses" directive instructs the framework that the package in question are using other packages, and that is needed fopr the framework to figure out how packages are going to be wired, as the Import-Package doesn't give enough clues. > 2) Also please let me know how to differentiate the separator "," which > is used as a separtor of package names in uses directive as well as used as > a separator between two exports. eg: Export-Package: > com.osgi;uses:=p1,p2;mandatory:=security, com.osgi1;uses:=p3 IIRC, you will need quotes around the "p1,p2", otherwise it gets confused. Cheers Niclas _______________________________________________ osgi-dev mailing list osgi-dev@bundles.osgi.org http://bundles.osgi.org/mailman/listinfo/osgi-dev