FileDocCategorySizeDatePackage
JBIAdapter.javaAPI DocGlassfish v2 API5549Wed Jul 04 08:20:20 BST 2007com.sun.enterprise.jbi.serviceengine.bridge.transport

JBIAdapter

public class JBIAdapter extends com.sun.xml.ws.api.server.Adapter
Adapter class that invokes the Endpoint. It uses an inner class to handle the inbound request.
author
Vikas Awasthi

Fields Summary
private final Logger
logger
private NMRServerConnection
con
private ClassLoader
classLoader
private com.sun.enterprise.webservice.EjbRuntimeEndpointInfo
ejbEndPtInfo
Constructors Summary
public JBIAdapter(com.sun.xml.ws.api.server.WSEndpoint endpoint, com.sun.enterprise.jbi.serviceengine.core.ServiceEngineEndpoint endpt, javax.jbi.messaging.MessageExchange me, ClassLoader classLoader, com.sun.enterprise.webservice.EjbRuntimeEndpointInfo ejbEndPtInfo)
Creates an {@link com.sun.xml.ws.api.server.Adapter} that delivers messages to the given endpoint.

    
                    
       
                        
                       
                       
                        
        super(endpoint);
        con = new NMRServerConnection(me, endpt);
        this.classLoader = classLoader;
        this.ejbEndPtInfo = ejbEndPtInfo;
    
Methods Summary
protected com.sun.enterprise.jbi.serviceengine.bridge.transport.JBIAdapter$WSToolkitcreateToolkit()

        return new WSToolkit();
    
public java.lang.ClassLoadergetClassLoader()

        return classLoader;
    
public voidhandle()

        WSToolkit tk = pool.take();
        try {
            tk.handle();
        }finally {
            pool.recycle(tk);
        }
    
public voidhandleException(java.lang.Exception ex)

        con.handleException(ex);
    
private voidpostInvoke()
For every EJB endpoint invocation a preInvoke and postInvoke must be called. The preInvoke is called during the creation of JBIAdapter in JBIAdapterBuilder. The postInvoke method should be called before returning the response back to NMR. For non-EJB cases ejbEndPtInfo will be null.

        if(ejbEndPtInfo!=null)
            ejbEndPtInfo.releaseImplementor();