[teiid-commits] teiid SVN: r2518 - in branches/7.1.x: runtime/src/main/java/org/teiid/transport and 1 other directory.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Wed Sep 1 17:46:44 EDT 2010


Author: rareddy
Date: 2010-09-01 17:46:44 -0400 (Wed, 01 Sep 2010)
New Revision: 2518

Modified:
   branches/7.1.x/build/kits/jboss-container/deploy/teiid/teiid-jboss-beans.xml
   branches/7.1.x/runtime/src/main/java/org/teiid/transport/SocketConfiguration.java
Log:
TEIID-1235: Fixed the address binding issue with 0.0.0.0, also made the configuration open such that user can add the host address separate from the JBoss AS configuration. by default it chooses same bind address defined for JBoss AS

Modified: branches/7.1.x/build/kits/jboss-container/deploy/teiid/teiid-jboss-beans.xml
===================================================================
--- branches/7.1.x/build/kits/jboss-container/deploy/teiid/teiid-jboss-beans.xml	2010-09-01 20:28:35 UTC (rev 2517)
+++ branches/7.1.x/build/kits/jboss-container/deploy/teiid/teiid-jboss-beans.xml	2010-09-01 21:46:44 UTC (rev 2518)
@@ -111,7 +111,7 @@
     <!-- JDBC Socket connection properties (SSL see below) -->
     <bean name="JdbcSocketConfiguration" class="org.teiid.transport.SocketConfiguration">
         <property name="enabled">true</property>
-        <!-- property name="bindAddress">localhost</property-->
+        <property name="bindAddress">${jboss.bind.address}</property>
         <property name="portNumber">31000</property>
         <!-- Max number of threads dedicated to initial request processing (default 15) -->
         <property name="maxSocketThreads">15</property>
@@ -139,7 +139,7 @@
     <!-- Admin Socket connection settings (SSL see below) -->
     <bean name="AdminSocketConfiguration" class="org.teiid.transport.SocketConfiguration">
         <property name="enabled">true</property>
-        <!-- property name="bindAddress">localhost</property-->
+        <property name="bindAddress">${jboss.bind.address}</property>
         <property name="portNumber">31443</property>
         <!-- Max number of threads dedicated to Admin and initial request processing (default 4) -->
         <property name="maxSocketThreads">4</property>
@@ -167,7 +167,7 @@
     <!-- JDBC Socket connection properties (SSL see below) -->
     <bean name="OdbcSocketConfiguration" class="org.teiid.transport.SocketConfiguration">
         <property name="enabled">true</property>
-        <!-- property name="bindAddress">localhost</property-->
+        <property name="bindAddress">${jboss.bind.address}</property>
         <property name="portNumber">35432</property>
         <!-- Max number of threads dedicated to initial request processing (default 15) -->
         <property name="maxSocketThreads">15</property>

Modified: branches/7.1.x/runtime/src/main/java/org/teiid/transport/SocketConfiguration.java
===================================================================
--- branches/7.1.x/runtime/src/main/java/org/teiid/transport/SocketConfiguration.java	2010-09-01 20:28:35 UTC (rev 2517)
+++ branches/7.1.x/runtime/src/main/java/org/teiid/transport/SocketConfiguration.java	2010-09-01 21:46:44 UTC (rev 2518)
@@ -33,8 +33,6 @@
 
 @ManagementObject(componentType=@ManagementComponent(type="teiid",subtype="dqp"), properties=ManagementProperties.EXPLICIT)
 public class SocketConfiguration {
-	private static final String ANY = "0.0.0.0"; //$NON-NLS-1$
-	private static final String JBOSS_SERVER_BIND_ADDRESS = "jboss.bind.address";
 	
 	private int outputBufferSize;
 	private int inputBufferSize;
@@ -72,13 +70,8 @@
  	
 	private void resolveHostName() {
 		try {
-			// if host name not specified try to get it from the JBoss configuration
-			if (this.hostName == null) {
-				this.hostName = System.getProperty(JBOSS_SERVER_BIND_ADDRESS);
-			}
-			
 			// if not defined then see if can bind to local address; if supplied resolve it by name
-			if (this.hostName == null || ANY.equals(this.hostName)) {
+			if (this.hostName == null) {
 				this.hostName = InetAddress.getLocalHost().getHostName();
 			}
 		} catch (UnknownHostException e) {
@@ -117,6 +110,7 @@
 
 	public InetAddress getHostAddress() {
 		resolveHostName();
+		
 		if (this.hostAddress != null) {
 			return hostAddress;
 		}



More information about the teiid-commits mailing list