Author: asoldano
Date: 2014-04-08 06:30:51 -0400 (Tue, 08 Apr 2014)
New Revision: 18570
Modified:
stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/ServerBeanCustomizer.java
Log:
Move JBossWSDestinationRegistryImpl addition to ServerBeanCustomizer (see CXF-5678)
Modified:
stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
===================================================================
---
stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2014-04-08
10:16:03 UTC (rev 18569)
+++
stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2014-04-08
10:30:51 UTC (rev 18570)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -40,7 +40,6 @@
import org.apache.cxf.resource.ResourceResolver;
import org.apache.cxf.service.factory.FactoryBeanListener;
import org.apache.cxf.service.factory.FactoryBeanListenerManager;
-import org.apache.cxf.transport.http.DestinationRegistry;
import org.apache.cxf.workqueue.AutomaticWorkQueue;
import org.apache.cxf.workqueue.AutomaticWorkQueueImpl;
import org.apache.cxf.workqueue.WorkQueueManager;
@@ -69,7 +68,6 @@
import org.jboss.wsf.stack.cxf.interceptor.NsCtxSelectorStoreInterceptor;
import org.jboss.wsf.stack.cxf.management.InstrumentationManagerExtImpl;
import
org.jboss.wsf.stack.cxf.security.authentication.AutenticationMgrSubjectCreatingInterceptor;
-import org.jboss.wsf.stack.cxf.transport.JBossWSDestinationRegistryImpl;
/**
* A wrapper of the Bus for performing most of the configurations required on it by
JBossWS
@@ -143,10 +141,6 @@
{
bus.getExtension(PolicyEngine.class).setAlternativeSelector(getAlternativeSelector(props));
}
- if (bus.getExtension(DestinationRegistry.class) == null)
- {
- bus.setExtension(new JBossWSDestinationRegistryImpl(),
DestinationRegistry.class);
- }
setCXFManagement(bus, props); //*first* enabled cxf management if required, *then*
add anything else which could be manageable (e.g. work queues)
setAdditionalWorkQueues(bus, props);
setWSDiscovery(bus, props);
Modified:
stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/ServerBeanCustomizer.java
===================================================================
---
stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/ServerBeanCustomizer.java 2014-04-08
10:16:03 UTC (rev 18569)
+++
stack/cxf/branches/asoldano/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/ServerBeanCustomizer.java 2014-04-08
10:30:51 UTC (rev 18570)
@@ -26,6 +26,8 @@
import java.util.List;
import org.apache.cxf.frontend.ServerFactoryBean;
+import org.apache.cxf.transport.http.DestinationRegistry;
+import org.apache.cxf.transport.http.HTTPTransportFactory;
import org.jboss.ws.api.annotation.EndpointConfig;
import org.jboss.ws.api.util.ServiceLoader;
import org.jboss.ws.common.management.AbstractServerConfig;
@@ -43,6 +45,7 @@
import org.jboss.wsf.stack.cxf.deployment.EndpointImpl;
import org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher;
import
org.jboss.wsf.stack.cxf.security.authentication.AutenticationMgrSubjectCreatingInterceptor;
+import org.jboss.wsf.stack.cxf.transport.JBossWSDestinationRegistryImpl;
/**
*
@@ -88,6 +91,13 @@
}
}
}
+ if (beanInstance instanceof HTTPTransportFactory) {
+ HTTPTransportFactory factory = (HTTPTransportFactory) beanInstance;
+ DestinationRegistry oldRegistry = factory.getRegistry();
+ if (!(oldRegistry instanceof JBossWSDestinationRegistryImpl)) {
+ factory.setRegistry(new JBossWSDestinationRegistryImpl());
+ }
+ }
super.customize(beanInstance);
}
Show replies by date