Search in sources :

Example 1 with EndpointRegistrationException

use of org.glassfish.api.container.EndpointRegistrationException in project Payara by payara.

the class WebServicesApplication method start.

public boolean start(ApplicationContext startupContext) throws Exception {
    cl = startupContext.getClassLoader();
    try {
        app = deploymentCtx.getModuleMetaData(Application.class);
        DeployCommandParameters commandParams = ((DeploymentContext) startupContext).getCommandParameters(DeployCommandParameters.class);
        String virtualServers = commandParams.virtualservers;
        Iterator<EjbEndpoint> iter = ejbendpoints.iterator();
        EjbEndpoint ejbendpoint = null;
        while (iter.hasNext()) {
            ejbendpoint = iter.next();
            String contextRoot = ejbendpoint.contextRoot;
            WebServerInfo wsi = new WsUtil().getWebServerInfoForDAS();
            URL rootURL = wsi.getWebServerRootURL(ejbendpoint.isSecure);
            dispatcher.registerEndpoint(contextRoot, httpHandler, this, virtualServers);
            // Fix for issue 13107490 and 17648
            if (wsi.getHttpVS() != null && wsi.getHttpVS().getPort() != 0) {
                logger.log(Level.INFO, LogUtils.EJB_ENDPOINT_REGISTRATION, new Object[] { app.getAppName(), rootURL + contextRoot });
            }
        }
    } catch (EndpointRegistrationException e) {
        logger.log(Level.SEVERE, LogUtils.ENDPOINT_REGISTRATION_ERROR, e.toString());
    }
    return true;
}
Also used : DeployCommandParameters(org.glassfish.api.deployment.DeployCommandParameters) DeploymentContext(org.glassfish.api.deployment.DeploymentContext) WebServerInfo(org.glassfish.web.deployment.util.WebServerInfo) EndpointRegistrationException(org.glassfish.api.container.EndpointRegistrationException) URL(java.net.URL)

Aggregations

URL (java.net.URL)1 EndpointRegistrationException (org.glassfish.api.container.EndpointRegistrationException)1 DeployCommandParameters (org.glassfish.api.deployment.DeployCommandParameters)1 DeploymentContext (org.glassfish.api.deployment.DeploymentContext)1 WebServerInfo (org.glassfish.web.deployment.util.WebServerInfo)1