protected VaultConnection getConnection()

in vault-server/src/jetbrains/buildServer/buildTriggers/vcs/vault/connection/ClassLoadingVaultConnection.java [29:49]


  protected VaultConnection getConnection() throws VcsException {
    if (myConnection == null) {
      try {

        myClassLoader.loadClass("VaultClientIntegrationLib.ServerOperations"); // check if Vault API is present

        myConnection = ((VaultConnectionFactory)myClassLoader.loadClass("jetbrains.buildServer.buildTriggers.vcs.vault.impl.VaultConnectionFactoryImpl").newInstance()).getOrCreateConnection(myParameters);

      } catch (ClassNotFoundException e) {
        throw new VcsException(VaultUtil.NO_API_FOUND_EXCEPTION);
      } catch (NoClassDefFoundError e) {
        throw new VcsException(VaultUtil.NO_API_FOUND_EXCEPTION);

      } catch (InstantiationException e) {
        throw new VcsException(e);
      } catch (IllegalAccessException e) {
        throw new VcsException(e);
      }
    }
    return myConnection;
  }