I don’t believe the way the service is exposed has any bearing on when a proxy 
is created - the proxy is created by the <reference ….>, not the <service>

Also, if you’re trying to achieve a service with the properties of an OSGi 
Service Factory (i.e. one service instance per calling bundle), I don’t think 
what you have will work - you’ll wind up with a single instance of the service 
in the container.  See this JIRA for a little more info as to why. 
https://issues.apache.org/jira/browse/KARAF-4284
 <https://issues.apache.org/jira/browse/KARAF-4284>

 <https://issues.apache.org/jira/browse/KARAF-4284?filter=-2>
> On Feb 26, 2016, at 2:35 PM, Brad Johnson <brad.john...@mediadriver.com> 
> wrote:
> 
> Just a quick follow up to that question, the class is not proxied in CBTS
> but that may be an impedance mismatch between the test harness and an
> actual OSGi container and not indicative of how it will be handled by
> blueprint in Karaf.
> 
> On Fri, Feb 26, 2016 at 3:23 PM, Ranx <brad.john...@mediadriver.com> wrote:
> 
>> If I create a service factory instantiated in blueprint like this:
>> 
>>        <bean id="service" class="fo.bar.ServiceFactory"
>> factory-method="createService" >
>>                <argument value="${serviceClassImpl}"/>
>> 
>>        </bean>
>>        <service ref="service" interface="foo.api.MyOSGiService" />
>> 
>> And inside the factory just do a Class.forName to instantiate and return
>> it,
>> will the service reference itself be proxied?
>> 
>> 
>> 
>> 
>> 
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/ServiceFactory-tp5778336.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>> 

Reply via email to