You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ga...@apache.org on 2011/04/22 17:54:00 UTC

svn commit: r1095952 - /geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java

Author: gawor
Date: Fri Apr 22 15:54:00 2011
New Revision: 1095952

URL: http://svn.apache.org/viewvc?rev=1095952&view=rev
Log:
logger might not be initialized

Modified:
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java?rev=1095952&r1=1095951&r2=1095952&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java (original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java Fri Apr 22 15:54:00 2011
@@ -211,17 +211,17 @@ public class GeronimoStandardContext ext
                                 try {
                                     classSet.add(bundle.loadClass(cls));
                                 } catch (ClassNotFoundException e) {
-                                    logger.warn("Fail to load class " + cls + " interested by ServletContainerInitializer " + servletContainerInitializerClassName, e);
+                                    getLogger().warn("Fail to load class " + cls + " interested by ServletContainerInitializer " + servletContainerInitializerClassName, e);
                                 }
                             }
                             addServletContainerInitializer(servletContainerInitializer, classSet);
                         }
                     } catch (IllegalAccessException e) {
-                        logger.error("Fail to initialize ServletContainerInitializer " + servletContainerInitializerClassName, e);
+                        getLogger().error("Fail to initialize ServletContainerInitializer " + servletContainerInitializerClassName, e);
                     } catch (InstantiationException e) {
-                        logger.error("Fail to initialize ServletContainerInitializer " + servletContainerInitializerClassName, e);
+                        getLogger().error("Fail to initialize ServletContainerInitializer " + servletContainerInitializerClassName, e);
                     } catch (ClassNotFoundException e) {
-                        logger.error("Fail to initialize ServletContainerInitializer " + servletContainerInitializerClassName, e);
+                        getLogger().error("Fail to initialize ServletContainerInitializer " + servletContainerInitializerClassName, e);
                     }
                 }
             }
@@ -337,8 +337,8 @@ public class GeronimoStandardContext ext
         //Set context attributes via reflection
         for (Map.Entry<String, String> entry : contextAttributes.entrySet()) {
             if (!IntrospectionUtils.setProperty(this, entry.getKey(), entry.getValue())) {
-                if (logger.isWarnEnabled()) {
-                    logger.warn("Fail to configure attribute " + entry.getKey() + " with value " + entry.getValue() + ", please check whether the attribute exists or is typo correctly");
+                if (getLogger().isWarnEnabled()) {
+                    getLogger().warn("Fail to configure attribute " + entry.getKey() + " with value " + entry.getValue() + ", please check whether the attribute exists or is typo correctly");
                 }
             }
         }
@@ -495,13 +495,13 @@ public class GeronimoStandardContext ext
                 try {
                     applicationPolicyConfigurationManager.updateApplicationPolicyConfiguration(contextIdPermissionsMap);
                 } catch (LoginException e) {
-                    logger.error("Fail to set application policy configurations", e);
+                    getLogger().error("Fail to set application policy configurations", e);
                     throw new RuntimeException("Fail to set application policy configurations", e);
                 } catch (PolicyContextException e) {
-                    logger.error("Fail to set application policy configurations", e);
+                    getLogger().error("Fail to set application policy configurations", e);
                     throw new RuntimeException("Fail to set application policy configurations", e);
                 } catch (ClassNotFoundException e) {
-                    logger.error("Fail to set application policy configurations", e);
+                    getLogger().error("Fail to set application policy configurations", e);
                     throw new RuntimeException("Fail to set application policy configurations", e);
                 } finally {
                     //Clear SpecSecurityBuilder
@@ -612,7 +612,7 @@ public class GeronimoStandardContext ext
                         extractionRequired = false;
                     }
                 } catch (Exception e) {
-                    logger.warn("Unable to compare the timestamp in the file " + completeFlagFile.getAbsolutePath() + ", resources will be re-extracted", e);
+                    getLogger().warn("Unable to compare the timestamp in the file " + completeFlagFile.getAbsolutePath() + ", resources will be re-extracted", e);
                     //ignore
                 }
             }