Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-5822

Add support for value-factory injection to -service.xml parsing

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • JBossAS-5.0.0.CR2
    • None
    • Deployers
    • None

    Description

      Allow equivalent to microcontainer's "value-factory" element as the value for a -service.xml's server/mbean/attribute element.

      Can handle this:

      <mbean ...>
      <attribute name="Foo">
      <value-factory bean="FooProvider" method="getFoo" parameter="A" default="1100"/>
      </attribute>
      </mbean>

      And this:

      <attribute name="Foo">
      <value-factory bean="FooProvider" method="getFoo" default="1100">
      <parameter>A</parameter>
      <parameter>1</parameter>
      </value-factory>
      </attribute>

      And, as long as parameter type com.foo.Bar is visible and a PropertyEditor exists, this:

      <attribute name="Foo">
      <value-factory bean="FooProvider" method="getFoo" default="1100">
      <parameter class="com.foo.Bar">A</parameter>
      <parameter class="java.lang.Integer">1</parameter>
      </value-factory>
      </attribute>

      Injecting a type assignable from the parameter type is supported:

      <attribute name="Foo">
      <value-factory bean="FooProvider" method="getFoo" default="1100">
      <parameter class="java.lang.Object">
      <value class="java.lang.Integer">1</value>
      </parameter>
      </value-factory>
      </attribute>

      The following MC value-factory features are not supported:

      <attribute name="Foo">
      <value-factory bean="FooProvider" method="getFoo" default="1100">
      <parameter><inject bean"FooParamProvider"/></parameter>
      </value-factory>
      </attribute>

      <attribute name="Foo">
      <value-factory bean="FooProvider" method="getFoo" default="1100">
      <parameter>
      <bean name="FooParam" class="com.foo.FooParam"/>
      </parameter>
      </value-factory>
      </attribute>

      <attribute name="Foo">
      <value-factory bean="FooProvider" method="getFoo" default="1100">
      <parameter>
      <map>
      ...
      </map>
      </parameter>
      </value-factory>
      </attribute>

      (or any of the other collection types).

      Attachments

        Issue Links

          Activity

            People

              bstansbe@redhat.com Brian Stansberry
              bstansbe@redhat.com Brian Stansberry
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: