ConnectionProvider connectionProvider;
EmsConnection connection;
try {
connectionProvider = ConnectionProviderFactory.createConnectionProvider(pluginConfig, null,
discoveryContext.getParentResourceContext().getTemporaryDirectory());
connection = connectionProvider.connect();
connection.loadSynchronous(false);
} catch (Exception e) {
if (e.getCause() instanceof SecurityException) {
throw new InvalidPluginConfigurationException("Failed to authenticate to JVM with connector address ["
+ connectorAddress + "] - principal and/or credentials connection properties are not set correctly.");