You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by rm...@apache.org on 2014/12/08 11:56:17 UTC

tomee git commit: can be too late to init system instance but we want the config anyway

Repository: tomee
Updated Branches:
  refs/heads/develop 20a1c1d2b -> 4c0eb66fd


can be too late to init system instance but we want the config anyway


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

Branch: refs/heads/develop
Commit: 4c0eb66fd02a84d68ba264136a8f0fb20cfb7c8b
Parents: 20a1c1d
Author: Romain Manni-Bucau <rm...@apache.org>
Authored: Mon Dec 8 11:56:03 2014 +0100
Committer: Romain Manni-Bucau <rm...@apache.org>
Committed: Mon Dec 8 11:56:03 2014 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/tomee/embedded/Container.java     | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/4c0eb66f/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Container.java
----------------------------------------------------------------------
diff --git a/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Container.java b/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Container.java
index 341b5fc..b154869 100644
--- a/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Container.java
+++ b/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Container.java
@@ -588,7 +588,11 @@ public class Container implements AutoCloseable {
         final Properties initProps = new Properties();
         initProps.putAll(System.getProperties());
         initProps.putAll(properties);
-        SystemInstance.init(initProps);
+        if (SystemInstance.isInitialized()) {
+            SystemInstance.get().getProperties().putAll(initProps);
+        } else {
+            SystemInstance.init(initProps);
+        }
         SystemInstance.get().setComponent(StandardServer.class, (StandardServer) tomcat.getServer());
         SystemInstance.get().setComponent(Server.class, tomcat.getServer()); // needed again cause of init()