Why don't you import the package ("com.example.thirdpackage") within
your bundle Bundle A too ?
On 30/05/15 14:53, Александр Свиридов wrote:
I use javase and solution osgi (felix)+cdi(weld)+paxcdi. I have two
bundles A and B. Bundle B is a lib bundle.
In bundle A I have one class and one package.
In bundle B I have two classes and two packages
I install and start both bundles.
The problem - pax (or weld) for injecting in classes of bundle A scans
only those packages which are imported for classes IN bundle A. In my
example - CDI for injecting in Class1 Class2 will scan
com.example.secondpackage of bundle B. However, it will throw
exception as Class2 needs Class3 but com.example.thirdpackage is not
scanned for bundle A (as it's not imported!!!).
com.example.thirdpackage is only scanned for bundle B but, as I
understand every bundles for cdi has its own scope. How to fix it?
weld-dev mailing list