You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ke...@apache.org on 2010/10/04 17:35:13 UTC
svn commit: r1004290 - in /geronimo/server/branches/2.2/plugins/openejb:
geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDaemonGBean.java
openejb/pom.xml openejb/src/main/plan/plan.xml
Author: kevan
Date: Mon Oct 4 15:35:13 2010
New Revision: 1004290
URL: http://svn.apache.org/viewvc?rev=1004290&view=rev
Log:
GERONIMO-5628 Add DiscoveryHostname property which will be the hostname to be used by remote discovery clients to reach this server
Modified:
geronimo/server/branches/2.2/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDaemonGBean.java
geronimo/server/branches/2.2/plugins/openejb/openejb/pom.xml
geronimo/server/branches/2.2/plugins/openejb/openejb/src/main/plan/plan.xml
Modified: geronimo/server/branches/2.2/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDaemonGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDaemonGBean.java?rev=1004290&r1=1004289&r2=1004290&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDaemonGBean.java (original)
+++ geronimo/server/branches/2.2/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDaemonGBean.java Mon Oct 4 15:35:13 2010
@@ -36,7 +36,8 @@ public class EjbDaemonGBean implements N
private ServiceManager serviceManager;
private boolean secure;
- private String discoveryURI = "ejb:ejbd://{bind}:{port}";
+ private String discoveryHost = null;
+ private String discoveryURI = "ejb:ejbd://{discoveryHost}:{port}";
private String clusterName;
private String multicastHost;
private int multicastPort;
@@ -117,6 +118,14 @@ public class EjbDaemonGBean implements N
return new InetSocketAddress(host, port);
}
+ public String getDiscoveryHost() {
+ return discoveryHost;
+ }
+
+ public void setDiscoveryHost(String discoveryHost) {
+ this.discoveryHost = discoveryHost;
+ }
+
public String getDiscoveryURI() {
return discoveryURI;
}
@@ -198,6 +207,11 @@ public class EjbDaemonGBean implements N
properties.setProperty("multipoint.group", clusterName);
properties.setProperty("multipoint.heart_rate", Long.toString(heartRate));
properties.setProperty("multipoint.max_missed_heartbeats", Integer.toString(maxMissedHeartbeats));
+ if ((discoveryHost != null) && discoveryHost.length() > 0) {
+ properties.setProperty("ejbd.discoveryHost", discoveryHost);
+ } else {
+ properties.setProperty("ejbd.discoveryHost", host);
+ }
properties.setProperty("ejbd.discovery", discoveryURI);
properties.setProperty("ejbd.secure", secure + "");
properties.setProperty("ejbds.disabled", "true");
@@ -223,6 +237,7 @@ public class EjbDaemonGBean implements N
GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic("OpenEJB Daemon", EjbDaemonGBean.class);
infoBuilder.addAttribute("host", String.class, true);
infoBuilder.addAttribute("port", int.class, true);
+ infoBuilder.addAttribute("discoveryHost", String.class, true);
infoBuilder.addAttribute("clusterName", String.class, true);
infoBuilder.addAttribute("heartRate", long.class, true);
infoBuilder.addAttribute("maxMissedHeartbeats", int.class, true);
Modified: geronimo/server/branches/2.2/plugins/openejb/openejb/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/openejb/openejb/pom.xml?rev=1004290&r1=1004289&r2=1004290&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/openejb/openejb/pom.xml (original)
+++ geronimo/server/branches/2.2/plugins/openejb/openejb/pom.xml Mon Oct 4 15:35:13 2010
@@ -162,6 +162,7 @@
<gbean name="EJBNetworkService">
<attribute name="port">${OpenEJBPort + PortOffset}</attribute>
<attribute name="host">${ServerHostname}</attribute>
+ <attribute name="discoveryHost">${DiscoveryHostname}</attribute>
<attribute name="multicastHost">${MulticastDiscoveryAddress}</attribute>
<attribute name="multicastPort">${MulticastDiscoveryPort}</attribute>
<attribute name="multipointHost">${MultipointHost}</attribute>
@@ -203,6 +204,7 @@
<config-substitution key="StatelessMinPoolSize">0</config-substitution>
<config-substitution key="StatelessStrictPooling">true</config-substitution>
<config-substitution key="StatelessIdleTimeout">0</config-substitution>
+ <config-substitution key="DiscoveryHostname"></config-substitution>
<config-substitution key="MulticastDiscoveryAddress">239.255.3.2</config-substitution>
<config-substitution key="MulticastDiscoveryPort">6142</config-substitution>
<config-substitution key="MultipointHost">0.0.0.0</config-substitution>
Modified: geronimo/server/branches/2.2/plugins/openejb/openejb/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/openejb/openejb/src/main/plan/plan.xml?rev=1004290&r1=1004289&r2=1004290&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/openejb/openejb/src/main/plan/plan.xml (original)
+++ geronimo/server/branches/2.2/plugins/openejb/openejb/src/main/plan/plan.xml Mon Oct 4 15:35:13 2010
@@ -91,6 +91,7 @@
<gbean name="EJBNetworkService" class="org.apache.geronimo.openejb.EjbDaemonGBean">
<attribute name="port">${PlanOpenEJBPort}</attribute>
<attribute name="host">${PlanServerHostname}</attribute>
+ <attribute name="discoveryHost"></attribute>
<attribute name="threads">200</attribute>
<attribute name="multicastPort">${PlanOpenEJBMulticastPort}</attribute>
<attribute name="multicastHost">${PlanOpenEJBMulticastHostname}</attribute>