myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bom...@apache.org
Subject svn commit: r922201 - in /myfaces/orchestra/trunk: core/src/main/java/org/apache/myfaces/orchestra/annotation/ core/src/main/java/org/apache/myfaces/orchestra/annotation/spring/ core/src/main/java/org/apache/myfaces/orchestra/conversation/ core/src/mai...
Date Fri, 12 Mar 2010 10:36:40 GMT
Author: bommel
Date: Fri Mar 12 10:36:39 2010
New Revision: 922201

URL: http://svn.apache.org/viewvc?rev=922201&view=rev
Log:
(ORCHESTRA-48) Ensure log guard for debug level messages

Modified:
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/annotation/AnnotationInfoManager.java
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/annotation/spring/AnnotationsInfoInitializer.java
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationManager.java
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationWiperThread.java
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/servlet/ConversationManagerSessionListener.java
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/ScopedBeanTargetSource.java
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/_SpringUtils.java
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/basic/BasicFrameworkAdapter.java
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/basic/BasicFrameworkAdapterFilter.java
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/jsf/JsfFrameworkAdapterFilter.java
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/springBasic/SpringBasicFrameworkAdapterFilter.java
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/jsf/ContextLockRequestHandler.java
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/jsf/FrameworkAdapterRequestHandler.java
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/jsf/OrchestraFacesContextFactory.java
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/jsf/_PortletFacesContextWrapper.java
    myfaces/orchestra/trunk/core12/src/main/java/org/apache/myfaces/orchestra/lib/jsf/_PortletFacesContextWrapper.java
    myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/lib/jsf/_PortletFacesContextWrapper.java
    myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/FlowHandler.java

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/annotation/AnnotationInfoManager.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/annotation/AnnotationInfoManager.java?rev=922201&r1=922200&r2=922201&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/annotation/AnnotationInfoManager.java
(original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/annotation/AnnotationInfoManager.java
Fri Mar 12 10:36:39 2010
@@ -51,7 +51,10 @@ public class AnnotationInfoManager
     {
         if (annotationsInfoByName.containsKey(annotationInfo.getBeanName()))
         {
-            log.info("duplicate bean definition: " + annotationInfo.getBeanName());
+            if (log.isInfoEnabled())
+            {
+                log.info("duplicate bean definition: " + annotationInfo.getBeanName());
+            }
         }
 
         annotationsInfoByName.put(annotationInfo.getBeanName(), annotationInfo);
@@ -64,9 +67,12 @@ public class AnnotationInfoManager
             {
                 String viewId = viewIds[i];
 
-                if (annotationsInfoByViewId.containsKey(annotationInfo.getBeanName()))
+                if (log.isInfoEnabled())
                 {
-                    log.info("duplicate viewId definition: " + annotationInfo.getBeanName());
+                    if (annotationsInfoByViewId.containsKey(annotationInfo.getBeanName()))
+                    {
+                        log.info("duplicate viewId definition: " + annotationInfo.getBeanName());
+                    }
                 }
 
                 annotationsInfoByViewId.put(viewId, annotationInfo);

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/annotation/spring/AnnotationsInfoInitializer.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/annotation/spring/AnnotationsInfoInitializer.java?rev=922201&r1=922200&r2=922201&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/annotation/spring/AnnotationsInfoInitializer.java
(original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/annotation/spring/AnnotationsInfoInitializer.java
Fri Mar 12 10:36:39 2010
@@ -94,7 +94,11 @@ public class AnnotationsInfoInitializer 
                 }
                 catch (ClassNotFoundException e)
                 {
-                    log.debug(e.getLocalizedMessage(), e);
+
+                    if (log.isDebugEnabled())
+                    {
+                        log.debug(e.getLocalizedMessage(), e);
+                    }
                 }
 
                 if (beanClass != null)

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationManager.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationManager.java?rev=922201&r1=922200&r2=922201&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationManager.java
(original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationManager.java
Fri Mar 12 10:36:39 2010
@@ -129,7 +129,10 @@ public class ConversationManager impleme
         if (cmObj == DUMMY)
         {
             Log log = LogFactory.getLog(ConversationManager.class);
-            log.debug("Method getInstance found dummy ConversationManager object");
+            if (log.isDebugEnabled())
+            {
+                log.debug("Method getInstance found dummy ConversationManager object");
+            }
             cmObj = null;
         }
 
@@ -139,8 +142,11 @@ public class ConversationManager impleme
         if (conversationManager == null && create)
         {
             Log log = LogFactory.getLog(ConversationManager.class);
-            log.debug("Register ConversationRequestParameterProvider");
-            
+
+            if (log.isDebugEnabled())
+            {
+                log.debug("Register ConversationRequestParameterProvider");
+            }
             conversationManager = FactoryFinder.getConversationManagerFactory().createConversationManager();
 
             // initialize environmental systems
@@ -289,7 +295,10 @@ public class ConversationManager impleme
 
                 // TODO: add the "user" name here, otherwise this debugging is not very useful
                 // except when testing a webapp with only one user.
-                log.debug("Created context " + conversationContextId);
+                if (log.isDebugEnabled())
+                {
+                    log.debug("Created context " + conversationContextId);
+                }
             }
             return conversationContext;
         }

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationWiperThread.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationWiperThread.java?rev=922201&r1=922200&r2=922201&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationWiperThread.java
(original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationWiperThread.java
Fri Mar 12 10:36:39 2010
@@ -90,9 +90,15 @@ public class ConversationWiperThread ext
 
     public void run()
     {
-        log.debug("ConversationWiperThread startup"); // NON-NLS
+        if (log.isDebugEnabled())
+        {
+            log.debug("ConversationWiperThread startup"); // NON-NLS
+        }
         _run();
-        log.debug("ConversationWiperThread shtudown"); // NON-NLS
+        if (log.isDebugEnabled())
+        {
+            log.debug("ConversationWiperThread shtudown"); // NON-NLS
+        }
     }
 
     private void _run()

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/servlet/ConversationManagerSessionListener.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/servlet/ConversationManagerSessionListener.java?rev=922201&r1=922200&r2=922201&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/servlet/ConversationManagerSessionListener.java
(original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/servlet/ConversationManagerSessionListener.java
Fri Mar 12 10:36:39 2010
@@ -84,7 +84,10 @@ public class ConversationManagerSessionL
 
     public void contextInitialized(ServletContextEvent event)
     {
-        log.debug("contextInitialized");
+        if (log.isDebugEnabled())
+        {
+            log.debug("contextInitialized");
+        }
         long checkTime = DEFAULT_CHECK_TIME;
         String checkTimeString = event.getServletContext().getInitParameter(CHECK_TIME);
         if (checkTimeString != null)
@@ -102,12 +105,18 @@ public class ConversationManagerSessionL
         {
             log.error("context initialised more than once");
         }
-        log.debug("initialised");
+        if (log.isDebugEnabled())
+        {
+            log.debug("initialised");
+        }
     }
 
     public void contextDestroyed(ServletContextEvent event)
     {
-        log.debug("Context destroyed");
+        if (log.isDebugEnabled())
+        {
+            log.debug("Context destroyed");
+        }
         if (conversationWiperThread != null)
         {
             conversationWiperThread.interrupt();
@@ -148,7 +157,10 @@ public class ConversationManagerSessionL
                 // This call will trigger method "attributeRemoved" below, which will clean
up the wiper thread.
                 // And because the attribute is removed, the post-destroy calls to attributeRemoved
will then
                 // NOT include this (removed) attribute, so multiple attempts to clean it
up will not occur.
-                log.debug("Session containing a ConversationManager has been destroyed (eg
timed out)");
+                if (log.isDebugEnabled())
+                {
+                    log.debug("Session containing a ConversationManager has been destroyed
(eg timed out)");
+                }
                 session.removeAttribute(attrName);
             }
         }
@@ -173,7 +185,10 @@ public class ConversationManagerSessionL
         // (including getId and getAttribute) throw IllegalStateException.
         if (event.getValue() instanceof ConversationManager)
         {
-            log.debug("A ConversationManager instance has been removed from a session");
+            if (log.isDebugEnabled())
+            {
+                log.debug("A ConversationManager instance has been removed from a session");
+            }
             ConversationManager cm = (ConversationManager) event.getValue();
             removeAndInvalidateConversationManager(cm);
         }

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/ScopedBeanTargetSource.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/ScopedBeanTargetSource.java?rev=922201&r1=922200&r2=922201&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/ScopedBeanTargetSource.java
(original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/ScopedBeanTargetSource.java
Fri Mar 12 10:36:39 2010
@@ -69,7 +69,10 @@ public class ScopedBeanTargetSource exte
     public Object getTarget() throws Exception
     {
         final Log log = LogFactory.getLog(ScopedBeanTargetSource.class);
-        log.debug("getRealBean for " + targetBeanName);
+        if (log.isDebugEnabled())
+        {
+            log.debug("getRealBean for " + targetBeanName);
+        }
         return scope.getRealBean(conversationName, targetBeanName, objectFactory);
     }
 }

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/_SpringUtils.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/_SpringUtils.java?rev=922201&r1=922200&r2=922201&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/_SpringUtils.java
(original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/spring/_SpringUtils.java
Fri Mar 12 10:36:39 2010
@@ -143,7 +143,10 @@ public final class _SpringUtils
         // based on code from  Spring ScopedProxyFactoryBean (APL2.0)
         final Log log = LogFactory.getLog(_SpringUtils.class);
 
-        log.debug("newProxy invoked for " + targetBeanName);
+        if (log.isDebugEnabled())
+        {
+            log.debug("newProxy invoked for " + targetBeanName);
+        }
 
         if (!(beanFactory instanceof ConfigurableBeanFactory))
         {

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/basic/BasicFrameworkAdapter.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/basic/BasicFrameworkAdapter.java?rev=922201&r1=922200&r2=922201&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/basic/BasicFrameworkAdapter.java
(original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/basic/BasicFrameworkAdapter.java
Fri Mar 12 10:36:39 2010
@@ -110,7 +110,10 @@ public class BasicFrameworkAdapter exten
 
     public void beginRequest(ServletRequest req, ServletResponse rsp)
     {
-        log.debug("Beginning request");
+        if (log.isDebugEnabled())
+        {
+            log.debug("Beginning request");
+        }
         if (req instanceof HttpServletRequest)
         {
             httpServletRequestThreadLocal.set(req);
@@ -125,7 +128,10 @@ public class BasicFrameworkAdapter exten
 
     public void endRequest()
     {
-        log.debug("Ending request");
+        if (log.isDebugEnabled())
+        {
+            log.debug("Ending request");
+        }
         FrameworkAdapter.setCurrentInstance(null);
         httpServletRequestThreadLocal.set(null);
         httpServletResponseThreadLocal.set(null);

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/basic/BasicFrameworkAdapterFilter.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/basic/BasicFrameworkAdapterFilter.java?rev=922201&r1=922200&r2=922201&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/basic/BasicFrameworkAdapterFilter.java
(original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/basic/BasicFrameworkAdapterFilter.java
Fri Mar 12 10:36:39 2010
@@ -71,7 +71,10 @@ public class BasicFrameworkAdapterFilter
             return;
         }
 
-        log.debug("doFilter");
+        if (log.isDebugEnabled())
+        {
+            log.debug("doFilter");
+        }
         try
         {
             adapter.beginRequest(req, rsp);

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/jsf/JsfFrameworkAdapterFilter.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/jsf/JsfFrameworkAdapterFilter.java?rev=922201&r1=922200&r2=922201&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/jsf/JsfFrameworkAdapterFilter.java
(original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/jsf/JsfFrameworkAdapterFilter.java
Fri Mar 12 10:36:39 2010
@@ -77,7 +77,10 @@ public class JsfFrameworkAdapterFilter i
             return;
         }
 
-        log.debug("doFilter");
+        if (log.isDebugEnabled())
+        {
+            log.debug("doFilter");
+        }
         try
         {
             adapter.beginRequest();

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/springBasic/SpringBasicFrameworkAdapterFilter.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/springBasic/SpringBasicFrameworkAdapterFilter.java?rev=922201&r1=922200&r2=922201&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/springBasic/SpringBasicFrameworkAdapterFilter.java
(original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/frameworkAdapter/springBasic/SpringBasicFrameworkAdapterFilter.java
Fri Mar 12 10:36:39 2010
@@ -74,7 +74,10 @@ public class SpringBasicFrameworkAdapter
             return;
         }
 
-        log.debug("doFilter");
+        if (log.isDebugEnabled())
+        {
+            log.debug("doFilter");
+        }
         try
         {
             adapter.beginRequest(req, rsp);

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/jsf/ContextLockRequestHandler.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/jsf/ContextLockRequestHandler.java?rev=922201&r1=922200&r2=922201&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/jsf/ContextLockRequestHandler.java
(original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/jsf/ContextLockRequestHandler.java
Fri Mar 12 10:36:39 2010
@@ -103,12 +103,18 @@ class ContextLockRequestHandler implemen
                 }
                 else
                 {
-                    log.debug("No conversation context specified for this request");
+                    if (log.isDebugEnabled())
+                    {
+                        log.debug("No conversation context specified for this request");
+                    }
                 }
             }
             else
             {
-                log.debug("No conversation manager exists for this request");
+                if (log.isDebugEnabled())
+                {
+                    log.debug("No conversation manager exists for this request");
+                }
             }
         }
     }
@@ -127,9 +133,11 @@ class ContextLockRequestHandler implemen
             }
             else
             {
-                log.debug(
-                  "Odd situation: lock never acquired. Perhaps InterruptedException occurred"
-                  + " while waiting to get the context lock?");
+                if (log.isDebugEnabled())
+                {
+                    log.debug("Odd situation: lock never acquired. Perhaps InterruptedException
occurred"
+                            + " while waiting to get the context lock?");
+                }
             }
         }
     }

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/jsf/FrameworkAdapterRequestHandler.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/jsf/FrameworkAdapterRequestHandler.java?rev=922201&r1=922200&r2=922201&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/jsf/FrameworkAdapterRequestHandler.java
(original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/jsf/FrameworkAdapterRequestHandler.java
Fri Mar 12 10:36:39 2010
@@ -44,11 +44,17 @@ class FrameworkAdapterRequestHandler imp
 
     public void init(FacesContext facesContext) throws FacesException
     {
-        log.debug("init");
+        if (log.isDebugEnabled())
+        {
+            log.debug("init");
+        }
 
         if (FrameworkAdapter.getCurrentInstance() == null)
         {
-            log.debug("creating jsfFrameworkAdapter");
+            if (log.isDebugEnabled())
+            {
+                log.debug("creating jsfFrameworkAdapter");
+            }
             // No filter has yet initialised the adapter, so do it here.
             String conversationMessagerClass = getConversationMessagerClass(facesContext);
             adapter = new JsfFrameworkAdapter(conversationMessagerClass);

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/jsf/OrchestraFacesContextFactory.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/jsf/OrchestraFacesContextFactory.java?rev=922201&r1=922200&r2=922201&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/jsf/OrchestraFacesContextFactory.java
(original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/jsf/OrchestraFacesContextFactory.java
Fri Mar 12 10:36:39 2010
@@ -66,7 +66,10 @@ public class OrchestraFacesContextFactor
             final Object response, 
             final Lifecycle lifecycle) throws FacesException
     {
-        log.debug("getFacesContext: entry");
+        if (log.isDebugEnabled())
+        {
+            log.debug("getFacesContext: entry");
+        }
         final FacesContext facesContext = original.getFacesContext(context, request, response,
lifecycle);
         if (facesContext == null)
         {
@@ -99,14 +102,20 @@ public class OrchestraFacesContextFactor
             // to call release on, even though it is not the "current instance".
             // Not making the wrapper the current instance saves a little bit
             // of performance..
-            log.debug("getFacesContext: creating custom instance");
+            if (log.isDebugEnabled())
+            {
+                log.debug("getFacesContext: creating custom instance");
+            }
             return new _FacesContextWrapper(facesContext, false)
             {
                 // Constructor. Note that the parent constructor runs first,
                 // which means that FacesContext.currentInstance is valid
                 // at the time that the RequestHandler objects run.
                 {
-                    log.debug("getFacesContext: running inner constructor");
+                    if (log.isDebugEnabled())
+                    {
+                        log.debug("getFacesContext: running inner constructor");
+                    }
                     ListIterator i = handlers.listIterator();
                     try
                     {
@@ -143,7 +152,10 @@ public class OrchestraFacesContextFactor
                     // class should run before the parent release. This also
                     // ensures that FacesContext.currentInstance() is still
                     // valid when the RequestHandler objects run.
-                    log.debug("Running release");
+                    if (log.isDebugEnabled())
+                    {
+                        log.debug("Running release");
+                    }
                     
                     // Here, run the registered RequestHandlers in reverse order.
                     // Unfortunately, there is no ReverseListIterator class, so
@@ -159,7 +171,10 @@ public class OrchestraFacesContextFactor
     
                     // And invoke the parent release (which will invoke release
                     // on the target instance that this object decorates).
-                    log.debug("Release completed");
+                    if (log.isDebugEnabled())
+                    {
+                        log.debug("Release completed");
+                    }
                     super.release();
                 }
                 

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/jsf/_PortletFacesContextWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/jsf/_PortletFacesContextWrapper.java?rev=922201&r1=922200&r2=922201&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/jsf/_PortletFacesContextWrapper.java
(original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/jsf/_PortletFacesContextWrapper.java
Fri Mar 12 10:36:39 2010
@@ -80,7 +80,10 @@ public class _PortletFacesContextWrapper
             final boolean install, boolean finit, String fnextToken, List fhandlers,
             final RequestHandler fcontextLockHandler )
     {
-        log.debug("getFacesContext: running inner constructor");
+        if (log.isDebugEnabled())
+        {
+            log.debug("getFacesContext: running inner constructor");
+        }
 
         _facesContext = facesContext;
 
@@ -154,7 +157,10 @@ public class _PortletFacesContextWrapper
 
     public void release()
     {
-        log.debug("Running release");
+        if (log.isDebugEnabled())
+        {
+            log.debug("Running release");
+        }
         RequestType type = ExternalContextUtils
                 .getRequestType(getExternalContext());
         if (RequestType.RENDER.equals(type) || 
@@ -206,7 +212,10 @@ public class _PortletFacesContextWrapper
         {
             log.error("Problem deinitialising RequestHandler", e);
         }
-        log.debug("Release completed");
+        if (log.isDebugEnabled())
+        {
+            log.debug("Release completed");
+        }
         _facesContext.release();
     }
 

Modified: myfaces/orchestra/trunk/core12/src/main/java/org/apache/myfaces/orchestra/lib/jsf/_PortletFacesContextWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core12/src/main/java/org/apache/myfaces/orchestra/lib/jsf/_PortletFacesContextWrapper.java?rev=922201&r1=922200&r2=922201&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core12/src/main/java/org/apache/myfaces/orchestra/lib/jsf/_PortletFacesContextWrapper.java
(original)
+++ myfaces/orchestra/trunk/core12/src/main/java/org/apache/myfaces/orchestra/lib/jsf/_PortletFacesContextWrapper.java
Fri Mar 12 10:36:39 2010
@@ -77,7 +77,10 @@ public class _PortletFacesContextWrapper
             final boolean install, boolean finit, String fnextToken, List fhandlers,
             final RequestHandler fcontextLockHandler )
     {
-        log.debug("getFacesContext: running inner constructor");
+        if (log.isDebugEnabled())
+        {
+            log.debug("getFacesContext: running inner constructor");
+        }
 
         _facesContext = facesContext;
 
@@ -151,7 +154,10 @@ public class _PortletFacesContextWrapper
 
     public void release()
     {
-        log.debug("Running release");
+        if (log.isDebugEnabled())
+        {
+            log.debug("Running release");
+        }
         RequestType type = ExternalContextUtils
                 .getRequestType(getExternalContext());
         if (RequestType.RENDER.equals(type) || 
@@ -203,7 +209,10 @@ public class _PortletFacesContextWrapper
         {
             log.error("Problem deinitialising RequestHandler", e);
         }
-        log.debug("Release completed");
+        if (log.isDebugEnabled())
+        {
+            log.debug("Release completed");
+        }
         _facesContext.release();
     }
 

Modified: myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/lib/jsf/_PortletFacesContextWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/lib/jsf/_PortletFacesContextWrapper.java?rev=922201&r1=922200&r2=922201&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/lib/jsf/_PortletFacesContextWrapper.java
(original)
+++ myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/lib/jsf/_PortletFacesContextWrapper.java
Fri Mar 12 10:36:39 2010
@@ -70,7 +70,10 @@ public class _PortletFacesContextWrapper
             final boolean install, boolean finit, String fnextToken, List fhandlers,
             final RequestHandler fcontextLockHandler )
     {
-        log.debug("getFacesContext: running inner constructor");
+        if (log.isDebugEnabled())
+        {
+            log.debug("getFacesContext: running inner constructor");
+        }
 
         _facesContext = facesContext;
 
@@ -144,7 +147,10 @@ public class _PortletFacesContextWrapper
 
     public void release()
     {
-        log.debug("Running release");
+        if (log.isDebugEnabled())
+        {
+            log.debug("Running release");
+        }
         RequestType type = ExternalContextUtils
                 .getRequestType(getExternalContext());
         if (RequestType.RENDER.equals(type) || 
@@ -196,7 +202,10 @@ public class _PortletFacesContextWrapper
         {
             log.error("Problem deinitialising RequestHandler", e);
         }
-        log.debug("Release completed");
+        if (log.isDebugEnabled())
+        {
+            log.debug("Release completed");
+        }
         getWrapped().release();
     }
     

Modified: myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/FlowHandler.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/FlowHandler.java?rev=922201&r1=922200&r2=922201&view=diff
==============================================================================
--- myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/FlowHandler.java
(original)
+++ myfaces/orchestra/trunk/flow/src/main/java/org/apache/myfaces/orchestra/flow/FlowHandler.java
Fri Mar 12 10:36:39 2010
@@ -109,12 +109,18 @@ public class FlowHandler
         FlowConfig config = getFlowConfig(facesContext, viewId);
         if (config == null)
         {
-            log.debug("No flowaccept for " + viewId);
+            if (log.isDebugEnabled())
+            {
+                log.debug("No flowaccept for " + viewId);
+            }
             return null;
         }
 
         FlowAccept fa = config.getFlowAccept();
-        log.debug("FlowAccept for " + viewId + " is " + String.valueOf(fa));
+        if (log.isDebugEnabled())
+        {
+            log.debug("FlowAccept for " + viewId + " is " + String.valueOf(fa));
+        }
         return fa;
     }
 
@@ -595,11 +601,17 @@ public class FlowHandler
             msg.append("Invocation of flow without callee declaration. ");
             msg.append("Calling view is " + flowInfo.getCallerViewId() + ". ");
             msg.append("Called view is " + newViewId + ".");
-            log.debug("isNewFlowEntry: Error: " + msg.toString());
+            if (log.isDebugEnabled())
+            {
+                log.debug("isNewFlowEntry: Error: " + msg.toString());
+            }
             throw new OrchestraException(msg.toString());
         }
 
-        log.debug("isNewFlowEntry: new flow detected.");
+        if (log.isDebugEnabled())
+        {
+            log.debug("isNewFlowEntry: new flow detected.");
+        }
         // validate flowCall against flowAccept. TODO: discard flow stacks on error?
         validateCall(flowInfo.getFlowCall(), flowAccept);
 



Mime
View raw message