Details
-
Bug
-
Resolution: Done
-
Major
-
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);