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:46:45 UTC

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

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