modules/core/client-api/src/main/java/org/rhq/core/clientapi/descriptor/PluginTransformer.java | 2 modules/core/dbutils/src/main/java/org/rhq/core/db/upgrade/CustomAlertSenderUpgradeTask.java | 15 +- modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Property.java | 3 modules/core/domain/src/main/java/org/rhq/core/domain/search/SearchSuggestion.java | 1 modules/core/util/src/main/java/org/rhq/core/util/MessageDigestGenerator.java | 2 modules/core/util/src/main/java/org/rhq/core/util/updater/ExtractorZipFileVisitor.java | 5 modules/core/util/src/main/java/org/rhq/core/util/updater/InMemoryZipFileVisitor.java | 7 - modules/enterprise/gui/base-perspective-jar/pom.xml | 48 ++++-- modules/enterprise/gui/coregui/pom.xml | 11 + modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/operation/create/OperationCreateWizard.java | 1 modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SubjectGWTServiceImpl.java | 3 modules/enterprise/gui/portal-war/pom.xml | 15 +- modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/role/AddLdapGroupsFormPrepareAction.java | 32 +++- modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/content/CreateNewPackageUIBean.java | 69 ++-------- modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/subsystem/SubsystemAlertDefinitionUIBean.java | 4 modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/repo.xhtml | 2 modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/alertHistory.xhtml | 4 modules/enterprise/remoting/client-api/pom.xml | 59 ++++---- modules/enterprise/server/ear/pom.xml | 10 + modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/content/ContentSourceManagerBean.java | 32 ++-- modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/LdapLoginModule.java | 6 modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerBean.java | 32 +++- modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/LdapGroupManagerBean.java | 7 - modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SavedSearchManagerRemote.java | 12 - modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/AbstractSearchAssistant.java | 4 modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/ResourceSearchAssistant.java | 1 modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java | 4 modules/enterprise/server/plugins/alert-operations/src/test/java/org/rhq/enterprise/server/plugins/alertOperations/TokenReplacementTest.java | 2 modules/enterprise/server/plugins/pom.xml | 2 modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/RhnHttpURLConnectionFactory.java | 2 modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/RhnSSLTransport.java | 2 modules/plugins/augeas/pom.xml | 2 modules/plugins/grub/pom.xml | 2 modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/ApplicationServerDiscoveryComponent.java | 41 ++++- modules/plugins/nagios/.classpath | 1 modules/plugins/nagios/.settings/org.eclipse.jdt.core.prefs | 2 modules/plugins/nagios/src/main/java/org/rhq/plugins/nagios/NagiosMonitorComponent.java | 30 +++- modules/plugins/nagios/src/main/resources/META-INF/rhq-plugin.xml | 26 +-- modules/plugins/platform/src/main/java/org/rhq/plugins/platform/LinuxPlatformComponent.java | 2 modules/plugins/pom.xml | 33 +++- modules/plugins/script2/pom.xml | 26 +++ modules/plugins/sshd/pom.xml | 2 42 files changed, 321 insertions(+), 245 deletions(-)
New commits: commit 6e14e4802ad0550c13822220b38a5a9bc6490d17 Author: alexander.kiefer79@googlemail.com <di34475@.dh-com.continental.steel> Date: Wed May 26 10:36:52 2010 +0200
Put RegEx in plugin descriptor, modified ComponentClass to handle them
diff --git a/modules/plugins/nagios/.classpath b/modules/plugins/nagios/.classpath index 70a3874..cb112c7 100644 --- a/modules/plugins/nagios/.classpath +++ b/modules/plugins/nagios/.classpath @@ -2,6 +2,7 @@ <classpath> <classpathentry kind="src" output="target/classes" path="src/main/java"/> <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/> + <classpathentry kind="src" output="target/test-classes" path="src/test/java"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/> <classpathentry kind="output" path="target/classes"/> diff --git a/modules/plugins/nagios/.settings/org.eclipse.jdt.core.prefs b/modules/plugins/nagios/.settings/org.eclipse.jdt.core.prefs index 078b951..4156312 100644 --- a/modules/plugins/nagios/.settings/org.eclipse.jdt.core.prefs +++ b/modules/plugins/nagios/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,4 @@ -#Thu Apr 22 22:19:52 CEST 2010 +#Fri May 21 08:40:23 CEST 2010 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 org.eclipse.jdt.core.compiler.compliance=1.5 diff --git a/modules/plugins/nagios/src/main/java/org/rhq/plugins/nagios/NagiosMonitorComponent.java b/modules/plugins/nagios/src/main/java/org/rhq/plugins/nagios/NagiosMonitorComponent.java index 51120a6..d8fdc7a 100644 --- a/modules/plugins/nagios/src/main/java/org/rhq/plugins/nagios/NagiosMonitorComponent.java +++ b/modules/plugins/nagios/src/main/java/org/rhq/plugins/nagios/NagiosMonitorComponent.java @@ -19,6 +19,8 @@ package org.rhq.plugins.nagios; */
import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern;
import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -123,11 +125,6 @@ public class NagiosMonitorComponent implements ResourceComponent, MeasurementFac { //Getting all Nagios system information nagiosSystemData = nagiosManagementInterface.createNagiosSystemData(); - -// log.info(nagiosSystemData.getSingleHostServiceMetric("execution_time", "Current Load", "localhost").getValue()); -// log.info(nagiosSystemData.getSingleHostServiceMetric("host_execution_time", "Current Load", "localhost").getValue()); -// log.info(nagiosSystemData.getSingleHostServiceMetric("host_check_period", "Current Load", "localhost").getValue()); - } catch (Exception e) { @@ -140,16 +137,33 @@ public class NagiosMonitorComponent implements ResourceComponent, MeasurementFac { try { // Don't let one bad egg spoil the cake + + String[] splitter = req.getName().split("|"); + String property = splitter[1]; + String pattern = splitter[2]; + + log.info("Name of Metric: " + property); + log.info("RegEx: " + pattern);
if (req.getDataType() == DataType.MEASUREMENT) { - String value = nagiosSystemData.getSingleHostServiceMetric(req.getName(), serviceName, "localhost").getValue(); // TODO use 'real' host - MeasurementDataNumeric res = new MeasurementDataNumeric(req, Double.valueOf(value)); + String value = nagiosSystemData.getSingleHostServiceMetric(property, serviceName, "localhost").getValue(); // TODO use 'real' host + + Pattern p = Pattern.compile(pattern); + Matcher m = p.matcher(value); + String val = m.group(1); + + MeasurementDataNumeric res = new MeasurementDataNumeric(req, Double.valueOf(val)); report.addData(res); } else if(req.getDataType() == DataType.TRAIT) { String value = nagiosSystemData.getSingleHostServiceMetric(req.getName(), serviceName, "localhost").getValue(); // TODO use 'real' host - MeasurementDataTrait res = new MeasurementDataTrait(req, value); + + Pattern p = Pattern.compile(pattern); + Matcher m = p.matcher(value); + String val = m.group(1); + + MeasurementDataTrait res = new MeasurementDataTrait(req, val); report.addData(res); } else diff --git a/modules/plugins/nagios/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/nagios/src/main/resources/META-INF/rhq-plugin.xml index 26d1743..b1b44a3 100644 --- a/modules/plugins/nagios/src/main/resources/META-INF/rhq-plugin.xml +++ b/modules/plugins/nagios/src/main/resources/META-INF/rhq-plugin.xml @@ -7,7 +7,7 @@ xmlns:c="urn:xmlns:rhq-configuration" description="Interface to Nagios monitoring system. Nagios needs to be equipped with mk_livestatus module for this plugin to work" - version="3.0.0.B05" + version="3.0.0.B04" >
@@ -26,25 +26,17 @@ description="Port on which mk_livestatus is listening"/> </plugin-configuration>
- <service name="Root Partition" class="NagiosMonitorComponent" discovery="NagiosMonitorDiscovery" description="check_disc_root service"> - <metric property="execution_time" displayName="execution_time" measurementType="dynamic" units="milliseconds" displayType="summary"/> - <metric property="host_execution_time" displayName="host_execution_time" measurementType="dynamic" units="milliseconds" displayType="summary"/> - <metric property="host_check_period" displayName="host_check_period" dataType="trait" displayType="summary"/> + <service name="Root Partition" class="NagiosMonitorComponent" discovery="NagiosMonitorDiscovery" description="root partition service"> + <metric property="free_space|plugin_output|.*/ ([\\d]+).*" displayName="free_space" measurementType="dynamic" units="megabytes" displayType="summary"/> </service> - <service name="Current Load" class="NagiosMonitorComponent" discovery="NagiosMonitorDiscovery" description="check_disc_root service"> - <metric property="execution_time" displayName="execution_time" measurementType="dynamic" units="milliseconds" displayType="summary"/> - <metric property="host_execution_time" displayName="host_execution_time" measurementType="dynamic" units="milliseconds" displayType="summary"/> - <metric property="host_check_period" displayName="host_check_period" dataType="trait" displayType="summary"/> + <service name="Current Load" class="NagiosMonitorComponent" discovery="NagiosMonitorDiscovery" description="current load service"> + <metric property="load_average|plugin_output|.*: ([\\d]+\\.[\\d]+), ([\\d]+\\.[\\d]+), ([\\d]+\\.[\\d]+).*" displayName="loadAverage" measurementType="dynamic" units="none" displayType="summary"/> </service> - <service name="Current users" class="NagiosMonitorComponent" discovery="NagiosMonitorDiscovery" description="check_disc_root service"> - <metric property="execution_time" displayName="execution_time" measurementType="dynamic" units="milliseconds" displayType="summary"/> - <metric property="host_execution_time" displayName="host_execution_time" measurementType="dynamic" units="milliseconds" displayType="summary"/> - <metric property="host_check_period" displayName="host_check_period" dataType="trait" displayType="summary"/> + <service name="Current Users" class="NagiosMonitorComponent" discovery="NagiosMonitorDiscovery" description="current users service"> + <metric property="current_users|plugin_output|.*- ([\\d]+).*" displayName="current_users" measurementType="dynamic" units="none" displayType="summary"/> </service> - <service name="SSH" class="NagiosMonitorComponent" discovery="NagiosMonitorDiscovery" description="check_disc_root service"> - <metric property="execution_time" displayName="execution_time" measurementType="dynamic" units="milliseconds" displayType="summary"/> - <metric property="host_execution_time" displayName="host_execution_time" measurementType="dynamic" units="milliseconds" displayType="summary"/> - <metric property="host_check_period" displayName="host_check_period" dataType="trait" displayType="summary"/> + <service name="Total Processes" class="NagiosMonitorComponent" discovery="NagiosMonitorDiscovery" description="total processes service"> + <metric property="total_processes|plugin_output|.*: ([\\d]+).*" displayName="total_pocesses" measurementType="dynamic" units="none" displayType="summary"/> </service> </server> </plugin>
commit b2da6e75c1d860df6d4aa925a40b670348e7b904 Merge: 21a6710... b1bddcd... Author: alexander.kiefer79@googlemail.com <di34475@.dh-com.continental.steel> Date: Wed May 26 10:34:07 2010 +0200
Merge branch 'nagios' of ssh://git.fedorahosted.org/git/rhq/rhq into nagios
commit 21a671064f95793aa5a6163a38b7b134ce25a0a0 Merge: 0cd562b... 3533189... Author: alexander.kiefer79@googlemail.com <di34475@.dh-com.continental.steel> Date: Thu May 20 11:42:52 2010 +0200
Merge branch 'nagios' of ssh://git.fedorahosted.org/git/rhq/rhq into nagios
commit 0cd562bbad7d94b33a7f92aa3e083b50ceb0ba1c Author: Heiko W. Rupp hwr@redhat.com Date: Thu May 20 10:07:21 2010 +0200
Disable jdk6 needing plugins
diff --git a/modules/enterprise/server/ear/pom.xml b/modules/enterprise/server/ear/pom.xml index e373421..bf15866 100644 --- a/modules/enterprise/server/ear/pom.xml +++ b/modules/enterprise/server/ear/pom.xml @@ -320,11 +320,13 @@ <version>${project.version}</version> </artifactItem>
+<!-- TODO:jdk6 - temporarily disabled because of jdk6 requirement <artifactItem> <groupId>org.rhq</groupId> <artifactId>alert-scriptlang</artifactId> <version>${project.version}</version> </artifactItem> +-->
<artifactItem> <groupId>org.rhq</groupId> @@ -383,7 +385,7 @@ <version>${project.version}</version> </artifactItem> </artifactItems> - + <outputDirectory>${earDirectory}/rhq-downloads/rhq-plugins</outputDirectory> </configuration> </execution> @@ -408,7 +410,7 @@ <version>${project.version}</version> </artifactItem> </artifactItems> - + <outputDirectory>${earDirectory}/rhq-serverplugins</outputDirectory> </configuration> </execution> @@ -547,11 +549,13 @@ <version>${project.version}</version> </artifactItem>
+<!-- TODO:jdk6 temporarily disabled because of jdk6 requirement <artifactItem> <groupId>org.rhq</groupId> <artifactId>rhq-script2-plugin</artifactId> <version>${project.version}</version> </artifactItem> +-->
<artifactItem> <groupId>org.rhq</groupId> @@ -606,6 +610,7 @@ <artifactId>rhq-sshd-plugin</artifactId> <version>${project.version}</version> </artifactItem> +<!-- TODO:jdk6 - temporarily disabled because of jdk6 requirement
<artifactItem> <groupId>org.rhq</groupId> @@ -619,6 +624,7 @@ <version>${project.version}</version> </artifactItem>
+--> </artifactItems> <outputDirectory>${earDirectory}/rhq-downloads/rhq-plugins</outputDirectory> </configuration>
commit a4b4b451c9c31ad933f2230293929b309e4a049a Author: Heiko W. Rupp hwr@redhat.com Date: Thu May 20 09:33:39 2010 +0200
Disable the scriptlang sender for now as it requires jdk6
diff --git a/modules/enterprise/server/plugins/pom.xml b/modules/enterprise/server/plugins/pom.xml index 06f91cf..1e17ce8 100644 --- a/modules/enterprise/server/plugins/pom.xml +++ b/modules/enterprise/server/plugins/pom.xml @@ -76,7 +76,7 @@ <module>alert-microblog</module> <module>alert-operations</module> <module>alert-roles</module> - <module>alert-scriptlang</module> +<!-- <module>alert-scriptlang</module> disabled foe the moment because of jdk6 requirements --> <!-- Seeing strange issues with corrupt jar dependencies... <module>alert-sms</module> -->
commit e610db209d351fa8ee598bf2c6e8feabe86201a3 Author: Heiko W. Rupp hwr@redhat.com Date: Wed May 19 20:22:50 2010 +0200
Use jdk5 api.
diff --git a/modules/enterprise/server/plugins/alert-operations/src/test/java/org/rhq/enterprise/server/plugins/alertOperations/TokenReplacementTest.java b/modules/enterprise/server/plugins/alert-operations/src/test/java/org/rhq/enterprise/server/plugins/alertOperations/TokenReplacementTest.java index 45b03d6..a3081c4 100644 --- a/modules/enterprise/server/plugins/alert-operations/src/test/java/org/rhq/enterprise/server/plugins/alertOperations/TokenReplacementTest.java +++ b/modules/enterprise/server/plugins/alert-operations/src/test/java/org/rhq/enterprise/server/plugins/alertOperations/TokenReplacementTest.java @@ -163,7 +163,7 @@ public class TokenReplacementTest {
String result = PrintTokens.createTokenDescription(); assert result != null; - assert !result.isEmpty(); + assert !result.equals(""); assert result.contains("<token "); }
commit 22fb10f7d01e84829e43d02dbf719e5be94c9d64 Author: Heiko W. Rupp hwr@redhat.com Date: Wed May 19 18:35:14 2010 +0200
Add missing dependency for jdk15
diff --git a/modules/enterprise/gui/base-perspective-jar/pom.xml b/modules/enterprise/gui/base-perspective-jar/pom.xml index 91a5440..ad30bfb 100644 --- a/modules/enterprise/gui/base-perspective-jar/pom.xml +++ b/modules/enterprise/gui/base-perspective-jar/pom.xml @@ -20,14 +20,14 @@ <developerConnection>scm:git:ssh://git.fedorahosted.org/git/rhq.git/modules/enterprise/gui/base-perspective-jar/</developerConnection> </scm>
- <properties> - <jsf.version>1.2_14</jsf.version> - <facelets.version>1.1.15.B1</facelets.version> - <!-- NOTE: Seam 2.1.2 and 2.2.0 can't be used in webapps deployed to the RHQ Server + <properties> + <jsf.version>1.2_14</jsf.version> + <facelets.version>1.1.15.B1</facelets.version> + <!-- NOTE: Seam 2.1.2 and 2.2.0 can't be used in webapps deployed to the RHQ Server due to https://jira.jboss.org/jira/browse/JBSEAM-4029. Seam 2.2.1 can be used once it's released. --> - <seam.version>2.1.0.SP1</seam.version> - <jboss-el.version>1.0_02.CR5</jboss-el.version> + <seam.version>2.1.0.SP1</seam.version> + <jboss-el.version>1.0_02.CR5</jboss-el.version> <richfaces.version>3.3.2.SR1</richfaces.version> <rhq.version>3.0.0-SNAPSHOT</rhq.version> </properties> @@ -39,7 +39,7 @@ <dependency> <groupId>org.rhq</groupId> <artifactId>rhq-remoting-client-api</artifactId> - <version>${project.parent.version}</version> + <version>${project.parent.version}</version> </dependency>
<dependency> @@ -47,7 +47,7 @@ <artifactId>jsf-facelets</artifactId> <version>${facelets.version}</version> </dependency> - + <dependency> <groupId>org.jboss.seam</groupId> <artifactId>jboss-seam</artifactId> @@ -56,11 +56,11 @@ <exclusion> <groupId>javax.el</groupId> <artifactId>el-api</artifactId> - </exclusion> + </exclusion> <exclusion> <groupId>xml-apis</groupId> <artifactId>xml-apis</artifactId> - </exclusion> + </exclusion> </exclusions> </dependency>
@@ -78,7 +78,7 @@ <exclusion> <groupId>javax.el</groupId> <artifactId>el-api</artifactId> - </exclusion> + </exclusion> </exclusions> </dependency>
@@ -105,13 +105,13 @@ <artifactId>jsf-api</artifactId> <version>${jsf.version}</version> </dependency> - + <dependency> <groupId>org.rhq</groupId> <artifactId>rhq-core-gui</artifactId> <version>${rhq.version}</version> </dependency> - + </dependencies>
</dependencyManagement> @@ -123,12 +123,12 @@ <groupId>org.rhq</groupId> <artifactId>rhq-remoting-client-api</artifactId> </dependency> - + <dependency> <groupId>com.sun.facelets</groupId> <artifactId>jsf-facelets</artifactId> </dependency> - + <dependency> <groupId>org.jboss.seam</groupId> <artifactId>jboss-seam</artifactId> @@ -158,7 +158,7 @@ <groupId>org.jboss.el</groupId> <artifactId>jboss-el</artifactId> </dependency> - + <dependency> <groupId>org.richfaces.framework</groupId> <artifactId>richfaces-api</artifactId> @@ -173,18 +173,26 @@ <groupId>org.richfaces.ui</groupId> <artifactId>richfaces-ui</artifactId> </dependency> - + <dependency> <groupId>javax.faces</groupId> <artifactId>jsf-api</artifactId> <scope>provided</scope> </dependency> - + <dependency> <groupId>org.rhq</groupId> <artifactId>rhq-core-gui</artifactId> </dependency> - + + <dependency> + <!-- TODO only load in for jdk5 builds --> + <groupId>sun-jaxws</groupId> + <artifactId>jsr181-api</artifactId> + <version>2.1.1</version> + </dependency> + + </dependencies>
<repositories> @@ -198,5 +206,5 @@ </snapshots> </repository> </repositories> - + </project>
commit b78f470901ba0ccbbc0d1ed84791c19e95b49a76 Author: Heiko W. Rupp hwr@redhat.com Date: Wed May 19 17:00:37 2010 +0200
Disable the jdk6 plugins completely for the moment.
diff --git a/modules/plugins/pom.xml b/modules/plugins/pom.xml index 1813d1c..85d6105 100644 --- a/modules/plugins/pom.xml +++ b/modules/plugins/pom.xml @@ -153,6 +153,7 @@ </modules> </profile>
+<!-- <profile> <id>jdk6-only-plugins</id> <activation> @@ -167,11 +168,6 @@ <id>jdk6-linux-plugins</id> <activation> <jdk>[1.6,)</jdk> -<!-- - <property> - <name>java.home</name> - </property> ---> </activation> <modules> <module>virt</module> @@ -180,6 +176,7 @@ </modules>
</profile> +-->
<profile> <id>misc-plugins</id>
commit 028a70678e4b53ae55afc07616e03bef0befa0de Author: Heiko W. Rupp hwr@redhat.com Date: Wed May 19 16:28:44 2010 +0200
Fix a typo *sigh*
diff --git a/modules/plugins/script2/pom.xml b/modules/plugins/script2/pom.xml index 568fe04..3ca3e1d 100644 --- a/modules/plugins/script2/pom.xml +++ b/modules/plugins/script2/pom.xml @@ -69,32 +69,33 @@ </build>
<profiles> - <profile>
- <!-- Unlike most of RHQ, this module requires JDK6, so replace the Java 5 bootclasspath that was added to the compiler args by the root POM with a bootclasspath based on the java.home sysprop (which should be Java 6 or later if the enforcer plugin did its job). --> - <profile> - <id>check-java-api</id> + <!-- Unlike most of RHQ, this module requires JDK6, so replace the Java 5 bootclasspath that was added to the compiler args by the root POM with a bootclasspath based on the java.home sysprop (which should be Java 6 or later if the enforcer plugin did its job). --> + <profile> + <id>check-java-api</id> + + <activation> + <property> + <name>java5.home</name> + </property> + </activation> + + <build> + <plugins> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <compilerArguments> + <bootclasspath>${java.home}/lib/rt.jar${path.separator}${java.home}/lib/jsse.jar${path.separator}${java.home}/lib/jce.jar</bootclasspath> + </compilerArguments> + </configuration> + </plugin> + </plugins> + </build>
- <activation> - <property> - <name>java5.home</name> - </property> - </activation> + </profile>
- <build> - <plugins> - <plugin> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <compilerArguments> - <bootclasspath>${java.home}/lib/rt.jar${path.separator}${java.home}/lib/jsse.jar${path.separator}${java.home}/lib/jce.jar</bootclasspath> - </compilerArguments> - </configuration> - </plugin> - </plugins> - </build> - </profile> - + <profile> <id>dev</id>
<properties>
commit ab32e795b9e76153d6292b11f0ab77e6dc69b240 Merge: 4cd12d1... 643b2cb... Author: Heiko W. Rupp hwr@redhat.com Date: Wed May 19 16:16:50 2010 +0200
Merge branch 'master' of ssh://git.fedorahosted.org/git/rhq/rhq
commit 4cd12d13e7463b198f6ab95f2848148ac32571ea Author: Heiko W. Rupp hwr@redhat.com Date: Wed May 19 16:16:09 2010 +0200
Check for jdk5 in the script2 module and disable its build then.
diff --git a/modules/plugins/script2/pom.xml b/modules/plugins/script2/pom.xml index 038ce5c..568fe04 100644 --- a/modules/plugins/script2/pom.xml +++ b/modules/plugins/script2/pom.xml @@ -70,6 +70,31 @@
<profiles> <profile> + + <!-- Unlike most of RHQ, this module requires JDK6, so replace the Java 5 bootclasspath that was added to the compiler args by the root POM with a bootclasspath based on the java.home sysprop (which should be Java 6 or later if the enforcer plugin did its job). --> + <profile> + <id>check-java-api</id> + + <activation> + <property> + <name>java5.home</name> + </property> + </activation> + + <build> + <plugins> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <compilerArguments> + <bootclasspath>${java.home}/lib/rt.jar${path.separator}${java.home}/lib/jsse.jar${path.separator}${java.home}/lib/jce.jar</bootclasspath> + </compilerArguments> + </configuration> + </plugin> + </plugins> + </build> + </profile> + <id>dev</id>
<properties>
commit 643b2cbf99961da02f69337e2d489d0fdb933934 Author: John Mazzitelli mazz@redhat.com Date: Wed May 19 09:08:47 2010 -0400
BZ 587026: use Iterator.remove API to avoid concurrent modification exceptions during the loop over the keyset of the cache
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerBean.java index ab94c0a..9b6b93b 100644 --- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerBean.java +++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerBean.java @@ -21,6 +21,7 @@ package org.rhq.enterprise.server.perspective; import java.util.ArrayList; import java.util.EnumSet; import java.util.HashMap; +import java.util.Iterator; import java.util.List; import java.util.Map;
@@ -228,16 +229,18 @@ public class PerspectiveManagerBean implements PerspectiveManagerLocal, Perspect Subject subject;
synchronized (CACHE) { - for (Integer sessionId : CACHE.keySet()) { + Iterator<Integer> iterator = CACHE.keySet().iterator(); // so we can use iterator.remove and avoid concurrent-mod-exception + while (iterator.hasNext()) { + Integer sessionId = iterator.next(); try { subject = subjectManager.getSubjectBySessionId(sessionId); if (null == subject) { - log.debug("Removing perspective cache entry for session " + sessionId); - CACHE.remove(sessionId); + log.debug("Removing perspective cache entry for session. " + sessionId); + iterator.remove(); } } catch (Exception e) { - log.debug("Removing perspective cache entry for session " + sessionId); - CACHE.remove(sessionId); + log.debug("Removing perspective cache entry for session: " + sessionId); + iterator.remove(); } } }
commit 8d1c051fbb07765ea3e746754ae61aabe2257a12 Author: John Sanda jsanda@redhat.com Date: Wed May 19 08:08:45 2010 -0400
[BZ 591485] Removing calls to delete alert templates when they are enabled/disabled
Fixing some alert property name references in alertHistory.xhtml.
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/subsystem/SubsystemAlertDefinitionUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/subsystem/SubsystemAlertDefinitionUIBean.java index 2e8d49c..41cc2fa 100644 --- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/subsystem/SubsystemAlertDefinitionUIBean.java +++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/subsystem/SubsystemAlertDefinitionUIBean.java @@ -205,8 +205,6 @@ public class SubsystemAlertDefinitionUIBean extends SubsystemView { // then delete templates and group alert defs, which are both tolerant of missing child definitions groupAlertDefinitionManager.disableGroupAlertDefinitions(subject, groupDefinitions .toArray(new Integer[groupDefinitions.size()])); - alertTemplateManager.removeAlertTemplates(subject, typeDefinitions.toArray(new Integer[typeDefinitions - .size()]));
FacesContextUtility.addMessage(FacesMessage.SEVERITY_INFO, "Disable selected alert definitions."); } catch (Exception e) { @@ -244,8 +242,6 @@ public class SubsystemAlertDefinitionUIBean extends SubsystemView { // then delete templates and group alert defs, which are both tolerant of missing child definitions groupAlertDefinitionManager.enableGroupAlertDefinitions(subject, groupDefinitions .toArray(new Integer[groupDefinitions.size()])); - alertTemplateManager.removeAlertTemplates(subject, typeDefinitions.toArray(new Integer[typeDefinitions - .size()]));
FacesContextUtility.addMessage(FacesMessage.SEVERITY_INFO, "Enable selected alert definitions."); } catch (Exception e) { diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/alertHistory.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/alertHistory.xhtml index 1f81df9..f2ca8fd 100644 --- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/alertHistory.xhtml +++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/alertHistory.xhtml @@ -168,7 +168,7 @@ <f:facet name="header"> <h:outputText styleClass="headerText" value="Ack by" /> </f:facet> - <h:outputText value="#{item.original.alert.ackBy.name}" title="#{item.original.alert.ackBy.firstName} #{item.original.alert.ackBy.lastName}"/> + <h:outputText value="#{item.original.alert.acknowledgingSubject}" title="#{item.original.alert.acknowledgingSubject}"/> </rich:column>
rich:column @@ -177,7 +177,7 @@ <h:outputText styleClass="headerText" value="Ack date" /> </onc:sortableColumnHeader> </f:facet> - <h:outputText value="#{item.original.alert.ackTime}"> + <h:outputText value="#{item.original.alert.acknowledgeTime}"> <f:converter converterId="RelativeDurationConverter" /> </h:outputText> </rich:column>
commit 5e431bd864c35b6f1917b7edf2d8ba78b13b2faf Merge: d6a1bdf... 1bf7956... Author: John Sanda jsanda@redhat.com Date: Tue May 18 14:52:22 2010 -0400
Merge branch 'master' of ssh://git.fedorahosted.org/git/rhq/rhq
commit d6a1bdf05d4a688f11781ed270b1cf5109db27d2 Author: John Sanda jsanda@redhat.com Date: Tue May 18 14:48:42 2010 -0400
[BZ 593000] Adding logic to check for different client jars based on JBoss AS version
There are a couple additional jars specific to AS 6 that that discovery component looks for in its impl of ClassLoaderFacet.getAdditionalClasspathUrls. Those jars are not found on an EAP 5 server, which results in an exception being thrown and the plugin components are never properly initialized.
diff --git a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/ApplicationServerDiscoveryComponent.java b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/ApplicationServerDiscoveryComponent.java index 4174283..c5eb7a9 100644 --- a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/ApplicationServerDiscoveryComponent.java +++ b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/ApplicationServerDiscoveryComponent.java @@ -84,14 +84,8 @@ public class ApplicationServerDiscoveryComponent implements ResourceDiscoveryCom private static final String JAVA_HOME_ENV_VAR = "JAVA_HOME";
private static final Map<JBossProductType, ComparableVersion> MINIMUM_PRODUCT_VERSIONS = new HashMap(3); - static { - MINIMUM_PRODUCT_VERSIONS.put(JBossProductType.AS, new ComparableVersion("5.2.0.Beta1")); - MINIMUM_PRODUCT_VERSIONS.put(JBossProductType.EAP, new ComparableVersion("5.0.0.Beta")); - MINIMUM_PRODUCT_VERSIONS.put(JBossProductType.EWP, new ComparableVersion("5.0.0.CR1")); - MINIMUM_PRODUCT_VERSIONS.put(JBossProductType.SOA, new ComparableVersion("5.0.0.Beta")); - }
- private static final String[] CLIENT_JARS = new String[] { + private static final List<String> CLIENT_JARS = Arrays.asList( // NOTE: The jbossall-client.jar aggregates a whole bunch of other jars from the client dir via its // MANIFEST.MF Class-Path. "client/jbossall-client.jar", @@ -100,11 +94,21 @@ public class ApplicationServerDiscoveryComponent implements ResourceDiscoveryCom "common/lib/jboss-security-aspects.jar", "lib/jboss-managed.jar", "lib/jboss-metatype.jar", - "lib/jboss-dependency.jar", - // The below jars are required for JBoss AS 6.0 M1, M2, and M3. - "lib/jboss-classpool.jar", - "lib/jboss-classpool-scoped.jar" - }; + "lib/jboss-dependency.jar" + ); + + private static final List<String> AS6_CLIENT_JARS = new ArrayList<String>(CLIENT_JARS); + + static { + MINIMUM_PRODUCT_VERSIONS.put(JBossProductType.AS, new ComparableVersion("5.2.0.Beta1")); + MINIMUM_PRODUCT_VERSIONS.put(JBossProductType.EAP, new ComparableVersion("5.0.0.Beta")); + MINIMUM_PRODUCT_VERSIONS.put(JBossProductType.EWP, new ComparableVersion("5.0.0.CR1")); + MINIMUM_PRODUCT_VERSIONS.put(JBossProductType.SOA, new ComparableVersion("5.0.0.Beta")); + + // The below jars are required for JBoss AS 6.0 M1, M2, and M3. + AS6_CLIENT_JARS.add("lib/jboss-classpool.jar"); + AS6_CLIENT_JARS.add("lib/jboss-classpool-scoped.jar"); + }
private final Log log = LogFactory.getLog(this.getClass());
@@ -151,7 +155,7 @@ public class ApplicationServerDiscoveryComponent implements ResourceDiscoveryCom
List<URL> clientJars = new ArrayList<URL>();
- for (String jarFileName : CLIENT_JARS) { + for (String jarFileName : getClientJars(pluginConfig)) { File clientJar = new File(homeDir, jarFileName); if (!clientJar.exists()) { throw new FileNotFoundException("Cannot find [" + clientJar + "] - unable to manage server."); @@ -165,6 +169,17 @@ public class ApplicationServerDiscoveryComponent implements ResourceDiscoveryCom return clientJars; }
+ private List<String> getClientJars(Configuration pluginConfig) throws IOException { + PropertySimple jbossHomeDir = pluginConfig.getSimple("homeDir"); + JBossInstallationInfo installationInfo = new JBossInstallationInfo(new File(jbossHomeDir.getStringValue())); + + if (installationInfo.getMajorVersion().equals("6")) { + return AS6_CLIENT_JARS; + } + + return CLIENT_JARS; + } + private Set<DiscoveredResourceDetails> discoverExternalJBossAsProcesses(ResourceDiscoveryContext discoveryContext) { Set<DiscoveredResourceDetails> resources = new HashSet<DiscoveredResourceDetails>(); List<ProcessScanResult> autoDiscoveryResults = discoveryContext.getAutoDiscoveredProcesses();
commit 1bf79560371b4ff1901d32d33cec79d98195df8e Author: Heiko W. Rupp hwr@redhat.com Date: Tue May 18 17:04:20 2010 +0200
More jdk15 exclusions
diff --git a/modules/plugins/pom.xml b/modules/plugins/pom.xml index 8164624..1813d1c 100644 --- a/modules/plugins/pom.xml +++ b/modules/plugins/pom.xml @@ -167,13 +167,16 @@ <id>jdk6-linux-plugins</id> <activation> <jdk>[1.6,)</jdk> +<!-- <property> <name>java.home</name> </property> +--> </activation> <modules> <module>virt</module> <module>kickstart</module> + <module>byteman</module> </modules>
</profile> @@ -187,7 +190,6 @@ </activation>
<modules> - <module>byteman</module> <module>iis</module> <module>database</module> <module>postgres</module>
commit efe5b2749e53e9fa350a3b51aaed67e7ebcd588e Merge: a6285e2... 5415086... Author: Heiko W. Rupp hwr@redhat.com Date: Tue May 18 16:56:00 2010 +0200
Merge branch 'master' of ssh://git.fedorahosted.org/git/rhq/rhq
commit a6285e2215e932a22cdbf19c8850022207909ed2 Author: Heiko W. Rupp hwr@redhat.com Date: Tue May 18 16:42:32 2010 +0200
Another dependency for jdk1.5
diff --git a/modules/enterprise/remoting/client-api/pom.xml b/modules/enterprise/remoting/client-api/pom.xml index 395a90f..605267f 100644 --- a/modules/enterprise/remoting/client-api/pom.xml +++ b/modules/enterprise/remoting/client-api/pom.xml @@ -20,7 +20,7 @@
<properties> <scm.module.path>modules/enterprise/remoting/</scm.module.path> - + <i18nlog.version>1.0.9</i18nlog.version> <log4j.version>1.2.14</log4j.version> <persistence-api.version>1.0</persistence-api.version> @@ -57,43 +57,43 @@ <exclusion> <groupId>oswego-concurrent</groupId> <artifactId>concurrent</artifactId> - </exclusion> - </exclusions> + </exclusion> + </exclusions> </dependency>
<dependency> <groupId>${project.groupId}</groupId> <artifactId>rhq-enterprise-server</artifactId> - <version>${project.version}</version> + <version>${project.version}</version> <exclusions> <exclusion> <groupId>ant</groupId> <artifactId>ant</artifactId> - </exclusion> + </exclusion> <exclusion> <groupId>commons-beanutils</groupId> <artifactId>commons-beanutils</artifactId> - </exclusion> + </exclusion> <exclusion> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> - </exclusion> + </exclusion> <exclusion> <groupId>commons-httpclient</groupId> <artifactId>commons-httpclient</artifactId> - </exclusion> + </exclusion> <exclusion> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> - </exclusion> + </exclusion> <exclusion> <groupId>commons-validator</groupId> <artifactId>commons-validator</artifactId> - </exclusion> + </exclusion> <exclusion> <groupId>dom4j</groupId> <artifactId>dom4j</artifactId> - </exclusion> + </exclusion> <exclusion> <groupId>gnu-getopt</groupId> <artifactId>getopt</artifactId> @@ -101,15 +101,15 @@ <exclusion> <groupId>jboss</groupId> <artifactId>jboss-cache</artifactId> - </exclusion> + </exclusion> <exclusion> <groupId>jboss</groupId> <artifactId>jbpm</artifactId> - </exclusion> + </exclusion> <exclusion> <groupId>junit</groupId> <artifactId>junit</artifactId> - </exclusion> + </exclusion> <exclusion> <groupId>org.rhq</groupId> <artifactId>rhq-core-client-api</artifactId> @@ -133,20 +133,20 @@ <exclusion> <groupId>org.snmp4j</groupId> <artifactId>snmp4j</artifactId> - </exclusion> + </exclusion> <exclusion> <groupId>oswego-concurrent</groupId> <artifactId>concurrent</artifactId> - </exclusion> + </exclusion> <exclusion> <groupId>postgresql</groupId> <artifactId>postgresql</artifactId> - </exclusion> + </exclusion> <exclusion> <groupId>rss4j</groupId> <artifactId>rss4j</artifactId> - </exclusion> - </exclusions> + </exclusion> + </exclusions> </dependency>
<dependency> @@ -164,7 +164,7 @@ <groupId>jdom</groupId> <artifactId>jdom</artifactId> </exclusion> - </exclusions> + </exclusions> </dependency>
<dependency> @@ -176,7 +176,7 @@ <groupId>jboss</groupId> <artifactId>javassist</artifactId> </dependency> - + <dependency> <groupId>javax.persistence</groupId> <artifactId>persistence-api</artifactId> @@ -186,7 +186,7 @@ <groupId>hibernate-annotations</groupId> <artifactId>hibernate-annotations</artifactId> </exclusion> - </exclusions> + </exclusions> </dependency>
<dependency> @@ -198,9 +198,16 @@ <groupId>hibernate-annotations</groupId> <artifactId>hibernate-annotations</artifactId> </dependency> - + + <dependency> + <groupId>jboss.jbossws</groupId> + <artifactId>jboss-jaxws</artifactId> + <version>3.0.1-native-2.0.4.GA</version> + <scope>provided</scope> <!-- by JBossAS --> + </dependency> + </dependencies> - + <profiles> <profile> <id>javadoc</id> @@ -232,7 +239,7 @@ <breakiterator>true</breakiterator> <links> <link>http://java.sun.com/j2se/1.5.0/docs/api/</link> - <link>../remote-api</link> + <link>../remote-api</link> </links> </configuration> <goals> @@ -247,6 +254,6 @@
</profile>
- </profiles> + </profiles>
</project>
commit bbe6e85668779997882df550248002fc3205be46 Author: Heiko W. Rupp hwr@redhat.com Date: Tue May 18 16:39:36 2010 +0200
Another dependency for jdk1.5
diff --git a/modules/enterprise/gui/portal-war/pom.xml b/modules/enterprise/gui/portal-war/pom.xml index 1672828..783942c 100644 --- a/modules/enterprise/gui/portal-war/pom.xml +++ b/modules/enterprise/gui/portal-war/pom.xml @@ -28,7 +28,7 @@ <jsf-facelets.version>1.1.15.B1</jsf-facelets.version> <seam.version>2.1.0.SP1</seam.version>
- <!-- plugin versions --> + <!-- plugin versions --> <jetty-jspc-maven-plugin.version>7.0.1.v20091125</jetty-jspc-maven-plugin.version>
<product.shortName>RHQ</product.shortName> @@ -366,6 +366,13 @@ </dependency>
<dependency> + <groupId>jboss.jbossws</groupId> + <artifactId>jboss-jaxws</artifactId> + <version>3.0.1-native-2.0.4.GA</version> + <scope>provided</scope> <!-- by JBossAS --> + </dependency> + + <dependency> <groupId>xalan</groupId> <artifactId>xalan</artifactId> <version>2.5.1</version> @@ -394,7 +401,7 @@
</dependencies>
- + <build> <finalName>rhq-portal</finalName> <plugins> @@ -475,7 +482,7 @@
</build>
- + <profiles>
<profile> @@ -585,7 +592,7 @@
</profiles>
- + <repositories>
<repository>
commit 3d1ebb7c6c3fb2c654baf999b6f28713ec9403d1 Author: Heiko W. Rupp hwr@redhat.com Date: Tue May 18 16:37:53 2010 +0200
Another dependency for jdk1.5
diff --git a/modules/enterprise/gui/coregui/pom.xml b/modules/enterprise/gui/coregui/pom.xml index 3c87ff0..c45e91f 100644 --- a/modules/enterprise/gui/coregui/pom.xml +++ b/modules/enterprise/gui/coregui/pom.xml @@ -1,6 +1,6 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - + <modelVersion>4.0.0</modelVersion>
<parent> @@ -68,7 +68,7 @@
<!-- =============== 3rd Party Deps =============== --> - + <dependency> <groupId>com.google.gwt</groupId> <artifactId>gwt-servlet</artifactId> @@ -183,6 +183,13 @@ <!-- by JBossAS --> </dependency>
+ <dependency> + <groupId>jboss.jbossws</groupId> + <artifactId>jboss-jaxws</artifactId> + <version>3.0.1-native-2.0.4.GA</version> + <scope>provided</scope> <!-- by JBossAS --> + </dependency> + </dependencies>
commit 071d1ea3e2ea6c6b68a0e650d0ded7d260ed7fa2 Author: Heiko W. Rupp hwr@redhat.com Date: Tue May 18 16:37:02 2010 +0200
Actually use 1.6+
diff --git a/modules/plugins/pom.xml b/modules/plugins/pom.xml index 2ac8f30..8164624 100644 --- a/modules/plugins/pom.xml +++ b/modules/plugins/pom.xml @@ -156,7 +156,7 @@ <profile> <id>jdk6-only-plugins</id> <activation> - <jdk>1.6</jdk> + <jdk>[1.6,)</jdk> </activation> <modules> <module>script2</module> @@ -166,7 +166,7 @@ <profile> <id>jdk6-linux-plugins</id> <activation> - <jdk>1.6</jdk> + <jdk>[1.6,)</jdk> <property> <name>java.home</name> </property>
commit 541508681cfd995aec3da7757fbbd46d4e94e175 Author: John Mazzitelli mazz@redhat.com Date: Tue May 18 10:12:44 2010 -0400
BZ 587026 - fix concurrent mod exception by synchronizing access to the static cache
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerBean.java index e2ab6e4..ab94c0a 100644 --- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerBean.java +++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerBean.java @@ -188,7 +188,10 @@ public class PerspectiveManagerBean implements PerspectiveManagerLocal, Perspect
private CacheEntry getCacheEntry(Subject subject) { Integer sessionId = subject.getSessionId(); - CacheEntry cacheEntry = CACHE.get(sessionId); + CacheEntry cacheEntry; + synchronized (CACHE) { + cacheEntry = CACHE.get(sessionId); + } long metadataLastModifiedTime = getPluginMetadataManager().getLastModifiedTime(); if (cacheEntry == null || cacheEntry.getMetadataLastModifiedTime() < metadataLastModifiedTime) { // Take this opportunity to clean expired sessions from the cache. @@ -207,7 +210,9 @@ public class PerspectiveManagerBean implements PerspectiveManagerLocal, Perspect List<PageLink> filteredPageLinks = applyActivatorsToPageLinks(context, scopes, basePageLinks);
cacheEntry = new CacheEntry(metadataLastModifiedTime, filteredMenu, filteredTabs, filteredPageLinks); - CACHE.put(sessionId, cacheEntry); + synchronized (CACHE) { + CACHE.put(sessionId, cacheEntry); + } } return cacheEntry; } @@ -222,16 +227,18 @@ public class PerspectiveManagerBean implements PerspectiveManagerLocal, Perspect private void cleanCache() { Subject subject;
- for (Integer sessionId : CACHE.keySet()) { - try { - subject = subjectManager.getSubjectBySessionId(sessionId); - if (null == subject) { + synchronized (CACHE) { + for (Integer sessionId : CACHE.keySet()) { + try { + subject = subjectManager.getSubjectBySessionId(sessionId); + if (null == subject) { + log.debug("Removing perspective cache entry for session " + sessionId); + CACHE.remove(sessionId); + } + } catch (Exception e) { log.debug("Removing perspective cache entry for session " + sessionId); CACHE.remove(sessionId); } - } catch (Exception e) { - log.debug("Removing perspective cache entry for session " + sessionId); - CACHE.remove(sessionId); } } }
commit 8431fffb14edd3a4aba89e6b26bf1718099f3a6f Author: Heiko W. Rupp hwr@redhat.com Date: Tue May 18 15:55:51 2010 +0200
Move plugins that depend on jdk6 into their own profiles.
diff --git a/modules/plugins/pom.xml b/modules/plugins/pom.xml index b1b9275..2ac8f30 100644 --- a/modules/plugins/pom.xml +++ b/modules/plugins/pom.xml @@ -80,8 +80,8 @@
<!-- !!! --> <!-- These profile groupings need to also be mirrored in server/ear/pom.xml --> - <!-- !!! --> - + <!-- !!! --> + <modules> <!-- core plugins --> <module>platform</module> @@ -101,7 +101,7 @@
<modules> <!-- NOTE: Order is important. --> - <module>augeas</module> + <module>augeas</module> <module>apache</module> <module>tomcat</module> <module>jboss-as</module> @@ -140,7 +140,6 @@ <module>augeas</module> <module>cron</module> <module>script</module> - <module>script2</module> <module>grub</module> <!-- not behaving <module>hardware</module> --> <module>hosts</module> @@ -151,12 +150,35 @@ <module>postfix</module> <module>aliases</module> <module>sshd</module> - <module>virt</module> - <module>kickstart</module> </modules> </profile>
<profile> + <id>jdk6-only-plugins</id> + <activation> + <jdk>1.6</jdk> + </activation> + <modules> + <module>script2</module> + </modules> + </profile> + + <profile> + <id>jdk6-linux-plugins</id> + <activation> + <jdk>1.6</jdk> + <property> + <name>java.home</name> + </property> + </activation> + <modules> + <module>virt</module> + <module>kickstart</module> + </modules> + + </profile> + + <profile> <id>misc-plugins</id> <activation> <property>
commit 4c4ae4916be15b749af7744724fadc932131903b Author: Heiko W. Rupp hwr@redhat.com Date: Tue May 18 15:37:55 2010 +0200
Revert Ian's commit 804620f9314e4d2b80a980208244b75920b018e7 that got accidently overwritten by my last commit
diff --git a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/descriptor/PluginTransformer.java b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/descriptor/PluginTransformer.java index 613500f..e877c7f 100644 --- a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/descriptor/PluginTransformer.java +++ b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/descriptor/PluginTransformer.java @@ -1,6 +1,6 @@ /* * RHQ Management Platform - * Copyright (C) 2005-2008 Red Hat, Inc. + * Copyright (C) 2005-2010 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or modify @@ -20,7 +20,6 @@ * if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - package org.rhq.core.clientapi.descriptor;
import org.rhq.core.domain.plugin.Plugin; @@ -30,8 +29,7 @@ import org.rhq.core.util.MessageDigestGenerator;
import java.net.URL; import java.io.IOException; -import java.io.File; -import java.util.jar.JarFile; +import java.util.jar.JarInputStream; import java.util.jar.Manifest; import java.util.jar.Attributes;
@@ -94,38 +92,33 @@ public class PluginTransformer { }
private String getMd5(URL pluginURL) throws IOException { - File jarFile = toFile(pluginURL); - return MessageDigestGenerator.getDigestString(jarFile); + return MessageDigestGenerator.getDigestString(pluginURL); }
String getVersion(PluginDescriptor pluginDescriptor, URL pluginURL) throws IOException { - if (pluginDescriptor.getVersion() != null) { - return pluginDescriptor.getVersion(); + String version = pluginDescriptor.getVersion(); + if (version == null) { + version = getVersionFromPluginJarManifest(pluginURL); }
- File pluginJarFile = toFile(pluginURL); - - String version = getVersionFromPluginJarManifest(pluginJarFile); - if (version == null) { - throw new PluginTransformException("No version is defined for plugin jar [" + pluginJarFile - + "]. A version must be defined either via the MANIFEST.MF [" + Attributes.Name.IMPLEMENTATION_VERSION - + "] attribute or via the plugin descriptor 'version' attribute."); + throw new PluginTransformException("No version is defined for plugin jar [" + pluginURL + + "]. A version must be defined either via the MANIFEST.MF '" + Attributes.Name.IMPLEMENTATION_VERSION + + "' attribute or via the plugin descriptor 'version' attribute."); }
return version; }
- private String getVersionFromPluginJarManifest(File pluginJarFile) throws IOException { - JarFile jarFile = new JarFile(pluginJarFile); - Manifest manifest = jarFile.getManifest(); - Attributes attributes = manifest.getMainAttributes(); - - return attributes.getValue(Attributes.Name.IMPLEMENTATION_VERSION); - } - - private File toFile(URL url) { - return new File(url.getPath()); + private String getVersionFromPluginJarManifest(URL pluginJarUrl) throws IOException { + JarInputStream jarInputStream = new JarInputStream(pluginJarUrl.openStream()); + jarInputStream.close(); + Manifest manifest = jarInputStream.getManifest(); + if (manifest != null) { + Attributes attributes = manifest.getMainAttributes(); + return attributes.getValue(Attributes.Name.IMPLEMENTATION_VERSION); + } else { + return null; + } } - } diff --git a/modules/core/util/src/main/java/org/rhq/core/util/MessageDigestGenerator.java b/modules/core/util/src/main/java/org/rhq/core/util/MessageDigestGenerator.java index 9a20424..0ffbe96 100644 --- a/modules/core/util/src/main/java/org/rhq/core/util/MessageDigestGenerator.java +++ b/modules/core/util/src/main/java/org/rhq/core/util/MessageDigestGenerator.java @@ -1,6 +1,6 @@ /* * RHQ Management Platform - * Copyright (C) 2005-2008 Red Hat, Inc. + * Copyright (C) 2005-2010 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or modify @@ -28,6 +28,7 @@ import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; +import java.net.URL; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException;
@@ -35,7 +36,7 @@ import java.security.NoSuchAlgorithmException; * An object that generates a message digest or hash for algorithms such as MD5 or SHA. This class is basically a * wrapper around {@link java.security.MessageDigest} and provides convenience methods making it easier to generate * hashes. - * + * * There are static methods in here that use MD5 as the default algorithm. If you want to use another * algorithm, instantiate an instance of this object and use its instance methods. */ @@ -260,6 +261,18 @@ public class MessageDigestGenerator { } }
+ public byte[] calcDigest(URL url) throws IOException { + InputStream is = null; + try { + is = url.openStream(); + return calcDigest(new BufferedInputStream(is, 1024 * 32)); + } finally { + if (is != null) { + is.close(); + } + } + } + /** * Calculates the digest for a given file. The file's contents will be used as the source data for the digest calculation. * @@ -279,6 +292,24 @@ public class MessageDigestGenerator { }
/** + * Calculates the digest for a given file. The file's contents will be used as the source data for the digest calculation. + * + * @param url the URL whose contents are to be used to calculate the digest. + * + * @return the URL content's digest as a String + * + * @throws IOException if the URL could not be read or accessed + */ + public static String getDigestString(URL url) throws IOException { + MessageDigestGenerator md5 = new MessageDigestGenerator(MD5); + return md5.calcDigestString(url); + } + + public String calcDigestString(URL url) throws IOException { + return calculateDigestStringFromBytes(calcDigest(url)); + } + + /** * Given a digest byte array, this will return its String representation. * * @param bytes the digest whose String representation is to be returned
commit 24beba04a8b570d3dfbfcdc0d2b0410c06755e13 Author: Heiko W. Rupp hwr@redhat.com Date: Tue May 18 14:57:22 2010 +0200
First batch of changes from the jdk15 branch to be merged back.
diff --git a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/descriptor/PluginTransformer.java b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/descriptor/PluginTransformer.java index ecaa80b..613500f 100644 --- a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/descriptor/PluginTransformer.java +++ b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/descriptor/PluginTransformer.java @@ -1,6 +1,6 @@ /* * RHQ Management Platform - * Copyright (C) 2005-2010 Red Hat, Inc. + * Copyright (C) 2005-2008 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or modify @@ -20,6 +20,7 @@ * if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + package org.rhq.core.clientapi.descriptor;
import org.rhq.core.domain.plugin.Plugin; @@ -29,7 +30,8 @@ import org.rhq.core.util.MessageDigestGenerator;
import java.net.URL; import java.io.IOException; -import java.util.jar.JarInputStream; +import java.io.File; +import java.util.jar.JarFile; import java.util.jar.Manifest; import java.util.jar.Attributes;
@@ -92,33 +94,38 @@ public class PluginTransformer { }
private String getMd5(URL pluginURL) throws IOException { - return MessageDigestGenerator.getDigestString(pluginURL); + File jarFile = toFile(pluginURL); + return MessageDigestGenerator.getDigestString(jarFile); }
String getVersion(PluginDescriptor pluginDescriptor, URL pluginURL) throws IOException { - String version = pluginDescriptor.getVersion(); - if (version == null) { - version = getVersionFromPluginJarManifest(pluginURL); + if (pluginDescriptor.getVersion() != null) { + return pluginDescriptor.getVersion(); } - + + File pluginJarFile = toFile(pluginURL); + + String version = getVersionFromPluginJarManifest(pluginJarFile); + if (version == null) { - throw new PluginTransformException("No version is defined for plugin jar [" + pluginURL - + "]. A version must be defined either via the MANIFEST.MF '" + Attributes.Name.IMPLEMENTATION_VERSION - + "' attribute or via the plugin descriptor 'version' attribute."); + throw new PluginTransformException("No version is defined for plugin jar [" + pluginJarFile + + "]. A version must be defined either via the MANIFEST.MF [" + Attributes.Name.IMPLEMENTATION_VERSION + + "] attribute or via the plugin descriptor 'version' attribute."); }
return version; }
- private String getVersionFromPluginJarManifest(URL pluginJarUrl) throws IOException { - JarInputStream jarInputStream = new JarInputStream(pluginJarUrl.openStream()); - jarInputStream.close(); - Manifest manifest = jarInputStream.getManifest(); - if (manifest != null) { - Attributes attributes = manifest.getMainAttributes(); - return attributes.getValue(Attributes.Name.IMPLEMENTATION_VERSION); - } else { - return null; - } + private String getVersionFromPluginJarManifest(File pluginJarFile) throws IOException { + JarFile jarFile = new JarFile(pluginJarFile); + Manifest manifest = jarFile.getManifest(); + Attributes attributes = manifest.getMainAttributes(); + + return attributes.getValue(Attributes.Name.IMPLEMENTATION_VERSION); } + + private File toFile(URL url) { + return new File(url.getPath()); + } + } diff --git a/modules/core/dbutils/src/main/java/org/rhq/core/db/upgrade/CustomAlertSenderUpgradeTask.java b/modules/core/dbutils/src/main/java/org/rhq/core/db/upgrade/CustomAlertSenderUpgradeTask.java index 8ff2ab5..bcd210c 100644 --- a/modules/core/dbutils/src/main/java/org/rhq/core/db/upgrade/CustomAlertSenderUpgradeTask.java +++ b/modules/core/dbutils/src/main/java/org/rhq/core/db/upgrade/CustomAlertSenderUpgradeTask.java @@ -28,22 +28,22 @@ import org.rhq.core.db.DatabaseType; * The introduction of custom alert senders brought with it the denormalization of the AlertNotification schema. * Instead of the AlertNotification entity storing the notification-related data itself (through referential integrity) * it has been subsumed inside of configuration objects, which are then associated back to the entity. - * + * * Each custom alert sender has full control over the structure within that configuration object. This task represents - * the work necessary to translate the first-class notification data (previously stored in the rhq_alert_notification - * table itself) into appropriate configuration objects to be used by the custom senders that will be shipped with the + * the work necessary to translate the first-class notification data (previously stored in the rhq_alert_notification + * table itself) into appropriate configuration objects to be used by the custom senders that will be shipped with the * product by default. - * + * * In particular, this task handles the upgrade tasks for alert notifications setup against the following types of data: - * + * * <ul> * <li>RHQ Subjects</li> * <li>RHQ Roles</li> * <li>Direct Email Addresses</li> * <li>SNMP Trap Receivers</li> * <li>Resource Operations</li> - * </ul> - * + * </ul> + * * @author Joseph Marques */ public class CustomAlertSenderUpgradeTask implements DatabaseUpgradeTask { @@ -53,7 +53,6 @@ public class CustomAlertSenderUpgradeTask implements DatabaseUpgradeTask {
private final long NOW = System.currentTimeMillis();
- @Override public void execute(DatabaseType databaseType, Connection connection) throws SQLException { this.databaseType = databaseType; this.connection = connection; diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Property.java b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Property.java index c7d56f1..67d1df4 100644 --- a/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Property.java +++ b/modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Property.java @@ -285,7 +285,7 @@ public class Property implements Serializable, DeepCopyable<Property>, Comparabl // It's not clear to me why this class implements Externalizable. It seems to write out every field // using standard serialization. Also, it's sub-classes seem to write out every field. To be safe I'm leaving // it as is and also applying the new strategy logic, in case there are (future) differences between agent and - // remoteAPI serialization. + // remoteAPI serialization. public void writeExternal(ObjectOutput out) throws IOException { ExternalizableStrategy.Subsystem strategy = ExternalizableStrategy.getStrategy(); out.writeChar(strategy.id()); @@ -367,7 +367,6 @@ public class Property implements Serializable, DeepCopyable<Property>, Comparabl return; }
- @Override public int compareTo(Property other) { return getName().compareTo(other.getName()); } diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/search/SearchSuggestion.java b/modules/core/domain/src/main/java/org/rhq/core/domain/search/SearchSuggestion.java index 7e47275..bef8a2c 100644 --- a/modules/core/domain/src/main/java/org/rhq/core/domain/search/SearchSuggestion.java +++ b/modules/core/domain/src/main/java/org/rhq/core/domain/search/SearchSuggestion.java @@ -76,7 +76,6 @@ public class SearchSuggestion implements Serializable, Comparable<SearchSuggesti return endIndex; }
- @Override public int compareTo(SearchSuggestion other) { int kindComparision = (this.kind.ordinal() - other.kind.ordinal()); if (kindComparision != 0) { diff --git a/modules/core/util/src/main/java/org/rhq/core/util/MessageDigestGenerator.java b/modules/core/util/src/main/java/org/rhq/core/util/MessageDigestGenerator.java index e96d86a..9a20424 100644 --- a/modules/core/util/src/main/java/org/rhq/core/util/MessageDigestGenerator.java +++ b/modules/core/util/src/main/java/org/rhq/core/util/MessageDigestGenerator.java @@ -1,6 +1,6 @@ /* * RHQ Management Platform - * Copyright (C) 2005-2010 Red Hat, Inc. + * Copyright (C) 2005-2008 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or modify @@ -28,7 +28,6 @@ import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; -import java.net.URL; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException;
@@ -261,18 +260,6 @@ public class MessageDigestGenerator { } }
- public byte[] calcDigest(URL url) throws IOException { - InputStream is = null; - try { - is = url.openStream(); - return calcDigest(new BufferedInputStream(is, 1024 * 32)); - } finally { - if (is != null) { - is.close(); - } - } - } - /** * Calculates the digest for a given file. The file's contents will be used as the source data for the digest calculation. * @@ -292,24 +279,6 @@ public class MessageDigestGenerator { }
/** - * Calculates the digest for a given file. The file's contents will be used as the source data for the digest calculation. - * - * @param url the URL whose contents are to be used to calculate the digest. - * - * @return the URL content's digest as a String - * - * @throws IOException if the URL could not be read or accessed - */ - public static String getDigestString(URL url) throws IOException { - MessageDigestGenerator md5 = new MessageDigestGenerator(MD5); - return md5.calcDigestString(url); - } - - public String calcDigestString(URL url) throws IOException { - return calculateDigestStringFromBytes(calcDigest(url)); - } - - /** * Given a digest byte array, this will return its String representation. * * @param bytes the digest whose String representation is to be returned diff --git a/modules/core/util/src/main/java/org/rhq/core/util/updater/ExtractorZipFileVisitor.java b/modules/core/util/src/main/java/org/rhq/core/util/updater/ExtractorZipFileVisitor.java index 93230ec..d7de282 100644 --- a/modules/core/util/src/main/java/org/rhq/core/util/updater/ExtractorZipFileVisitor.java +++ b/modules/core/util/src/main/java/org/rhq/core/util/updater/ExtractorZipFileVisitor.java @@ -39,7 +39,7 @@ import org.rhq.core.util.stream.StreamUtil; /** * A visitor object that will extract each zip entry it visits, realizing files that * need to have their replacement variables replaced. - * + * * @author John Mazzitelli */ public class ExtractorZipFileVisitor implements ZipUtil.ZipEntryVisitor { @@ -59,7 +59,7 @@ public class ExtractorZipFileVisitor implements ZipUtil.ZipEntryVisitor { * If you just want this visitor to walk a zip file without realizing any files, pass in * a null pattern or pass in a null template engine. This will, in effect, * have this visitor extract all file entries as-is. - * + * * @param rootDir the top level directory where all zip file entries will be extracted to. * In other words, all zip file entries' paths are relative to this directory. * @param filesToRealizeRegex pattern of files that are to be realized prior to hashcodes being computed @@ -97,7 +97,6 @@ public class ExtractorZipFileVisitor implements ZipUtil.ZipEntryVisitor { return fileHashcodeMap; }
- @Override public boolean visit(ZipEntry entry, ZipInputStream stream) throws Exception {
String pathname = entry.getName(); diff --git a/modules/core/util/src/main/java/org/rhq/core/util/updater/InMemoryZipFileVisitor.java b/modules/core/util/src/main/java/org/rhq/core/util/updater/InMemoryZipFileVisitor.java index 9e85f18..3fae9bd 100644 --- a/modules/core/util/src/main/java/org/rhq/core/util/updater/InMemoryZipFileVisitor.java +++ b/modules/core/util/src/main/java/org/rhq/core/util/updater/InMemoryZipFileVisitor.java @@ -35,7 +35,7 @@ import org.rhq.core.util.stream.StreamUtil;
/** * A visitor object that will perform some in-memory work for each zip entry it visits. - * + * * @author John Mazzitelli */ public class InMemoryZipFileVisitor implements ZipUtil.ZipEntryVisitor { @@ -53,7 +53,7 @@ public class InMemoryZipFileVisitor implements ZipUtil.ZipEntryVisitor { * a null pattern or pass in a null template engine. This will, in effect, * have this visitor collect all zip file entry names and calculate their hashcodes based on * all content within the zip file. - * + * * @param filesToRealizeRegex pattern of files that are to be realized prior to hashcodes being computed * @param templateEngine the template engine that replaces replacement variables in files to be realized */ @@ -75,7 +75,6 @@ public class InMemoryZipFileVisitor implements ZipUtil.ZipEntryVisitor { return fileHashcodeMap; }
- @Override public boolean visit(ZipEntry entry, ZipInputStream stream) throws Exception {
if (entry.isDirectory()) { @@ -86,7 +85,7 @@ public class InMemoryZipFileVisitor implements ZipUtil.ZipEntryVisitor { String hashcode;
if (this.filesToRealizeRegex != null && this.filesToRealizeRegex.matcher(pathname).matches()) { - // this entry needs to be realized, do it now, then calc the hashcode + // this entry needs to be realized, do it now, then calc the hashcode // note: tempateEngine will never be null if we got here int contentSize = (int) entry.getSize(); ByteArrayOutputStream baos = new ByteArrayOutputStream((contentSize > 0) ? contentSize : 32768); diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/operation/create/OperationCreateWizard.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/operation/create/OperationCreateWizard.java index d273596..3fd8517 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/operation/create/OperationCreateWizard.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/operation/create/OperationCreateWizard.java @@ -141,7 +141,6 @@ public class OperationCreateWizard implements Wizard { view.closeDialog(); }
- @Override public void cancel() { // TODO: revert back to original state } diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SubjectGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SubjectGWTServiceImpl.java index a46900c..32e1d2c 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SubjectGWTServiceImpl.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SubjectGWTServiceImpl.java @@ -27,9 +27,6 @@ import org.rhq.enterprise.server.auth.SubjectManagerLocal; import org.rhq.enterprise.server.exception.LoginException; import org.rhq.enterprise.server.util.LookupUtil;
-import com.google.gwt.user.server.rpc.RemoteServiceServlet; - -import javax.jws.WebParam;
/** * @author Greg Hinkle diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/role/AddLdapGroupsFormPrepareAction.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/role/AddLdapGroupsFormPrepareAction.java index 1acc73b..a704fb1 100644 --- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/role/AddLdapGroupsFormPrepareAction.java +++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/role/AddLdapGroupsFormPrepareAction.java @@ -19,14 +19,17 @@ package org.rhq.enterprise.gui.admin.role;
import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.NavigableSet; import java.util.Properties; import java.util.Set; +import java.util.SortedSet; import java.util.TreeMap; +import java.util.TreeSet;
import javax.ejb.EJBException; import javax.servlet.http.HttpServletRequest; @@ -66,14 +69,12 @@ import org.rhq.enterprise.server.util.LookupUtil; public class AddLdapGroupsFormPrepareAction extends TilesAction { final String LDAP_GROUP_CACHE = "ldapGroupCache";
- RoleManagerLocal roleManager = LookupUtil.getRoleManager(); LdapGroupManagerLocal ldapManager = LookupUtil.getLdapGroupManager();
public ActionForward execute(ComponentContext context, ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { Log log = LogFactory.getLog(AddLdapGroupsFormPrepareAction.class.getName());
- Subject whoami = RequestUtils.getSubject(request); AddLdapGroupsForm addForm = (AddLdapGroupsForm) form; Integer roleId = addForm.getR();
@@ -95,7 +96,7 @@ public class AddLdapGroupsFormPrepareAction extends TilesAction { PageControl pca = WebUtility.getPageControl(request, "a"); PageControl pcp = WebUtility.getPageControl(request, "p");
- //BZ-580127 Refactor so that all lists are initialized regardless of ldap server + //BZ-580127 Refactor so that all lists are initialized regardless of ldap server // availability or state of filter params List<String> pendingGroupIds = new ArrayList<String>(); Set<Map<String, String>> allGroups = new HashSet<Map<String, String>>(); @@ -247,7 +248,7 @@ public class AddLdapGroupsFormPrepareAction extends TilesAction { /** Method duplicates pageControl/pagination mechanism for LdapGroup data. This data has not been moved into the * database yet so the PageList and PageControl mechanism does not yet work properly. * There are only two columns so the pagination code uses Maps and Sorted Lists for efficient sorting. - * + * * @param pagedGroupData Pagelist of Maps to be populated. * @param fullGroupData Full list of Maps available for paging * @param pc the pagination control from the web session reflecting user selections. @@ -306,15 +307,21 @@ public class AddLdapGroupsFormPrepareAction extends TilesAction {
//detect sort order boolean descending = false; - if (sortOrder.DESC == sortOrder) { + if (PageOrdering.DESC == sortOrder) { descending = true; } //use sort column to determine which list to use if (sortColumn.equalsIgnoreCase("lg.name")) { int i = 0; - NavigableSet<String> keyList = groupNames.navigableKeySet(); + List<String> keyList; + if (descending) { - keyList = groupNames.descendingKeySet(); + keyList = new ArrayList<String>(groupNames.keySet()); + Collections.reverse(keyList); + } + else { + keyList = new ArrayList<String>(groupNames.keySet()); + Collections.sort(keyList); } for (String key : keyList) { if ((i >= start) && (i < end)) { @@ -324,9 +331,14 @@ public class AddLdapGroupsFormPrepareAction extends TilesAction { } } else { int i = 0; - NavigableSet<String> keyList = groupDescriptions.navigableKeySet(); + List<String> keyList; if (descending) { - keyList = groupDescriptions.descendingKeySet(); + keyList = new ArrayList<String>(groupDescriptions.keySet()); + Collections.reverse(keyList); + } + else { + keyList = new ArrayList<String>( groupDescriptions.keySet()); + Collections.sort(keyList); } for (String key : keyList) { if ((i >= start) && (i < end)) { diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/content/CreateNewPackageUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/content/CreateNewPackageUIBean.java index 92d584c..3db7ce6 100644 --- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/content/CreateNewPackageUIBean.java +++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/content/CreateNewPackageUIBean.java @@ -25,8 +25,6 @@ import java.util.List;
import javax.faces.application.FacesMessage; import javax.faces.model.SelectItem; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession;
@@ -46,10 +44,8 @@ import org.rhq.core.domain.resource.Resource; import org.rhq.core.domain.resource.ResourceCreationDataType; import org.rhq.core.domain.resource.ResourceType; import org.rhq.core.gui.util.FacesContextUtility; -import org.rhq.core.util.MessageDigestGenerator; import org.rhq.core.util.exception.ThrowableUtil; import org.rhq.enterprise.gui.util.EnterpriseFacesContextUtility; -import org.rhq.enterprise.server.RHQConstants; import org.rhq.enterprise.server.content.ContentException; import org.rhq.enterprise.server.content.ContentManagerLocal; import org.rhq.enterprise.server.content.ContentUIManagerLocal; @@ -63,9 +59,6 @@ import org.rhq.enterprise.server.util.LookupUtil; */ public class CreateNewPackageUIBean {
- @PersistenceContext(unitName = RHQConstants.PERSISTENCE_UNIT_NAME) - private EntityManager entityManager; - /** * Option value for deploying the package to a repo the resource is already subscribed to. */ @@ -83,12 +76,6 @@ public class CreateNewPackageUIBean { */ private static final String REPO_OPTION_NEW = "new";
- /** - * Option value for no repo. This is a standalone war that may not be related to any repo. - * - */ - private static final String REPO_OPTION_NONE = "none"; - private String packageName; private String version; private int selectedArchitectureId; @@ -162,7 +149,6 @@ public class CreateNewPackageUIBean {
String repoOption = request.getParameter("repoOption"); UploadItem fileItem = uploadUIBean.getFileItem(); - boolean usingARepo = true;
// Validate if (packageName == null || packageName.trim().equals("")) { @@ -191,21 +177,16 @@ public class CreateNewPackageUIBean { FacesContextUtility.addMessage(FacesMessage.SEVERITY_ERROR, "A package file must be uploaded"); return null; } - if (repoOption.equalsIgnoreCase(REPO_OPTION_NONE)) { - usingARepo = false; - }
// Determine which repo the package will go into String repoId = null; - if (usingARepo) { - try { - repoId = determineRepo(repoOption, subject, resource.getId()); - } catch (ContentException ce) { - String errorMessages = ThrowableUtil.getAllMessages(ce); - FacesContextUtility.addMessage(FacesMessage.SEVERITY_ERROR, "Failed to determine repository. Cause: " - + errorMessages); - return "failure"; - } + try { + repoId = determineRepo(repoOption, subject, resource.getId()); + } catch (ContentException ce) { + String errorMessages = ThrowableUtil.getAllMessages(ce); + FacesContextUtility.addMessage(FacesMessage.SEVERITY_ERROR, "Failed to determine repository. Cause: " + + errorMessages); + return "failure"; }
try { @@ -235,20 +216,6 @@ public class CreateNewPackageUIBean { ContentManagerLocal contentManager = LookupUtil.getContentManager(); packageVersion = contentManager.createPackageVersion(packageName, packageTypeId, version, architectureId, packageStream); - - //locate the file upload UI bean and populate installedPackage, then persist. - InstalledPackage installed = new InstalledPackage(); - UploadItem fileItemForPackage = uploadUIBean.getFileItem(); - packageVersion.setFileSize(Long.valueOf(fileItemForPackage.getFileSize())); - //Calculate SHA256 - String sha256 = new MessageDigestGenerator(MessageDigestGenerator.SHA_256) - .calcDigestString(packageStream); - packageVersion.setSHA256(sha256); - installed.setInstallationDate(fileItemForPackage.getFile().lastModified()); - installed.setUser(subject); - installed.setPackageVersion(packageVersion); - entityManager.persist(installed); - } catch (Exception e) { String errorMessages = ThrowableUtil.getAllMessages(e); FacesContextUtility.addMessage(FacesMessage.SEVERITY_ERROR, "Failed to create package [" + packageName @@ -259,18 +226,16 @@ public class CreateNewPackageUIBean { int[] packageVersionList = new int[] { packageVersion.getId() };
// Add the package to the repo - if (usingARepo) { - try { - int iRepoId = Integer.parseInt(repoId); - - RepoManagerLocal repoManager = LookupUtil.getRepoManagerLocal(); - repoManager.addPackageVersionsToRepo(subject, iRepoId, packageVersionList); - } catch (Exception e) { - String errorMessages = ThrowableUtil.getAllMessages(e); - FacesContextUtility.addMessage(FacesMessage.SEVERITY_ERROR, "Failed to associate package [" - + packageName + "] with repository ID [" + repoId + "]. Cause: " + errorMessages); - return "failure"; - } + try { + int iRepoId = Integer.parseInt(repoId); + + RepoManagerLocal repoManager = LookupUtil.getRepoManagerLocal(); + repoManager.addPackageVersionsToRepo(subject, iRepoId, packageVersionList); + } catch (Exception e) { + String errorMessages = ThrowableUtil.getAllMessages(e); + FacesContextUtility.addMessage(FacesMessage.SEVERITY_ERROR, "Failed to associate package [" + + packageName + "] with repository ID [" + repoId + "]. Cause: " + errorMessages); + return "failure"; }
// Put the package ID in the session so it can fit into the deploy existing package workflow diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/repo.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/repo.xhtml index 28edad0..55fdd56 100644 --- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/repo.xhtml +++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/repo.xhtml @@ -333,6 +333,7 @@ <rich:column colspan="#{param.debug ? 8 : 7}" width="100%">
+ ui:remove <!-- The ability to associate/disassociate repos with content sources is not needed for JON. --> <h:commandButton action="#{RepoContentSourcesUIBean.associateWithContentProviders}" @@ -343,6 +344,7 @@ value="DISASSOCIATE SELECTED" target="selectedRepoContentProviders" styleClass="on-pager-button buttonsmall" /> + </ui:remove>
<ui:param name="paginationDataTableName" value="repoContentProvidersDataTable" /> diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/content/ContentSourceManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/content/ContentSourceManagerBean.java index 755a88f..8601b51 100644 --- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/content/ContentSourceManagerBean.java +++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/content/ContentSourceManagerBean.java @@ -857,7 +857,7 @@ public class ContentSourceManagerBean implements ContentSourceManagerLocal { //for oracle and Connection.createBlob is not working on postgres. //This blob will be not empty because we saved there a bytes from String("a"). Blob blb = rs.getBlob(1); - + StreamUtil.copy(bitsStream, blb.setBinaryStream(1), true); ps2 = conn.prepareStatement("UPDATE " + PackageBits.TABLE_NAME + " SET bits = ? where id = ?"); ps2.setBlob(1, blb); @@ -911,7 +911,7 @@ public class ContentSourceManagerBean implements ContentSourceManagerLocal { + "] on content source [" + contentSourceId + "]"); } } - + if (ps2 != null) { try { ps2.close(); @@ -1816,7 +1816,7 @@ public class ContentSourceManagerBean implements ContentSourceManagerLocal { return outputPackageVersionBitsRangeHelper(resourceId, packageDetailsKey, outputStream, startByte, endByte, packageVersion.getId()); } - + @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) @TransactionTimeout(90 * 60) public boolean downloadPackageBits(int resourceId, PackageDetailsKey packageDetailsKey){ @@ -1827,10 +1827,10 @@ public class ContentSourceManagerBean implements ContentSourceManagerLocal { query.setParameter("version", packageDetailsKey.getVersion()); query.setParameter("resourceId", resourceId); int packageVersionId = ((Integer) query.getSingleResult()).intValue(); - + Query queryA = entityManager.createNamedQuery(PackageBits.QUERY_PACKAGE_BITS_LOADED_STATUS_PACKAGE_VERSION_ID); queryA.setParameter("id", packageVersionId); - + LoadedPackageBitsComposite composite = (LoadedPackageBitsComposite) queryA.getSingleResult();
boolean packageBitsAreAvailable = composite.isPackageBitsAvailable(); @@ -1890,7 +1890,7 @@ public class ContentSourceManagerBean implements ContentSourceManagerLocal { PackageBits bits = null; bits = contentSourceManager.downloadPackageBits(subjectManager.getOverlord(), pvcs); }catch(Exception e){ - return false; + return false; } } return true; @@ -1993,31 +1993,33 @@ public class ContentSourceManagerBean implements ContentSourceManagerLocal { bitsStream = adapterMgr.loadPackageBits(contentSourceId, pvcs.getLocation()); } else { if (composite.isPackageBitsInDatabase()) { - // this is DownloadMode.DATABASE - put the bits in the database + // this is DownloadMode.DATABASE - put the bits in the database
conn = dataSource.getConnection(); ps = conn.prepareStatement("SELECT BITS FROM " + PackageBits.TABLE_NAME + " WHERE ID = ?"); - + ps.setInt(1, composite.getPackageBitsId()); results = ps.executeQuery(); results.next(); Blob blob = results.getBlob(1); - + long bytesRetrieved=0; if (endByte < 0) { if (startByte == 0) { bytesRetrieved = StreamUtil.copy(blob.getBinaryStream(), outputStream, false); } - } else { - long length = (endByte - startByte) + 1; - InputStream stream = blob.getBinaryStream(startByte, length); - bytesRetrieved = StreamUtil.copy(stream, outputStream, false); + } else { + long length = (endByte - startByte) + 1; +// InputStream stream = blob.getBinaryStream(startByte, length); // JDK 6 api + InputStream stream = blob.getBinaryStream(); + + bytesRetrieved = StreamUtil.copy(stream, outputStream, startByte , length); } log.debug("Retrieved and sent [" + bytesRetrieved + "] bytes for [" + packageDetailsKey + "]"); ps.close(); conn.close(); return bytesRetrieved; - + } else { // this is DownloadMode.FILESYSTEM - put the bits on the filesystem File bitsFile = getPackageBitsLocalFileAndCreateParentDir(composite.getPackageVersionId(), @@ -2252,4 +2254,4 @@ public class ContentSourceManagerBean implements ContentSourceManagerLocal { return numBytes; } } - + diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/LdapLoginModule.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/LdapLoginModule.java index b857325..bb29a47 100644 --- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/LdapLoginModule.java +++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/jaas/LdapLoginModule.java @@ -207,13 +207,13 @@ public class LdapLoginModule extends UsernamePasswordLoginModule { //if successful then verified that user and pw are valid ldap credentials ctx.reconnect(null);
- //if group auth enabled and user acct already exists then insert authorization check + //if group auth enabled and user acct already exists then insert authorization check String groupFilter = (String) options.get("GroupFilter"); String groupMember = (String) options.get("GroupMemberFilter"); SubjectManagerLocal sManager = LookupUtil.getSubjectManager(); Subject ldapSubject = sManager.getSubjectByName(getUsername()); - if (ldapSubject != null && ((groupFilter != null) && !groupFilter.trim().isEmpty()) - && ((groupMember != null) && !groupMember.trim().isEmpty())) { + if (ldapSubject != null && ((groupFilter != null) && !groupFilter.trim().equals("")) + && ((groupMember != null) && !groupMember.trim().equals(""))) { //check authorized groups to see if this user is authorized via ldap //BUT still must always return true as authz is handled by RHQ if roles/groups correct
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/LdapGroupManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/LdapGroupManagerBean.java index 63e36db..409d64e 100644 --- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/LdapGroupManagerBean.java +++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/LdapGroupManagerBean.java @@ -61,7 +61,7 @@ import org.rhq.enterprise.server.system.SystemManagerLocal; import org.rhq.enterprise.server.util.security.UntrustedSSLSocketFactory;
/** - * This bean provides functionality to manipulate the ldap auth/authz funcitonality. + * This bean provides functionality to manipulate the ldap auth/authz funcitonality. * That is, adding/modifying/deleting ldap group/users and their * associated subjects and permissions are performed by this manager. * @author paji @@ -189,7 +189,6 @@ public class LdapGroupManagerBean implements LdapGroupManagerLocal { } }
- @Override public PageList<LdapGroup> findLdapGroupsByRole(int roleId, PageControl pageControl) { Role role = entityManager.find(Role.class, roleId); if (role == null) { @@ -280,7 +279,7 @@ public class LdapGroupManagerBean implements LdapGroupManagerLocal { }
/** - * @throws NamingException + * @throws NamingException * @see org.jboss.security.auth.spi.UsernamePasswordLoginModule#validatePassword(java.lang.String,java.lang.String) */ protected Set<Map<String, String>> buildGroup(Properties options, String filter) { @@ -347,7 +346,7 @@ public class LdapGroupManagerBean implements LdapGroupManagerLocal { log.error(message, fException); throw new LdapFilterException(message + " " + fException.getMessage()); } - //TODO: check for ldap connection/unavailable/etc. exceptions. + //TODO: check for ldap connection/unavailable/etc. exceptions. else { log.error("LDAP communication error: " + e.getMessage(), e); throw new LdapCommunicationException(e); diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SavedSearchManagerRemote.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SavedSearchManagerRemote.java index 231167e..6585739 100644 --- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SavedSearchManagerRemote.java +++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SavedSearchManagerRemote.java @@ -33,7 +33,7 @@ import org.rhq.enterprise.server.system.ServerVersion;
/** * The remote interface to the SavedSearchManager. - * + * * @author Joseph Marques */ @SOAPBinding(style = SOAPBinding.Style.DOCUMENT) @@ -45,11 +45,11 @@ public interface SavedSearchManagerRemote { * Persisted a new {@link SavedSearch} with the given primary key * * @param subject the logged in user requesting the {@link SavedSearch} deletion - * @param savedSearchId the primary key of the {@link SavedSearch} to be deleted + * @param savedSearch the primary key of the {@link SavedSearch} to be deleted * * @throws PermissionException if the user is not authorized to create the {@link SavedSearch}. Only inventory * managers can create global saved searches. Regular users can only create {@link SavedSearch}es against - * their own accounts. + * their own accounts. */ @WebMethod public void createSavedSearch( // @@ -57,11 +57,11 @@ public interface SavedSearchManagerRemote { @WebParam(name = "savedSearch") SavedSearch savedSearch);
/** - * Saves all changes to the passed {@link SavedSearch} database, correlating it to the record already + * Saves all changes to the passed {@link SavedSearch} database, correlating it to the record already * persisted with the same primary key * * @param subject the logged in user requesting the {@link SavedSearch} persisted modification - * @param savedSearchId the {@link SavedSearch} which will have its modifications persisted + * @param savedSearch the {@link SavedSearch} which will have its modifications persisted *. * @throws PermissionException if the user is not authorized to modify the {@link SavedSearch}. Only inventory * managers can update global saved searches. Regular users can only update {@link SavedSearch}es from @@ -94,7 +94,7 @@ public interface SavedSearchManagerRemote { * @param savedSearchId the primary key of the {@link SavedSearch} to be loaded * * @return the {@link SavedSearch} or <code>null</code> if it wasn't found - * @throws PermissionException if the user is not authorized to view the {@link SavedSearch}. Regular users can + * @throws PermissionException if the user is not authorized to view the {@link SavedSearch}. Regular users can * only view {@link SavedSearch}es from their own accounts. */ @WebMethod diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/AbstractSearchAssistant.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/AbstractSearchAssistant.java index 05b39e1..8603946 100644 --- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/AbstractSearchAssistant.java +++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/AbstractSearchAssistant.java @@ -22,17 +22,14 @@ public abstract class AbstractSearchAssistant implements SearchAssistant { this.maxResultCount = maxResultCount; }
- @Override public List<String> getSimpleContexts() { return Collections.emptyList(); }
- @Override public List<String> getParameterizedContexts() { return Collections.emptyList(); }
- @Override public List<String> getParameters(String context, String filter) { if (getParameterizedContexts().contains(context) == false) { throw new IllegalArgumentException("context[" + context @@ -41,7 +38,6 @@ public abstract class AbstractSearchAssistant implements SearchAssistant { return Collections.emptyList(); }
- @Override public List<String> getValues(String context, String param, String filter) { if (getSimpleContexts().contains(context) && param != null) { throw new IllegalArgumentException("context[" + context + "] is simple, param[" + param diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/ResourceSearchAssistant.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/ResourceSearchAssistant.java index 0e2b3df..4deaa01 100644 --- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/ResourceSearchAssistant.java +++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/assist/ResourceSearchAssistant.java @@ -19,7 +19,6 @@ public class ResourceSearchAssistant extends AbstractSearchAssistant { "name")); }
- @Override public SearchSubsystem getSearchSubsystem() { return SearchSubsystem.RESOURCE; } diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java index dcd6c69..edb5059 100644 --- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java +++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java @@ -473,7 +473,7 @@ public class SystemManagerBean implements SystemManagerLocal, SystemManagerRemot // we need to undeploy it first - on windows the files are locked and can't be renamed until undeployed ObjectName name = ObjectNameFactory.create("jboss.system:service=MainDeployer"); MBeanServerConnection mbs = MBeanServerLocator.locateJBoss(); - MainDeployerMBean mbean = MBeanServerInvocationHandler.newProxyInstance(mbs, name, + MainDeployerMBean mbean = (MainDeployerMBean) MBeanServerInvocationHandler.newProxyInstance(mbs, name, MainDeployerMBean.class, false); URL url = deployedInstallWar.toURI().toURL(); String urlString = url.toString().replace("%20", " "); // bug in undeployer doesn't like %20 - it wants a real space @@ -550,7 +550,7 @@ public class SystemManagerBean implements SystemManagerLocal, SystemManagerRemot * @return The License object */ public License getLicense() { - // it's legal to return a null license, which then by-passes the check to + // it's legal to return a null license, which then by-passes the check to // whether the expirationDate in the backing store has been fiddled with License license = LicenseManager.instance().getLicense(); if (license == null) { diff --git a/modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/RhnHttpURLConnectionFactory.java b/modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/RhnHttpURLConnectionFactory.java index 37ed7b0..a7f51a8 100644 --- a/modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/RhnHttpURLConnectionFactory.java +++ b/modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/RhnHttpURLConnectionFactory.java @@ -32,7 +32,7 @@ public class RhnHttpURLConnectionFactory { { e.printStackTrace(); log.error(e); - throw new IOException(e); + throw new IOException(e.getMessage()); } log.debug("SSLSocketFactory has been set with a custom version using certPath: " + sslCertPathIn); } diff --git a/modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/RhnSSLTransport.java b/modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/RhnSSLTransport.java index c036ae6..5fa8a63 100644 --- a/modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/RhnSSLTransport.java +++ b/modules/enterprise/server/plugins/rhnhosted/src/main/java/org/rhq/enterprise/server/plugins/rhnhosted/xmlrpc/RhnSSLTransport.java @@ -66,7 +66,7 @@ public class RhnSSLTransport extends XmlRpcSun15HttpTransport { e.printStackTrace(); log.error(e); - throw new IOException(e); + throw new IOException(e.getMessage()); } log.debug("SSLSocketFactory has been set with a custom version using cert path: " + sslCertPath); } diff --git a/modules/plugins/augeas/pom.xml b/modules/plugins/augeas/pom.xml index 5734463..9a781ba 100644 --- a/modules/plugins/augeas/pom.xml +++ b/modules/plugins/augeas/pom.xml @@ -45,7 +45,7 @@ <dependency> <groupId>net.augeas</groupId> <artifactId>augeas</artifactId> - <version>0.0.1</version> + <version>0.0.2</version> </dependency>
<dependency> diff --git a/modules/plugins/grub/pom.xml b/modules/plugins/grub/pom.xml index a827e5a..f7cf265 100644 --- a/modules/plugins/grub/pom.xml +++ b/modules/plugins/grub/pom.xml @@ -28,7 +28,7 @@ <dependency> <groupId>net.augeas</groupId> <artifactId>augeas</artifactId> - <version>0.0.1</version> + <version>0.0.2</version> </dependency>
<dependency> diff --git a/modules/plugins/platform/src/main/java/org/rhq/plugins/platform/LinuxPlatformComponent.java b/modules/plugins/platform/src/main/java/org/rhq/plugins/platform/LinuxPlatformComponent.java index 62652a1..0793831 100644 --- a/modules/plugins/platform/src/main/java/org/rhq/plugins/platform/LinuxPlatformComponent.java +++ b/modules/plugins/platform/src/main/java/org/rhq/plugins/platform/LinuxPlatformComponent.java @@ -256,7 +256,7 @@ public class LinuxPlatformComponent extends PlatformComponent implements Content List<String> pkgs = new ArrayList<String>(); for (ResourcePackageDetails p : packages) { String pkgInfo = p.getName(); - if ((p.getVersion() != null) && (!p.getVersion().isEmpty())) { + if ((p.getVersion() != null) && (!p.getVersion().equals(""))) { pkgInfo = pkgInfo + "-" + p.getVersion(); } log.info("Adding <" + pkgInfo + "> to list of packages to deploy, original package object was: " + p); diff --git a/modules/plugins/sshd/pom.xml b/modules/plugins/sshd/pom.xml index 9f8f36b..3579496 100644 --- a/modules/plugins/sshd/pom.xml +++ b/modules/plugins/sshd/pom.xml @@ -28,7 +28,7 @@ <dependency> <groupId>net.augeas</groupId> <artifactId>augeas</artifactId> - <version>0.0.1</version> + <version>0.0.2</version> </dependency>
<dependency>
rhq-commits@lists.fedorahosted.org