tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject tomee git commit: TOMEE-1650 avoid too weak defaults for remote ejbs
Date Mon, 02 Nov 2015 20:12:17 GMT
Repository: tomee
Updated Branches:
  refs/heads/master 7f4526a00 -> f244ed176


TOMEE-1650 avoid too weak defaults for remote ejbs


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/f244ed17
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/f244ed17
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/f244ed17

Branch: refs/heads/master
Commit: f244ed1769d6968df5413394647fb764f320054f
Parents: 7f4526a
Author: Romain Manni-Bucau <rmannibu@gmail.com>
Authored: Mon Nov 2 12:11:59 2015 -0800
Committer: Romain Manni-Bucau <rmannibu@gmail.com>
Committed: Mon Nov 2 12:11:59 2015 -0800

----------------------------------------------------------------------
 .../apache/tomee/arquillian/remote/RemoteTomEEContainer.java | 8 +++++++-
 .../apache/tomee/arquillian/webapp/TomEEWebappContainer.java | 5 ++++-
 .../org/apache/openejb/maven/plugin/AbstractCommandMojo.java | 3 ++-
 .../org/apache/openejb/maven/plugin/UpdatableTomEEMojo.java  | 4 ++++
 .../org/apache/tomee/catalina/GlobalListenerSupport.java     | 2 +-
 .../main/java/org/apache/tomee/catalina/TomcatLoader.java    | 1 -
 6 files changed, 18 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/f244ed17/arquillian/arquillian-tomee-remote/src/main/java/org/apache/tomee/arquillian/remote/RemoteTomEEContainer.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-remote/src/main/java/org/apache/tomee/arquillian/remote/RemoteTomEEContainer.java
b/arquillian/arquillian-tomee-remote/src/main/java/org/apache/tomee/arquillian/remote/RemoteTomEEContainer.java
index ce953f7..110e113 100644
--- a/arquillian/arquillian-tomee-remote/src/main/java/org/apache/tomee/arquillian/remote/RemoteTomEEContainer.java
+++ b/arquillian/arquillian-tomee-remote/src/main/java/org/apache/tomee/arquillian/remote/RemoteTomEEContainer.java
@@ -154,7 +154,11 @@ public class RemoteTomEEContainer extends TomEEContainer<RemoteTomEEConfiguratio
             opts = opts.trim();
         }
         if (opts == null || opts.isEmpty()) {
-            return Arrays.asList("-Dorg.apache.catalina.STRICT_SERVLET_COMPLIANCE=false",
ARQUILLIAN_FILTER);
+            return Arrays.asList(
+                "-Dorg.apache.catalina.STRICT_SERVLET_COMPLIANCE=false",
+                ARQUILLIAN_FILTER,
+                "-Dopenejb.system.apps=true", "-Dtomee.remote.support=true"
+            );
         }
 
         final List<String> splitOnSpace = new ArrayList<String>();
@@ -168,6 +172,8 @@ public class RemoteTomEEContainer extends TomEEContainer<RemoteTomEEConfiguratio
             splitOnSpace.add("-Dorg.apache.catalina.STRICT_SERVLET_COMPLIANCE=false");
         }
         splitOnSpace.add(ARQUILLIAN_FILTER);
+        splitOnSpace.add("-Dopenejb.system.apps=true");
+        splitOnSpace.add("-Dtomee.remote.support=true");
         return splitOnSpace;
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/f244ed17/arquillian/arquillian-tomee-webapp-remote/src/main/java/org/apache/tomee/arquillian/webapp/TomEEWebappContainer.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-webapp-remote/src/main/java/org/apache/tomee/arquillian/webapp/TomEEWebappContainer.java
b/arquillian/arquillian-tomee-webapp-remote/src/main/java/org/apache/tomee/arquillian/webapp/TomEEWebappContainer.java
index b7cf46a..90ca223 100644
--- a/arquillian/arquillian-tomee-webapp-remote/src/main/java/org/apache/tomee/arquillian/webapp/TomEEWebappContainer.java
+++ b/arquillian/arquillian-tomee-webapp-remote/src/main/java/org/apache/tomee/arquillian/webapp/TomEEWebappContainer.java
@@ -173,7 +173,10 @@ public class TomEEWebappContainer extends TomEEContainer<TomEEWebappConfiguratio
 
             container = new RemoteServer();
             container.setPortStartup(httpPort);
