karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject git commit: [KARAF-2633] Prevent deadlocks with classloaders on JDK 6
Date Wed, 18 Dec 2013 09:30:18 GMT
Updated Branches:
  refs/heads/karaf-2.x 411b9e420 -> 6ae261ba8


[KARAF-2633] Prevent deadlocks with classloaders on JDK 6

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

Branch: refs/heads/karaf-2.x
Commit: 6ae261ba802128ae640cd4f834db5965989b1532
Parents: 411b9e4
Author: Guillaume Nodet <gnodet@gmail.com>
Authored: Wed Dec 18 10:30:07 2013 +0100
Committer: Guillaume Nodet <gnodet@gmail.com>
Committed: Wed Dec 18 10:30:07 2013 +0100

----------------------------------------------------------------------
 .../org/apache/karaf/admin/internal/AdminServiceImpl.java    | 8 +++++---
 .../apache-karaf/src/main/distribution/unix-shell/bin/karaf  | 2 +-
 .../src/main/distribution/windows-text/bin/karaf.bat         | 2 +-
 3 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/6ae261ba/admin/core/src/main/java/org/apache/karaf/admin/internal/AdminServiceImpl.java
----------------------------------------------------------------------
diff --git a/admin/core/src/main/java/org/apache/karaf/admin/internal/AdminServiceImpl.java
b/admin/core/src/main/java/org/apache/karaf/admin/internal/AdminServiceImpl.java
index 621e93f..7f63fea 100644
--- a/admin/core/src/main/java/org/apache/karaf/admin/internal/AdminServiceImpl.java
+++ b/admin/core/src/main/java/org/apache/karaf/admin/internal/AdminServiceImpl.java
@@ -77,6 +77,8 @@ public class AdminServiceImpl implements AdminService {
 
     private static final String DEFAULT_SHUTDOWN_COMMAND = "SHUTDOWN";
 
+    public static final String DEFAULT_JAVA_OPTS = "-server -Xmx512M -Dcom.sun.management.jmxremote
-XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass";
+
     private LinkedHashMap<String, InstanceImpl> proxies = new LinkedHashMap<String,
InstanceImpl>();
 
     private File storageLocation;
@@ -307,7 +309,7 @@ public class AdminServiceImpl implements AdminService {
 
                 String javaOpts = settings.getJavaOpts();
                 if (javaOpts == null || javaOpts.length() == 0) {
-                    javaOpts = "-server -Xmx512M -Dcom.sun.management.jmxremote";
+                    javaOpts = DEFAULT_JAVA_OPTS;
                 }
                 InstanceState is = new InstanceState();
                 is.name = name;
@@ -376,7 +378,7 @@ public class AdminServiceImpl implements AdminService {
                     opts = instance.opts;
                 }
                 if (opts == null || opts.length() == 0) {
-                    opts = "-server -Xmx512M -Dcom.sun.management.jmxremote";
+                    opts = DEFAULT_JAVA_OPTS;
                 }
                 String karafOpts = System.getProperty("karaf.opts", "");
 
@@ -571,7 +573,7 @@ public class AdminServiceImpl implements AdminService {
                 // create and add the clone instance in the registry
                 String javaOpts = settings.getJavaOpts();
                 if (javaOpts == null || javaOpts.length() == 0) {
-                    javaOpts = "-server -Xmx512M -Dcom.sun.management.jmxremote";
+                    javaOpts = DEFAULT_JAVA_OPTS;
                 }
                 InstanceState is = new InstanceState();
                 is.name = cloneName;

http://git-wip-us.apache.org/repos/asf/karaf/blob/6ae261ba/assemblies/apache-karaf/src/main/distribution/unix-shell/bin/karaf
----------------------------------------------------------------------
diff --git a/assemblies/apache-karaf/src/main/distribution/unix-shell/bin/karaf b/assemblies/apache-karaf/src/main/distribution/unix-shell/bin/karaf
index 911e7ae..8c1eb39 100755
--- a/assemblies/apache-karaf/src/main/distribution/unix-shell/bin/karaf
+++ b/assemblies/apache-karaf/src/main/distribution/unix-shell/bin/karaf
@@ -261,7 +261,7 @@ setupDebugOptions() {
 }
 
 setupDefaults() {
-    DEFAULT_JAVA_OPTS="-Xms$JAVA_MIN_MEM -Xmx$JAVA_MAX_MEM "
+    DEFAULT_JAVA_OPTS="-Xms$JAVA_MIN_MEM -Xmx$JAVA_MAX_MEM -XX:+UnlockDiagnosticVMOptions
-XX:+UnsyncloadClass "
 
     #Set the JVM_VENDOR specific JVM flags
     if [ "$JVM_VENDOR" = "SUN" ]; then

http://git-wip-us.apache.org/repos/asf/karaf/blob/6ae261ba/assemblies/apache-karaf/src/main/distribution/windows-text/bin/karaf.bat
----------------------------------------------------------------------
diff --git a/assemblies/apache-karaf/src/main/distribution/windows-text/bin/karaf.bat b/assemblies/apache-karaf/src/main/distribution/windows-text/bin/karaf.bat
index 4488600..6c1a1ba 100755
--- a/assemblies/apache-karaf/src/main/distribution/windows-text/bin/karaf.bat
+++ b/assemblies/apache-karaf/src/main/distribution/windows-text/bin/karaf.bat
@@ -105,7 +105,7 @@ if not exist "%JAVA_HOME%\bin\server\jvm.dll" (
         set JAVA_MODE=-client
     )
 )
-set DEFAULT_JAVA_OPTS=%JAVA_MODE% -Xms%JAVA_MIN_MEM% -Xmx%JAVA_MAX_MEM% -Dderby.system.home="%KARAF_DATA%\derby"
-Dderby.storage.fileSyncTransactionLog=true -Dcom.sun.management.jmxremote
+set DEFAULT_JAVA_OPTS=%JAVA_MODE% -Xms%JAVA_MIN_MEM% -Xmx%JAVA_MAX_MEM% -Dderby.system.home="%KARAF_DATA%\derby"
-Dderby.storage.fileSyncTransactionLog=true -Dcom.sun.management.jmxremote -XX:+UnlockDiagnosticVMOptions
-XX:+UnsyncloadClass
 
 rem Check some easily accessible MIN/MAX params for JVM mem usage
 if not "%JAVA_PERM_MEM%" == "" (


Mime
View raw message