cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <>
Subject [jira] Assigned: (CXF-1619) Move bus wiring out of Spring XML handlers
Date Fri, 30 May 2008 14:42:45 GMT


Daniel Kulp reassigned CXF-1619:

    Assignee: Daniel Kulp

> Move bus wiring out of Spring XML handlers
> ------------------------------------------
>                 Key: CXF-1619
>                 URL:
>             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.

View raw message