You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by db...@apache.org on 2010/04/19 22:50:12 UTC

svn commit: r935735 - in /geronimo/server/branches/2.2: plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDaemonGBean.java plugins/openejb/openejb/src/main/plan/plan.xml pom.xml

Author: dblevins
Date: Mon Apr 19 20:50:12 2010
New Revision: 935735

URL: http://svn.apache.org/viewvc?rev=935735&view=rev
Log:
TCP-based discovery gbean/config bits

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/src/main/plan/plan.xml
    geronimo/server/branches/2.2/pom.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=935735&r1=935734&r2=935735&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 Apr 19 20:50:12 2010
@@ -37,10 +37,15 @@ public class EjbDaemonGBean implements N
 
     private boolean secure;
     private String discoveryURI = "ejb:ejbd://{bind}:{port}";
-    private String multicastHost;
     private String clusterName;
+    private String multicastHost;
     private int multicastPort;
     private boolean enableMulticast;
+    private String multipointHost;
+    private int multipointPort;
+    private boolean enableMultipoint;
+    private long heartRate;
+    private int maxMissedHeartbeats;
 
     public EjbDaemonGBean() {
         System.setProperty("openejb.nobanner","true");
@@ -127,6 +132,46 @@ public class EjbDaemonGBean implements N
         this.secure = secure;
     }
 
+    public String getMultipointHost() {
+        return multipointHost;
+    }
+
+    public void setMultipointHost(String multipointHost) {
+        this.multipointHost = multipointHost;
+    }
+
+    public int getMultipointPort() {
+        return multipointPort;
+    }
+
+    public void setMultipointPort(int multipointPort) {
+        this.multipointPort = multipointPort;
+    }
+
+    public boolean isEnableMultipoint() {
+        return enableMultipoint;
+    }
+
+    public void setEnableMultipoint(boolean enableMultipoint) {
+        this.enableMultipoint = enableMultipoint;
+    }
+
+    public long getHeartRate() {
+        return heartRate;
+    }
+
+    public void setHeartRate(long heartRate) {
+        this.heartRate = heartRate;
+    }
+
+    public int getMaxMissedHeartbeats() {
+        return maxMissedHeartbeats;
+    }
+
+    public void setMaxMissedHeartbeats(int maxMissedHeartbeats) {
+        this.maxMissedHeartbeats = maxMissedHeartbeats;
+    }
+
     public void doStart() throws Exception {
         Properties properties = SystemInstance.get().getProperties();
         properties.setProperty("ejbd.bind", host);
@@ -135,6 +180,14 @@ public class EjbDaemonGBean implements N
         properties.setProperty("multicast.port", Integer.toString(multicastPort));
         properties.setProperty("multicast.disabled", Boolean.toString(!enableMulticast));
         properties.setProperty("multicast.group", clusterName);
+        properties.setProperty("multicast.heart_rate", Long.toString(heartRate));
+        properties.setProperty("multicast.max_missed_heartbeats", Integer.toString(maxMissedHeartbeats));
+        properties.setProperty("multipoint.bind", multipointHost);
+        properties.setProperty("multipoint.port", Integer.toString(multipointPort));
+        properties.setProperty("multipoint.disabled", Boolean.toString(!enableMultipoint));
+        properties.setProperty("multipoint.group", clusterName);
+        properties.setProperty("multipoint.heart_rate", Long.toString(heartRate));
+        properties.setProperty("multipoint.max_missed_heartbeats", Integer.toString(maxMissedHeartbeats));
         properties.setProperty("ejbd.discovery", discoveryURI);
         properties.setProperty("ejbd.secure", secure + "");
         properties.setProperty("ejbds.disabled", "true");
@@ -161,9 +214,14 @@ public class EjbDaemonGBean implements N
         infoBuilder.addAttribute("host", String.class, true);
         infoBuilder.addAttribute("port", int.class, true);
         infoBuilder.addAttribute("clusterName", String.class, true);
+        infoBuilder.addAttribute("heartRate", long.class, true);
+        infoBuilder.addAttribute("maxMissedHeartbeats", int.class, true);
         infoBuilder.addAttribute("multicastHost", String.class, true);
         infoBuilder.addAttribute("multicastPort", int.class, true);
         infoBuilder.addAttribute("enableMulticast", boolean.class, true);
+        infoBuilder.addAttribute("multipointHost", String.class, true);
+        infoBuilder.addAttribute("multipointPort", int.class, true);
+        infoBuilder.addAttribute("enableMultipoint", boolean.class, true);
         infoBuilder.addAttribute("threads", int.class, true);
 
         GBEAN_INFO = infoBuilder.getBeanInfo();

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=935735&r1=935734&r2=935735&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 Apr 19 20:50:12 2010
@@ -92,8 +92,13 @@
         <attribute name="threads">200</attribute>
         <attribute name="multicastPort">${PlanOpenEJBMulticastPort}</attribute>
         <attribute name="multicastHost">${PlanOpenEJBMulticastHostname}</attribute>
-        <attribute name="clusterName">cluster1</attribute>
         <attribute name="enableMulticast">true</attribute>
+        <attribute name="multipointPort">${PlanOpenEJBMultipointPort}</attribute>
+        <attribute name="multipointHost">${PlanOpenEJBMultipointHostname}</attribute>
+        <attribute name="enableMultipoint">false</attribute>
+        <attribute name="clusterName">cluster1</attribute>
+        <attribute name="heartRate">500</attribute>
+        <attribute name="maxMissedHeartbeats">10</attribute>
         <attribute name="discoveryURI">ejb:ejbd://${PlanServerHostname}:${PlanOpenEJBPort}</attribute>
         <attribute name="secure">false</attribute>
         <dependency>

Modified: geronimo/server/branches/2.2/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/pom.xml?rev=935735&r1=935734&r2=935735&view=diff
==============================================================================
--- geronimo/server/branches/2.2/pom.xml (original)
+++ geronimo/server/branches/2.2/pom.xml Mon Apr 19 20:50:12 2010
@@ -108,6 +108,8 @@
         <PlanOpenEJBPort>4201</PlanOpenEJBPort>
         <PlanOpenEJBMulticastPort>6142</PlanOpenEJBMulticastPort>
         <PlanOpenEJBMulticastHostname>239.255.3.2</PlanOpenEJBMulticastHostname>
+        <PlanOpenEJBMultipointPort>4212</PlanOpenEJBMultipointPort>
+        <PlanOpenEJBMultipointHostname>localhost</PlanOpenEJBMultipointHostname>
         <PlanNamingPort>1099</PlanNamingPort>
         <PlanActiveMQPort>61616</PlanActiveMQPort>
         <PlanCOSNamingHost>localhost</PlanCOSNamingHost>