[jboss-dev-forums] [Design of POJO Server] - EAR CL isolation is broken

alesj do-not-reply at jboss.com
Thu Mar 12 05:55:38 EDT 2009


WRT
 - https://jira.jboss.org/jira/browse/JBAS-6600
current impl of EarClassLoaderDeployer looks pretty much broken.

>From 5_0 branch

  |    public void deploy(DeploymentUnit unit, JBossAppMetaData metaData) throws DeploymentException
  |    {
  |       ClassLoadingMetaData classLoadingMetaData = unit.getAttachment(ClassLoadingMetaData.class);
  |       if (classLoadingMetaData != null)
  |          return;
  | 
  |       LoaderRepositoryMetaData lrmd = metaData.getLoaderRepository();
  |       if (lrmd != null)
  |       {
  |          ClassLoadingMetaData clmd = LoaderRepositoryMetaDataHelper.create(unit, lrmd);
  |          // For isolated automatically create the classloader in a new domain
  |          if (clmd == null && isolated)
  |          {
  |             String domain = EARDeployment.getJMXName(metaData, unit) + ",extension=LoaderRepository";
  |             classLoadingMetaData = new ClassLoadingMetaData();
  |             classLoadingMetaData.setName(unit.getName());
  |             classLoadingMetaData.setDomain(domain);
  |             classLoadingMetaData.setExportAll(ExportAll.NON_EMPTY);
  |             classLoadingMetaData.setImportAll(true);
  |             classLoadingMetaData.setVersion(Version.DEFAULT_VERSION);
  |             classLoadingMetaData.setJ2seClassLoadingCompliance(false);
  |          }
  |       }
  |    }
  | 

1) Why only do isolation if LRMD is present? (as Jaikiran noted)
2) Even if isolation kicks in, it's never attached
3) LoaderRepositoryMetaDataHelper and LoaderRepositoryConfigHelper have duplicated code

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217356#4217356

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4217356



More information about the jboss-dev-forums mailing list