incubator-s4-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dfe...@apache.org
Subject git commit: Set correct ClassLoader for app initialization
Date Tue, 05 Mar 2013 15:24:20 GMT
Updated Branches:
  refs/heads/S4-68 [created] f86f31b4e


Set correct ClassLoader for app initialization


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

Branch: refs/heads/S4-68
Commit: f86f31b4e5f430131785e844fc13fcbf878333a9
Parents: 4429bef
Author: Daniel Gómez Ferro <dferro@apache.org>
Authored: Tue Mar 5 16:23:53 2013 +0100
Committer: Daniel Gómez Ferro <dferro@apache.org>
Committed: Tue Mar 5 16:23:53 2013 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/s4/core/S4Bootstrap.java  |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s4/blob/f86f31b4/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Bootstrap.java
----------------------------------------------------------------------
diff --git a/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Bootstrap.java b/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Bootstrap.java
index 01e241f..757ce4f 100644
--- a/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Bootstrap.java
+++ b/subprojects/s4-core/src/main/java/org/apache/s4/core/S4Bootstrap.java
@@ -130,6 +130,10 @@ public class S4Bootstrap {
     private void startS4App(AppConfig appConfig, Injector parentInjector, ClassLoader modulesLoader)
{
         try {
             App app = loadApp(appConfig, modulesLoader);
+
+            // use correct classLoader for running the app initialization
+            Thread.currentThread().setContextClassLoader(app.getClass().getClassLoader());
+
             app.init();
             app.start();
 


Mime
View raw message