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

alesj do-not-reply at jboss.com
Mon Mar 16 08:33:18 EDT 2009


This is the fix:

  |    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 && LoaderRepositoryMetaDataHelper.create(unit, lrmd) != null)
  |          return;
  | 
  |       // For isolated automatically create the classloader in a new domain
  |       if (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);
  |          unit.addAttachment(ClassLoadingMetaData.class, classLoadingMetaData);
  |       }
  |    }
  | 

btw, Adrian, what happened to Hack(Something)Deployer, 
that was responsible to transform the old -service.xml cl metadata to new CLMD?

Do we really need to map the old descriptors to CLMD?
I guess we can leave this via programmatic approach, as it is now.

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

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



More information about the jboss-dev-forums mailing list