You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Gary Tully (JIRA)" <ji...@apache.org> on 2007/05/02 17:10:15 UTC
[jira] Created: (CXF-623) spring bean configuration should support
simple wildcards
spring bean configuration should support simple wildcards
---------------------------------------------------------
Key: CXF-623
URL: https://issues.apache.org/jira/browse/CXF-623
Project: CXF
Issue Type: Improvement
Components: Configuration
Affects Versions: 2.0-RC
Reporter: Gary Tully
to apply configuration to a http destination I need to provide the following:
<bean name="{http://www.test.com}MyPort.http-destination" abstract="true">
<property name="multiplexWithAddress" value="true"/>
</bean>
which matches a single port by name.
I would like to be able to provide
<bean name="*.http-destination" abstract="true">
<property name="multiplexWithAddress" value="true"/>
</bean>
to indicate to apply the config to all http-destinations. To make this work in practice a class attribute is required, otherwise any wildcard would be matched against all beanNames. The package is probably not required in the className attribute.
<bean name="*.http-destination" abstract="true" class="HttpDestination">
<property name="multiplexWithAddress" value="true"/>
</bean>
To get Spring to merge wildcard and beanName specific config may be a chalenge but it would be great. Possibly it is a case of configuring once with the wildcard match and once with the specific name.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
Re: [jira] Commented: (CXF-623) spring bean configuration should
support simple wildcards
Posted by Andrea Smyth <an...@iona.com>.
I'll take care of the patch.
Andrea.
Gary Tully (JIRA) wrote:
> [ https://issues.apache.org/jira/browse/CXF-623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493168 ]
>
>Gary Tully commented on CXF-623:
>--------------------------------
>
>one further detail of the patch, the wildcard is a applied before any bean id matching config such that a bean with an exact-name match can override any wildcard.
>
>
>
>>spring bean configuration should support simple wildcards
>>---------------------------------------------------------
>>
>> Key: CXF-623
>> URL: https://issues.apache.org/jira/browse/CXF-623
>> Project: CXF
>> Issue Type: Improvement
>> Components: Configuration
>> Affects Versions: 2.0-RC
>> Reporter: Gary Tully
>> Attachments: patch-cxf-623.r534554.patch
>>
>>
>>to apply configuration to a http destination I need to provide the following:
>> <bean name="{http://www.test.com}MyPort.http-destination" abstract="true">
>> <property name="multiplexWithAddress" value="true"/>
>> </bean>
>>which matches a single port by name.
>>I would like to be able to provide
>> <bean name="*.http-destination" abstract="true">
>> <property name="multiplexWithAddress" value="true"/>
>> </bean>
>>to indicate to apply the config to all http-destinations. To make this work in practice a class attribute is required, otherwise any wildcard would be matched against all beanNames. The package is probably not required in the className attribute.
>> <bean name="*.http-destination" abstract="true" class="HttpDestination">
>> <property name="multiplexWithAddress" value="true"/>
>> </bean>
>>To get Spring to merge wildcard and beanName specific config may be a chalenge but it would be great. Possibly it is a case of configuring once with the wildcard match and once with the specific name.
>>
>>
>
>
>
[jira] Commented: (CXF-623) spring bean configuration should
support simple wildcards
Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493168 ]
Gary Tully commented on CXF-623:
--------------------------------
one further detail of the patch, the wildcard is a applied before any bean id matching config such that a bean with an exact-name match can override any wildcard.
> spring bean configuration should support simple wildcards
> ---------------------------------------------------------
>
> Key: CXF-623
> URL: https://issues.apache.org/jira/browse/CXF-623
> Project: CXF
> Issue Type: Improvement
> Components: Configuration
> Affects Versions: 2.0-RC
> Reporter: Gary Tully
> Attachments: patch-cxf-623.r534554.patch
>
>
> to apply configuration to a http destination I need to provide the following:
> <bean name="{http://www.test.com}MyPort.http-destination" abstract="true">
> <property name="multiplexWithAddress" value="true"/>
> </bean>
> which matches a single port by name.
> I would like to be able to provide
> <bean name="*.http-destination" abstract="true">
> <property name="multiplexWithAddress" value="true"/>
> </bean>
> to indicate to apply the config to all http-destinations. To make this work in practice a class attribute is required, otherwise any wildcard would be matched against all beanNames. The package is probably not required in the className attribute.
> <bean name="*.http-destination" abstract="true" class="HttpDestination">
> <property name="multiplexWithAddress" value="true"/>
> </bean>
> To get Spring to merge wildcard and beanName specific config may be a chalenge but it would be great. Possibly it is a case of configuring once with the wildcard match and once with the specific name.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-623) spring bean configuration should
support simple wildcards
Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493323 ]
Gary Tully commented on CXF-623:
--------------------------------
This feature can form the basis for addressing the issue of portNAme clashing:
http://mail-archives.apache.org/mod_mbox/incubator-cxf-user/200704.mbox/%3c46149E97.8080500@iona.com%3e
the serviceName can be reintroduced into the destination/Conduit config and the existing portNAme match can be achieved by using *PortName.
If more flexibility, ie regexp are required it can be extended to support that.
> spring bean configuration should support simple wildcards
> ---------------------------------------------------------
>
> Key: CXF-623
> URL: https://issues.apache.org/jira/browse/CXF-623
> Project: CXF
> Issue Type: Improvement
> Components: Configuration
> Affects Versions: 2.0-RC
> Reporter: Gary Tully
> Attachments: patch-cxf-623.r534554.patch
>
>
> to apply configuration to a http destination I need to provide the following:
> <bean name="{http://www.test.com}MyPort.http-destination" abstract="true">
> <property name="multiplexWithAddress" value="true"/>
> </bean>
> which matches a single port by name.
> I would like to be able to provide
> <bean name="*.http-destination" abstract="true">
> <property name="multiplexWithAddress" value="true"/>
> </bean>
> to indicate to apply the config to all http-destinations. To make this work in practice a class attribute is required, otherwise any wildcard would be matched against all beanNames. The package is probably not required in the className attribute.
> <bean name="*.http-destination" abstract="true" class="HttpDestination">
> <property name="multiplexWithAddress" value="true"/>
> </bean>
> To get Spring to merge wildcard and beanName specific config may be a chalenge but it would be great. Possibly it is a case of configuring once with the wildcard match and once with the specific name.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (CXF-623) spring bean configuration should support
simple wildcards
Posted by "Bozhong Lin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-623?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bozhong Lin closed CXF-623.
---------------------------
Resolution: Fixed
patch applied by Andrea with r534945 on May 3rd
> spring bean configuration should support simple wildcards
> ---------------------------------------------------------
>
> Key: CXF-623
> URL: https://issues.apache.org/jira/browse/CXF-623
> Project: CXF
> Issue Type: Improvement
> Components: Configuration
> Affects Versions: 2.0-RC
> Reporter: Gary Tully
> Attachments: patch-cxf-623.r534554.patch
>
>
> to apply configuration to a http destination I need to provide the following:
> <bean name="{http://www.test.com}MyPort.http-destination" abstract="true">
> <property name="multiplexWithAddress" value="true"/>
> </bean>
> which matches a single port by name.
> I would like to be able to provide
> <bean name="*.http-destination" abstract="true">
> <property name="multiplexWithAddress" value="true"/>
> </bean>
> to indicate to apply the config to all http-destinations. To make this work in practice a class attribute is required, otherwise any wildcard would be matched against all beanNames. The package is probably not required in the className attribute.
> <bean name="*.http-destination" abstract="true" class="HttpDestination">
> <property name="multiplexWithAddress" value="true"/>
> </bean>
> To get Spring to merge wildcard and beanName specific config may be a chalenge but it would be great. Possibly it is a case of configuring once with the wildcard match and once with the specific name.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CXF-623) spring bean configuration should support
simple wildcards
Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-623?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary Tully updated CXF-623:
---------------------------
Attachment: patch-cxf-623.r534554.patch
Implementation of simple wildcarding for bean identifiers, config for multiplex address changes like so:
from:
<bean name="{http://cxf.apache.org/factory_pattern}NumberPort.http-destination"
abstract="true">
<property name="multiplexWithAddress" value="true"/>
</bean>
to:
<bean name="*" abstract="true" class="JettyHTTPDestination">
<property name="multiplexWithAddress" value="true"/>
</bean>
Detail:
wildcards must start with * and can contain a only one *. The matching is based on simple endswith of the bean id.
The class is the SimpleName of the impl class, this makes writing easier/shorter with the possible downside of needing a more explicit wildcard in the event of duplicate class names (becasue of the missing package). The class is a must, otherwise a single wildcard would be checked for every configured bean which would slow down every configured object creation.
I could make the className optional but I think it helps to localise the wildcarding. The downside is that it exposes implementation detail in the config which is bad imho.
Limitation:
only a single wildcard is allowed per class, the first wins, the rest are logged as ignored with a warning. Should this be an error.
I have not gone down the road of idenitfying ids of the form {ns}port and allowing {*}port.*. This can be added later if needed.
> spring bean configuration should support simple wildcards
> ---------------------------------------------------------
>
> Key: CXF-623
> URL: https://issues.apache.org/jira/browse/CXF-623
> Project: CXF
> Issue Type: Improvement
> Components: Configuration
> Affects Versions: 2.0-RC
> Reporter: Gary Tully
> Attachments: patch-cxf-623.r534554.patch
>
>
> to apply configuration to a http destination I need to provide the following:
> <bean name="{http://www.test.com}MyPort.http-destination" abstract="true">
> <property name="multiplexWithAddress" value="true"/>
> </bean>
> which matches a single port by name.
> I would like to be able to provide
> <bean name="*.http-destination" abstract="true">
> <property name="multiplexWithAddress" value="true"/>
> </bean>
> to indicate to apply the config to all http-destinations. To make this work in practice a class attribute is required, otherwise any wildcard would be matched against all beanNames. The package is probably not required in the className attribute.
> <bean name="*.http-destination" abstract="true" class="HttpDestination">
> <property name="multiplexWithAddress" value="true"/>
> </bean>
> To get Spring to merge wildcard and beanName specific config may be a chalenge but it would be great. Possibly it is a case of configuring once with the wildcard match and once with the specific name.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.