openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject svn commit: r1070286 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
Date Sun, 13 Feb 2011 19:53:50 GMT
Author: gpetracek
Date: Sun Feb 13 19:53:50 2011
New Revision: 1070286

URL: http://svn.apache.org/viewvc?rev=1070286&view=rev
Log:
improved logging and exceptions

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java?rev=1070286&r1=1070285&r2=1070286&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
Sun Feb 13 19:53:50 2011
@@ -562,16 +562,24 @@ public class BeansDeployer
         {
             URL fileURL = it.next();
             String fileName = fileURL.getFile();
+
+            if (logger.wblWillLogDebug())
+            {
+                logger.debug("OpenWebBeans BeansDeployer configuring filename: " +
+                        fileName + " from URL: " + fileURL.toString());
+            }
+
             InputStream fis = null;
             try
             {
                 fis = fileURL.openStream();
-                
-                this.xmlConfigurator.configure(fis, fileName,scanner);
-            } 
+
+                this.xmlConfigurator.configure(fis, fileName, scanner);
+            }
             catch (IOException e)
             {
-                throw new WebBeansDeploymentException(e);
+                throw new WebBeansDeploymentException("Error configuring: filename: " +
+                        fileName + " from fileURL: " + fileURL.toString(), e);
             }
             finally
             {
@@ -589,9 +597,11 @@ public class BeansDeployer
             }
         }
 
-        logger.debug("Deploying configurations from XML has ended successfully.");
+        if(logger.wblWillLogDebug())
+        {
+            logger.debug("Deploying configurations from XML has ended successfully.");
+        }
     }
-    
 
     /**
      * Checks specialization.



Mime
View raw message