[jboss-cvs] JBossAS SVN: r57906 - projects/microcontainer/trunk/deployers/src/main/org/jboss/deployers/plugins/structure

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Oct 27 18:11:39 EDT 2006


Author: scott.stark at jboss.org
Date: 2006-10-27 18:11:37 -0400 (Fri, 27 Oct 2006)
New Revision: 57906

Modified:
   projects/microcontainer/trunk/deployers/src/main/org/jboss/deployers/plugins/structure/DefaultStructureBuilder.java
Log:
The context map used to track DeploymentContexts must be a transient local variable to the populateContext method.

Modified: projects/microcontainer/trunk/deployers/src/main/org/jboss/deployers/plugins/structure/DefaultStructureBuilder.java
===================================================================
--- projects/microcontainer/trunk/deployers/src/main/org/jboss/deployers/plugins/structure/DefaultStructureBuilder.java	2006-10-27 21:24:21 UTC (rev 57905)
+++ projects/microcontainer/trunk/deployers/src/main/org/jboss/deployers/plugins/structure/DefaultStructureBuilder.java	2006-10-27 22:11:37 UTC (rev 57906)
@@ -52,11 +52,11 @@
    implements StructureBuilder
 {
    private static Logger log = Logger.getLogger(DefaultStructureBuilder.class);
-   private HashMap<String, DeploymentContext> contextMap = new HashMap<String, DeploymentContext>();
 
    public void populateContext(DeploymentContext context, StructureMetaData metaData)
       throws DeploymentException
 	{
+      HashMap<String, DeploymentContext> contextMap = new HashMap<String, DeploymentContext>();
       // Validate that the root file has a valid ContextInfo
 		VirtualFile root = context.getRoot();
       ContextInfo rootInfo = metaData.getContext(root.getPathName());
@@ -86,16 +86,18 @@
                else
                   ctx = new AbstractDeploymentContext(vf);
             }
-            processContext(ctx, vf, info);
+            processContext(ctx, vf, info, contextMap);
          }
       }
       catch(Exception e)
       {
          throw new DeploymentException("Failed to process context: "+context.getName(), e);
       }
+      contextMap.clear();
 	}
 
-   protected void processContext(DeploymentContext context, VirtualFile virtualFile, ContextInfo info)
+   protected void processContext(DeploymentContext context, VirtualFile virtualFile,
+         ContextInfo info, HashMap<String, DeploymentContext> contextMap)
    {
       boolean trace = log.isTraceEnabled();
       if( trace )




More information about the jboss-cvs-commits mailing list