tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r932798 - /tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java
Date Sat, 10 Apr 2010 22:28:05 GMT
Author: markt
Date: Sat Apr 10 22:28:05 2010
New Revision: 932798

URL: http://svn.apache.org/viewvc?rev=932798&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48613
Only attempt APR initialization if the <Listener> has been specified (fhanik/kkolinko)

Modified:
    tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java

Modified: tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java
URL: http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java?rev=932798&r1=932797&r2=932798&view=diff
==============================================================================
--- tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java
(original)
+++ tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/core/AprLifecycleListener.java
Sat Apr 10 22:28:05 2010
@@ -46,6 +46,7 @@ public class AprLifecycleListener
 
     private static Log log = LogFactory.getLog(AprLifecycleListener.class);
 
+    private static boolean instanceCreated = false;
     /**
      * The string manager for this package.
      */
@@ -71,9 +72,14 @@ public class AprLifecycleListener
     protected static boolean aprAvailable = false;
 
     public static boolean isAprAvailable() {
-        init();
+        //https://issues.apache.org/bugzilla/show_bug.cgi?id=48613
+        if (instanceCreated) init();
         return aprAvailable;
     }
+    
+    public AprLifecycleListener() {
+        instanceCreated = true;
+    }
 
     // ---------------------------------------------- LifecycleListener Methods
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message