[jboss-cvs] JBossAS SVN: r75271 - in trunk: cluster/src/main/org/jboss/ha/jndi and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jul 1 11:52:52 EDT 2008
Author: pferraro
Date: 2008-07-01 11:52:52 -0400 (Tue, 01 Jul 2008)
New Revision: 75271
Modified:
trunk/cluster/src/etc/hajndi-service.xml
trunk/cluster/src/main/org/jboss/ha/jndi/HANamingService.java
trunk/cluster/src/main/org/jboss/ha/jndi/HANamingServiceMBean.java
trunk/testsuite/src/resources/cluster/ejb2/passexp/partition-passexp-service.xml
trunk/testsuite/src/resources/cluster/partition/partition-restart-service.xml
trunk/testsuite/src/resources/naming/restart/naming-restart-beans.xml
Log:
[JBAS-4732] Multihome support: HAJNDI`s HANamingServiceMBean needs a configurable RmiBindAddress (like Naming`s MainMBean)
Modified: trunk/cluster/src/etc/hajndi-service.xml
===================================================================
--- trunk/cluster/src/etc/hajndi-service.xml 2008-07-01 15:26:34 UTC (rev 75270)
+++ trunk/cluster/src/etc/hajndi-service.xml 2008-07-01 15:52:52 UTC (rev 75271)
@@ -18,10 +18,12 @@
<!-- The thread pool used to control the bootstrap and auto discovery lookups -->
<attribute name="LookupPool"><inject bean="jboss.system:service=ThreadPool"/></attribute>
- <!-- Bind address of bootstrap and HA-JNDI RMI endpoints -->
+ <!-- Bind address of bootstrap endpoint -->
<attribute name="BindAddress">${jboss.bind.address}</attribute>
<!-- Port on which the HA-JNDI stub is made available -->
<attribute name="Port">1100</attribute>
+ <!-- Bind address of the HA-JNDI RMI endpoint -->
+ <attribute name="RmiBindAddress">${jboss.bind.address}</attribute>
<!-- RmiPort to be used by the HA-JNDI service once bound. 0 => auto. -->
<attribute name="RmiPort">1101</attribute>
<!-- Accept backlog of the bootstrap socket -->
Modified: trunk/cluster/src/main/org/jboss/ha/jndi/HANamingService.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/jndi/HANamingService.java 2008-07-01 15:26:34 UTC (rev 75270)
+++ trunk/cluster/src/main/org/jboss/ha/jndi/HANamingService.java 2008-07-01 15:52:52 UTC (rev 75271)
@@ -21,6 +21,8 @@
*/
package org.jboss.ha.jndi;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
import java.rmi.server.RMIClientSocketFactory;
import java.rmi.server.RMIServerSocketFactory;
@@ -58,6 +60,7 @@
/** The RMI port on which the Naming implementation will be exported. The
default is 0 which means use any available port. */
private int rmiPort = 0;
+ private InetAddress rmiBindAddress;
protected String replicantName = "HAJNDI";
private HARMIServerImpl rmiserver;
@@ -77,6 +80,16 @@
return this.rmiPort;
}
+ public String getRmiBindAddress()
+ {
+ return (this.rmiBindAddress != null) ? this.rmiBindAddress.getHostAddress() : null;
+ }
+
+ public void setRmiBindAddress(String address) throws UnknownHostException
+ {
+ this.rmiBindAddress = InetAddress.getByName(address);
+ }
+
public String getClientSocketFactory()
{
return this.serverSocketFactoryName;
@@ -126,7 +139,7 @@
protected Naming getNamingProxy() throws Exception
{
this.rmiserver = new HARMIServerImpl(this.clusterPartition, this.replicantName, Naming.class,
- this.theServer, this.rmiPort, this.clientSocketFactory, this.serverSocketFactory, this.bindAddress);
+ this.theServer, this.rmiPort, this.clientSocketFactory, this.serverSocketFactory, this.rmiBindAddress);
ClassLoader cl = Thread.currentThread().getContextClassLoader();
Class<?> clazz = cl.loadClass(this.loadBalancePolicy);
Modified: trunk/cluster/src/main/org/jboss/ha/jndi/HANamingServiceMBean.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/jndi/HANamingServiceMBean.java 2008-07-01 15:26:34 UTC (rev 75270)
+++ trunk/cluster/src/main/org/jboss/ha/jndi/HANamingServiceMBean.java 2008-07-01 15:52:52 UTC (rev 75271)
@@ -21,6 +21,8 @@
*/
package org.jboss.ha.jndi;
+import java.net.UnknownHostException;
+
/**
* HA-JNDI service that provides JNDI services in a clustered way.
* Bindings are replicated cluster-wide.
@@ -49,6 +51,13 @@
int getRmiPort();
/**
+ * RmiBindAddress to be used by the HA-JNDI service once bound.
+ * @param address
+ */
+ void setRmiBindAddress(String address) throws UnknownHostException;
+ String getRmiBindAddress();
+
+ /**
* Client socket factory to be used for client-server RMI invocations during JNDI queries
*/
String getClientSocketFactory();
Modified: trunk/testsuite/src/resources/cluster/ejb2/passexp/partition-passexp-service.xml
===================================================================
--- trunk/testsuite/src/resources/cluster/ejb2/passexp/partition-passexp-service.xml 2008-07-01 15:26:34 UTC (rev 75270)
+++ trunk/testsuite/src/resources/cluster/ejb2/passexp/partition-passexp-service.xml 2008-07-01 15:52:52 UTC (rev 75271)
@@ -18,10 +18,12 @@
<!-- The thread pool used to control the bootstrap and auto discovery lookups -->
<attribute name="LookupPool"><inject bean="PassExpThreadPool"/></attribute>
- <!-- Bind address of bootstrap and HA-JNDI RMI endpoints -->
+ <!-- Bind address of bootstrap endpoint -->
<attribute name="BindAddress">${jboss.bind.address}</attribute>
<!-- Port on which the HA-JNDI stub is made available -->
<attribute name="Port">11100</attribute>
+ <!-- Bind address of the HA-JNDI RMI endpoint -->
+ <attribute name="RmiBindAddress">${jboss.bind.address}</attribute>
<!-- RmiPort to be used by the HA-JNDI service once bound. 0 => auto. -->
<attribute name="RmiPort">11101</attribute>
<!-- Accept backlog of the bootstrap socket -->
Modified: trunk/testsuite/src/resources/cluster/partition/partition-restart-service.xml
===================================================================
--- trunk/testsuite/src/resources/cluster/partition/partition-restart-service.xml 2008-07-01 15:26:34 UTC (rev 75270)
+++ trunk/testsuite/src/resources/cluster/partition/partition-restart-service.xml 2008-07-01 15:52:52 UTC (rev 75271)
@@ -18,10 +18,12 @@
<!-- The thread pool used to control the bootstrap and auto discovery lookups -->
<attribute name="LookupPool"><inject bean="RestartPartitionThreadPool"/></attribute>
- <!-- Bind address of bootstrap and HA-JNDI RMI endpoints -->
+ <!-- Bind address of bootstrap endpoint -->
<attribute name="BindAddress">${jboss.bind.address}</attribute>
<!-- Port on which the HA-JNDI stub is made available -->
<attribute name="Port">11100</attribute>
+ <!-- Bind address of the HA-JNDI RMI endpoint -->
+ <attribute name="RmiBindAddress">${jboss.bind.address}</attribute>
<!-- RmiPort to be used by the HA-JNDI service once bound. 0 => auto. -->
<attribute name="RmiPort">11101</attribute>
<!-- Accept backlog of the bootstrap socket -->
Modified: trunk/testsuite/src/resources/naming/restart/naming-restart-beans.xml
===================================================================
--- trunk/testsuite/src/resources/naming/restart/naming-restart-beans.xml 2008-07-01 15:26:34 UTC (rev 75270)
+++ trunk/testsuite/src/resources/naming/restart/naming-restart-beans.xml 2008-07-01 15:52:52 UTC (rev 75271)
@@ -52,10 +52,12 @@
<property name="HAPartition"><inject bean="HAPartition"/></property>
<property name="clusteredCache"><inject bean="HAPartition" property="clusteredCache"/></property>
- <!-- Bind address of bootstrap and HA-JNDI RMI endpoints -->
+ <!-- Bind address of bootstrap endpoint -->
<property name="bindAddress">${jboss.bind.address}</property>
<!-- Port on which the HA-JNDI stub is made available -->
<property name="port">19100</property>
+ <!-- Bind address of the HA-JNDI RMI endpoint -->
+ <attribute name="rmiBindAddress">${jboss.bind.address}</attribute>
<!-- RmiPort to be used by the HA-JNDI service once bound. 0 => auto. -->
<property name="rmiPort">0</property>
<!-- Accept backlog of the bootstrap socket -->
More information about the jboss-cvs-commits
mailing list