Start JAR verification. This sets a special provider list for
the current thread. You MUST save the return value from this
method and you MUST call stopJarVerification() with that object
once you are done.
964005
public static Object startJarVerification() {
        ProviderList currentList = getProviderList();
        ProviderList jarList = currentList.getJarList(jarVerificationProviders);
        // return the old thread-local provider list, usually null
        return beginThreadProviderList(jarList);
    }
1005420
public void execute() throws MojoExecutionException, MojoFailureException {
        if(preverifyPath == null) {
            getLog().debug("skip native preverification");
            return;
        }
        
        getLog().debug("start native preverification");

        final File preverifyCmd= getAbsolutePreverifyCommand();
        
        StreamConsumer stdoutLogger= new LogWriter(false);
        StreamConsumer stderrLogger= new LogWriter(true);
        
        String classPath = getClassPath(getProject());
        AbstractConfiguration[] configurations= (AbstractConfiguration[]) getPluginContext().get(ConfiguratorMojo.GENERATED_CONFIGURATIONS_KEY);
        
        for(AbstractConfiguration configuration : configurations) {
            if(!(configuration instanceof NodeConfiguration)) {
                continue;
            }
            
            String classifier= configuration.className.substring(configuration.className.lastIndexOf('.') + 1);
            File oldJar= checkJarFile(classifier);
            
            if(keepJars) {
                try {
                    FileUtils.copyFile(oldJar, getJarFile(classifier + "-before_preverify"));
                } catch (IOException ioe) {
                    getLog().warn("could not keep old jar '" + oldJar.getAbsolutePath() + "'", ioe);
                }
            }
            
            getLog().info("Preverifying jar: " + FileNameUtil.getAbsolutPath(oldJar));
            
            Commandline commandLine= new Commandline(preverifyCmd.getPath() + " -classpath " + classPath + " -d " + FileNameUtil.getAbsolutPath(oldJar.getParentFile()) + " " + FileNameUtil.getAbsolutPath(oldJar));
            getLog().debug(commandLine.toString());
            
            try {
                if(CommandLineUtils.executeCommandLine(commandLine, stdoutLogger, stderrLogger) != 0) {
                    throw new MojoExecutionException("Preverification failed. Please read the log for details.");
                }
            } catch (CommandLineException cle) {
                throw new MojoExecutionException("could not execute preverify command", cle);
            }
        }

        getLog().debug("finished preverification");
    }
141183
void stop( Instance instance, PluginInterface plugin ) throws IOException {

		String instancePath = InstanceHelpers.computeInstancePath( instance );
		if( instance.getStatus() != InstanceStatus.DEPLOYED_STARTED )
			this.logger.fine( instancePath + " cannot be stopped. Prerequisite status: DEPLOYED_STARTED (but was " + instance.getStatus() + ")." );
		else
			stopInstance( instance, plugin, false );
	}
674596
public void verify() throws VerificationException {
        final Transaction fromTx = getOutpoint().fromTx;
        long spendingIndex = getOutpoint().getIndex();
        checkNotNull(fromTx, "Not connected");
        final TransactionOutput output = fromTx.getOutput((int) spendingIndex);
        verify(output);
    }
150957
@Override
    public void run() {
        try {
            waitUntilServerIsInitialized();

            recoveryLog.log("Start recovery.");

            while (true) {
                if (shutdown) {
                    break;
                }
                ConsumerJournalEntry cje = reader.readJournalEntry();
                if (cje == null) {
                    break;
                }
                cje.invokeMethod(delegate, recoveryLog);
                cje.close();
            }
            reader.shutdown();

            recoveryLog.log("Recovery complete.");
        } catch (Throwable e) {
            /*
             * It makes sense to catch Exception here, because any uncaught
             * exception will not be reported - there is no console to print the
             * stack trace! It might not be appropriate to catch Throwable, but
             * it's the only way we can know about missing class files and such.
             * Of course, if we catch an OutOfMemoryError or a
             * VirtualMachineError, all bets are off.
             */
            logger.error("Error during Journal recovery", e);
            String stackTrace = JournalHelper.captureStackTrace(e);
            recoveryLog.log("PROBLEM: " + stackTrace);
            recoveryLog.log("Recovery terminated prematurely.");
        } finally {
            recoveryLog.shutdown();
        }
    }
668596
def verify(self):
        
        log.debug('verify request=%s', self.lti_kwargs.get('request'))
        if self.lti_kwargs.get('request') == 'session':
            self._verify_session()
        elif self.lti_kwargs.get('request') == 'initial':
            self.verify_request()
        elif self.lti_kwargs.get('request') == 'any':
            self._verify_any()
        else:
            raise LTIException("Unknown request type")
        return True
