Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-5524

EAR isolation requires jboss-app.xml

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • JBossAS-5.0.0.CR1
    • JBossAS-5.0.0.Beta4
    • None
    • None

    Description

      Setting "isolated" to true in ear-deployer-beans.xml on JBossAppParsingDeployer will not make EARs isolated unless they include at least an empty jboss-app.xml. The bug is in the logic of JBossAppParsingDeployer.createMetaData().

      The following patch would fix it

      @@ -152,6 +149,8 @@
      if(specMetaData == null && metaData == null)
      return;

      + LoaderRepositoryConfig loaderCfg = null;
      +
      // If there no JBossMetaData was created from a jboss-app.xml, create one
      if (metaData == null)
      {
      @@ -160,12 +159,6 @@
      else
      {
      LoaderRepositoryMetaData lrmd = metaData.getLoaderRepository();

      • LoaderRepositoryConfig loaderCfg = null;
      • if (loaderCfg == null && isolated)
      • { - // If no config was given and isolation is on, create an isolated config - loaderCfg = initLoaderRepository(metaData, unit); - }

        if (lrmd != null)

        { loaderCfg = new LoaderRepositoryConfig(); @@ -189,10 +182,18 @@ loaderCfg.repositoryConfig = config.getConfig(); }

        }

      • // Add the loader repository config
      • if (loaderCfg != null)
      • unit.addAttachment(LoaderRepositoryConfig.class, loaderCfg);
        }
        +
        + if (loaderCfg == null && isolated)
        + { + // If no config was given and isolation is on, create an isolated config + loaderCfg = initLoaderRepository(metaData, unit); + }

        +
        + // Add the loader repository config
        + if (loaderCfg != null)
        + unit.addAttachment(LoaderRepositoryConfig.class, loaderCfg);

      Attachments

        Activity

          People

            olubyans@redhat.com Alexey Loubyansky
            olubyans@redhat.com Alexey Loubyansky
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: