FactoryBean that transparently publishes other beans in the same application context as OSGi services returning the ServiceRegistration for the given object. Also known as an
exporter this class handle the registration and unregistration of an OSGi service for the backing/target object.
The service properties used when publishing the service are determined by the OsgiServicePropertiesResolver. The default implementation uses
- BundleSymbolicName=<bundle symbolic name>
- BundleVersion=<bundle version>
- org.springframework.osgi.bean.name="<bean name>
Note:If thread context class loader management is used ( {@link #setContextClassLoader(ExportContextClassLoader)}, since proxying is required, the target class has to meet certain criterion described in the Spring AOP documentation. In short, final classes are not supported when class enhancement is used.
@author Adrian Colyer
@author Costin Leau
@author Hal Hildebrand
@author Andy Piper