59158
public void setVerificationState(java.util.Collection<StringFilter> verificationState) {
        if (verificationState == null) {
            this.verificationState = null;
            return;
        }

        this.verificationState = new java.util.ArrayList<StringFilter>(verificationState);
    }
622284
private void checkStarted() throws SINotPossibleInCurrentConfigurationException 
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "checkStarted");

    synchronized (this)
    {
      if (!isStarted())
      {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
          SibTr.exit(tc, "checkStarted", "ME not started");

        throw new SINotPossibleInCurrentConfigurationException(
          nls.getFormattedMessage("MESSAGE_PROCESSOR_NOT_STARTED_ERROR_CWSIP0211", 
          new Object[] { messageProcessor.getMessagingEngineName(), messageProcessor.getMessagingEngineBus()}, 
          null));
      }
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "checkStarted");
  }
752948
public void stopping() {
        boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isDebugEnabled())
            Tr.debug(tc, "stopping");

        J2EEName j2eeName = ivApplicationMetaData == null ? null : ivApplicationMetaData.getJ2EEName();
        beginStopping(true, j2eeName, ivModules); // F743-26072
    }
705191
private static void hasValidatingMcfInterface(PrintStream out, PrintStream error, String classname,
         URLClassLoader cl)
   {
      try
      {
         out.print("  Validating: ");
         Class<?> clazz = Class.forName(classname, true, cl);

         if (hasInterface(clazz, "javax.resource.spi.ValidatingManagedConnectionFactory"))
         {
            out.println("Yes");
         }
         else
         {
            out.println("No");
         }
      }
      catch (Throwable t)
      {
         // Nothing we can do
         t.printStackTrace(error);
         out.println("Unknown");
      }
   }
394442
public boolean load(String name, boolean verify) {
        boolean loaded = false;

        try {
            Platform platform = Platform.detect();
            JarFile jar = new JarFile(codeSource.getLocation().getPath(), verify);
            try {
                for (String path : libCandidates(platform, name)) {
                    JarEntry entry = jar.getJarEntry(path);
                    if (entry == null) continue;

                    File lib = extract(name, jar.getInputStream(entry));
                    System.load(lib.getAbsolutePath());
                    lib.delete();

                    loaded = true;
                    break;
                }
            } finally {
                jar.close();
            }
        } catch (Throwable e) {
            loaded = false;
        }

        return loaded;
    }
1037142
def cli_verify_jar_signature(argument_list):
    

    usage_message = "jarutil v file.jar trusted_certificate.pem [SF_NAME.SF]"
    if len(argument_list) < 2 or len(argument_list) > 3:
        print(usage_message)
        return 1

    jar_file, certificate, sf_name = (argument_list + [None])[:3]
    try:
        verify(certificate, jar_file, sf_name)

    except VerificationError as error_message:
        print(error_message)
        return 1

    else:
        print("Jar verified.")
        return 0
876157
public void setClasspath(Path classpath)
    {
        if (_classpath == null)
        {
            _classpath = classpath;
        }
        else
        {
            _classpath.append(classpath);
        }
        log("Verification classpath is "+ _classpath,
            Project.MSG_VERBOSE);
    }
1084397
@Deprecated
    public C verifyAtMostOnce(Threads threadMatcher) throws WrongNumberOfQueriesError {
        return verify(SqlQueries.atMostOneQuery().threads(threadMatcher));
    }
346739
public void ensureStarted()
        throws MojoExecutionException
    {
        synchronized ( lock )
        {
            if ( started || starting )
            {
                return;
            }
            starting = true;
            started = false;
            finished = false;
            finishing = false;
        }
        Thread worker = new Thread( new Worker(), "FileSystemServer[" + name + "]" );
        worker.setDaemon( true );
        worker.start();
        try
        {
            synchronized ( lock )
            {
                while ( starting && !started && !finished && !finishing )
                {
                    lock.wait();
                }
                if ( problem != null )
                {
                    throw problem;
                }
            }
        }
        catch ( Exception e )
        {
            throw new MojoExecutionException( e.getMessage(), e );
        }
    }
1133039
protected final void waitForCheckpoint(boolean persistent)
                    throws ObjectManagerException
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this,
                        cclass,
                        "waitForCheckpoint");

        checkpointHelper.waitForCheckpoint(persistent);

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this,
                       cclass,
                       "waitForCheckpoint",
                       "persistent=" + persistent + "(boolean)");
    }
1298978
def restart(self, name):
        
        init = self._get_implementation(name)
        self._assert_service_installed(init, name)
        logger.info('Restarting service: %s...', name)
        init.stop()
        # Here we would use status to verify that the service stopped
        # before restarting. If only status was stable. eh..
        # The arbitrarity of this sleep time is making me sick...
        time.sleep(3)
        init.start()