[
https://issues.apache.org/jira/browse/ARIES-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14613011#comment-14613011
]
Guillaume Nodet commented on ARIES-1333:
----------------------------------------
The problem is caused by generics.
The collections generated from the xml are not typed, so they are effectively
ArrayList, HashSet and HashMap.
However, the constructor expects List<String>, Set<String> and Map<String,
String>, and those are not compatible (at least from a blueprint POV), so there
is a conversion between the untyped arguments to the real typed constructor
arguments.
If you remove the generics from the ReferringBean, you'll see that the same
instances are passed.
> Cannot instantiate singleton collections in blueprint
> -----------------------------------------------------
>
> Key: ARIES-1333
> URL: https://issues.apache.org/jira/browse/ARIES-1333
> Project: Aries
> Issue Type: Bug
> Components: Blueprint
> Affects Versions: blueprint-core-1.4.2
> Reporter: Tomas Rohovsky
> Attachments: bean-reference.zip
>
>
> New instances of collections (set, list, map) are always created when
> referring them by different beans. So, it behaves like the {{prototype}}
> scope would be set on them. The {{singleton}} scope should be default, but it
> doesn't work even if it is set explicitly. A Camel based reproducer is
> attached. Note that this is not an issue for Spring configuration.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)