[seam-commits] Seam SVN: r8923 - in trunk/src: main/org/jboss/seam/deployment and 1 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Fri Sep 5 12:52:07 EDT 2008


Author: pete.muir at jboss.org
Date: 2008-09-05 12:52:07 -0400 (Fri, 05 Sep 2008)
New Revision: 8923

Modified:
   trunk/src/debug/org/jboss/seam/debug/hot/HotDeployFilter.java
   trunk/src/main/org/jboss/seam/deployment/HotDeploymentStrategy.java
   trunk/src/main/org/jboss/seam/init/Initialization.java
Log:
JBSEAM-3366

Modified: trunk/src/debug/org/jboss/seam/debug/hot/HotDeployFilter.java
===================================================================
--- trunk/src/debug/org/jboss/seam/debug/hot/HotDeployFilter.java	2008-09-05 12:12:51 UTC (rev 8922)
+++ trunk/src/debug/org/jboss/seam/debug/hot/HotDeployFilter.java	2008-09-05 16:52:07 UTC (rev 8923)
@@ -54,7 +54,6 @@
       }
       
       //TODO: check the timestamp, for a minor optimization
-      
       // instead 
       Pages pages = (Pages) getServletContext().getAttribute(Seam.getComponentName(Pages.class));
       if (pages!= null) {

Modified: trunk/src/main/org/jboss/seam/deployment/HotDeploymentStrategy.java
===================================================================
--- trunk/src/main/org/jboss/seam/deployment/HotDeploymentStrategy.java	2008-09-05 12:12:51 UTC (rev 8922)
+++ trunk/src/main/org/jboss/seam/deployment/HotDeploymentStrategy.java	2008-09-05 16:52:07 UTC (rev 8923)
@@ -70,13 +70,17 @@
    {
       try
       {
-         if (hotDeployDirectory.exists())
+         if (hotDeployDirectory != null)
          {
             URL url = hotDeployDirectory.toURL();
             URL[] urls = { url };
             hotDeployClassLoader = new URLClassLoader(urls, classLoader);
             getFiles().add(hotDeployDirectory);
          }
+         else
+         {
+            hotDeployClassLoader = classLoader;
+         }
 
       }
       catch (MalformedURLException mue)

Modified: trunk/src/main/org/jboss/seam/init/Initialization.java
===================================================================
--- trunk/src/main/org/jboss/seam/init/Initialization.java	2008-09-05 12:12:51 UTC (rev 8922)
+++ trunk/src/main/org/jboss/seam/init/Initialization.java	2008-09-05 16:52:07 UTC (rev 8923)
@@ -627,10 +627,6 @@
       }
       init.checkDefaultInterceptors();
       init.setTimestamp( System.currentTimeMillis() );
-      if (hotDeploymentStrategy != null)
-      {
-         init.setHotDeployPaths( hotDeploymentStrategy.getHotDeploymentPaths() );
-      }
       addSpecialComponents(init);
       
       // Make the deployment strategies available in the contexts. This gives 
@@ -645,6 +641,9 @@
       {
          hotDeploymentStrategy.scan();
          installHotDeployableComponents();
+         // TODO Hack
+         hotDeploymentStrategy.getFiles().add(warRootDirectory);
+         init.setHotDeployPaths( hotDeploymentStrategy.getHotDeploymentPaths() );
       }
       
       for (String globalImport: globalImports)
@@ -682,7 +681,6 @@
       hotDeploymentStrategy.scan();
       installHotDeployableComponents();
       Contexts.getEventContext().set(HotDeploymentStrategy.NAME, hotDeploymentStrategy);
-      // Add the WAR root to the hot deploy path to pick up .page.xml
       Pages.instance().setHotDotPageDotXmlFileNames(DotPageDotXmlDeploymentHandler.hotInstance().getFiles());
       init.setTimestamp( System.currentTimeMillis() );
       init.setHotDeployPaths(hotDeploymentStrategy.getHotDeploymentPaths());
@@ -702,7 +700,7 @@
    
    private HotDeploymentStrategy createHotDeployment(ClassLoader classLoader)
    {
-      if ( isDebugEnabled() && hotDeployDirectory != null )
+      if ( isDebugEnabled() )
       {
          if (isGroovyPresent())
          {
@@ -1040,7 +1038,7 @@
                descriptor.getJndiName()
             );
          context.set(componentName, component);
-         if ( hotDeploymentStrategy != null && hotDeploymentStrategy.isFromHotDeployClassLoader( descriptor.getComponentClass() ) )
+         if ( hotDeploymentStrategy != null && !hotDeploymentStrategy.getClassLoader().equals(getClass().getClassLoader()) && hotDeploymentStrategy.isFromHotDeployClassLoader( descriptor.getComponentClass() ) )
          {
             Init.instance().addHotDeployableComponent( component.getName() );
          }




More information about the seam-commits mailing list