openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1073735 - in /openwebbeans/trunk: atinject-tck/src/test/java/org/apache/webbeans/atinject/tck/container/ webbeans-impl/src/main/java/org/apache/webbeans/component/ webbeans-impl/src/main/java/org/apache/webbeans/logger/ webbeans-impl/src/m...
Date Wed, 23 Feb 2011 13:34:40 GMT
Author: struberg
Date: Wed Feb 23 13:34:40 2011
New Revision: 1073735

URL: http://svn.apache.org/viewvc?rev=1073735&view=rev
Log:
OWB-461 remove e.printStackTrace and use proper logging

Modified:
    openwebbeans/trunk/atinject-tck/src/test/java/org/apache/webbeans/atinject/tck/container/AtInjectContainer.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/logger/WebBeansLogger.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansErrorHandler.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLUtil.java
    openwebbeans/trunk/webbeans-jee5-ejb-resource/src/main/java/org/apache/webbeans/resource/spi/ee/ExtendedStandaloneResourceInjectionService.java
    openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/StandaloneContainersImpl.java
    openwebbeans/trunk/webbeans-tomcat6/pom.xml
    openwebbeans/trunk/webbeans-tomcat6/src/main/java/org/apache/webbeans/web/tomcat/TomcatAnnotProcessor.java

Modified: openwebbeans/trunk/atinject-tck/src/test/java/org/apache/webbeans/atinject/tck/container/AtInjectContainer.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/atinject-tck/src/test/java/org/apache/webbeans/atinject/tck/container/AtInjectContainer.java?rev=1073735&r1=1073734&r2=1073735&view=diff
==============================================================================
--- openwebbeans/trunk/atinject-tck/src/test/java/org/apache/webbeans/atinject/tck/container/AtInjectContainer.java
(original)
+++ openwebbeans/trunk/atinject-tck/src/test/java/org/apache/webbeans/atinject/tck/container/AtInjectContainer.java
Wed Feb 23 13:34:40 2011
@@ -77,9 +77,10 @@ public class AtInjectContainer extends S
             
             return Tck.testsFor(car, false, true);
             
-        }catch(DeploymentException e)
+        } catch(DeploymentException e)
         {
-            e.printStackTrace();
+            logger.error(e);
+            excpetion = e;
         }
         
         return null;

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java?rev=1073735&r1=1073734&r2=1073735&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractOwbBean.java
Wed Feb 23 13:34:40 2011
@@ -250,8 +250,7 @@ public abstract class AbstractOwbBean<T>
         }
         catch(Exception e)
         {
-            logger.fatal(OWBLogConst.FATAL_0001, this);
-            e.printStackTrace();
+            logger.fatal(e, OWBLogConst.FATAL_0001, this);
         }
         finally
         {

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/logger/WebBeansLogger.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/logger/WebBeansLogger.java?rev=1073735&r1=1073734&r2=1073735&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/logger/WebBeansLogger.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/logger/WebBeansLogger.java
Wed Feb 23 13:34:40 2011
@@ -145,11 +145,17 @@ public final class WebBeansLogger implem
         this.wblLog(WebBeansLogger.WBL_FATAL, messageKey, args);
     }
 
-    public void fatal(String messageKey, Throwable e)
+    public void fatal(Throwable e, String messageKey)
     {
         this.wblLog(WebBeansLogger.WBL_FATAL, e, messageKey);
     }
 
+    public void fatal(Throwable e, String messageKey, Object... args)
+    {
+        this.wblLog(WebBeansLogger.WBL_FATAL, e, messageKey, args);
+    }
+
+
     public void error(Throwable e)
     {
         this.wblLog(WebBeansLogger.WBL_ERROR, e, "");

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansErrorHandler.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansErrorHandler.java?rev=1073735&r1=1073734&r2=1073735&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansErrorHandler.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/WebBeansErrorHandler.java
Wed Feb 23 13:34:40 2011
@@ -45,7 +45,7 @@ public class WebBeansErrorHandler implem
 
     public void fatalError(SAXParseException exception) throws SAXException
     {
-        logger.fatal(exception.getMessage(), exception.getCause());
+        logger.fatal(exception.getCause(), exception.getMessage());
         throw new WebBeansException(exception);
     }
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLUtil.java?rev=1073735&r1=1073734&r2=1073735&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLUtil.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLUtil.java Wed
Feb 23 13:34:40 2011
@@ -149,7 +149,7 @@ public class XMLUtil
         }
         catch (Exception e)
         {
-            log.fatal(OWBLogConst.FATAL_0002, e);
+            log.fatal(e, OWBLogConst.FATAL_0002);
             throw new WebBeansException(log.getTokenString(OWBLogConst.EXCEPT_0013), e);
         }
     }
