@SuppressWarnings("boxing")
public void analyze(final ClassLoader classLoader) throws ScanException, ResolverException,
DeployableHelperException, DeployableMetadataException {
// Create metadata
EasyBeansEjbJarDeployableFactory deployableFactory = getDeployableFactory();
// TODO gaellalire : metadata should be contruct directly with ear
List<IClassesLocator> lib = null;
if (this.extraArchives != null) {
lib = new ArrayList<IClassesLocator>();
for (IArchive archive : this.extraArchives) {
lib.add(new ArchiveClassesLocator(archive));
}
}
if (classLoader != null) {
if (lib == null) {
lib = new ArrayList<IClassesLocator>();
}
lib.add(new ClassLoaderClassesLocator(classLoader));
}
this.ejbJarArchiveMetadata = deployableFactory.createDeployableMetadata(EJB3Deployable.class.cast(DeployableHelper
.getDeployable(this.archive, false)), lib);
// Complete metadata
long tResolverStart = System.currentTimeMillis();
ResolverHelper.resolve(this.ejbJarArchiveMetadata, this.configuration.getEZBServer());