[jboss-cvs] JBossAS SVN: r72444 - in trunk/system-jmx: src/main/org/jboss/system and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Apr 18 09:43:36 EDT 2008


Author: adrian at jboss.org
Date: 2008-04-18 09:43:36 -0400 (Fri, 18 Apr 2008)
New Revision: 72444

Modified:
   trunk/system-jmx/.classpath
   trunk/system-jmx/src/main/org/jboss/system/ServiceConfigurator.java
Log:
Use the mbean classloader as the TCL when configuring attributes. Fix the test classpath in eclipse by adding jaxb api

Modified: trunk/system-jmx/.classpath
===================================================================
--- trunk/system-jmx/.classpath	2008-04-18 13:26:05 UTC (rev 72443)
+++ trunk/system-jmx/.classpath	2008-04-18 13:43:36 UTC (rev 72444)
@@ -14,6 +14,7 @@
 	<classpathentry exported="true" kind="lib" path="/thirdparty/apache-xerces/lib/resolver.jar"/>
 	<classpathentry exported="true" kind="lib" path="/thirdparty/apache-xerces/lib/xercesImpl.jar"/>
 	<classpathentry exported="true" kind="lib" path="/thirdparty/apache-xerces/lib/xml-apis.jar"/>
+	<classpathentry exported="true" kind="lib" path="/thirdparty/sun-jaxb/lib/jaxb-api.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/test/lib/jboss-test.jar" sourcepath="/home/svn/JBossHead/projects/test/trunk/test/src/main"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-deployers/lib/jboss-deployers-client.jar" sourcepath="/thirdparty/jboss/jboss-deployers/lib/jboss-deployers-client-sources.jar"/>

Modified: trunk/system-jmx/src/main/org/jboss/system/ServiceConfigurator.java
===================================================================
--- trunk/system-jmx/src/main/org/jboss/system/ServiceConfigurator.java	2008-04-18 13:26:05 UTC (rev 72443)
+++ trunk/system-jmx/src/main/org/jboss/system/ServiceConfigurator.java	2008-04-18 13:43:36 UTC (rev 72444)
@@ -132,9 +132,18 @@
          }
 
          valueContext.setAttributeInfo(attributeInfo);
-         Object value = attribute.getValue(valueContext);
+         Object value = null;
+         ClassLoader previous = SecurityActions.setContextClassLoader(cl);
          try
          {
+            value = attribute.getValue(valueContext);
+         }
+         finally
+         {
+            SecurityActions.resetContextClassLoader(previous);
+         }
+         try
+         {
             log.debug(attributeName + " set to " + value + " in " + objectName);
             server.setAttribute(objectName, new Attribute(attributeName, value));
          }




More information about the jboss-cvs-commits mailing list