[jboss-jira] [JBoss JIRA] Created: (JBAS-5822) Add support for value-factory injection to -service.xml parsing

Brian Stansberry (JIRA) jira-events at lists.jboss.org
Thu Jul 31 18:49:26 EDT 2008


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

                 Key: JBAS-5822
                 URL: https://jira.jboss.org/jira/browse/JBAS-5822
             Project: JBoss Application Server
          Issue Type: Feature Request
      Security Level: Public (Everyone can see)
          Components: Deployers
            Reporter: Brian Stansberry
            Assignee: Brian Stansberry
             Fix For: JBossAS-5.0.0.CR2


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).


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list