openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1078806 - in /openwebbeans/trunk: webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/ webbeans-impl/src/main/java/org/apache/webbeans/decorator/ webbeans-impl/src/main/java/org/apache/webbeans/intercept/ webbeans-jsf/src...
Date Mon, 07 Mar 2011 15:20:19 GMT
Author: struberg
Date: Mon Mar  7 15:20:19 2011
New Revision: 1078806

URL: http://svn.apache.org/viewvc?rev=1078806&view=rev
Log:
OWB-393 check willLogDebug before actually logging

Modified:
    openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/OpenWebBeansEjbInterceptor.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecoratorConfig.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java
    openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/WebBeansPhaseListener.java
    openwebbeans/trunk/webbeans-jsf12/src/main/java/org/apache/webbeans/jsf12/WebBeansPhaseListener.java
    openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java
    openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/failover/DefaultOwbFailOverService.java

Modified: openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/OpenWebBeansEjbInterceptor.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/OpenWebBeansEjbInterceptor.java?rev=1078806&r1=1078805&r2=1078806&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/OpenWebBeansEjbInterceptor.java
(original)
+++ openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/OpenWebBeansEjbInterceptor.java
Mon Mar  7 15:20:19 2011
@@ -575,7 +575,7 @@ public class OpenWebBeansEjbInterceptor 
     public Object callAroundTimeouts(InvocationContext context) throws Exception
     {
         Object rv = null;
-        if (logger.wblWillLogTrace())
+        if (logger.wblWillLogDebug())
         {
             logger.debug("OWBEI:: @AroundTimeout entry. Trying to run Interceptors.");  
         
         }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecoratorConfig.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecoratorConfig.java?rev=1078806&r1=1078805&r2=1078806&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecoratorConfig.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecoratorConfig.java
Mon Mar  7 15:20:19 2011
@@ -76,8 +76,11 @@ public final class WebBeansDecoratorConf
             }                
         }            
 
-        
-        logger.debug("Configuring decorator class : [{0}]", delegate.getReturnType());
+
+        if (logger.wblWillLogDebug())
+        {
+            logger.debug("Configuring decorator class : [{0}]", delegate.getReturnType());
+        }
         WebBeansDecorator<T> decorator = new WebBeansDecorator<T>(delegate);
         delegate.getWebBeansContext().getBeanManagerImpl().addDecorator(decorator);
     }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java?rev=1078806&r1=1078805&r2=1078806&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java
Mon Mar  7 15:20:19 2011
@@ -102,7 +102,10 @@ public final class WebBeansInterceptorCo
             }
         }
 
-        logger.debug("Configuring interceptor class : [{0}]", delegate.getReturnType());
+        if (logger.wblWillLogDebug())
+        {
+            logger.debug("Configuring interceptor class : [{0}]", delegate.getReturnType());
+        }
         WebBeansInterceptor<T> interceptor = new WebBeansInterceptor<T>(delegate);
 
         List<Annotation> anns = Arrays.asList(interceptorBindingTypes);

Modified: openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/WebBeansPhaseListener.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/WebBeansPhaseListener.java?rev=1078806&r1=1078805&r2=1078806&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/WebBeansPhaseListener.java
(original)
+++ openwebbeans/trunk/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/WebBeansPhaseListener.java
Mon Mar  7 15:20:19 2011
@@ -64,7 +64,10 @@ public class WebBeansPhaseListener imple
 
             if (conversation.isTransient())
             {
-                logger.debug("Destroying the conversation context with cid : [{0}]", conversation.getId());
+                if (logger.wblWillLogDebug())
+                {
+                    logger.debug("Destroying the conversation context with cid : [{0}]",
conversation.getId());
+                }
                 ContextFactory contextFactory = webBeansContext.getContextFactory();
                 contextFactory.destroyConversationContext();
             }
