Hi

You might want to consider the Apache Felix DependencyManager [1]

This of course has nothing to do with OSGi Blueprint or Spring/DM. It is just a 
programmatic front-end to simplify servie registration and DI.

Regards
Felix

[1]  http://felix.apache.org/site/apache-felix-dependency-manager.html

Am 16.11.2011 um 15:18 schrieb Martin Lichtin:

Hi

With SpringDM/Gemini it is possible to call a service programmatically like 
this:

 Class<ValueProcessor> cls = ValueProcessor.class;
 OsgiServiceProxyFactoryBean factoryBean = new OsgiServiceProxyFactoryBean();
 factoryBean.setBundleContext(bundleContext);
 factoryBean.setInterfaces(new Class[] { cls });
 factoryBean.setFilter(filter);
 factoryBean.setContextClassLoader(ImportContextClassLoader.CLIENT);
 factoryBean.setBeanClassLoader(cls.getClassLoader());
 factoryBean.afterPropertiesSet();
 ValueProcessor valueProcessor = (ValueProcessor) factoryBean.getObject();

How can one create the proxy instance of the service with Aries?

Martin


Reply via email to