@Override protected WSDLEndpointFactory getWSDLEndpointFactory() { if (destinationFactory == null) { try { destinationFactory = getBus().getExtension(DestinationFactoryManager.class) .getDestinationFactory(transportId); } catch (Throwable t) { try { Object o = getBus().getExtension(ConduitInitiatorManager.class) .getConduitInitiator(transportId); if (o instanceof WSDLEndpointFactory) { return (WSDLEndpointFactory)o; } } catch (Throwable th) { //ignore } } } if (destinationFactory instanceof WSDLEndpointFactory) { return (WSDLEndpointFactory)destinationFactory; } return null; }
protected void applyFeatures(Server server) { if (getFeatures() != null) { for (Feature feature : getFeatures()) { feature.initialize(server, getBus()); } } }
@Override protected WSDLEndpointFactory getWSDLEndpointFactory() { if (destinationFactory == null) { try { destinationFactory = getBus().getExtension(DestinationFactoryManager.class) .getDestinationFactory(transportId); } catch (Throwable t) { try { Object o = getBus().getExtension(ConduitInitiatorManager.class) .getConduitInitiator(transportId); if (o instanceof WSDLEndpointFactory) { return (WSDLEndpointFactory)o; } } catch (Throwable th) { //ignore } } } if (destinationFactory instanceof WSDLEndpointFactory) { return (WSDLEndpointFactory)destinationFactory; } return null; }
public Class<?> getServiceBeanClass() { if (serviceBean != null) { return ClassHelper.getRealClass(getBus(), serviceBean); } return getServiceFactory().getServiceClass(); }
public Class<?> getServiceBeanClass() { if (serviceBean != null) { return ClassHelper.getRealClass(getBus(), serviceBean); } return getServiceFactory().getServiceClass(); }
protected void applyFeatures(Server server) { if (getFeatures() != null) { for (Feature feature : getFeatures()) { feature.initialize(server, getBus()); } } }
@Override protected String detectTransportIdFromAddress(String ad) { DestinationFactory df = getDestinationFactory(); if (df == null) { DestinationFactoryManager dfm = getBus().getExtension(DestinationFactoryManager.class); df = dfm.getDestinationFactoryForUri(getAddress()); if (df != null) { return df.getTransportIds().get(0); } } return null; }
@Override protected String detectTransportIdFromAddress(String ad) { DestinationFactory df = getDestinationFactory(); if (df == null) { DestinationFactoryManager dfm = getBus().getExtension(DestinationFactoryManager.class); df = dfm.getDestinationFactoryForUri(getAddress()); if (df != null) { return df.getTransportIds().get(0); } } return null; }
public Server publish() throws Exception { jndiContext = new InitialContext(); Object obj = jndiContext.lookup(config.getJNDIName()); ejbHome = (EJBHome) PortableRemoteObject.narrow(obj, EJBHome.class); Class<?> interfaceClass = Class.forName(getServiceClassName()); boolean isJaxws = isJaxWsServiceInterface(interfaceClass); ServerFactoryBean factory = isJaxws ? new JaxWsServerFactoryBean() : new ServerFactoryBean(); factory.setServiceClass(interfaceClass); if (config.getWsdlURL() != null) { factory.getServiceFactory().setWsdlURL(config.getWsdlURL()); } factory.setInvoker(new EJBInvoker(ejbHome)); String baseAddress = isNotNull(getEjbServantBaseURL()) ? getEjbServantBaseURL() : getDefaultEJBServantBaseURL(); String address = baseAddress + "/" + config.getJNDIName(); factory.setAddress(address); if (address.length() >= 5 && HTTPS_PREFIX.equalsIgnoreCase(address.substring(0, 5))) { throw new UnsupportedOperationException("EJBEndpoint creation by https protocol is unsupported"); } if (getWorkManager() != null) { setWorkManagerThreadPoolToJetty(factory.getBus(), baseAddress); } Server server = factory.create(); LOG.info("Published EJB Endpoint of [" + config.getJNDIName() + "] at [" + address + "]"); return server; }
ClassLoader origClassLoader = svrFactory.getBus().getExtension(ClassLoader.class); try { String serviceAddress = getBaseAddress() + processURL(service.getUrl()); svrFactory.getBus().setExtension(service.getClassLoader(), ClassLoader.class); if (isLoggingStoreEnable()) { svrFactory.getFeatures().add(getStoreLoggingFeatureBean()); log.info("Service '{}' has been exposed with URL '{}'.", service.getName(), serviceAddress); } finally { svrFactory.getBus().setExtension(origClassLoader, ClassLoader.class);
Thread.currentThread().setContextClassLoader(service.getClassLoader()); ServerFactoryBean svrFactory = getServerFactoryBean(); ClassLoader origClassLoader = svrFactory.getBus().getExtension(ClassLoader.class); try { String serviceAddress = getBaseAddress() + processURL(service.getUrl()); svrFactory.getBus().setExtension(service.getClassLoader(), ClassLoader.class); if (isLoggingStoreEnable()) { svrFactory.getFeatures().add(getStoreLoggingFeatureBean()); log.info("Service '{}' has been exposed with URL '{}'.", service.getName(), serviceAddress); } finally { svrFactory.getBus().setExtension(origClassLoader, ClassLoader.class);
configureServer(server); processor.setBus(sfb.getBus()); processor.setServer(server); processor.setProxy(isProxy());