Package org.jboss.seam.deployment

Examples of org.jboss.seam.deployment.TimestampCheckForwardingDeploymentStrategy


      {
         try
         {
            hotDeploymentStrategy = createHotDeployment(Thread.currentThread().getContextClassLoader(), isHotDeployEnabled(init));
           
            boolean changed = new TimestampCheckForwardingDeploymentStrategy()
            {
               @Override
               protected DeploymentStrategy delegate()
               {
                  return hotDeploymentStrategy;
               }
              
            }.changedSince(init.getTimestamp());
           
            if (hotDeploymentStrategy.available() && changed)
            {
               ServletLifecycle.beginReinitialization(request);
               Contexts.getEventContext().set(HotDeploymentStrategy.NAME, hotDeploymentStrategy);
               hotDeploymentStrategy.scan();
              
               if (hotDeploymentStrategy.getTimestamp() > init.getTimestamp())
               {
                  log.info("redeploying components");
                  Seam.clearComponentNameCache();
                  for ( String name: init.getHotDeployableComponents() )
                  {
                     Component component = Component.forName(name);
                     if (component!=null)
                     {
                        ScopeType scope = component.getScope();
                        if ( scope!=ScopeType.STATELESS && scope.isContextActive() )
                        {
                           scope.getContext().remove(name);
                        }
                        init.removeObserverMethods(component);
                     }
                     Contexts.getApplicationContext().remove(name + COMPONENT_SUFFIX);
                  }
              
                  init.getHotDeployableComponents().clear();
                  installHotDeployableComponents();
                  installComponents(init);
                  log.info("done redeploying components");
               }
               // update the timestamp outside of the second timestamp check to be sure we don't cause an unnecessary scan
               // the second scan checks annotations (the slow part) which might happen to exclude the most recent file
               init.setTimestamp(System.currentTimeMillis());
               ServletLifecycle.endReinitialization();
            }
              
            final WarRootDeploymentStrategy warRootDeploymentStrategy = new WarRootDeploymentStrategy(Thread.currentThread().getContextClassLoader(), warRoot, new File[] { warClassesDirectory, warLibDirectory, hotDeployDirectory });
            changed = new TimestampCheckForwardingDeploymentStrategy()
            {
               @Override
               protected DeploymentStrategy delegate()
               {
                  return warRootDeploymentStrategy;
View Full Code Here


     
      try
      {
         hotDeploymentStrategy = createHotDeployment(Thread.currentThread().getContextClassLoader(), isHotDeployEnabled(init));
        
         boolean changed = new TimestampCheckForwardingDeploymentStrategy()
         {
            @Override
            protected DeploymentStrategy delegate()
            {
               return hotDeploymentStrategy;
            }
           
         }.changedSince(init.getTimestamp());
        
         if (hotDeploymentStrategy.available() && changed)
         {
            ServletLifecycle.beginReinitialization(request);
            Contexts.getEventContext().set(HotDeploymentStrategy.NAME, hotDeploymentStrategy);
            hotDeploymentStrategy.scan();
           
            if (hotDeploymentStrategy.getTimestamp() > init.getTimestamp())
            {
               log.debug("redeploying components");
               Seam.clearComponentNameCache();
               for ( String name: init.getHotDeployableComponents() )
               {
                  Component component = Component.forName(name);
                  if (component!=null)
                  {
                     ScopeType scope = component.getScope();
                     if ( scope!=ScopeType.STATELESS && scope.isContextActive() )
                     {
                        scope.getContext().remove(name);
                     }
                     init.removeObserverMethods(component);
                  }
                  Contexts.getApplicationContext().remove(name + COMPONENT_SUFFIX);
               }
           
               init.getHotDeployableComponents().clear();
               installHotDeployableComponents();
               installComponents(init);
               log.debug("done redeploying components");
            }
            // update the timestamp outside of the second timestamp check to be sure we don't cause an unnecessary scan
            // the second scan checks annotations (the slow part) which might happen to exclude the most recent file
            init.setTimestamp(System.currentTimeMillis());
            ServletLifecycle.endReinitialization();
         }
           
         final WarRootDeploymentStrategy warRootDeploymentStrategy = new WarRootDeploymentStrategy(Thread.currentThread().getContextClassLoader(), warRoot, servletContext, new File[] { warClassesDirectory, warLibDirectory, hotDeployDirectory });
         changed = new TimestampCheckForwardingDeploymentStrategy()
         {
            @Override
            protected DeploymentStrategy delegate()
            {
               return warRootDeploymentStrategy;
View Full Code Here

     
      try
      {
         hotDeploymentStrategy = createHotDeployment(Thread.currentThread().getContextClassLoader(), isHotDeployEnabled(init));
        
         boolean changed = new TimestampCheckForwardingDeploymentStrategy()
         {
            @Override
            protected DeploymentStrategy delegate()
            {
               return hotDeploymentStrategy;
            }
           
         }.changedSince(init.getTimestamp());
        
         if (hotDeploymentStrategy.available() && changed)
         {
            ServletLifecycle.beginReinitialization(request);
            Contexts.getEventContext().set(HotDeploymentStrategy.NAME, hotDeploymentStrategy);
            hotDeploymentStrategy.scan();
           
            if (hotDeploymentStrategy.getTimestamp() > init.getTimestamp())
            {
               log.debug("redeploying components");
               Seam.clearComponentNameCache();
               for ( String name: init.getHotDeployableComponents() )
               {
                  Component component = Component.forName(name);
                  if (component!=null)
                  {
                     ScopeType scope = component.getScope();
                     if ( scope!=ScopeType.STATELESS && scope.isContextActive() )
                     {
                        scope.getContext().remove(name);
                     }
                     init.removeObserverMethods(component);
                  }
                  Contexts.getApplicationContext().remove(name + COMPONENT_SUFFIX);
               }
           
               init.getHotDeployableComponents().clear();
               installHotDeployableComponents();
               installComponents(init);
               log.debug("done redeploying components");
            }
            // update the timestamp outside of the second timestamp check to be sure we don't cause an unnecessary scan
            // the second scan checks annotations (the slow part) which might happen to exclude the most recent file
            init.setTimestamp(System.currentTimeMillis());
            ServletLifecycle.endReinitialization();
         }
           
         final WarRootDeploymentStrategy warRootDeploymentStrategy = new WarRootDeploymentStrategy(Thread.currentThread().getContextClassLoader(), warRoot, servletContext, new File[] { warClassesDirectory, warLibDirectory, hotDeployDirectory });
         changed = new TimestampCheckForwardingDeploymentStrategy()
         {
            @Override
            protected DeploymentStrategy delegate()
            {
               return warRootDeploymentStrategy;
View Full Code Here

         return;
      }
     
      hotDeploymentStrategy = createHotDeployment(Thread.currentThread().getContextClassLoader(), isHotDeployEnabled(init));
     
      boolean changed = new TimestampCheckForwardingDeploymentStrategy()
      {
         @Override
         protected DeploymentStrategy delegate()
         {
            return hotDeploymentStrategy;
         }
        
      }.changedSince(init.getTimestamp());
     
      if (hotDeploymentStrategy.available() && changed)
      {
         ServletLifecycle.beginReinitialization(request);
         Contexts.getEventContext().set(HotDeploymentStrategy.NAME, hotDeploymentStrategy);
         hotDeploymentStrategy.scan();
        
         if (hotDeploymentStrategy.getTimestamp() > init.getTimestamp())
         {
            log.debug("redeploying components");
            Seam.clearComponentNameCache();
            for (String name : init.getHotDeployableComponents())
            {
               Component component = Component.forName(name);
               if (component != null)
               {
                  ScopeType scope = component.getScope();
                  if (scope != ScopeType.STATELESS && scope.isContextActive())
                  {
                     scope.getContext().remove(name);
                  }
                  init.removeObserverMethods(component);
               }
               Contexts.getApplicationContext().remove(name + COMPONENT_SUFFIX);
            }
           
            init.getHotDeployableComponents().clear();
            installHotDeployableComponents();
            installComponents(init);
            log.debug("done redeploying components");
         }
         // update the timestamp outside of the second timestamp check to be
         // sure we don't cause an unnecessary scan
         // the second scan checks annotations (the slow part) which might
         // happen to exclude the most recent file
         init.setTimestamp(System.currentTimeMillis());
         ServletLifecycle.endReinitialization();
      }
     
      final WarRootDeploymentStrategy warRootDeploymentStrategy = new WarRootDeploymentStrategy(Thread.currentThread().getContextClassLoader(), warRoot, servletContext, new File[] { warClassesDirectory, warLibDirectory, hotDeployDirectory });
      changed = new TimestampCheckForwardingDeploymentStrategy()
      {
         @Override
         protected DeploymentStrategy delegate()
         {
            return warRootDeploymentStrategy;
View Full Code Here

      {
         try
         {
            hotDeploymentStrategy = createHotDeployment(Thread.currentThread().getContextClassLoader(), isHotDeployEnabled(init));
           
            boolean changed = new TimestampCheckForwardingDeploymentStrategy()
            {
               @Override
               protected DeploymentStrategy delegate()
               {
                  return hotDeploymentStrategy;
               }
              
            }.changedSince(init.getTimestamp());
           
            if (hotDeploymentStrategy.available() && changed)
            {
               ServletLifecycle.beginReinitialization(request);
               Contexts.getEventContext().set(HotDeploymentStrategy.NAME, hotDeploymentStrategy);
               hotDeploymentStrategy.scan();
              
               if (hotDeploymentStrategy.getTimestamp() > init.getTimestamp())
               {
                  log.debug("redeploying components");
                  Seam.clearComponentNameCache();
                  for ( String name: init.getHotDeployableComponents() )
                  {
                     Component component = Component.forName(name);
                     if (component!=null)
                     {
                        ScopeType scope = component.getScope();
                        if ( scope!=ScopeType.STATELESS && scope.isContextActive() )
                        {
                           scope.getContext().remove(name);
                        }
                        init.removeObserverMethods(component);
                     }
                     Contexts.getApplicationContext().remove(name + COMPONENT_SUFFIX);
                  }
              
                  init.getHotDeployableComponents().clear();
                  installHotDeployableComponents();
                  installComponents(init);
                  log.debug("done redeploying components");
               }
               // update the timestamp outside of the second timestamp check to be sure we don't cause an unnecessary scan
               // the second scan checks annotations (the slow part) which might happen to exclude the most recent file
               init.setTimestamp(System.currentTimeMillis());
               ServletLifecycle.endReinitialization();
            }
              
            final WarRootDeploymentStrategy warRootDeploymentStrategy = new WarRootDeploymentStrategy(Thread.currentThread().getContextClassLoader(), warRoot, new File[] { warClassesDirectory, warLibDirectory, hotDeployDirectory });
            changed = new TimestampCheckForwardingDeploymentStrategy()
            {
               @Override
               protected DeploymentStrategy delegate()
               {
                  return warRootDeploymentStrategy;
View Full Code Here

TOP

Related Classes of org.jboss.seam.deployment.TimestampCheckForwardingDeploymentStrategy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.