@@ -97,7 +100,10 @@ public class WebBeansPhaseListener imple
 
             if (conversation.isTransient())
             {
-                logger.debug("Creating a new transitional conversation with cid : [{0}]",
conversation.getId());
+                if (logger.wblWillLogDebug())
+                {
+                    logger.debug("Creating a new transitional conversation with cid : [{0}]",
conversation.getId());
+                }
                 contextFactory.initConversationContext(null);
 
                 //Not restore, throw exception
@@ -108,7 +114,10 @@ public class WebBeansPhaseListener imple
             }
             else
             {
-                logger.debug("Restoring conversation with cid : [{0}]", conversation.getId());
+                if (logger.wblWillLogDebug())
+                {
+                    logger.debug("Restoring conversation with cid : [{0}]", conversation.getId());
+                }
 
                 //Conversation must be used by one thread at a time
                 ConversationImpl owbConversation = (ConversationImpl)conversation;

Modified: openwebbeans/trunk/webbeans-jsf12/src/main/java/org/apache/webbeans/jsf12/WebBeansPhaseListener.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-jsf12/src/main/java/org/apache/webbeans/jsf12/WebBeansPhaseListener.java?rev=1078806&r1=1078805&r2=1078806&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-jsf12/src/main/java/org/apache/webbeans/jsf12/WebBeansPhaseListener.java
(original)
+++ openwebbeans/trunk/webbeans-jsf12/src/main/java/org/apache/webbeans/jsf12/WebBeansPhaseListener.java
Mon Mar  7 15:20:19 2011
@@ -65,7 +65,10 @@ public class WebBeansPhaseListener imple
 
             if (conversation.isTransient())
             {
-                logger.debug("Destroying the conversation context with cid : [{0}]", conversation.getId());
+                if (logger.wblWillLogDebug())
+                {
+                    logger.debug("Destroying the conversation context with cid : [{0}]",
conversation.getId());
+                }
                 contextFactory.destroyConversationContext();
             }
             else
@@ -102,7 +105,10 @@ public class WebBeansPhaseListener imple
 
             if (conversation.isTransient())
             {
-                logger.debug("Creating a new transitional conversation with cid : [{0}]",
conversation.getId());
+                if (logger.wblWillLogDebug())
+                {
+                    logger.debug("Creating a new transitional conversation with cid : [{0}]",
conversation.getId());
+                }
                 contextFactory.initConversationContext(null);
 
                 //Not restore, throw exception
@@ -113,7 +119,10 @@ public class WebBeansPhaseListener imple
             }
             else
             {
-                logger.debug("Restoring conversation with cid : [{0}]", conversation.getId());
+                if (logger.wblWillLogDebug())
+                {
+                    logger.debug("Restoring conversation with cid : [{0}]", conversation.getId());
+                }
 
                 //Conversation must be used by one thread at a time
                 ConversationImpl owbConversation = (ConversationImpl)conversation;

Modified: openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java?rev=1078806&r1=1078805&r2=1078806&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java
(original)
+++ openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java
Mon Mar  7 15:20:19 2011
@@ -653,7 +653,10 @@ public class WebContextsService extends 
     private Context lazyStartSessionContext()
     {
 
-        logger.debug(">lazyStartSessionContext");
+        if (logger.wblWillLogDebug())
+        {
+            logger.debug(">lazyStartSessionContext");
+        }
 
         Context webContext = null;
         Context context = getCurrentContext(RequestScoped.class);
@@ -672,7 +675,10 @@ public class WebContextsService extends 
                         failoverService.sessionIsInUse(currentSession);
                     }
 
-                    logger.debug("Lazy SESSION context initialization SUCCESS");
+                    if (logger.wblWillLogDebug())
+                    {
+                        logger.debug("Lazy SESSION context initialization SUCCESS");
+                    }
                 }
                 catch (Exception e)
                 {
@@ -690,7 +696,10 @@ public class WebContextsService extends 
             logger.warn("Could NOT lazily initialize session context because of "+context+"
RequestContext");
         }
 
-        logger.debug("<lazyStartSessionContext "+ webContext);
+        if (logger.wblWillLogDebug())
+        {
+            logger.debug("<lazyStartSessionContext "+ webContext);
+        }
         return webContext;
     }
 }
\ No newline at end of file

Modified: openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/failover/DefaultOwbFailOverService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/failover/DefaultOwbFailOverService.java?rev=1078806&r1=1078805&r2=1078806&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/failover/DefaultOwbFailOverService.java
(original)
+++ openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/failover/DefaultOwbFailOverService.java
Mon Mar  7 15:20:19 2011
@@ -95,7 +95,7 @@ public class DefaultOwbFailOverService i
             } 
             catch (Exception e) 
             {
-                logger.debug("DefaultOwbFailOverService could not instanciate: [{0}]", value);
+                logger.error("DefaultOwbFailOverService could not instanciate: [{0}]", e,
value);
             }
         }
         
@@ -166,7 +166,10 @@ public class DefaultOwbFailOverService i
             (FailOverBagWrapper)session.getAttribute(getFailOverAttributeName());
         if (bagWrapper != null) 
         {
-            logger.debug("DefaultOwbFailOverService restoreBeans for session: [{0}]", session);
+            if (logger.wblWillLogDebug())
+            {
+                logger.debug("DefaultOwbFailOverService restoreBeans for session: [{0}]",
session);
+            }
             bagWrapper.restore();
             session.removeAttribute(getFailOverAttributeName());
         }



Mime
View raw message