if (!XTSDeploymentMarker.isXTSAnnotationDeployment(unit)) {
return;
}
final ClassLoader cl = unit.getAttachment(Attachments.MODULE).getClassLoader();
WeldPortableExtensions extensions = WeldPortableExtensions.getPortableExtensions(unit);
ClassLoader old = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(cl);
for (String fqn : EXTENSIONS) {
try {
final Class<?> extension = Class.forName(fqn, true, cl);
extensions.tryRegisterExtension(extension, unit);
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
}
}
} finally {