Announcement Announcement Module
Collapse
No announcement yet.
query value of depends-on <bean> attribute Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • query value of depends-on <bean> attribute

    I am developing plugin system based on Spring IoC. Is there way to query bean attribute depends-on after bean is created by FileSystemXmlApplicationContext?

  • #2
    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...

    Comment


    • #3
      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>

      Comment


      • #4
        Simply check if the BeanDefinition is an AbstractBeanDefinition then cast and call the getDependsOn method..

        Comment

        Working...
        X