@@ -181,7 +181,7 @@ public class XMLUtil
         }
         catch (Exception e)
         {
-            log.fatal(OWBLogConst.FATAL_0002, e);
+            log.fatal(e, OWBLogConst.FATAL_0002);
             throw new WebBeansException(log.getTokenString(OWBLogConst.EXCEPT_0013), e);
         }
     }

Modified: openwebbeans/trunk/webbeans-jee5-ejb-resource/src/main/java/org/apache/webbeans/resource/spi/ee/ExtendedStandaloneResourceInjectionService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-jee5-ejb-resource/src/main/java/org/apache/webbeans/resource/spi/ee/ExtendedStandaloneResourceInjectionService.java?rev=1073735&r1=1073734&r2=1073735&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-jee5-ejb-resource/src/main/java/org/apache/webbeans/resource/spi/ee/ExtendedStandaloneResourceInjectionService.java
(original)
+++ openwebbeans/trunk/webbeans-jee5-ejb-resource/src/main/java/org/apache/webbeans/resource/spi/ee/ExtendedStandaloneResourceInjectionService.java
Wed Feb 23 13:34:40 2011
@@ -115,7 +115,7 @@ public class ExtendedStandaloneResourceI
 
             if (!beansIterator.hasNext())
             {
-                e.printStackTrace();
+                logger.error(e);
                 throw new RuntimeException("can't find ejb (via jndi) or cdi bean for type
"
                         + resourceType.getName(), e);
             }

Modified: openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/StandaloneContainersImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/StandaloneContainersImpl.java?rev=1073735&r1=1073734&r2=1073735&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/StandaloneContainersImpl.java
(original)
+++ openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/StandaloneContainersImpl.java
Wed Feb 23 13:34:40 2011
@@ -56,11 +56,11 @@ import org.jboss.testharness.spi.Standal
 public class StandaloneContainersImpl implements StandaloneContainers
 {
     /**Logger instance*/
-    private  final WebBeansLogger logger = WebBeansLogger.getLogger(StandaloneContainersImpl.class);
+    protected  final WebBeansLogger logger = WebBeansLogger.getLogger(StandaloneContainersImpl.class);
 
-    private StandaloneLifeCycle lifeCycle = null;
+    protected StandaloneLifeCycle lifeCycle = null;
 
-    private DeploymentException excpetion;
+    protected DeploymentException excpetion;
 
     public void deployInternal(Iterable<Class<?>> classes) throws DeploymentException
     {

Modified: openwebbeans/trunk/webbeans-tomcat6/pom.xml
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat6/pom.xml?rev=1073735&r1=1073734&r2=1073735&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-tomcat6/pom.xml (original)
+++ openwebbeans/trunk/webbeans-tomcat6/pom.xml Wed Feb 23 13:34:40 2011
@@ -42,6 +42,12 @@
             <scope>provided</scope>
         </dependency>
         <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-impl</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-jcdi_1.0_spec</artifactId>
             <scope>provided</scope>

Modified: openwebbeans/trunk/webbeans-tomcat6/src/main/java/org/apache/webbeans/web/tomcat/TomcatAnnotProcessor.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat6/src/main/java/org/apache/webbeans/web/tomcat/TomcatAnnotProcessor.java?rev=1073735&r1=1073734&r2=1073735&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-tomcat6/src/main/java/org/apache/webbeans/web/tomcat/TomcatAnnotProcessor.java
(original)
+++ openwebbeans/trunk/webbeans-tomcat6/src/main/java/org/apache/webbeans/web/tomcat/TomcatAnnotProcessor.java
Wed Feb 23 13:34:40 2011
@@ -25,9 +25,12 @@ import java.util.concurrent.ConcurrentHa
 import javax.naming.NamingException;
 
 import org.apache.AnnotationProcessor;
+import org.apache.webbeans.logger.WebBeansLogger;
 
 public class TomcatAnnotProcessor implements AnnotationProcessor
 {
+    private final WebBeansLogger logger = WebBeansLogger.getLogger(TomcatAnnotProcessor.class);
+
     private AnnotationProcessor processor;
 
     private ClassLoader loader;
@@ -58,7 +61,7 @@ public class TomcatAnnotProcessor implem
             }
             catch (Exception e)
             {
-                e.printStackTrace();
+                logger.error(e);
             }
         }
         processor.preDestroy(obj);
@@ -78,7 +81,7 @@ public class TomcatAnnotProcessor implem
         }
         catch (Exception e)
         {
-            e.printStackTrace();
+            logger.error(e);
         }
     }
 



Mime
View raw message