use of org.talend.daikon.sandbox.SandboxedInstance in project components by Talend.
the class SalesforceSourceOrSink method validateConnection.
public static ValidationResult validateConnection(SalesforceProvideConnectionProperties properties) {
ClassLoader classLoader = SalesforceSourceOrSink.class.getClassLoader();
// org.talend.components.salesforce.runtime.common.SalesforceRuntimeCommon.enableTLSv11AndTLSv12ForJava7()
try (SandboxedInstance sandboxedInstance = RuntimeUtil.createRuntimeClassWithCurrentJVMProperties(getStaticRuntimeInfo(), classLoader)) {
SalesforceSourceOrSink ss = (SalesforceSourceOrSink) sandboxedInstance.getInstance();
ss.initialize(null, (ComponentProperties) properties);
return ss.validate(null);
}
}
Aggregations