tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1537005 - in /tomee/tomee/trunk/tomee: tomee-catalina/src/main/java/org/apache/tomee/catalina/cluster/ClusterObserver.java tomee-common/src/main/java/org/apache/tomee/installer/Installer.java
Date Wed, 30 Oct 2013 08:34:22 GMT
Author: rmannibucau
Date: Wed Oct 30 08:34:21 2013
New Revision: 1537005

URL: http://svn.apache.org/r1537005
Log:
TOMEE-1068 cluster deployment shouldn't be activated by default since it is unexpected

Modified:
    tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/cluster/ClusterObserver.java
    tomee/tomee/trunk/tomee/tomee-common/src/main/java/org/apache/tomee/installer/Installer.java

Modified: tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/cluster/ClusterObserver.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/cluster/ClusterObserver.java?rev=1537005&r1=1537004&r2=1537005&view=diff
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/cluster/ClusterObserver.java
(original)
+++ tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/cluster/ClusterObserver.java
Wed Oct 30 08:34:21 2013
@@ -21,12 +21,15 @@ import org.apache.catalina.ha.ClusterMes
 import org.apache.openejb.assembler.classic.AppInfo;
 import org.apache.openejb.assembler.classic.event.AssemblerAfterApplicationCreated;
 import org.apache.openejb.assembler.classic.event.AssemblerBeforeApplicationDestroyed;
+import org.apache.openejb.loader.SystemInstance;
 import org.apache.openejb.observer.Observes;
 
 import java.io.File;
 import java.util.Set;
 
 public class ClusterObserver {
+    private static final boolean ClUSTER_DEPLOYMENT = "true".equals(SystemInstance.get().getProperty("tomee.cluster.deployment",
"false"));
+
     private final Set<CatalinaCluster> clusters;
 
     public ClusterObserver(final Set<CatalinaCluster> clusters) {
@@ -34,11 +37,19 @@ public class ClusterObserver {
     }
 
     public void deploy(@Observes final AssemblerAfterApplicationCreated app) {
+        if (!ClUSTER_DEPLOYMENT) {
+            return;
+        }
+
         final AppInfo appInfo = app.getApp();
         send(new DeployMessage(appInfo.path), appInfo);
     }
 
     public void undeploy(@Observes final AssemblerBeforeApplicationDestroyed app) {
+        if (!ClUSTER_DEPLOYMENT) {
+            return;
+        }
+
         final AppInfo appInfo = app.getApp();
         send(new UndeployMessage(appInfo.path), appInfo);
     }

Modified: tomee/tomee/trunk/tomee/tomee-common/src/main/java/org/apache/tomee/installer/Installer.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-common/src/main/java/org/apache/tomee/installer/Installer.java?rev=1537005&r1=1537004&r2=1537005&view=diff
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-common/src/main/java/org/apache/tomee/installer/Installer.java
(original)
+++ tomee/tomee/trunk/tomee/tomee-common/src/main/java/org/apache/tomee/installer/Installer.java
Wed Oct 30 08:34:21 2013
@@ -658,6 +658,10 @@ public class Installer {
                 systemPropertiesWriter.write("# tomee.jaxws.oldsubcontext = false\n");
 
                 systemPropertiesWriter.write("\n");
+                systemPropertiesWriter.write("# if you want to propagate a deployment on
a cluster when a tomcat cluster is defined\n");
+                systemPropertiesWriter.write("# tomee.cluster.deployment = false\n");
+
+                systemPropertiesWriter.write("\n");
                 systemPropertiesWriter.write("# openejb.system.apps = true\n");
                 systemPropertiesWriter.write("# openejb.servicemanager.enabled = true\n");
                 systemPropertiesWriter.write("# openejb.jmx.active = false\n");



Mime
View raw message