karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Viktor Kozlov (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KARAF-4169) Blueprint creates unnecessary prototype bean instances
Date Fri, 04 Dec 2015 09:12:11 GMT
Viktor Kozlov created KARAF-4169:

             Summary: Blueprint creates unnecessary prototype bean instances
                 Key: KARAF-4169
                 URL: https://issues.apache.org/jira/browse/KARAF-4169
             Project: Karaf
          Issue Type: Bug
          Components: karaf-core
    Affects Versions: 4.0.3
         Environment: Windows 7 version 6.1 x64
Java 1.7.0_80 x64
            Reporter: Viktor Kozlov

After creating all necessary prototype instances, blueprint create one more instance for each
prototype bean. It can be a huge trouble when there is deep prototype bean tree.

Here is simple example to demostrate it: http://www.lorien.biz/karaf/test.zip

-- normal creation --
Server1 create bpt.test.internal.Server1@67ea2a02
Server2 create bpt.test.internal.Server2@72af85f3
Consumer1 create bpt.test.internal.Consumer1@35fc15f7
injected_s1 bpt.test.internal.Server1@67ea2a02
injected_s2 bpt.test.internal.Server2@72af85f3
MyServlet create bpt.test.internal.MyServlet@612307e7
injected_c bpt.test.internal.Consumer1@35fc15f7
-- normal creation ends --
-- unnecessary creation of Server 1 --
Server1 create bpt.test.internal.Server1@6f878ffd
-- unnecessary creation of Server 1 ends --
-- unnecessary creation of Server 2 --
Server2 create bpt.test.internal.Server2@2cfe643f
-- unnecessary creation of Server 2 ends --
-- unnecessary creation of Consumer (with its all dependencies which are prototypes too) --
Server1 create bpt.test.internal.Server1@71677b2c
Server2 create bpt.test.internal.Server2@40c7bfde
Consumer1 create bpt.test.internal.Consumer1@7a05a90b
injected_s1 bpt.test.internal.Server1@71677b2c
injected_s2 bpt.test.internal.Server2@40c7bfde
-- unnecessary creation of Consumer ends -- 

This message was sent by Atlassian JIRA

View raw message