Methods Summary |
---|
public static void | debug(java.lang.Throwable t)debug messages are logged here.
logger.log(Level.FINEST, "Exception occurred", t);
|
public void | generateReports()It generates the reports using the ResultManager
new ReportHandler(frameworkContext).generateAllReports();
|
public static boolean | isDebug()checks if verifier is running in debug mode
return debug;
|
public static void | main(java.lang.String[] args)Main verifier method
Verifier verifier = new Verifier(args);
if (verifier.frameworkContext.isUsingGui()) {
MainFrame mf = new MainFrame(
verifier.frameworkContext.getJarFileName(), true, verifier);
mf.setSize(800, 600);
mf.setVisible(true);
} else {
LocalStringManagerImpl smh = StringManagerHelper.getLocalStringsManager();
try {
verifier.verify();
} catch (Exception e) {
LogRecord logRecord = new LogRecord(Level.SEVERE,
smh.getLocalString(
verifier.getClass().getName() +
".verifyFailed", // NOI18N
"Could not verify successfully.")); // NOI18N
logRecord.setThrown(e);
verifier.frameworkContext.getResultManager().log(logRecord);
}
verifier.generateReports();
int failedCount = verifier.frameworkContext.getResultManager()
.getFailedCount() +
verifier.frameworkContext.getResultManager().getErrorCount();
if (failedCount != 0)
System.exit(failedCount);
}
|
private ResultManager | verify()This method does the verification by running all the verifier tests
VerificationHandler verificationHandler =
new VerificationHandler(frameworkContext);
ResultManager resultManager;
try {
resultManager = verificationHandler.verifyArchive();
} finally {
verificationHandler.cleanup();
}
return resultManager;
|
public ResultManager | verify(java.lang.String jarFile)
frameworkContext.setJarFileName(jarFile);
return verify();
|
public int | verify(com.sun.enterprise.deployment.Application application, com.sun.enterprise.deployment.deploy.shared.AbstractArchive abstractArchive, java.util.List classPath, java.io.File jspOutDir)Call from deployment backend. This call is in the appserver process.
Verifier will run in appserver mode for this invocation.
If parameter application is null then this api is equivalent to
invoking a standalone verifier.
Parameter abstractArchive must not be null.
boolean originalBoundsChecking = Descriptor.isBoundsChecking();
Descriptor.setBoundsChecking(false);
ResultManager rmanager=null;
frameworkContext.setJspOutDir(jspOutDir);
frameworkContext.setIsBackend(true);
VerificationHandler verificationHandler = null;
try {
if(application == null) { //can be a standalone connector deployment
frameworkContext.setJarFileName(abstractArchive.getArchiveUri());
verificationHandler = new VerificationHandler(frameworkContext);
} else
verificationHandler = new VerificationHandler(frameworkContext,
application,
abstractArchive,
classPath);
rmanager = verificationHandler.verifyArchive();
} catch(Exception e) {
LocalStringManagerImpl smh = StringManagerHelper.getLocalStringsManager();
LogRecord logRecord =
new LogRecord(Level.SEVERE,
smh.getLocalString(getClass().getName() +
".verifyFailed", // NOI18N
"Could not verify successfully.")); // NOI18N
logRecord.setThrown(e);
frameworkContext.getResultManager().log(logRecord);
} finally { // restore the original values
Descriptor.setBoundsChecking(originalBoundsChecking);
if(verificationHandler!=null)
verificationHandler.cleanup();
}
generateReports();
return rmanager.getErrorCount() + rmanager.getFailedCount();
|