Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-3033

Review JBossWSCXFConfigurer and enable to configure by bean name support

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Major
    • jbossws-cxf-3.3.0
    • jbossws-cxf-3.3.0.CR2
    • jbossws-cxf
    • None

    Description

      CXF's ConfigurerImpl has the addApplicationContext(ApplicationContext ac) method to update the Spring appllicationContext , when the bus loads new SpringBeans. JBossWSCXFConfigurer delegates the configuration work to CXF's ConfigurerImpl and not extend ConfigurerImpl .

      In BusWiringBeanFactoryPostProcessor(invoked by JAXWSDefinitionParser when parse the <jaxws:endpoint>), there is code to call the addApplicationContext only if the Configuer instance is ConfiguerImpl:

      public static void updateBusReferencesInContext(Bus bus, ApplicationContext ctx) {
      Configurer conf = bus.getExtension(Configurer.class);
      if (conf instanceof ConfigurerImpl)

      { ((ConfigurerImpl)conf).addApplicationContext(ctx); }

      }

      So after set the JBossWSCXFConfigurer for the CXF configuer , the BusDeploymentAspect fails to configure the logger interceptor to this endpoint in this sample:

      <beans >
      <!-Configure the logger interceptor by service name autowire->
      <bean name="

      {http://ws.jboss.org/jaxws_samples}

      HelloService"
      abstract="true">
      <property name="inInterceptors">
      <list>
      <bean
      class="org.apache.cxf.jaxws.LoggerInteceptor">
      <constructor-arg value="service-in" />
      </bean>
      </list>
      </property>
      </bean>
      <jaxws:endpoint
      implementor='org.jboss.ws.jaxws.samples.EndpointImpl
      transportId="http://cxf.apache.org/transports/jms">
      </jaxws:endpoint>
      </beans>

      Attachments

        Activity

          People

            rhn-engineering-ema Jim Ma
            rhn-engineering-ema Jim Ma
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: