use of org.glassfish.api.invocation.ComponentInvocation in project Payara by payara.
the class ConfigProviderResolverImpl method getDefaultSources.
List<ConfigSource> getDefaultSources() {
LinkedList<ConfigSource> sources = new LinkedList<>();
String appName = null;
String moduleName = null;
ComponentInvocation currentInvocation = invocationManager.getCurrentInvocation();
if (currentInvocation == null) {
ApplicationInfo info = getAppInfo(Thread.currentThread().getContextClassLoader());
if (info != null) {
appName = info.getName();
moduleName = appName;
}
} else {
appName = currentInvocation.getAppName();
moduleName = currentInvocation.getModuleName();
}
String serverName = context.getInstanceName();
String configName = context.getConfigBean().getConfig().getName();
sources.add(new DomainConfigSource());
sources.add(new ClusterConfigSource());
sources.add(new ConfigConfigSource(configName));
sources.add(new ServerConfigSource(serverName));
sources.add(new EnvironmentConfigSource());
sources.add(new SystemPropertyConfigSource());
sources.add(new JNDIConfigSource());
sources.add(new PayaraServerProperties());
sources.add(new SecretsDirConfigSource());
if (appName != null) {
sources.add(new ApplicationConfigSource(appName));
sources.add(new ModuleConfigSource(appName, moduleName));
for (Properties props : getDeployedApplicationProperties(appName)) {
sources.add(new PropertiesConfigSource(props, appName));
}
}
return sources;
}
use of org.glassfish.api.invocation.ComponentInvocation in project Payara by payara.
the class WSTCPAdapterRegistryImpl method createWSAdapter.
private TCPAdapter createWSAdapter(@NotNull final String wsPath, @NotNull final WSEndpointDescriptor wsEndpointDescriptor) throws Exception {
if (wsEndpointDescriptor.isEJB()) {
final EjbRuntimeEndpointInfo ejbEndPtInfo = (EjbRuntimeEndpointInfo) V3Module.getWSEjbEndpointRegistry().getEjbWebServiceEndpoint(wsEndpointDescriptor.getURI(), "POST", null);
final AdapterInvocationInfo adapterInfo = (AdapterInvocationInfo) ejbEndPtInfo.prepareInvocation(true);
return new Ejb109Adapter(wsEndpointDescriptor.getWSServiceName().toString(), wsPath, adapterInfo.getAdapter().getEndpoint(), new ServletFakeArtifactSet(wsEndpointDescriptor.getRequestURL(), wsEndpointDescriptor.getUrlPattern()), ejbEndPtInfo, adapterInfo);
} else {
final String uri = wsEndpointDescriptor.getURI();
final Adapter adapter = JAXWSAdapterRegistry.getInstance().getAdapter(wsEndpointDescriptor.getContextRoot(), uri, uri);
final WebModule webModule = AppServRegistry.getWebModule(wsEndpointDescriptor.getWSServiceEndpoint());
final ComponentInvocation invocation = new WebComponentInvocation(webModule);
return new Web109Adapter(wsEndpointDescriptor.getWSServiceName().toString(), wsPath, adapter.getEndpoint(), new ServletFakeArtifactSet(wsEndpointDescriptor.getRequestURL(), wsEndpointDescriptor.getUrlPattern()), invocation);
}
}
Aggregations