This is puzzling.
I am asking the BlueprintContainer to give me metadata about the beans
and expect the container knows the context and the bean scope.
Just returning information from the XML parser is not enough, imho.
On 10/05/2013 17:05, Timothy Ward wrote:
A value of null means that the scope wasn't specified in the XML. We
have to return null because in the blueprint specification the default
scope of a bean is context specific. Top level beans default to being
singleton. Inner beans default to being prototype.
When we're parsing snippets we don't have that context information, so
we have to return null.
Regards
Tim Ward
-------------------
Apache Aries PMC member & Enterprise OSGi advocate
Enterprise OSGi in Action (http://www.manning.com/cummins)
-------------------
> Date: Fri, 10 May 2013 07:05:09 -0700
> From: [email protected]
> Subject: BeanMetadata.getScope() returns "null"
> To: [email protected]
>
> Hi
> When BeanMetadata.getScope() returns "null", what is the scope of
the bean?
> I'd have expected the method to always return the scope.
> The API is:
>
> /**
> * Return the scope for the bean.
> *
> * @return The scope for the bean.
> * @see #SCOPE_SINGLETON
> * @see #SCOPE_PROTOTYPE
> */
> String getScope();