cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jiang Ning <ning.ji...@iona.com>
Subject Re: Where do all the protocols come from in the DestinationFactoryManager?
Date Thu, 19 Oct 2006 09:57:29 GMT
Hi David,

It is easy to stop jetty by remove the cxf-rt-transports-http jar from 
the class path.
Because CXF bus can load the extension module by look for the 
cxf-extension.xml in class path. The rt-core is using cxf-extension.xml 
which in the cxf-rt-transports-http jar to initiate the 
HTTPTransportFactory and register these namespace to 
DestinationFactoryManager as ActivationNamespaces.
These namespaces work as the transportId for HTTPTransportFactory to 
create related destination.

public Destination getDestination(EndpointInfo endpointInfo)
throws IOException {
JettyHTTPDestination destination = new JettyHTTPDestination(bus, this, 
endpointInfo);
Configurer configurer = bus.getExtension(Configurer.class);
if (null != configurer) {
configurer.configureBean(destination);
}
return destination;
}

public EndpointInfo(ServiceInfo serv, String ns) {
transportId = ns;
service = serv;
}

Chrees,

Willem.

David Jencks wrote:

> Working on the cxf-geronimo integration I finally convinced cxf to 
> stop trying to create a jetty5 server by replacing all the registered 
> destination factories in the DestinationFactoryManager:
>
> DestinationFactoryManager destinationFactoryManager = 
> bus.getExtension(DestinationFactoryManager.class);
> DestinationFactory factory = new GeronimoDestinationFactory (bus);
> destinationFactoryManager.registerDestinationFactory("http:// 
> cxf.apache.org/transports/http/configuration", factory);
> destinationFactoryManager.registerDestinationFactory("http:// 
> www.w3.org/2003/05/soap/bindings/HTTP/", factory);
> destinationFactoryManager.registerDestinationFactory("http:// 
> schemas.xmlsoap.org/soap/http", factory);
> destinationFactoryManager.registerDestinationFactory("http:// 
> schemas.xmlsoap.org/wsdl/http/", factory);
> destinationFactoryManager.registerDestinationFactory("http:// 
> schemas.xmlsoap.org/wsdl/soap/", factory);
> destinationFactoryManager.registerDestinationFactory("http:// 
> schemas.xmlsoap.org/wsdl/soap/http", factory);
> destinationFactoryManager.registerDestinationFactory 
> (XMLConstants.NS_XML_FORMAT, factory);
> EndpointImpl publishedEndpoint = publishEndpoint(target);
> destination = (GeronimoDestination) 
> publishedEndpoint.getServer().getDestination();
>
>
> (there were actually a couple others that don't seem to cause 
> immediate problems)
>
> geronimo is listening for http requests and feeding them into cxf, 
> which seems to take over the function of the HTTPFactory that was 
> previously registered, I have to wonder what the function of 
> registering these protocols is, whether they all need to be 
> registered, and if not how to prevent the jetty5 destination factory 
> from being registered.
>
> thanks
> david jencks
>
>


-- 
Willem Jiang
Software Engineer

IONA Asia Pacific Software Development Center
2/F, Unit A, Information Center
Zhongguancun Software Park Haidian District,
Beijing, P.R.China (100094)

Tel: +86-10-82825151 - 523
Fax: +86-10-82825210
Email: ning.jiang@iona.com



Mime
View raw message