karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Nodet (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-4284) Blueprint Services are not creating a service instance per consuming bundle for prototype-scoped beans
Date Fri, 19 Feb 2016 10:02:18 GMT

    [ https://issues.apache.org/jira/browse/KARAF-4284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15154020#comment-15154020
] 

Guillaume Nodet commented on KARAF-4284:
----------------------------------------

Unfortunately, you're wrong.

Section 121.6.8 of the OSGi Enterprise 6.0.0 indicates:
{code}
A service manager must always register a Service Factory as service object and then dispatch
the ser- vice requests to the service object. A service manager must obtain a single component
instance as service object. This component instance is shared between all bundles. That is,
even if the service object comes from a prototype scoped manager, only one instance is ever
created per service manager.
{code}

> Blueprint Services are not creating a service instance per consuming bundle for prototype-scoped
beans
> ------------------------------------------------------------------------------------------------------
>
>                 Key: KARAF-4284
>                 URL: https://issues.apache.org/jira/browse/KARAF-4284
>             Project: Karaf
>          Issue Type: Bug
>    Affects Versions: 2.4.3, 3.0.5, 4.0.4
>         Environment: Oracle Java 1.7.0_79
> Camel 2.16.1
>            Reporter: Quinn Stevenson
>
> According to the book "Enterprise OSGi In Action" (section 6.3.3), when a prototype-scoped
bean is exposed as a service using Blueprint, a new instance of the service should get created
for each consuming bundle.
> Services exposed in this manner in Karaf are not behaving this way - a single service
instance is created and
> all consuming bundles use it.  It appears the prototype scope is being ignored since
the obseved behaviour is 
> what is expected for singleton-scoped beans exposed as services.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message