[seam-issues] [JBoss JIRA] Updated: (SEAMXML-8) Review all deviations from the original JSR-299 draft spec

Stuart Douglas (JIRA) jira-events at lists.jboss.org
Tue Jun 15 22:52:46 EDT 2010


     [ https://jira.jboss.org/browse/SEAMXML-8?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart Douglas updated SEAMXML-8:
---------------------------------

    Description: 
There a quite a few changes from the draft spec, I have listed them below:

1) shorthand field value syntax 

You can do <ns:Company name="Red Hat, Inc." />

2) Producer method / field syntax was:

<ns:Bean>
<ns:field>
  <Producer>
    <ns:SomeQualifier/>
  </Producer>
</ns:field>
</ns:Bean>

I have changed this to:

<ns:Bean>
<ns:field>
  <Producer/>
  <ns:SomeQualifier/>
</ns:field>
</ns:Bean>

3) Setting initial field values

You can now do:

<ns:Bean>
<ns:field>
  <Producer/>
   <value>10</value>
</ns:field>
<ns:field2>5</ns:field2>
<ns:mapField>
   <entry><key>a</key><value>b</value></entry>
   <e><k>c</k><v>d</v></e>
</ns:mapField/>
</ns:Bean>

The value key and entry tags can be shorted to just <v><k> and <e> tags. The <value> element was not able to be used like this in the original spec, so it was not possible to apply annotations and set the field value.

4) <overrides> and <specializes> tags


5) Change of syntax for constructor and method parameters

In the draft spec method parameters are specified as direct children of the method like so:

<ns:Bean>
<ns:method>
  <Producer/>
   <ns:ParamType1><ns:SomeAnntation/></ns:ParamType1>
   <ns:SomeOtherAnnotation/>
   <ns:ParamType2/>
</ns:method>
</ns:Bean>

This has been changed to:

<ns:Bean>
<ns:method>
  <Producer/>
   <ns:SomeOtherAnnotation/>
   <parameters>
      <ns:ParamType1><ns:SomeAnntation/></ns:ParamType1>
      <ns:ParamType2/>
   </parameters/>
</ns:method>
</ns:Bean>

6) Interface configuration

Annotations / field values applied to an interface via XML are applied to all classes that implement that interface.

7) Generic Beans

Intended as a tool for framework writers, generic beans allow you to define a set of beans generic that are related to a primary bean. Every time the user wires up a bean based on the primary bean Seam XML installs a corresponding version of each of the secondary beans, with the same qualifiers as the bean the user wired up. e.g. the Drools module uses this feature to install multiple beans every time the user wires up a DroolsConfig bean. 

8) Multi dimensional arrays

The dimensions attribute of the <array> tag was not in the original spec. It allows you to configure methods that take a multi-dimansional array as an argument. 


  was:
There a quite a few changes from the draft spec, I have listed them below:

1) shorthand field value syntax 

You can do <ns:Company name="Red Hat, Inc." />

2) Producer method / field syntax was:

<ns:Bean>
<ns:field>
  <Producer>
    <ns:SomeQualifier/>
  </Producer>
</ns:field>
</ns:Bean>

I have changed this to:

<ns:Bean>
<ns:field>
  <Producer/>
  <ns:SomeQualifier/>
</ns:field>
</ns:Bean>

3) Setting initial field values

You can now do:

<ns:Bean>
<ns:field>
  <Producer/>
   <value>10</value>
</ns:field>
<ns:field2>5</ns:field2>
<ns:mapField>
   <entry><key>a</key><value>b</value></entry>
   <e><k>c</k><v>d</v></e>
</ns:mapField/>
</ns:Bean>

The value key and entry tags can be shorted to just <v><k> and <e> tags. The <value> element was not able to be used like this in the original spec, so it was not possible to apply annotations and set the field value.

4) <overrides> and <specializes> tags


5) Change of syntax for constructor and method parameters

In the draft spec method parameters are specified as direct children of the method like so:

