Results 1 to 4 of 4

Thread: Single configuration for auto-detecting beans in Virgo

  1. #1
    Join Date
    Jan 2013
    Posts
    6

    Default Single configuration for auto-detecting beans in Virgo

    Hi,
    I have many spring bundles deployed to Virgo 3.5. I'd like to have one point of configuration (below) that auto detects (via annotations) all the beans made, across all the bundles deployed without having to include the boilerplate in every XML configuration, is this possible?

    Thanks, Dan.

    Code:
       <bean id="exporter" class="org.springframework.jmx.export.MBeanExporter">
            <property name="assembler" ref="assembler"/>
            <property name="namingStrategy" ref="namingStrategy"/>
            <property name="autodetect" value="true"/>
        </bean>
    
        <bean id="jmxAttributeSource"
              class="org.springframework.jmx.export.annotation.AnnotationJmxAttributeSource"/>
    
        <!-- will create management interface using annotation metadata -->
        <bean id="assembler"
              class="org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler">
            <property name="attributeSource" ref="jmxAttributeSource"/>
        </bean>
    
        <!-- will pick up the ObjectName from the annotation -->
        <bean id="namingStrategy"
              class="org.springframework.jmx.export.naming.MetadataNamingStrategy">
            <property name="attributeSource" ref="jmxAttributeSource"/>
        </bean>

  2. #2
    Join Date
    May 2013
    Posts
    8

    Default

    Thanks for the information on single configuration for auto detecting beans in Virgo. I am glad that I am a part of this forum.
    .

  3. #3
    Join Date
    Jan 2013
    Posts
    6

    Default

    Quote Originally Posted by Brettlee1 View Post
    Thanks for the information on single configuration for auto detecting beans in Virgo. I am glad that I am a part of this forum.
    Weird.

    But it did remind me that I realised that java config, instead of XML, would allow you to reduce the boiler plate and share the configuration more readily throughout bundles?

  4. #4
    Join Date
    May 2013
    Posts
    8

    Default

    It is great to have amazing knowledge about single configuration for auto detecting beans in Virgo. Thanks for sharing this information.
    .

Posting Permissions

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