FileDocCategorySizeDatePackage
AppServerBridge.javaAPI DocGlassfish v2 API4205Mon Jun 18 08:06:20 BST 2007com.sun.enterprise.jbi.serviceengine.bridge

AppServerBridge

public class AppServerBridge extends Object implements com.sun.enterprise.jbi.serviceengine.core.Bridge
Bridge is initialized during server startup.
author
Manisha Umbarje

Fields Summary
Constructors Summary
public AppServerBridge()
Creates a new instance of Bridge

    
Methods Summary
public voiddestroy()

        EndpointHelper.getInstance().destroy();
    
public com.sun.enterprise.jbi.serviceengine.comm.MessageProcessorgetMessageProcessor(javax.jbi.messaging.MessageExchange me)

        
        QName jbiServiceName = me.getEndpoint().getServiceName();
        String jbiEndpointName = me.getEndpoint().getEndpointName();
        
        String key = DescriptorEndpointInfo.getDEIKey(
                jbiServiceName, jbiEndpointName);
        DescriptorEndpointInfo dei = EndpointRegistry.getInstance().
                getWSDLEndpts().get(key);
        
        QName actualServiceName = dei !=null ? dei.getServiceName() : jbiServiceName;
        String actualEndpointName = dei != null ? dei.getEndpointName() : jbiEndpointName;
        
        ServiceEngineEndpoint seEndpoint =  EndpointRegistry.getInstance().
                get(actualServiceName, actualEndpointName);
        
        if(seEndpoint.isJAXWSEndpoint()) {
            return new JAXWSMessageProcessor();
        } else
            return new JAXRPCMessageProcessor();
    
public voidinitialize()

        ServiceEngineRtObjectFactory.getInstance().
                setFacade(ServiceEngineFacadeImpl.getInstance());
        
        //Instantiates Endpoint Helper
        EndpointHelper.getInstance().initialize();
        EndpointRegistry registry = EndpointRegistry.getInstance();
        ServiceEngineUtil.getListener().mergeEndpointRegistry(registry.getWSEndpoints());