Hi Valentin, I think it can be injected in the following way: <bean class="com.acme.FooImpl"> <property name="bundleContext" ref="blueprintBundleContext"/> </bean>
See chapter 121.11 of the 4.2 compendium spec: http://www.osgi.org/Download/Release4V42 David 2009/11/27 Valentin Mahrwald <[email protected]>: > Hi, > > I remember that in the early draft of the Blueprint spec there were two > implicit bean definitions "bundle" and "bundleContext", which could be used > to inject these objects into a user-defined bean. However, in the final spec > and also, admittedly only after a superficial look, the Aries implementation > these two seem to be missing. > > Does anyone know what happened to this part of the early draft and more > importantly how one could get hold of the BundleContext using pure > Blueprint? > > If there is no easy way to do this, I would suggest that we might offer the > capability of the early draft as an add-on to the final spec :) > > Regards, > > Valentin >
