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: lich...@yahoo.com > Subject: BeanMetadata.getScope() returns "null" > To: user@aries.apache.org > > 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();