cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1342674 - in /cxf/branches/2.3.x-fixes: ./ common/common/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java parent/pom.xml
Date Fri, 25 May 2012 15:09:30 GMT
Author: dkulp
Date: Fri May 25 15:09:30 2012
New Revision: 1342674

URL: http://svn.apache.org/viewvc?rev=1342674&view=rev
Log:
Merged revisions 1342664 via  svn merge from
https://svn.us.apache.org/repos/asf/cxf/branches/2.4.x-fixes

........
  r1342664 | dkulp | 2012-05-25 10:57:57 -0400 (Fri, 25 May 2012) | 17 lines
  
  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.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java
    cxf/branches/2.3.x-fixes/parent/pom.xml

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java?rev=1342674&r1=1342673&r2=1342674&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java
(original)
+++ cxf/branches/2.3.x-fixes/common/common/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java
Fri May 25 15:09:30 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.3.x-fixes/parent/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/parent/pom.xml?rev=1342674&r1=1342673&r2=1342674&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/parent/pom.xml (original)
+++ cxf/branches/2.3.x-fixes/parent/pom.xml Fri May 25 15:09:30 2012
@@ -282,6 +282,7 @@
                         <argLine>${cxf.surefire.fork.vmargs}</argLine>
                         <parallel>${cxf.surefire.parallel.mode}</parallel>
                         <systemPropertyVariables>
+                            <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>
                             <useRandomPorts>true</useRandomPorts>
                             <cxf.validateServiceSchemas>${cxf.validateServices}</cxf.validateServiceSchemas>



Mime
View raw message