[jboss-cvs] JBossAS SVN: r88391 - in branches/Branch_5_x: connector/src/etc/example-config and 6 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu May 7 23:48:50 EDT 2009
Author: bstansberry at jboss.com
Date: 2009-05-07 23:48:50 -0400 (Thu, 07 May 2009)
New Revision: 88391
Modified:
branches/Branch_5_x/cluster/src/etc/ha-legacy-jboss-beans.xml
branches/Branch_5_x/cluster/src/etc/hajndi-jboss-beans.xml
branches/Branch_5_x/connector/src/etc/example-config/hsqldb-ds.xml
branches/Branch_5_x/jbossas/jmx-remoting/src/etc/jboss-service.xml
branches/Branch_5_x/server/src/etc/conf/all/bindings-jboss-beans.xml
branches/Branch_5_x/server/src/etc/conf/all/jboss-service.xml
branches/Branch_5_x/server/src/etc/deploy/legacy-invokers-service.xml
branches/Branch_5_x/tomcat/src/resources/jboss-beans.xml
branches/Branch_5_x/varia/src/main/org/jboss/services/binding/ServiceBindingManager.java
branches/Branch_5_x/varia/src/resources/services/snmp/deploy/META-INF/jboss-service.xml
Log:
[JBAS-6876] Configure binding interface via ServiceBindingManager
Modified: branches/Branch_5_x/cluster/src/etc/ha-legacy-jboss-beans.xml
===================================================================
--- branches/Branch_5_x/cluster/src/etc/ha-legacy-jboss-beans.xml 2009-05-08 03:14:24 UTC (rev 88390)
+++ branches/Branch_5_x/cluster/src/etc/ha-legacy-jboss-beans.xml 2009-05-08 03:48:50 UTC (rev 88391)
@@ -20,7 +20,11 @@
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=invoker,type=jrmpha", exposedInterface=org.jboss.invocation.jrmp.server.JRMPInvokerMBean.class, registerDirectly=true)</annotation>
- <property name="serverAddress">${jboss.bind.address}</property>
+ <property name="serverAddress">
+ <!-- Get the interface from the ServiceBindingManager -->
+ <value-factory bean="ServiceBindingManager" method="getStringBinding"
+ parameter="jboss:service=invoker,type=jrmpha"/>
+ </property>
<property name="RMIObjectPort">
<!-- Get the port from the ServiceBindingManager -->
<value-factory bean="ServiceBindingManager" method="getIntBinding"
@@ -28,7 +32,6 @@
</property>
<!--
- <property name="RMIObjectPort">0</property>
<property name="RMIClientSocketFactory">custom</property>
<property name="RMIServerSocketFactory">custom</property>
-->
@@ -50,7 +53,11 @@
<property name="maxPoolSize">300</property>
<property name="clientMaxPoolSize">300</property>
<property name="socketTimeout">60000</property>
- <property name="serverBindAddress">${jboss.bind.address}</property>
+ <property name="serverBindAddress">
+ <!-- Get the interface from the ServiceBindingManager -->
+ <value-factory bean="ServiceBindingManager" method="getStringBinding"
+ parameter="jboss:service=invoker,type=pooledha"/>
+ </property>
<property name="serverBindPort">
<!-- Get the port from the ServiceBindingManager -->
<value-factory bean="ServiceBindingManager" method="getIntBinding"
Modified: branches/Branch_5_x/cluster/src/etc/hajndi-jboss-beans.xml
===================================================================
--- branches/Branch_5_x/cluster/src/etc/hajndi-jboss-beans.xml 2009-05-08 03:14:24 UTC (rev 88390)
+++ branches/Branch_5_x/cluster/src/etc/hajndi-jboss-beans.xml 2009-05-08 03:48:50 UTC (rev 88391)
@@ -30,7 +30,14 @@
<property name="lookupPool"><inject bean="jboss.system:service=ThreadPool"/></property>
<!-- Bind address of bootstrap endpoint -->
- <property name="bindAddress">${jboss.bind.address}</property>
+ <property name="bindAddress">
+ <!-- Get the interface from the ServiceBindingManager -->
+ <value-factory bean="ServiceBindingManager" method="getStringBinding">
+ <parameter>jboss:service=HAJNDI</parameter>
+ <parameter>Port</parameter>
+ <parameter><null/></parameter>
+ </value-factory>
+ </property>
<!-- Port on which the HA-JNDI stub is made available -->
<property name="port">
<!-- Get the port from the ServiceBindingManager -->
@@ -41,7 +48,14 @@
</property>
<!-- Bind address of the HA-JNDI RMI endpoint -->
- <property name="rmiBindAddress">${jboss.bind.address}</property>
+ <property name="rmiBindAddress">
+ <!-- Get the port from the ServiceBindingManager -->
+ <value-factory bean="ServiceBindingManager" method="getStringBinding">
+ <parameter>jboss:service=HAJNDI</parameter>
+ <parameter>RmiPort</parameter>
+ <parameter><null/></parameter>
+ </value-factory>
+ </property>
<!-- RmiPort to be used by the HA-JNDI service once bound. 0 => auto. -->
<property name="rmiPort">
@@ -57,16 +71,12 @@
<!-- A flag to disable the auto discovery via multicast -->
<property name="discoveryDisabled">false</property>
- <!-- Set the auto-discovery bootstrap multicast bind address. If not
- specified and a BindAddress is specified, the BindAddress will be used. -->
- <property name="autoDiscoveryBindAddress">${jboss.bind.address}</property>
-
<!-- Multicast Address and group port used for auto-discovery -->
<property name="autoDiscoveryAddress">
<!-- Get the multicast address from the ServiceBindingManager -->
<value-factory bean="ServiceBindingManager" method="getStringBinding">
<parameter>jboss:service=HAJNDI</parameter>
- <parameter>AutoDiscoveryMulticastAddress</parameter>
+ <parameter>AutoDiscovery</parameter>
<parameter><null/></parameter>
</value-factory>
</property>
@@ -74,9 +84,19 @@
<!-- Get the port from the ServiceBindingManager -->
<value-factory bean="ServiceBindingManager" method="getIntBinding">
<parameter>jboss:service=HAJNDI</parameter>
- <parameter>AutoDiscoveryPort</parameter>
+ <parameter>AutoDiscovery</parameter>
</value-factory>
</property>
+ <!-- Interface on which to listen for auto-discovery bootstrap multicasts.
+ If not specified and a BindAddress is specified, the BindAddress will be used. -->
+ <property name="autoDiscoveryBindAddress">
+ <!-- Get the multicast address from the ServiceBindingManager -->
+ <value-factory bean="ServiceBindingManager" method="getStringBinding">
+ <parameter>jboss:service=HAJNDI</parameter>
+ <parameter>AutoDiscoveryInterface</parameter>
+ <parameter><null/></parameter>
+ </value-factory>
+ </property>
<!-- The TTL (time-to-live) for autodiscovery IP multicast packets -->
<property name="autoDiscoveryTTL">16</property>
Modified: branches/Branch_5_x/connector/src/etc/example-config/hsqldb-ds.xml
===================================================================
--- branches/Branch_5_x/connector/src/etc/example-config/hsqldb-ds.xml 2009-05-08 03:14:24 UTC (rev 88390)
+++ branches/Branch_5_x/connector/src/etc/example-config/hsqldb-ds.xml 2009-05-08 03:48:50 UTC (rev 88391)
@@ -97,8 +97,11 @@
<attribute name="Port">
<value-factory bean="ServiceBindingManager" method="getIntBinding"
parameter="jboss:service=Hypersonic"/>
- </attribute>
- <attribute name="BindAddress">${jboss.bind.address}</attribute>
+ </attribute>
+ <attribute name="BindAddress">
+ <value-factory bean="ServiceBindingManager" method="getStringBinding"
+ parameter="jboss:service=Hypersonic"/>
+ </attribute>
<attribute name="Silent">true</attribute>
<attribute name="Database">default</attribute>
<attribute name="Trace">false</attribute>
Modified: branches/Branch_5_x/jbossas/jmx-remoting/src/etc/jboss-service.xml
===================================================================
--- branches/Branch_5_x/jbossas/jmx-remoting/src/etc/jboss-service.xml 2009-05-08 03:14:24 UTC (rev 88390)
+++ branches/Branch_5_x/jbossas/jmx-remoting/src/etc/jboss-service.xml 2009-05-08 03:48:50 UTC (rev 88391)
@@ -8,7 +8,11 @@
<mbean code="org.jboss.mx.remoting.service.JMXConnectorServerService"
name="jboss.remoting:service=JMXConnectorServer,protocol=rmi"
display-name="JMX Connector Server (RMI)">
- <attribute name="BindAddress">${jboss.bind.address}</attribute>
+ <attribute name="BindAddress">
+ <!-- Get the port from the ServiceBindingManager -->
+ <value-factory bean="ServiceBindingManager" method="getStringBinding"
+ parameter="jboss.remoting:service=JMXConnectorServer,protocol=rmi"/>
+ </attribute>
<!-- if comment this out, will use 1099 as default and will conflict -->
<!-- with default JNP (JNDI) port. -->
<attribute name="RegistryPort">
Modified: branches/Branch_5_x/server/src/etc/conf/all/bindings-jboss-beans.xml
===================================================================
--- branches/Branch_5_x/server/src/etc/conf/all/bindings-jboss-beans.xml 2009-05-08 03:14:24 UTC (rev 88390)
+++ branches/Branch_5_x/server/src/etc/conf/all/bindings-jboss-beans.xml 2009-05-08 03:48:50 UTC (rev 88391)
@@ -182,23 +182,24 @@
<bean class="org.jboss.services.binding.ServiceBindingMetadata">
<property name="serviceName">jboss:service=HAJNDI</property>
- <property name="bindingName">AutoDiscoveryMulticastAddress</property>
+ <property name="bindingName">AutoDiscovery</property>
<property name="hostName">${jboss.partition.udpGroup:230.0.0.4}</property>
+ <property name="port">1102</property>
<property name="description">Multicast socket on which HA-JNDI listens for auto-discovery requests from clients</property>
<!-- This address should not be changed between different
binding sets; all nodes need to listen on the same
multicast address -->
<property name="fixedHostName">true</property>
+ <!-- This port should not be changed between different
+ binding sets; all nodes need to listen on the same port -->
+ <property name="fixedPort">true</property>
</bean>
<bean class="org.jboss.services.binding.ServiceBindingMetadata">
<property name="serviceName">jboss:service=HAJNDI</property>
- <property name="bindingName">AutoDiscoveryPort</property>
- <property name="port">1102</property>
- <property name="description">Multicast socket on which HA-JNDI listens for auto-discovery requests from clients</property>
- <!-- This port should not be changed between different
- binding sets; all nodes need to listen on the same port -->
- <property name="fixedPort">true</property>
+ <property name="bindingName">AutoDiscoveryInterface</property>
+ <property name="hostName">${jboss.bind.address}</property>
+ <property name="description">Interface for multicast socket on which HA-JNDI listens for auto-discovery requests from clients</property>
</bean>
<!-- ********************* deploy/cluster/ha-legacy-service.xml ****************** -->
Modified: branches/Branch_5_x/server/src/etc/conf/all/jboss-service.xml
===================================================================
--- branches/Branch_5_x/server/src/etc/conf/all/jboss-service.xml 2009-05-08 03:14:24 UTC (rev 88390)
+++ branches/Branch_5_x/server/src/etc/conf/all/jboss-service.xml 2009-05-08 03:48:50 UTC (rev 88391)
@@ -147,7 +147,10 @@
<mbean code="org.jboss.web.WebService"
name="jboss:service=WebService">
<!-- The Bind address and Port -->
- <attribute name="BindAddress">${jboss.bind.address}</attribute>
+ <attribute name="BindAddress">
+ <!-- Get the interface to use from ServiceBindingManager. -->
+ <value-factory bean="ServiceBindingManager" method="getStringBinding" parameter="jboss:service=WebService"/>
+ </attribute>
<attribute name="Port">
<!-- Get the port to use from ServiceBindingManager. -->
<value-factory bean="ServiceBindingManager" method="getIntBinding" parameter="jboss:service=WebService"/>
@@ -203,7 +206,14 @@
<!-- The bootstrap JNP server bind address. This also sets the default
RMI service bind address. Empty == all addresses
-->
- <attribute name="BindAddress">${jboss.bind.address}</attribute>
+ <attribute name="BindAddress">
+ <value-factory bean="ServiceBindingManager" method="getStringBinding">
+ <parameter>jboss:service=Naming</parameter>
+ <parameter>Port</parameter>
+ <parameter><null/></parameter>
+ </value-factory>
+ </attribute>
+
<!-- The port of the RMI naming service, 0 == anonymous -->
<attribute name="RmiPort">
<value-factory bean="ServiceBindingManager" method="getIntBinding">
@@ -211,9 +221,15 @@
<parameter>RmiPort</parameter>
</value-factory>
</attribute>
- <!-- The RMI service bind address. Empty == all addresses
- -->
- <attribute name="RmiBindAddress">${jboss.bind.address}</attribute>
+ <!-- The RMI service bind address. Empty == all addresses -->
+ <attribute name="RmiBindAddress">
+ <value-factory bean="ServiceBindingManager" method="getStringBinding">
+ <parameter>jboss:service=Naming</parameter>
+ <parameter>RmiPort</parameter>
+ <parameter><null/></parameter>
+ </value-factory>
+ </attribute>
+
<!-- The thread pool service used to control the bootstrap lookups -->
<depends optional-attribute-name="LookupPool"
proxy-type="attribute">jboss.system:service=ThreadPool</depends>
Modified: branches/Branch_5_x/server/src/etc/deploy/legacy-invokers-service.xml
===================================================================
--- branches/Branch_5_x/server/src/etc/deploy/legacy-invokers-service.xml 2009-05-08 03:14:24 UTC (rev 88390)
+++ branches/Branch_5_x/server/src/etc/deploy/legacy-invokers-service.xml 2009-05-08 03:48:50 UTC (rev 88391)
@@ -13,7 +13,9 @@
<attribute name="RMIObjectPort">
<value-factory bean="ServiceBindingManager" method="getIntBinding" parameter="jboss:service=invoker,type=jrmp"/>
</attribute>
- <attribute name="ServerAddress">${jboss.bind.address}</attribute>
+ <attribute name="ServerAddress">
+ <value-factory bean="ServiceBindingManager" method="getStringBinding" parameter="jboss:service=invoker,type=jrmp"/>
+ </attribute>
<!--
<attribute name="RMIClientSocketFactory">custom</attribute>
<attribute name="RMIServerSocketFactory">custom</attribute>
@@ -35,11 +37,15 @@
<attribute name="MaxPoolSize">300</attribute>
<attribute name="ClientMaxPoolSize">300</attribute>
<attribute name="SocketTimeout">300000</attribute>
- <attribute name="ServerBindAddress">${jboss.bind.address}</attribute>
+ <attribute name="ServerBindAddress">
+ <value-factory bean="ServiceBindingManager" method="getStringBinding" parameter="jboss:service=invoker,type=pooled"/>
+ </attribute>
<attribute name="ServerBindPort">
<value-factory bean="ServiceBindingManager" method="getIntBinding" parameter="jboss:service=invoker,type=pooled"/>
</attribute>
- <attribute name="ClientConnectAddress">${jboss.bind.address}</attribute>
+ <attribute name="ClientConnectAddress">
+ <value-factory bean="ServiceBindingManager" method="getStringBinding" parameter="jboss:service=invoker,type=pooled"/>
+ </attribute>
<attribute name="ClientConnectPort">0</attribute>
<attribute name="ClientRetryCount">1</attribute>
<attribute name="EnableTcpNoDelay">false</attribute>
Modified: branches/Branch_5_x/tomcat/src/resources/jboss-beans.xml
===================================================================
--- branches/Branch_5_x/tomcat/src/resources/jboss-beans.xml 2009-05-08 03:14:24 UTC (rev 88390)
+++ branches/Branch_5_x/tomcat/src/resources/jboss-beans.xml 2009-05-08 03:48:50 UTC (rev 88391)
@@ -57,7 +57,12 @@
<parameter>jboss.web:service=WebServer</parameter>
</value-factory>
</property>
- <property name="address">${jboss.bind.address}</property>
+ <property name="address">
+ <value-factory bean="ServiceBindingManager"
+ method="getStringBinding" >
+ <parameter>jboss.web:service=WebServer</parameter>
+ </value-factory>
+ </property>
<property name="server"><inject bean="JMXKernel" property="mbeanServer"/></property>
</bean>
<bean name="ThreadPool-http-${jboss.bind.address}-8080MO"
@@ -73,11 +78,12 @@
</property>
<property name="port">
<value-factory bean="ServiceBindingManager"
- method="getIntBinding" >
- <parameter>jboss.web:service=WebServer</parameter>
- </value-factory>
+ method="getIntBinding" parameter="jboss.web:service=WebServer"/>
</property>
- <property name="address">${jboss.bind.address}</property>
+ <property name="address">
+ <value-factory bean="ServiceBindingManager"
+ method="getStringBinding" parameter="jboss.web:service=WebServer"/>
+ </property>
<property name="server"><inject bean="JMXKernel" property="mbeanServer"/></property>
</bean>
<bean name="${jboss.bind.address}-MO"
@@ -91,7 +97,10 @@
</entry>
<entry>
<key>host</key>
- <value>${jboss.bind.address}</value>
+ <value>
+ <value-factory bean="ServiceBindingManager"
+ method="getStringBinding" parameter="jboss.web:service=WebServer"/>
+ </value>
</entry>
</map>
</property>
Modified: branches/Branch_5_x/varia/src/main/org/jboss/services/binding/ServiceBindingManager.java
===================================================================
--- branches/Branch_5_x/varia/src/main/org/jboss/services/binding/ServiceBindingManager.java 2009-05-08 03:14:24 UTC (rev 88390)
+++ branches/Branch_5_x/varia/src/main/org/jboss/services/binding/ServiceBindingManager.java 2009-05-08 03:48:50 UTC (rev 88391)
@@ -452,6 +452,28 @@
*
* @param serviceName value to match to {@link ServiceBinding#getServiceName()}
* to identify the appropriate binding. Cannot be <code>null</code>.
+ *
+ * @return the raw binding value.
+ *
+ * @throws NoSuchBindingException if a matching ServiceBinding could not be found
+ *
+ * @see StringServiceBindingValueSource
+ */
+ public String getStringBinding(String serviceName) throws NoSuchBindingException
+ {
+ return getStringBinding(serviceName, null, null);
+ }
+
+ /**
+ * Gets the <code>String</code> binding value for the
+ * <code>ServiceBinding</code> with the given <code>serviceName</code>
+ * and no binding name qualifier.
+ * <p>
+ * This is typically the {@link ServiceBinding#getHostName() host name}.
+ * </p>
+ *
+ * @param serviceName value to match to {@link ServiceBinding#getServiceName()}
+ * to identify the appropriate binding. Cannot be <code>null</code>.
* @param input string that should be used as a source for transformations
* (e.g. string replacement), or <code>null</code> if no
* transformation is needed
Modified: branches/Branch_5_x/varia/src/resources/services/snmp/deploy/META-INF/jboss-service.xml
===================================================================
--- branches/Branch_5_x/varia/src/resources/services/snmp/deploy/META-INF/jboss-service.xml 2009-05-08 03:14:24 UTC (rev 88390)
+++ branches/Branch_5_x/varia/src/resources/services/snmp/deploy/META-INF/jboss-service.xml 2009-05-08 03:48:50 UTC (rev 88391)
@@ -72,8 +72,16 @@
<mbean code="org.jboss.jmx.adaptor.snmp.trapd.TrapdService"
name="jboss.jmx:name=SnmpAgent,service=trapd,type=logger">
+ <attribute name="BindAddress">
+ <!-- Get the interface from the ServiceBindingManager -->
+ <value-factory bean="ServiceBindingManager" method="getStringBinding"
+ parameter="jboss.jmx:name=SnmpAgent,service=trapd,type=logger"/>
+ </attribute>
+
<attribute name="Port">
- <value-factory bean="ServiceBindingManager" method="getIntBinding" parameter="jboss.jmx:name=SnmpAgent,service=trapd,type=logger"/>
+ <!-- Get the port from the ServiceBindingManager -->
+ <value-factory bean="ServiceBindingManager" method="getIntBinding"
+ parameter="jboss.jmx:name=SnmpAgent,service=trapd,type=logger"/>
</attribute>
</mbean>
@@ -87,6 +95,11 @@
<attribute name="NotificationMapResName">/notifications.xml</attribute>
<attribute name="ManagersResName">/managers.xml</attribute>
<attribute name="HeartBeatPeriod">0</attribute>
+ <attribute name="BindAddress">
+ <!-- Get the interface from the ServiceBindingManager -->
+ <value-factory bean="ServiceBindingManager" method="getStringBinding"
+ parameter="jboss.jmx:name=SnmpAgent,service=snmp,type=adaptor"/>
+ </attribute>
<attribute name="Port">
<!-- Get the port from the ServiceBindingManager -->
<value-factory bean="ServiceBindingManager" method="getIntBinding"
More information about the jboss-cvs-commits
mailing list