geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r783183 - in /geronimo/server/trunk/plugins: console/console-base-portlets/src/main/resources/ console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/connector/ tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/
Date Wed, 10 Jun 2009 02:45:39 GMT
Author: xuhaihong
Date: Wed Jun 10 02:45:39 2009
New Revision: 783183

URL: http://svn.apache.org/viewvc?rev=783183&view=rev
Log:
GERONIMO-3389 java.lang.UnsatisfiedLinkError is thrown when create a Tomcat APR HTTP Connector
(Patch from Shawn Jiang)

Modified:
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/resources/consolebase.properties
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/resources/consolebase_zh.properties
    geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/connector/normal.jsp
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/resources/consolebase.properties
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/resources/consolebase.properties?rev=783183&r1=783182&r2=783183&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/resources/consolebase.properties
(original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/resources/consolebase.properties
Wed Jun 10 02:45:39 2009
@@ -721,6 +721,7 @@
 webmanager.connector.editHTTP.addNewListener             = Add new {0} listener for {1}
 webmanager.connector.help.content                        = The Connector Manager displays
connections of all types and provide the capability to modify connections for this web server.

 webmanager.connector.normal.addNew                       = Add new
+webmanager.connector.normal.addNewNote                   = <p>Notes:</p><ul><li>To
enable APR connectors creation, you need to install APR native library firstly.</li></ul>

 webmanager.connector.normal.addNewListener               = Add new {0} listener for {1}
 webmanager.connector.normal.connectorsFor                = Connectors for {0}
 webmanager.connector.normal.consoleNavailable            = Console application will not be
available if {0} is stopped.  Stop {1} ?

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/resources/consolebase_zh.properties
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/resources/consolebase_zh.properties?rev=783183&r1=783182&r2=783183&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/resources/consolebase_zh.properties
(original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/resources/consolebase_zh.properties
Wed Jun 10 02:45:39 2009
@@ -721,6 +721,7 @@
 webmanager.connector.editHTTP.addNewListener             = \u4E3A{1}\u6DFB\u52A0\u76D1\u542C\u5668{0}
 webmanager.connector.help.content                        = \u8FDE\u63A5\u7BA1\u7406\u5668\u663E\u793A\u4E86\u6240\u6709\u7C7B\u578B\u7684\u94FE\u63A5\uFF0C\u5E76\u4E14\u80FD\u591F\u4FEE\u6539\u8FD9\u4E2AWeb\u670D\u52A1\u5668\u7684\u8FDE\u63A5\u3002=
 webmanager.connector.normal.addNew                       = \u6DFB\u52A0
+webmanager.connector.normal.addNewNote                   = <p>Notes:</p><ul><li>To
enable APR connectors creation, you need to install APR native library firstly.</li></ul>
 webmanager.connector.normal.addNewListener               = \u4E3A{1}\u6DFB\u52A0\u65B0\u7684{0}\u76D1\u542C\u5668=
 webmanager.connector.normal.connectorsFor                = {0}\u7684\u8FDE\u63A5\u5668=
 webmanager.connector.normal.consoleNavailable            = \u505C\u7528{0}\u5C06\u4F7F\u63A7\u5236\u53F0\u5E94\u7528\u65E0\u6CD5\u542F\u52A8.\u505C\u7528{1}?

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/connector/normal.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/connector/normal.jsp?rev=783183&r1=783182&r2=783183&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/connector/normal.jsp
(original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/connector/normal.jsp
Wed Jun 10 02:45:39 2009
@@ -114,5 +114,6 @@
          </portlet:actionURL>">${connectorType.description}</a>
 </c:forEach>
 </ul>
+<fmt:message key="webmanager.connector.normal.addNewNote"/>
 
 </c:forEach>

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java?rev=783183&r1=783182&r2=783183&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java
Wed Jun 10 02:45:39 2009
@@ -27,6 +27,7 @@
 
 import javax.net.ssl.KeyManagerFactory;
 
+import org.apache.catalina.connector.Connector;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.geronimo.gbean.AbstractName;
@@ -85,6 +86,14 @@
             AJP
     );
     
+    private static List<ConnectorType> NON_APR_CONNECTOR_TYPES = Arrays.asList(
+            HTTP_BIO,
+            HTTPS_BIO,
+            HTTP_NIO,
+            HTTPS_NIO,
+            AJP
+    );
+    
     private static Map<ConnectorType, List<ConnectorAttribute>> CONNECTOR_ATTRIBUTES
= new HashMap<ConnectorType, List<ConnectorAttribute>>();
 
     static {
@@ -283,7 +292,10 @@
     }
 
     public List<ConnectorType> getConnectorTypes() {
-        return CONNECTOR_TYPES;
+        if (isNativeAPRLibInstalled())
+            return CONNECTOR_TYPES;
+        else
+            return NON_APR_CONNECTOR_TYPES;
     }
 
     public List<ConnectorAttribute> getConnectorAttributes(ConnectorType connectorType)
{
@@ -543,6 +555,20 @@
         return connectorType;
     }
     
+    private boolean isNativeAPRLibInstalled() {
+
+        try {
+        	Connector connector = new Connector("HTTP/1.1");
+            if (!connector.getProtocolHandlerClassName().equalsIgnoreCase("org.apache.coyote.http11.Http11AprProtocol"))
{        
+               return false;
+            } 
+        } catch (Exception e) {
+           
+           return false;
+        }
+        return true;
+    }
+    
     public static final GBeanInfo GBEAN_INFO;
 
     static {



Mime
View raw message