[jboss-svn-commits] JBL Code SVN: r31948 - labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/http/configurators.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Mar 4 17:22:59 EST 2010


Author: kevin.conner at jboss.com
Date: 2010-03-04 17:22:59 -0500 (Thu, 04 Mar 2010)
New Revision: 31948

Modified:
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/http/configurators/HttpProtocol.java
Log:
remove static protocol behaviour: JBESB-3184

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/http/configurators/HttpProtocol.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/http/configurators/HttpProtocol.java	2010-03-04 22:16:00 UTC (rev 31947)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/http/configurators/HttpProtocol.java	2010-03-04 22:22:59 UTC (rev 31948)
@@ -87,33 +87,31 @@
             return;
         }
         
+        final int defaultPort ;
         boolean secure = "https".equals(scheme);
         if (secure) {
             factory = properties.getProperty("protocol-socket-factory", StrictSSLProtocolSocketFactory.class.getName());
             keyMaterial = getKeyMaterial(properties);
-            if (port == -1) {
-            	port = 443;
-            }
+            defaultPort = 443;
         } else {
             factory = properties.getProperty("protocol-socket-factory", DefaultProtocolSocketFactory.class.getName());
-            if (port == -1) {
-            	port = 80;
-            }
+            defaultPort = 80;
         }
+        if (port <= 0) {
+            port = defaultPort ;
+        }
         assertPropertySetAndNotBlank(factory, "protocol-socket-factory");
         socketFactory = createFactoryClass(factory, keyMaterial, properties);
         
         // And finally... configure the host with the protocol....
         protocol = new Protocol(scheme, socketFactory, port);
-        Protocol.registerProtocol(scheme, protocol);
         // these lines have to happen after registerProtocol, otherwise they pick up the wrong static value
         if (secure) {
         	setHttpsProxyHost(httpClient, properties);
         } else {
         	setHttpProxyHost(httpClient, properties);
         }
-        // JBESB-3021: the registerProtocol map is static (yuck!); we need to make sure to use the right protocol.
-        // See HttpRouter (JBESB-3021 comments) for more information.
+        // Use our own protocol, see JBESB-3021 comments for more information.
         httpClient.getHostConfiguration().setHost(targetURI.getHost(), port, protocol);
     }
     



More information about the jboss-svn-commits mailing list