geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r702558 - in /geronimo/server/trunk/plugins/openejb: geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDaemonGBean.java openejb/pom.xml openejb/src/main/plan/plan.xml
Date Tue, 07 Oct 2008 17:46:06 GMT
Author: dblevins
Date: Tue Oct  7 10:46:05 2008
New Revision: 702558

URL: http://svn.apache.org/viewvc?rev=702558&view=rev
Log:
Allow ClusterName, MulticastHost, and MulticastPort config substitutions to standardly apply
to ejb discovery and failover as well.

Modified:
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDaemonGBean.java
    geronimo/server/trunk/plugins/openejb/openejb/pom.xml
    geronimo/server/trunk/plugins/openejb/openejb/src/main/plan/plan.xml

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDaemonGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDaemonGBean.java?rev=702558&r1=702557&r2=702558&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDaemonGBean.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDaemonGBean.java
Tue Oct  7 10:46:05 2008
@@ -36,6 +36,7 @@
     private ServiceManager serviceManager;
 
     private String multicastHost;
+    private String clusterName;
     private int multicastPort;
     private boolean enableMulticast;
 
@@ -48,6 +49,14 @@
         return "ejbd";
     }
 
+    public String getClusterName() {
+        return clusterName;
+    }
+
+    public void setClusterName(String clusterName) {
+        this.clusterName = clusterName;
+    }
+
     public String getHost() {
         return host;
     }
@@ -107,6 +116,7 @@
         properties.setProperty("multicast.bind", multicastHost);
         properties.setProperty("multicast.port", Integer.toString(multicastPort));
         properties.setProperty("multicast.disabled", Boolean.toString(!enableMulticast));
+        properties.setProperty("multicast.group", clusterName);
         if (threads > 0) {
             properties.setProperty("ejbd.threads", Integer.toString(threads));
         }
@@ -129,6 +139,7 @@
         GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic("OpenEJB Daemon", EjbDaemonGBean.class);
         infoBuilder.addAttribute("host", String.class, true);
         infoBuilder.addAttribute("port", int.class, true);
+        infoBuilder.addAttribute("clusterName", String.class, true);
         infoBuilder.addAttribute("multicastHost", String.class, true);
         infoBuilder.addAttribute("multicastPort", int.class, true);
         infoBuilder.addAttribute("enableMulticast", boolean.class, true);

Modified: geronimo/server/trunk/plugins/openejb/openejb/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/openejb/pom.xml?rev=702558&r1=702557&r2=702558&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/openejb/pom.xml (original)
+++ geronimo/server/trunk/plugins/openejb/openejb/pom.xml Tue Oct  7 10:46:05 2008
@@ -169,9 +169,15 @@
                                 <gbean name="EJBNetworkService">
                                     <attribute name="port">${OpenEJBPort + PortOffset}</attribute>
                                     <attribute name="host">${ServerHostname}</attribute>
+                                    <attribute name="multicastHost">${MulticastDiscoveryAddress}</attribute>
+                                    <attribute name="multicastPort">${MulticastDiscoveryPort}</attribute>
+                                    <attribute name="clusterName">${ClusterName}</attribute>
                                 </gbean>
                             </config-xml-content>
                             <config-substitution key="OpenEJBPort">4201</config-substitution>
+                            <config-substitution key="MulticastDiscoveryAddress">239.255.3.2</config-substitution>
+                            <config-substitution key="MulticastDiscoveryPort">6142</config-substitution>
+                            <config-substitution key="ClusterName">cluster1</config-substitution>
                             <copy-file relative-to="geronimo" dest-dir="">schema</copy-file>
                         </plugin-artifact>
                     </instance>

Modified: geronimo/server/trunk/plugins/openejb/openejb/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/openejb/src/main/plan/plan.xml?rev=702558&r1=702557&r2=702558&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/openejb/src/main/plan/plan.xml (original)
+++ geronimo/server/trunk/plugins/openejb/openejb/src/main/plan/plan.xml Tue Oct  7 10:46:05
2008
@@ -74,6 +74,7 @@
         <attribute name="threads">20</attribute>
         <attribute name="multicastPort">${PlanOpenEJBMulticastPort}</attribute>
         <attribute name="multicastHost">${PlanOpenEJBMulticastHostname}</attribute>
+        <attribute name="clusterName">cluster1</attribute>
         <attribute name="enableMulticast">true</attribute>
         <dependency>
             <name>OpenEjbSystem</name>



Mime
View raw message