I am developing plugin system based on Spring IoC. Is there way to query bean attribute depends-on after bean is created by FileSystemXmlApplicationContext?
I am developing plugin system based on Spring IoC. Is there way to query bean attribute depends-on after bean is created by FileSystemXmlApplicationContext?
It isn't a bean attribute it is a bean definition attribute. You could retrieve the bean definition for the bean.
But please explain a bit more about the usecase...
Marten Deinum
Java Consultant / Pragmatist / Open Source Enthousiast / Author
Pro Spring MVC: With Web Flow
Conspect
Have you read the reference guide.
Use the [ code ] tags, young padawan
Now i need to get meta values from BeanDefinition. There are BeanMetadataElement and BeanMetadataAttribute but none of BeanDefinition returns them. According to manual - last paragraph on http://static.springsource.org/sprin...sd-config.html - these metadata should be somewhere in BeanDefinition. Documentation on this topic needs update.
<bean id="protocol-http/http" class="org.apache.nutch.protocol.http.Http" abstract="true" scope="prototype" depends-on="protocol-http">
<meta key="point" value="org.apache.nutch.protocol.Protocol"/>
<meta key="name" value="HttpProtocol"/>
<property name="protocolName" value="http"></property>
</bean>
Simply check if the BeanDefinition is an AbstractBeanDefinition then cast and call the getDependsOn method..
Marten Deinum
Java Consultant / Pragmatist / Open Source Enthousiast / Author
Pro Spring MVC: With Web Flow
Conspect
Have you read the reference guide.
Use the [ code ] tags, young padawan