// wrapping this into a try - catch block to prevent errors in
// verifier from stopping the deployment
try
{
BeanVerifier verifier = new BeanVerifier();
// add a listener so we can log the results
verifier.addVerificationListener(new VerificationListener()
{
Logger verifierLog = Logger.getLogger(EjbDeployer.class, "verifier");
public void beanChecked(VerificationEvent event)
{
verifierLog.debug( "Bean checked: " + event.getMessage() );
}
public void specViolation(VerificationEvent event)
{
verifierLog.warn( "EJB spec violation: " + (verifierVerbose ? event.getVerbose() : event.getMessage()));
}
});
log.debug("Verifying " + unit.getRoot().toURL());
verifier.verify(unit.getRoot().toURL(), legacyMD, unit.getClassLoader());
allOK = verifier.getSuccess();
}
catch (Throwable t)
{
log.warn("Verify failed; continuing", t );
allOK = false;