01: package org.objectweb.celtix.geronimo.container;
02:
03: import java.io.IOException;
04:
05: import javax.wsdl.WSDLException;
06:
07: import org.objectweb.celtix.bus.transports.http.HTTPTransportFactory;
08: import org.objectweb.celtix.transports.ServerTransport;
09: import org.objectweb.celtix.ws.addressing.EndpointReferenceType;
10:
11: public class GeronimoTransportFactory extends HTTPTransportFactory {
12:
13: private ThreadLocal<CeltixWebServiceContainer> currentContainer = new ThreadLocal<CeltixWebServiceContainer>();
14:
15: public CeltixWebServiceContainer getCurrentContainer() {
16: return currentContainer.get();
17: }
18:
19: public void setCurrentContainer(CeltixWebServiceContainer container) {
20: currentContainer.set(container);
21: }
22:
23: public ServerTransport createServerTransport(
24: EndpointReferenceType address) throws WSDLException,
25: IOException {
26:
27: GeronimoServerTransport ret = new GeronimoServerTransport(
28: getBus(), address);
29: getCurrentContainer().setServerTransport(ret);
30: return ret;
31: }
32:
33: }
|