<ns:Bean>
<ns:method>
  <Producer/>
   <ns:ParamType1><ns:SomeAnntation/></ns:ParamType1>
   <ns:SomeOtherAnnotation/>
   <ns:ParamType2/>
</ns:method>
</ns:Bean>

This has been changed to:

<ns:Bean>
<ns:method>
  <Producer/>
   <ns:SomeOtherAnnotation/>
   <parameters>
      <ns:ParamType1><ns:SomeAnntation/></ns:ParamType1>
      <ns:ParamType2/>
   </parameters/>
</ns:method>
</ns:Bean>

6) Interface configuration

Annotations / field values applied to an interface via XML are applied to all classes that implement that interface.

7) Generic Beans

Intended as a tool for framework writers, generic beans allow you to define a set of beans generic that are related to a primary bean. Every time the user wires up a bean based on the primary bean Seam XML installs a corresponding version of each of the secondary beans, with the same qualifiers as the bean the user wired up. e.g. the Drools module uses this feature to install multiple beans every time the user wires up a DroolsConfig bean. 



> Review all deviations from the original JSR-299 draft spec 
> -----------------------------------------------------------
>
>                 Key: SEAMXML-8
>                 URL: https://jira.jboss.org/browse/SEAMXML-8
>             Project: Seam XML Bean Config
>          Issue Type: Task
>            Reporter: Stuart Douglas
>
> There a quite a few changes from the draft spec, I have listed them below:
> 1) shorthand field value syntax 
> You can do <ns:Company name="Red Hat, Inc." />
> 2) Producer method / field syntax was:
> <ns:Bean>
> <ns:field>
>   <Producer>
>     <ns:SomeQualifier/>
>   </Producer>
> </ns:field>
> </ns:Bean>
> I have changed this to:
> <ns:Bean>
> <ns:field>
>   <Producer/>
>   <ns:SomeQualifier/>
> </ns:field>
> </ns:Bean>
> 3) Setting initial field values
> You can now do:
> <ns:Bean>
> <ns:field>
>   <Producer/>
>    <value>10</value>
> </ns:field>
> <ns:field2>5</ns:field2>
> <ns:mapField>
>    <entry><key>a</key><value>b</value></entry>
>    <e><k>c</k><v>d</v></e>
> </ns:mapField/>
> </ns:Bean>
> The value key and entry tags can be shorted to just <v><k> and <e> tags. The <value> element was not able to be used like this in the original spec, so it was not possible to apply annotations and set the field value.
> 4) <overrides> and <specializes> tags
> 5) Change of syntax for constructor and method parameters
> In the draft spec method parameters are specified as direct children of the method like so:
> <ns:Bean>
> <ns:method>
>   <Producer/>
>    <ns:ParamType1><ns:SomeAnntation/></ns:ParamType1>
>    <ns:SomeOtherAnnotation/>
>    <ns:ParamType2/>
> </ns:method>
> </ns:Bean>
> This has been changed to:
> <ns:Bean>
> <ns:method>
>   <Producer/>
>    <ns:SomeOtherAnnotation/>
>    <parameters>
>       <ns:ParamType1><ns:SomeAnntation/></ns:ParamType1>
>       <ns:ParamType2/>
>    </parameters/>
> </ns:method>
> </ns:Bean>
> 6) Interface configuration
> Annotations / field values applied to an interface via XML are applied to all classes that implement that interface.
> 7) Generic Beans
> Intended as a tool for framework writers, generic beans allow you to define a set of beans generic that are related to a primary bean. Every time the user wires up a bean based on the primary bean Seam XML installs a corresponding version of each of the secondary beans, with the same qualifiers as the bean the user wired up. e.g. the Drools module uses this feature to install multiple beans every time the user wires up a DroolsConfig bean. 
> 8) Multi dimensional arrays
> The dimensions attribute of the <array> tag was not in the original spec. It allows you to configure methods that take a multi-dimansional array as an argument. 

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

        


More information about the seam-issues mailing list