Because as we discussed before, debug msgs should not be high
frequency and do not warrent guards.

xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark
Chief Technology Officer
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx
----- Original Message -----
From: "Jason Dillon" <[EMAIL PROTECTED]>
To: "Scott M Stark" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, April 14, 2002 2:34 PM
Subject: Re: [JBoss-dev] CVS update:
jboss-system/src/main/org/jboss/deployment MainDeployer.java


> Why are we dropping log.debug gaurds?
>
> --jason
>
>
> Quoting Scott M Stark <[EMAIL PROTECTED]>:
>
> >   User: starksm
> >   Date: 02/04/14 13:19:55
> >
> >   Modified:    src/main/org/jboss/deployment MainDeployer.java
> >   Log:
> >   Fixed the wacked indentation and formatting
> >
> >   Revision  Changes    Path
> >   1.27      +66 -100
> > jboss-system/src/main/org/jboss/deployment/MainDeployer.java
> >
> >   Index: MainDeployer.java
> >   ===================================================================
> >   RCS file:
> >
/cvsroot/jboss/jboss-system/src/main/org/jboss/deployment/MainDeployer.java,
v
> >   retrieving revision 1.26
> >   retrieving revision 1.27
> >   diff -u -r1.26 -r1.27
> >   --- MainDeployer.java 14 Apr 2002 01:19:54 -0000 1.26
> >   +++ MainDeployer.java 14 Apr 2002 20:19:53 -0000 1.27
> >   @@ -58,7 +58,7 @@
> >     * @author <a href="mailto:[EMAIL PROTECTED]";>Marc Fleury</a>
> >     * @author <a href="mailto:[EMAIL PROTECTED]";>Scott Stark</a>
> >     * @author <a href="mailto:[EMAIL PROTECTED]";>David
> > Jencks</a>
> >   - * @version $Revision: 1.26 $
> >   + * @version $Revision: 1.27 $
> >     *
> >     * @jmx:mbean name="jboss.system:service=MainDeployer"
> >     *            extends="org.jboss.system.ServiceMBean,
> > org.jboss.deployment.DeployerMBean"
> >   @@ -150,9 +150,7 @@
> >        */
> >       public void addDeployer(final SubDeployer deployer)
> >       {
> >   -      if (log.isDebugEnabled()) {
> >   -         log.debug("Adding deployer: " + deployer);
> >   -      }
> >   +      log.info("Adding deployer: " + deployer);
> >          synchronized(deployers)
> >          {
> >             deployers.addFirst(deployer);
> >   @@ -172,11 +170,10 @@
> >                   log.error("DeploymentException while trying to deploy
a
> > package with a new deployer", e);
> >                } // end of try-catch
> >
> >   -         } // end of for ()
> >   -
> >   +         } // end of for ()
> >          }
> >       }
> >   -
> >   +
> >       /**
> >        * The <code>removeDeployer</code> method unregisters a deployer
with
> > the MainDeployer.
> >        * Deployed packages deployed with this deployer are undeployed.
> >   @@ -186,30 +183,28 @@
> >        */
> >       public void removeDeployer(final SubDeployer deployer)
> >       {
> >   -      if (log.isDebugEnabled()) {
> >   -         log.debug("Removing deployer: " + deployer);
> >   -      }
> >   +      log.info("Removing deployer: " + deployer);
> >          synchronized(deployers)
> >          {
> >   -         deployers.remove(deployer);
> >   +         deployers.remove(deployer);
> >          }
> >          List copy = null;
> >          synchronized(deploymentList)
> >          {
> >   - copy = new ArrayList(deploymentList);
> >   +         copy = new ArrayList(deploymentList);
> >          }
> >          for (Iterator i = copy.iterator(); i.hasNext(); )
> >          {
> >   - DeploymentInfo di = (DeploymentInfo)i.next();
> >   - if (di.deployer == deployer)
> >   - {
> >   -     undeploy(di);
> >   -     di.deployer = null;
> >   -     synchronized (waitingDeployments)
> >   -     {
> >   -        waitingDeployments.add(di);
> >   -     }
> >   - }
> >   +         DeploymentInfo di = (DeploymentInfo)i.next();
> >   +         if (di.deployer == deployer)
> >   +         {
> >   +            undeploy(di);
> >   +            di.deployer = null;
> >   +            synchronized (waitingDeployments)
> >   +            {
> >   +               waitingDeployments.add(di);
> >   +            }
> >   +         }
> >          }
> >       }
> >
> >   @@ -371,11 +366,7 @@
> >          for (Iterator subs = di.subDeployments.iterator();
> > subs.hasNext();)
> >          {
> >             DeploymentInfo sub = (DeploymentInfo) subs.next();
> >   -
> >   -         if (log.isDebugEnabled())
> >   -         {
> >   -            log.debug("Stopping sub deployment: "+sub.url);
> >   -         }
> >   +         log.debug("Stopping sub deployment: "+sub.url);
> >             stop(sub);
> >          }
> >
> >   @@ -406,11 +397,7 @@
> >          for (Iterator subs = di.subDeployments.iterator();
> > subs.hasNext();)
> >          {
> >             DeploymentInfo sub = (DeploymentInfo) subs.next();
> >   -
> >   -         if (log.isDebugEnabled())
> >   -         {
> >   -            log.debug("Destroying sub deployment: "+sub.url);
> >   -         }
> >   +         log.debug("Destroying sub deployment: "+sub.url);
> >             destroy(sub);
> >          }
> >
> >   @@ -452,10 +439,12 @@
> >       public void deploy(String urlspec) throws MalformedURLException
> >       {
> >          URL url;
> >   -      try {
> >   +      try
> >   +      {
> >             url = new URL(urlspec);
> >          }
> >   -      catch (MalformedURLException e) {
> >   +      catch (MalformedURLException e)
> >   +      {
> >             File file = new File(urlspec);
> >             url = file.toURL();
> >          }
> >   @@ -538,29 +527,28 @@
> >          log.debug("Starting deployment (init step) of package at: " +
> > deployment.url);
> >          try
> >          {
> >   -
> >             // Create a local copy of that File, the sdi keeps track of
the
> > copy directory
> >             if (deployment.localUrl == null)
> >             {
> >                makeLocalCopy(deployment);
> >                // initialize the unified classloaders for this
deployment
> >                deployment.createClassLoaders();
> >   -     //See if this lets us deploy any waiting configurations.
> >   -     try
> >   -     {
> >   -        getServer().invoke(ServiceControllerMBean.OBJECT_NAME,
> >   -   "newClassLoaderNotification",
> >   -   new Object[] {},
> >   -   new String[] {});
> >   -     }
> >   -     catch (Exception e)
> >   +            //See if this lets us deploy any waiting configurations.
> >   +            try
> >                {
> >   -        log.info("Exception notifying classloader added", e);
> >   -     }
> >   -     //serviceController.newClassLoaderNotification();
> >   +               getServer().invoke(ServiceControllerMBean.OBJECT_NAME,
> >   +                  "newClassLoaderNotification",
> >   +                  new Object[] {},
> >   +                  new String[] {}
> >   +               );
> >   +            }
> >   +            catch (Exception e)
> >   +            {
> >   +               log.info("Exception notifying classloader added", e);
> >   +            }
> >   +            //serviceController.newClassLoaderNotification();
> >             } // end of if ()
> >   -
> >   -
> >   +
> >             // What deployer is able to deploy this file
> >             findDeployer(deployment);
> >
> >   @@ -591,26 +579,26 @@
> >          finally
> >          {
> >             // whether you do it or not, for the autodeployer
> >   - try
> >   - {
> >   -    URL
> > url=(deployment.localUrl==null)?deployment.url:deployment.localUrl;
> >   -
> >   -    long lastModified = -1;
> >   -
> >   -    if (url.getProtocol().equals("file"))
> >   -      lastModified = new File(url.getFile()).lastModified();
> >   -    else
> >   -      lastModified = url.openConnection().getLastModified();
> >   -
> >   -    deployment.lastModified=lastModified;
> >   -    deployment.lastDeployed=System.currentTimeMillis();
> >   - }
> >   - catch (IOException ignore)
> >   - {
> >   -    deployment.lastModified=System.currentTimeMillis();
> >   -    deployment.lastDeployed=System.currentTimeMillis();
> >   - }
> >   -
> >   +         try
> >   +         {
> >   +            URL url = deployment.localUrl == null ? deployment.url :
> > deployment.localUrl;
> >   +
> >   +            long lastModified = -1;
> >   +
> >   +            if (url.getProtocol().equals("file"))
> >   +               lastModified = new File(url.getFile()).lastModified();
> >   +            else
> >   +               lastModified = url.openConnection().getLastModified();
> >   +
> >   +            deployment.lastModified=lastModified;
> >   +            deployment.lastDeployed=System.currentTimeMillis();
> >   +         }
> >   +         catch (IOException ignore)
> >   +         {
> >   +            deployment.lastModified=System.currentTimeMillis();
> >   +            deployment.lastDeployed=System.currentTimeMillis();
> >   +         }
> >   +
> >             synchronized (deploymentList)
> >             {
> >                //watch it, it will be picked up as modified below,
> > deployments is a map duplicates are ok
> >   @@ -713,8 +701,6 @@
> >        */
> >       private void findDeployer(DeploymentInfo sdi)
> >       {
> >   -      boolean debug = log.isDebugEnabled();
> >   -
> >          // Defensive
> >          sdi.deployer = null;
> >
> >   @@ -730,18 +716,12 @@
> >                if (deployer.accepts(sdi))
> >                {
> >                   sdi.deployer = deployer;
> >   -               if (debug)
> >   -               {
> >   -                  log.debug("using deployer "+deployer);
> >   -               }
> >   +               log.debug("using deployer "+deployer);
> >                   return;
> >                }
> >             }
> >          }
> >   -      if (debug)
> >   -      {
> >   -         log.debug("No deployer found for url: " + sdi.url);
> >   -      }
> >   +      log.debug("No deployer found for url: " + sdi.url);
> >       }
> >
> >       /**
> >   @@ -753,8 +733,6 @@
> >        */
> >       private void parseManifestLibraries(DeploymentInfo sdi) throws
> > DeploymentException
> >       {
> >   -      boolean debug = log.isDebugEnabled();
> >   -
> >          String classPath = null;
> >
> >          Manifest mf = sdi.getManifest();
> >   @@ -770,23 +748,14 @@
> >          {
> >             ArrayList tmp = new ArrayList();
> >             StringTokenizer st = new StringTokenizer(classPath);
> >   -         if (debug)
> >   -         {
> >   -            log.debug("resolveLibraries: "+classPath);
> >   -         }
> >   +         log.debug("resolveLibraries: "+classPath);
> >
> >             while (st.hasMoreTokens())
> >             {
> >   -            URL lib = null;
> >   -
> >   +            URL lib = null;
> >                String tk = st.nextToken();
> >   -
> >                DeploymentInfo sub = null;
> >   -
> >   -            if (debug)
> >   -            {
> >   -               log.debug("new manifest entry for sdi at
"+sdi.shortName+"
> > entry is "+tk);
> >   -            }
> >   +            log.debug("new manifest entry for sdi at
"+sdi.shortName+"
> > entry is "+tk);
> >
> >                try
> >                {
> >   @@ -825,13 +794,10 @@
> >          {
> >             if (sdi.url.getProtocol().equals("file") && sdi.isDirectory)
> >             {
> >   -            // TODO add support for Directory copying over
> >   -
> >   +            // TODO add support for Directory copying over
> >                sdi.localUrl = sdi.url;
> >   -
> >                return;
> >             }
> >   -
> >             // Are we already in the localCopyDir?
> >             else if (inLocalCopyDir(sdi.url))
> >             {
> >   @@ -884,10 +850,11 @@
> >
> >          File file = new File(_dest.getFile());
> >          File dir = file.getParentFile();
> >   -      if (!dir.exists()) {
> >   +      if (!dir.exists())
> >   +      {
> >             dir.mkdirs();
> >          }
> >   -
> >   +
> >          if (_src.getProtocol().equals("file"))
> >          {
> >             File srcFile = new File(_src.getFile());
> >   @@ -973,4 +940,3 @@
> >       }
> >
> >    }
> >   -
> >
> >
> >
> >
> > _______________________________________________
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-development
> >
>
>
>
>
> -------------------------------------------------
> This mail sent through IMP: http://horde.org/imp/
>
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
>


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to