Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 79632 invoked from network); 16 Jun 2009 21:23:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Jun 2009 21:23:15 -0000 Received: (qmail 21583 invoked by uid 500); 16 Jun 2009 21:23:27 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 21545 invoked by uid 500); 16 Jun 2009 21:23:27 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 21536 invoked by uid 99); 16 Jun 2009 21:23:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jun 2009 21:23:27 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jun 2009 21:23:23 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CDF0D23888A0; Tue, 16 Jun 2009 21:23:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r785411 - /db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/services/jmx/JMXManagementService.java Date: Tue, 16 Jun 2009 21:23:01 -0000 To: derby-commits@db.apache.org From: kmarsden@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090616212301.CDF0D23888A0@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kmarsden Date: Tue Jun 16 21:23:01 2009 New Revision: 785411 URL: http://svn.apache.org/viewvc?rev=785411&view=rev Log: DERBY-3887 Embedded Derby fails under JBoss because of JMX-related conflicts Backout jmx related changes from DERBY-3745. Modified: db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/services/jmx/JMXManagementService.java Modified: db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/services/jmx/JMXManagementService.java URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/services/jmx/JMXManagementService.java?rev=785411&r1=785410&r2=785411&view=diff ============================================================================== --- db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/services/jmx/JMXManagementService.java (original) +++ db/derby/code/branches/10.4/java/engine/org/apache/derby/impl/services/jmx/JMXManagementService.java Tue Jun 16 21:23:01 2009 @@ -165,43 +165,7 @@ * @throws StandardException */ private synchronized void findServer() { - //DERBY-3745 We want to avoid the timer leaking class loaders, so we make - // sure the context class loader is null before we start the MBean - // server which will create threads that we want to have a null context - // class loader - boolean hasGetClassLoaderPerms=false; - ClassLoader savecl = null; - try { - savecl = (ClassLoader)AccessController.doPrivileged( - new PrivilegedAction() { - public ClassLoader run() { - return Thread.currentThread().getContextClassLoader(); - } - }); - hasGetClassLoaderPerms = true; - } catch (SecurityException se) { - // ignore security exception. Earlier versions of Derby, before the - // DERBY-3745 fix did not require getClassloader permissions. - // We may leak class loaders if we are not able to get this, but - // cannot just fail. - } - if (hasGetClassLoaderPerms) - try { - AccessController.doPrivileged( - new PrivilegedAction() { - public Object run() { - Thread. - currentThread().setContextClassLoader(null); - return null; - } - }); - } catch (SecurityException se1) { - // ignore security exception. Earlier versions of Derby, before the - // DERBY-3745 fix did not require setContextClassloader permissions. - // We may leak class loaders if we are not able to set this, but - // cannot just fail. - } try { mbeanServer = AccessController .doPrivileged(new PrivilegedAction() { @@ -218,22 +182,6 @@ // them registered with JMX if someone else // starts the MBean server. } - if (hasGetClassLoaderPerms) - try { - final ClassLoader tmpsavecl = savecl; - AccessController.doPrivileged( - new PrivilegedAction() { - public Object run() { - Thread.currentThread().setContextClassLoader(tmpsavecl); - return null; - } - }); - } catch (SecurityException se) { - // ignore security exception. Earlier versions of Derby, before the - // DERBY-3745 fix did not require setContextClassloader permissions. - // We may leak class loaders if we are not able to set this, but - // cannot just fail. - } } /**