Results 1 to 4 of 4

Thread: query value of depends-on <bean> attribute

  1. #1

    Default 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. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,629

    Default

    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

  3. #3

    Default

    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>

  4. #4
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,629

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •