Thread.currentThread().setContextClassLoader(this.classLoader);
Enhancer enhancer = new Enhancer(this.classLoader, this.deployment.getEjbJarArchiveMetadata(), this.enhancerMap);
long tStartEnhancing = System.currentTimeMillis();
try {
enhancer.enhance();
} catch (EnhancerException ee) {
throw new EZBContainerException("Cannot run enhancer on archive '" + getName() + "'.", ee);
} catch (RuntimeException e) {
// Catch Exception as some exceptions can be runtime exception
throw new EZBContainerException("Cannot run enhancer on archive '" + getName() + "'.", e);