FileDocCategorySizeDatePackage
TCP109Adapter.javaAPI DocExample4635Tue May 29 16:57:12 BST 2007com.sun.xml.ws.transport.tcp.server.glassfish

TCP109Adapter

public final class TCP109Adapter extends com.sun.xml.ws.transport.tcp.server.TCPAdapter
author
Alexey Stashok

Fields Summary
private final ServletFakeArtifactSet
servletFakeArtifactSet
Currently 109 deployed WS's pipeline relies on Servlet request and response attributes. So its temporary workaround to make 109 work with TCP
private final boolean
isEJB
private final String
contextRoot
Constructors Summary
public TCP109Adapter(String name, String contextRoot, String urlPattern, com.sun.xml.ws.api.server.WSEndpoint endpoint, ServletFakeArtifactSet servletFakeArtifactSet, boolean isEJB)

        super(name, urlPattern, endpoint);
        this.contextRoot = contextRoot;
        this.servletFakeArtifactSet = servletFakeArtifactSet;
        this.isEJB = isEJB;
    
Methods Summary
protected TCPAdapter.TCPToolkitcreateToolkit()

        return new TCP109Toolkit();
    
public voidhandle(com.sun.xml.ws.transport.tcp.util.ChannelContext channelContext)

        EjbRuntimeEndpointInfo ejbRuntimeEndpointInfo = null;
        
        if (isEJB) {
            ejbRuntimeEndpointInfo = AppServWSRegistry.getInstance().
                    getEjbRuntimeEndpointInfo(contextRoot, getValidPath());
            try {
                ejbRuntimeEndpointInfo.prepareInvocation(true);
            } catch (Exception e) {
                throw new IOException(e.getClass().getName());
            }
        }
        
        try {
            super.handle(channelContext);
        } finally {
            if (isEJB && ejbRuntimeEndpointInfo != null) {
                ejbRuntimeEndpointInfo.releaseImplementor();
            }
        }