use of org.glassfish.connectors.config.ConnectorService in project Payara by payara.
the class AppSpecificConnectorClassLoaderUtil method useGlobalConnectorClassLoader.
public boolean useGlobalConnectorClassLoader() {
boolean flag = false;
ConnectorService connectorService = connectorServiceProvider.get();
// it is possible that connector-service is not yet defined in domain.xml
if (connectorService != null) {
String classLoadingPolicy = connectorService.getClassLoadingPolicy();
if (classLoadingPolicy != null && classLoadingPolicy.equals(ConnectorConstants.CLASSLOADING_POLICY_GLOBAL_ACCESS)) {
flag = true;
}
}
return flag;
}
use of org.glassfish.connectors.config.ConnectorService in project Payara by payara.
the class AppSpecificConnectorClassLoaderUtil method getRequiredResourceAdapters.
public Collection<String> getRequiredResourceAdapters(String appName) {
List<String> requiredRars = new ArrayList<String>();
if (appName != null) {
ConnectorService connectorService = connectorServiceProvider.get();
if (connectorService != null) {
if (appName.trim().length() > 0) {
Property property = connectorService.getProperty(appName.trim());
if (property != null) {
String requiredRarsString = property.getValue();
StringTokenizer tokenizer = new StringTokenizer(requiredRarsString, ",");
while (tokenizer.hasMoreTokens()) {
String token = tokenizer.nextToken().trim();
requiredRars.add(token);
}
}
}
}
}
return requiredRars;
}
Aggregations