modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/helper/JmxConnectionHelper.java | 14 ++++++---- modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatServerComponent.java | 1 2 files changed, 10 insertions(+), 5 deletions(-)
New commits: commit 7677e9f4712c8915e3ca7782797d5e26d40884f4 Author: Ian Springer ian.springer@redhat.com Date: Tue Aug 17 16:34:39 2010 -0400
JmxConnectionHelper.loadConnection() should set JAR_TEMP_DIR EMS control prop to PC temp dir even when PC is running in embedded mode (i.e. in the admin-console) (https://bugzilla.redhat.com/show_bug.cgi?id=624817)
diff --git a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/helper/JmxConnectionHelper.java b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/helper/JmxConnectionHelper.java index 24e3b25..c07254a 100644 --- a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/helper/JmxConnectionHelper.java +++ b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/helper/JmxConnectionHelper.java @@ -54,7 +54,8 @@ public class JmxConnectionHelper { private static final String JNP_DISABLE_DISCOVERY_JNP_INIT_PROP = "jnp.disableDiscovery";
/** - * This is the timeout for the initial connection to the MBeanServer that is made by {@link #start(ResourceContext)}. + * This is the timeout for the initial connection to the MBeanServer that is made by + * {@link org.rhq.plugins.jbossas5.ApplicationServerComponent#start(org.rhq.core.pluginapi.inventory.ResourceContext)}. */ private static final int JNP_TIMEOUT = 30 * 1000; // 30 seconds /** @@ -189,12 +190,15 @@ public class JmxConnectionHelper { // application files (making us unable to update them) Bug: JBNADM-670 connectionSettings.getControlProperties().setProperty(ConnectionFactory.COPY_JARS_TO_TEMP, String.valueOf(Boolean.TRUE)); - - // But tell it to put them in a place that we clean up when shutting down the agent - connectionSettings.getControlProperties().setProperty(ConnectionFactory.JAR_TEMP_DIR, - tmpDir.getAbsolutePath()); }
+ // Tell EMS to use the plugin's temp dir, so the PC will be able to clean it up and so an access control + // policy can easily be defined for the dir. EMS will use this for connection libraries (i.e. client + // jars) if COPY_JARS control prop is true, but it will also use it for the ems-mpl jar no matter what, + // so we need to always set it. + connectionSettings.getControlProperties().setProperty(ConnectionFactory.JAR_TEMP_DIR, + tmpDir.getAbsolutePath()); + connectionSettings.getAdvancedProperties().setProperty(InternalVMTypeDescriptor.DEFAULT_DOMAIN_SEARCH, "jboss");
diff --git a/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatServerComponent.java b/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatServerComponent.java index 3597999..89cbd72 100644 --- a/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatServerComponent.java +++ b/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatServerComponent.java @@ -199,6 +199,7 @@ public class TomcatServerComponent implements JMXComponent, MeasurementFacet, Op
// Tell EMS to make copies of jar files so that the ems classloader doesn't lock // application files (making us unable to update them) Bug: JBNADM-670 + // TODO (ips): Turn this off in the embedded case. connectionSettings.getControlProperties().setProperty(ConnectionFactory.COPY_JARS_TO_TEMP, String.valueOf(Boolean.TRUE));
rhq-commits@lists.fedorahosted.org