Hi Martin,

Aries doesn't have a programmatic API for creating blueprint managed beans, 
references or services. I assume that XML isn't appropriate for your use case?

Regards.

Tim Ward
-------------------
Apache Aries PMC member & Enterprise OSGi advocate
Enterprise OSGi in Action (http://www.manning.com/cummins)
-------------------


Date: Wed, 16 Nov 2011 06:18:57 -0800
From: [email protected]
Subject: Call OSGi services programmatically
To: [email protected]

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