You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Ian Roberts (JIRA)" <ji...@apache.org> on 2008/05/30 15:42:45 UTC

[jira] Created: (CXF-1619) Move bus wiring out of Spring XML handlers

Move bus wiring out of Spring XML handlers
------------------------------------------

                 Key: CXF-1619
                 URL: https://issues.apache.org/jira/browse/CXF-1619
             Project: CXF
          Issue Type: Improvement
          Components: Configuration
    Affects Versions: 2.1
            Reporter: Ian Roberts


Several classes in CXF, such as JaxWs{Proxy,Server}FactoryBean, EndpointImpl, etc. that take a reference to a Bus automatically wire in a reference to the Spring bean "cxf" if no bus has been explicitly specified.  However, this wiring is currently handled in the custom XML handlers, so happens at XML parsing time.  This means it is sensitive to the order in which the Spring beans have been defined - the "cxf" Bus bean is only wired in if its definition exists in the Spring context at the time the custom XML is parsed.

This patch implements an alternative behaviour where we first parse all the bean definitions, then go back and check for the existence of the "cxf" bean and wire it in if necessary.  This would mean that the CXF <import>s could go anywhere in your Spring config file (even after your <jaxws:endpoint>s), or even in a separate file.  At present, if you put the imports in a separate file you must arrange for this file to be loaded before your others, but this isn't always possible to guarantee.

Summary of the patch:
- Anywhere where a Spring XML handler currently does a check for the existence of a bean called "cxf" and wires it into the new definition, replace this code with code to add a custom attribute to the new bean definition instead.
- BusWiringBeanFactoryPostProcessor, registered by default in cxf.xml, checks bean definitions for this custom attribute and does the wiring.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CXF-1619) Move bus wiring out of Spring XML handlers

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-1619.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.7
                   2.1.1


Patch applied.   Major thanks!

> Move bus wiring out of Spring XML handlers
> ------------------------------------------
>
>                 Key: CXF-1619
>                 URL: https://issues.apache.org/jira/browse/CXF-1619
>             Project: CXF
>          Issue Type: Improvement
>          Components: Configuration
>    Affects Versions: 2.1
>            Reporter: Ian Roberts
>            Assignee: Daniel Kulp
>             Fix For: 2.1.1, 2.0.7
>
>         Attachments: BusWiringByPostProcessor.diff
>
>
> Several classes in CXF, such as JaxWs{Proxy,Server}FactoryBean, EndpointImpl, etc. that take a reference to a Bus automatically wire in a reference to the Spring bean "cxf" if no bus has been explicitly specified.  However, this wiring is currently handled in the custom XML handlers, so happens at XML parsing time.  This means it is sensitive to the order in which the Spring beans have been defined - the "cxf" Bus bean is only wired in if its definition exists in the Spring context at the time the custom XML is parsed.
> This patch implements an alternative behaviour where we first parse all the bean definitions, then go back and check for the existence of the "cxf" bean and wire it in if necessary.  This would mean that the CXF <import>s could go anywhere in your Spring config file (even after your <jaxws:endpoint>s), or even in a separate file.  At present, if you put the imports in a separate file you must arrange for this file to be loaded before your others, but this isn't always possible to guarantee.
> Summary of the patch:
> - Anywhere where a Spring XML handler currently does a check for the existence of a bean called "cxf" and wires it into the new definition, replace this code with code to add a custom attribute to the new bean definition instead.
> - BusWiringBeanFactoryPostProcessor, registered by default in cxf.xml, checks bean definitions for this custom attribute and does the wiring.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (CXF-1619) Move bus wiring out of Spring XML handlers

Posted by "Ian Roberts (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601135#action_12601135 ] 

button_boxer edited comment on CXF-1619 at 5/30/08 6:45 AM:
-----------------------------------------------------------

Patch implementing bus wiring by a BeanFactoryPostProcessor.  This is an svn diff against revision 661324 of the trunk.

      was (Author: button_boxer):
    Patch implementing bus wiring by a BeanFactoryPostProcessor.
  
