[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Deployment redeploy

alesj do-not-reply at jboss.com
Fri Jun 13 05:00:56 EDT 2008


"scott.stark at jboss.org" wrote : Why the profile is looking down to the jsp level is something that needs to be looked at. Its the Profile.getModifiedDeployments call implementation that has this behavior.
  | 

  | basic.ProfileImpl.getModifiedDeployments
  |             else if( root.hasBeenModified() )
  | 
this goes down to File.lastModified for directories
Which does this
anonymous wrote : 
  | I understand that we monitor the top level deployment for changes (in this case the jmx-console.war directory) so any changes in the directory content (addtions/removals/updates) causes it's date to be modified, which in turn triggers the re-deployment. 

Just ran a simple test to verify this 100%.


  | public class DirChecker implements Runnable
  | {
  |    private static File dir = new File("C:\\tmp");
  |    private long lastModified;
  | 
  |    public static void main(String[] args)
  |    {
  |       DirChecker target = new DirChecker();
  |       target.lastModified = dir.lastModified();
  |       new Thread(target).start();
  |    }
  | 
  |    public void run()
  |    {
  |       boolean changed = false;
  |       while (changed == false)
  |       {
  |          long lm = dir.lastModified();
  |          if (lm > lastModified)
  |          {
  |             System.out.println("lm = " + lm);
  |             changed = true;
  |          }
  |       }
  |    }
  | }
  | 

So I don't see how are you gonna pull this one off in a short time/simple change - w/o metadata change tracking.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157896#4157896

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157896



More information about the jboss-dev-forums mailing list