geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r780437 - /geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionTimer.java
Date Sun, 31 May 2009 14:34:25 GMT
Author: djencks
Date: Sun May 31 14:34:24 2009
New Revision: 780437

URL: http://svn.apache.org/viewvc?rev=780437&view=rev
Log:
GERONIMO-4543 create timer in priveleged block to not tie up callers classloader.  Thanks
to Janko Heilgeist

Modified:
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionTimer.java

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionTimer.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionTimer.java?rev=780437&r1=780436&r2=780437&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionTimer.java
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionTimer.java
Sun May 31 14:34:24 2009
@@ -17,6 +17,9 @@
 
 package org.apache.geronimo.transaction.manager;
 
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
 /**
  * TODO improve shutdown
  *
@@ -44,9 +47,14 @@
     }
 
     static {
-        CurrentTime tm = new CurrentTime();
-        tm.setDaemon(true);
-        tm.start();
+	AccessController.doPrivileged(new PrivilegedAction() {
+	    public Object run() {
+		CurrentTime tm = new CurrentTime();
+		tm.setDaemon(true);
+		tm.start();
+		return null;
+	    }
+	});
     }
 
     public static long getCurrentTime() {



Mime
View raw message