> Move bus wiring out of Spring XML handlers
> ------------------------------------------
>
>                 Key: CXF-1619
>                 URL: https://issues.apache.org/jira/browse/CXF-1619
>             Project: CXF
>          Issue Type: Improvement
>          Components: Configuration
>    Affects Versions: 2.1
>            Reporter: Ian Roberts
>         Attachments: BusWiringByPostProcessor.diff
>
>
> Several classes in CXF, such as JaxWs{Proxy,Server}FactoryBean, EndpointImpl, etc. that take a reference to a Bus automatically wire in a reference to the Spring bean "cxf" if no bus has been explicitly specified.  However, this wiring is currently handled in the custom XML handlers, so happens at XML parsing time.  This means it is sensitive to the order in which the Spring beans have been defined - the "cxf" Bus bean is only wired in if its definition exists in the Spring context at the time the custom XML is parsed.
> This patch implements an alternative behaviour where we first parse all the bean definitions, then go back and check for the existence of the "cxf" bean and wire it in if necessary.  This would mean that the CXF <import>s could go anywhere in your Spring config file (even after your <jaxws:endpoint>s), or even in a separate file.  At present, if you put the imports in a separate file you must arrange for this file to be loaded before your others, but this isn't always possible to guarantee.
> Summary of the patch:
> - Anywhere where a Spring XML handler currently does a check for the existence of a bean called "cxf" and wires it into the new definition, replace this code with code to add a custom attribute to the new bean definition instead.
> - BusWiringBeanFactoryPostProcessor, registered by default in cxf.xml, checks bean definitions for this custom attribute and does the wiring.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CXF-1619) Move bus wiring out of Spring XML handlers

Posted by "Ian Roberts (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ian Roberts updated CXF-1619:
-----------------------------

    Attachment: BusWiringByPostProcessor.diff

Patch implementing bus wiring by a BeanFactoryPostProcessor.

> Move bus wiring out of Spring XML handlers
> ------------------------------------------
>
>                 Key: CXF-1619
>                 URL: https://issues.apache.org/jira/browse/CXF-1619
>             Project: CXF
>          Issue Type: Improvement
>          Components: Configuration
>    Affects Versions: 2.1
>            Reporter: Ian Roberts
>         Attachments: BusWiringByPostProcessor.diff
>
>
> Several classes in CXF, such as JaxWs{Proxy,Server}FactoryBean, EndpointImpl, etc. that take a reference to a Bus automatically wire in a reference to the Spring bean "cxf" if no bus has been explicitly specified.  However, this wiring is currently handled in the custom XML handlers, so happens at XML parsing time.  This means it is sensitive to the order in which the Spring beans have been defined - the "cxf" Bus bean is only wired in if its definition exists in the Spring context at the time the custom XML is parsed.
> This patch implements an alternative behaviour where we first parse all the bean definitions, then go back and check for the existence of the "cxf" bean and wire it in if necessary.  This would mean that the CXF <import>s could go anywhere in your Spring config file (even after your <jaxws:endpoint>s), or even in a separate file.  At present, if you put the imports in a separate file you must arrange for this file to be loaded before your others, but this isn't always possible to guarantee.
> Summary of the patch:
> - Anywhere where a Spring XML handler currently does a check for the existence of a bean called "cxf" and wires it into the new definition, replace this code with code to add a custom attribute to the new bean definition instead.
> - BusWiringBeanFactoryPostProcessor, registered by default in cxf.xml, checks bean definitions for this custom attribute and does the wiring.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (CXF-1619) Move bus wiring out of Spring XML handlers

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp reassigned CXF-1619:
--------------------------------

    Assignee: Daniel Kulp

> Move bus wiring out of Spring XML handlers
> ------------------------------------------
>
>                 Key: CXF-1619
>                 URL: https://issues.apache.org/jira/browse/CXF-1619
>             Project: CXF
>          Issue Type: Improvement
>          Components: Configuration
>    Affects Versions: 2.1
>            Reporter: Ian Roberts
>            Assignee: Daniel Kulp
>         Attachments: BusWiringByPostProcessor.diff
>
>
> Several classes in CXF, such as JaxWs{Proxy,Server}FactoryBean, EndpointImpl, etc. that take a reference to a Bus automatically wire in a reference to the Spring bean "cxf" if no bus has been explicitly specified.  However, this wiring is currently handled in the custom XML handlers, so happens at XML parsing time.  This means it is sensitive to the order in which the Spring beans have been defined - the "cxf" Bus bean is only wired in if its definition exists in the Spring context at the time the custom XML is parsed.
> This patch implements an alternative behaviour where we first parse all the bean definitions, then go back and check for the existence of the "cxf" bean and wire it in if necessary.  This would mean that the CXF <import>s could go anywhere in your Spring config file (even after your <jaxws:endpoint>s), or even in a separate file.  At present, if you put the imports in a separate file you must arrange for this file to be loaded before your others, but this isn't always possible to guarantee.
> Summary of the patch:
> - Anywhere where a Spring XML handler currently does a check for the existence of a bean called "cxf" and wires it into the new definition, replace this code with code to add a custom attribute to the new bean definition instead.
> - BusWiringBeanFactoryPostProcessor, registered by default in cxf.xml, checks bean definitions for this custom attribute and does the wiring.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.