Author: dkulp Date: Fri May 25 14:57:57 2012 New Revision: 1342664 URL: http://svn.apache.org/viewvc?rev=1342664&view=rev Log: Merged revisions 1342661 via svn merge from https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes
........ r1342661 | dkulp | 2012-05-25 10:54:17 -0400 (Fri, 25 May 2012) | 9 lines Merged revisions 1342657 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/trunk ........ r1342657 | dkulp | 2012-05-25 10:50:34 -0400 (Fri, 25 May 2012) | 2 lines [CXF-4313] Add ability to completely turn off all the JDK hacks ........ ........ Modified: cxf/branches/2.4.x-fixes/ (props changed) cxf/branches/2.4.x-fixes/common/common/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java cxf/branches/2.4.x-fixes/parent/pom.xml Propchange: cxf/branches/2.4.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.4.x-fixes/common/common/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/common/common/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java?rev=1342664&r1=1342663&r2=1342664&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/common/common/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java (original) +++ cxf/branches/2.4.x-fixes/common/common/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java Fri May 25 14:57:57 2012 @@ -87,13 +87,15 @@ final class JDKBugHacks { } public static void doHacks() { + if (skipHack("org.apache.cxf.JDKBugHacks.all")) { + return; + } try { ClassLoader orig = Thread.currentThread().getContextClassLoader(); try { // Use the system classloader as the victim for all this // ClassLoader pinning we're about to do. Thread.currentThread().setContextClassLoader(ClassLoader.getSystemClassLoader()); - try { //Trigger a call to sun.awt.AppContext.getAppContext() if (!skipHack("org.apache.cxf.JDKBugHacks.imageIO")) { @@ -120,9 +122,14 @@ final class JDKBugHacks { try { if (!skipHack("org.apache.cxf.JDKBugHacks.gcRequestLatency")) { Class<?> clazz = Class.forName("sun.misc.GC"); - Method method = clazz.getDeclaredMethod("requestLatency", + Method method = clazz.getDeclaredMethod("currentLatencyTarget"); + Long l = (Long)method.invoke(null); + if (l != null && l.longValue() == 0) { + //something already set it, move on + method = clazz.getDeclaredMethod("requestLatency", new Class[] {Long.TYPE}); - method.invoke(null, Long.valueOf(36000000)); + method.invoke(null, Long.valueOf(36000000)); + } } } catch (Throwable e) { //ignore Modified: cxf/branches/2.4.x-fixes/parent/pom.xml URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/parent/pom.xml?rev=1342664&r1=1342663&r2=1342664&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/parent/pom.xml (original) +++ cxf/branches/2.4.x-fixes/parent/pom.xml Fri May 25 14:57:57 2012 @@ -339,6 +339,7 @@ <systemPropertyVariables> <java.io.tmpdir>${basedir}/target</java.io.tmpdir> <cxf.useRandomFirstPort>true</cxf.useRandomFirstPort> + <org.apache.cxf.JDKBugHacks.all>true</org.apache.cxf.JDKBugHacks.all> <org.apache.ws.commons.schema.protectReadOnlyCollections>${cxf.protect-xmlschema-collections}</org.apache.ws.commons.schema.protectReadOnlyCollections> <cxf.validateServiceSchemas>${cxf.validateServices}</cxf.validateServiceSchemas> <java.awt.headless>${java.awt.headless}</java.awt.headless>