-            container.start(Arrays.asList("-Dorg.apache.openejb.servlet.filters=" + ArquillianFilterRunner.class.getName()
+ "=" + ServletMethodExecutor.ARQUILLIAN_SERVLET_MAPPING), "start", true);
+            container.start(Arrays.asList(
+                "-Dopenejb.system.apps=true",
+                "-Dtomee.remote.support=true",
+                "-Dorg.apache.openejb.servlet.filters=" + ArquillianFilterRunner.class.getName()
+ "=" + ServletMethodExecutor.ARQUILLIAN_SERVLET_MAPPING), "start", true);
             container.killOnExit();
         } catch (final Exception e) {
             throw new LifecycleException("Unable to start remote container", e);

http://git-wip-us.apache.org/repos/asf/tomee/blob/f244ed17/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/AbstractCommandMojo.java
----------------------------------------------------------------------
diff --git a/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/AbstractCommandMojo.java
b/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/AbstractCommandMojo.java
index 6aa3489..4e0f09e 100644
--- a/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/AbstractCommandMojo.java
+++ b/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/AbstractCommandMojo.java
@@ -46,7 +46,8 @@ public abstract class AbstractCommandMojo extends AbstractAddressMojo {
         try {
             return new InitialContext(props).lookup(name);
         } catch (final Exception e) {
-            throw new TomEEException(e.getMessage(), e);
+            throw new TomEEException("Not able to execute " + getClass().getSimpleName()
+
+                ", maybe add -Dopenejb.system.apps=true -Dtomee.remote.support=true to tomee",
e);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/f244ed17/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/UpdatableTomEEMojo.java
----------------------------------------------------------------------
diff --git a/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/UpdatableTomEEMojo.java
b/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/UpdatableTomEEMojo.java
index 7b6e28f..63147cc 100644
--- a/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/UpdatableTomEEMojo.java
+++ b/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/UpdatableTomEEMojo.java
@@ -104,6 +104,10 @@ public abstract class UpdatableTomEEMojo extends AbstractTomEEMojo {
         s.getExtensions().addAll(s.getUpdateOnlyExtenions());
         if (reloadOnUpdate) {
             deployOpenEjbApplication = true;
+            if (systemVariables == null) {
+                systemVariables = new HashMap<>();
+                systemVariables.put("tomee.remote.support", "true");
+            }
         }
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/f244ed17/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/GlobalListenerSupport.java
----------------------------------------------------------------------
diff --git a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/GlobalListenerSupport.java
b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/GlobalListenerSupport.java
index c867689..0bdf9cb 100644
--- a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/GlobalListenerSupport.java
+++ b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/GlobalListenerSupport.java
@@ -44,7 +44,7 @@ import java.util.Map;
  * @version $Rev$ $Date$
  */
 public class GlobalListenerSupport implements PropertyChangeListener, LifecycleListener {
-    private static final boolean REMOTE_SUPPORT = SystemInstance.get().getOptions().get("tomee.remote.support",
true);
+    private static final boolean REMOTE_SUPPORT = SystemInstance.get().getOptions().get("tomee.remote.support",
false);
 
     /**
      * The LifecycleEvent type for the "component init" event.

http://git-wip-us.apache.org/repos/asf/tomee/blob/f244ed17/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatLoader.java
----------------------------------------------------------------------
diff --git a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatLoader.java
b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatLoader.java
index aaec6ab..06cafe9 100644
--- a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatLoader.java
+++ b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatLoader.java
@@ -130,7 +130,6 @@ public class TomcatLoader implements Loader {
     }
 
     public void initDefaults(final Properties properties) {
-        setIfNull(properties, "openejb.system.apps", "true");
         setIfNull(properties, "openejb.deployments.classpath", "false");
         setIfNull(properties, "openejb.deployments.classpath.filter.systemapps", "false");
 


Mime
View raw message