[rhq] 2 commits - modules/plugins publish.sh
by snegrea
modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/ApplicationComponent.java | 83 +++---
modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/JBossASServerComponent.java | 4
modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/JBossASTomcatDiscoveryComponent.java | 2
modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/WarComponent.java | 119 ++++------
modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/util/WarDiscoveryHelper.java | 65 ++---
publish.sh | 4
6 files changed, 125 insertions(+), 152 deletions(-)
New commits:
commit 12d26d21ff46c3575baa7fdf3f8409f3287e460f
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Feb 28 10:44:19 2012 -0600
Turn off maven publishing. Not fully implemented ...
diff --git a/publish.sh b/publish.sh
index a1b1c1e..266f1d8 100755
--- a/publish.sh
+++ b/publish.sh
@@ -341,8 +341,8 @@ build_from_source()
#========================================================================================
publish_external_maven_repository()
{
- mvn -Ddbsetup-do-not-check-schema=true -Dmaven.test.skip=true -P publish $MAVEN_RELEASE_PERFORM_GOAL
- [ "$?" -ne 0 ] && abort "Release build failed. Please see above Maven output for details, fix any issues, then try again."
+ #mvn -Ddbsetup-do-not-check-schema=true -Dmaven.test.skip=true -P publish $MAVEN_RELEASE_PERFORM_GOAL
+ #[ "$?" -ne 0 ] && abort "Release build failed. Please see above Maven output for details, fix any issues, then try again."
}
commit 247456ce168e31728e4f94f9441c24240972f524
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Wed Feb 29 09:38:07 2012 -0600
Light refactoring on JBoss AS4 plugin code.
diff --git a/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/ApplicationComponent.java b/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/ApplicationComponent.java
index b2e0185..4c66a6b 100644
--- a/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/ApplicationComponent.java
+++ b/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/ApplicationComponent.java
@@ -93,7 +93,6 @@ public class ApplicationComponent extends MBeanResourceComponent<JBossASServerCo
// ContentFacet Implementation --------------------------------------------
public InputStream retrievePackageBits(ResourcePackageDetails packageDetails) {
-
Configuration pluginConfiguration = getResourceContext().getPluginConfiguration();
String fullFileName = pluginConfiguration.getSimpleValue(FILENAME_PLUGIN_CONFIG_PROP, null);
@@ -103,8 +102,9 @@ public class ApplicationComponent extends MBeanResourceComponent<JBossASServerCo
if (packageFile.isDirectory()) {
fileToSend = File.createTempFile("rhq", ".zip");
ZipUtil.zipFileOrDirectory(packageFile, fileToSend);
- } else
+ } else {
fileToSend = packageFile;
+ }
return new BufferedInputStream(new FileInputStream(fileToSend));
} catch (IOException e) {
throw new RuntimeException("Failed to retrieve package bits for " + packageDetails, e);
@@ -112,7 +112,6 @@ public class ApplicationComponent extends MBeanResourceComponent<JBossASServerCo
}
public Set<ResourcePackageDetails> discoverDeployedPackages(PackageType type) {
-
Set<ResourcePackageDetails> packages = new HashSet<ResourcePackageDetails>();
Configuration pluginConfiguration = getResourceContext().getPluginConfiguration();
@@ -151,41 +150,6 @@ public class ApplicationComponent extends MBeanResourceComponent<JBossASServerCo
return packages;
}
- private String getSHA256(File file) {
-
- String sha256 = null;
-
- try {
- FileContentDelegate fileContentDelegate = new FileContentDelegate(file, null, null);
- sha256 = fileContentDelegate.getSHA(file);
- } catch (Exception iex) {
- //log exception but move on, discovery happens often. No reason to hold up anything.
- if (log.isDebugEnabled()) {
- log.debug("Problem calculating digest of package [" + file.getPath() + "]." + iex.getMessage());
- }
- }
-
- return sha256;
- }
-
- private String getVersion(String sha256) {
- return "[sha256=" + sha256 + "]";
- }
-
- /**
- * Retrieve the display version for the component. The display version should be stored
- * in the manifest of the application (implementation and/or specification version).
- * It will attempt to retrieve the version for both archived or exploded deployments.
- *
- * @param file component file
- * @return
- */
- private String getDisplayVersion(File file) {
- //JarContentFileInfo extracts the version from archived and exploded deployments
- ContentFileInfo contentFileInfo = new JarContentFileInfo(file);
- return contentFileInfo.getVersion(null);
- }
-
public RemovePackagesResponse removePackages(Set<ResourcePackageDetails> packages) {
throw new UnsupportedOperationException("Cannot remove the package backing an EAR/WAR resource.");
}
@@ -252,7 +216,6 @@ public class ApplicationComponent extends MBeanResourceComponent<JBossASServerCo
}
// Deploy was successful!
-
deleteBackupOfOriginalFile(backupOfOriginalFile);
DeployPackagesResponse response = new DeployPackagesResponse(ContentResponseResult.SUCCESS);
@@ -293,7 +256,6 @@ public class ApplicationComponent extends MBeanResourceComponent<JBossASServerCo
} else {
log.info("deleteResource: File [" + fullFileName + "] was not found - ignoring.");
}
-
}
// MeasurementFacet Implementation --------------------------------------------
@@ -355,7 +317,7 @@ public class ApplicationComponent extends MBeanResourceComponent<JBossASServerCo
return pluginConfiguration.getSimple(FILENAME_PLUGIN_CONFIG_PROP).getStringValue();
}
- public JBossASServerComponent getParentResourceComponent() {
+ public JBossASServerComponent<?> getParentResourceComponent() {
return getResourceContext().getParentResourceComponent();
}
@@ -378,10 +340,10 @@ public class ApplicationComponent extends MBeanResourceComponent<JBossASServerCo
}
backup = new File(fileName + ".bak");
-
if (!backup.exists()) {
throw new FileNotFoundException("Backup file " + backup + " does not exist");
}
+
File directory = backup.getParentFile();
if (!directory.canWrite()) {
throw new IOException("Can not modify directory " + directory);
@@ -396,7 +358,6 @@ public class ApplicationComponent extends MBeanResourceComponent<JBossASServerCo
}
// Now that we have moved the original to a backup, try to move the real backup in
-
good = backup.renameTo(file);
if (!good) {
// move backup in failed
@@ -409,8 +370,8 @@ public class ApplicationComponent extends MBeanResourceComponent<JBossASServerCo
// installing from backup worked
FileUtils.purge(tmpBackup, true);
}
- getParentResourceComponent().deployFile(file);
+ getParentResourceComponent().deployFile(file);
}
/**
@@ -500,4 +461,38 @@ public class ApplicationComponent extends MBeanResourceComponent<JBossASServerCo
}
return tempFile;
}
+
+ private String getSHA256(File file) {
+ String sha256 = null;
+
+ try {
+ FileContentDelegate fileContentDelegate = new FileContentDelegate(file, null, null);
+ sha256 = fileContentDelegate.getSHA(file);
+ } catch (Exception iex) {
+ //log exception but move on, discovery happens often. No reason to hold up anything.
+ if (log.isDebugEnabled()) {
+ log.debug("Problem calculating digest of package [" + file.getPath() + "]." + iex.getMessage());
+ }
+ }
+
+ return sha256;
+ }
+
+ private String getVersion(String sha256) {
+ return "[sha256=" + sha256 + "]";
+ }
+
+ /**
+ * Retrieve the display version for the component. The display version should be stored
+ * in the manifest of the application (implementation and/or specification version).
+ * It will attempt to retrieve the version for both archived or exploded deployments.
+ *
+ * @param file component file
+ * @return
+ */
+ private String getDisplayVersion(File file) {
+ //JarContentFileInfo extracts the version from archived and exploded deployments
+ ContentFileInfo contentFileInfo = new JarContentFileInfo(file);
+ return contentFileInfo.getVersion(null);
+ }
}
diff --git a/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/JBossASServerComponent.java b/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/JBossASServerComponent.java
index 45de746..73b4072 100644
--- a/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/JBossASServerComponent.java
+++ b/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/JBossASServerComponent.java
@@ -924,6 +924,7 @@ public class JBossASServerComponent<T extends ResourceComponent<?>> implements M
deployFile(path);
} catch (MainDeployer.DeployerException e) {
log.debug("Failed to deploy [" + path + "] - undeploying and deleting [" + path + "]...");
+ report.setStatus(CreateResourceStatus.FAILURE);
try {
undeployFile(path);
FileUtils.purge(path, true);
@@ -950,7 +951,8 @@ public class JBossASServerComponent<T extends ResourceComponent<?>> implements M
if (entry != null) {
is = jfile.getInputStream(entry);
SAXBuilder saxBuilder = new SAXBuilder();
- SelectiveSkippingEntityResolver entityResolver = SelectiveSkippingEntityResolver.getDtdAndXsdSkippingInstance();
+ SelectiveSkippingEntityResolver entityResolver = SelectiveSkippingEntityResolver
+ .getDtdAndXsdSkippingInstance();
saxBuilder.setEntityResolver(entityResolver);
Document doc = saxBuilder.build(is);
diff --git a/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/JBossASTomcatDiscoveryComponent.java b/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/JBossASTomcatDiscoveryComponent.java
index 8283423..d1b9910 100644
--- a/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/JBossASTomcatDiscoveryComponent.java
+++ b/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/JBossASTomcatDiscoveryComponent.java
@@ -102,7 +102,7 @@ public class JBossASTomcatDiscoveryComponent implements ResourceDiscoveryCompone
boolean pre42 = jbossWebDir.getName().startsWith(EMBEDDED_TOMCAT_PRE42_DIR);
String jarFileName = (pre42) ? "catalina.jar" : "jbossweb.jar";
File jarFile = new File(jbossWebDir, jarFileName);
- ClassLoader classLoader = new URLClassLoader(new URL[] { jarFile.toURL() });
+ ClassLoader classLoader = new URLClassLoader(new URL[] { jarFile.toURI().toURL() });
InputStream stream = classLoader.getResourceAsStream(SERVER_INFO_PROPERTIES_RESOURCE);
String version = null;
if (stream != null) {
diff --git a/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/WarComponent.java b/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/WarComponent.java
index 1993e7b..514e75e 100644
--- a/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/WarComponent.java
+++ b/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/WarComponent.java
@@ -1,25 +1,25 @@
- /*
- * Jopr Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
+/*
+ * Jopr Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
package org.rhq.plugins.jbossas;
import java.io.File;
@@ -44,8 +44,8 @@ import org.rhq.core.domain.measurement.MeasurementDataTrait;
import org.rhq.core.domain.measurement.MeasurementReport;
import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
import org.rhq.core.domain.measurement.calltime.CallTimeData;
-import org.rhq.core.pluginapi.inventory.ResourceContext;
import org.rhq.core.pluginapi.inventory.DeleteResourceFacet;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
import org.rhq.core.pluginapi.operation.OperationFacet;
import org.rhq.core.pluginapi.operation.OperationResult;
import org.rhq.core.pluginapi.util.ResponseTimeConfiguration;
@@ -55,12 +55,12 @@ import org.rhq.plugins.jbossas.util.WarDeploymentInformation;
import org.rhq.plugins.jbossas.util.WarDiscoveryHelper;
import org.rhq.plugins.jmx.util.ObjectNameQueryUtility;
- /**
- * A resource component for managing a web application (WAR) deployed to a JBossAS server.
- *
- * @author Ian Springer
- * @author Heiko W. Rupp
- */
+/**
+* A resource component for managing a web application (WAR) deployed to a JBossAS server.
+*
+* @author Ian Springer
+* @author Heiko W. Rupp
+*/
public class WarComponent extends ApplicationComponent implements OperationFacet, DeleteResourceFacet {
private static final String SERVLET_PREFIX = "Servlet.";
public static final String CONTEXT_ROOT_CONFIG_PROP = "contextRoot";
@@ -84,7 +84,7 @@ public class WarComponent extends ApplicationComponent implements OperationFacet
private static final String SESSION_NAME_BASE_TEMPLATE = "jboss.web:host=%HOST%,type=Manager,path=%PATH%";
- // WebModule=//localhost/test-simple,service=ClusterManager
+ //WebModule=//localhost/test-simple,service=ClusterManager
private static final String CLUSTER_SESSION_NAME_BASE_TEMPLATE = "jboss.web:service=ClusterManager,WebModule=//%HOST%%PATH%";
private static final String SESSION_PREFIX = "Session.";
private static final String VHOST_PREFIX = "Vhost";
@@ -94,24 +94,17 @@ public class WarComponent extends ApplicationComponent implements OperationFacet
private final Log log = LogFactory.getLog(this.getClass());
+ //Mapping non-clustered names -> attribute name in the cluster manager
+ private final String[] CLUSTER_SESSION_ATTRIBUTE_NAMES = { "maxInactiveInterval", "MaxInactiveInterval",
+ "activeSessions", "ActiveSessionCount", "sessionCounter", "CreatedSessionCount", "sessionAverageAliveTime", "",
+ "processingTime", "ProcessingTime", "maxActive", "MaxActiveSessionCount", "maxActiveSessions",
+ "MaxActiveAllowed", "expiredSessions", "ExpiredSessionCount", "rejectedSessions", "RejectedSessionCount",
+ "sessionIdLength", "SessionIdLength" };
+
private EmsBean jbossWebMBean;
private ResponseTimeLogParser logParser;
- String vhost;
+ private String vhost;
private String contextRoot;
- // Mapping non-clustered names -> attribute name in the cluster manager
- private final String[] CLUSTER_SESSION_ATTRIBUTE_NAMES = {
- "maxInactiveInterval","MaxInactiveInterval",
- "activeSessions","ActiveSessionCount",
- "sessionCounter","CreatedSessionCount",
- "sessionAverageAliveTime","",
- "processingTime","ProcessingTime",
- "maxActive","MaxActiveSessionCount",
- "maxActiveSessions","MaxActiveAllowed",
- "expiredSessions","ExpiredSessionCount",
- "rejectedSessions","RejectedSessionCount",
- "sessionIdLength","SessionIdLength"
- };
-
@Override
public AvailabilityType getAvailability() {
@@ -146,13 +139,13 @@ public class WarComponent extends ApplicationComponent implements OperationFacet
this.vhost = pluginConfig.getSimple(VHOST_CONFIG_PROP).getStringValue();
this.contextRoot = pluginConfig.getSimple(CONTEXT_ROOT_CONFIG_PROP).getStringValue();
ResponseTimeConfiguration responseTimeConfig = new ResponseTimeConfiguration(pluginConfig);
+
File logFile = responseTimeConfig.getLogFile();
if (logFile != null) {
this.logParser = new ResponseTimeLogParser(logFile);
this.logParser.setExcludes(responseTimeConfig.getExcludes());
this.logParser.setTransforms(responseTimeConfig.getTransforms());
}
-
}
@Override
@@ -212,21 +205,20 @@ public class WarComponent extends ApplicationComponent implements OperationFacet
EmsConnection jmxConnection = getEmsConnection();
String servletMBeanNames = SESSION_NAME_BASE_TEMPLATE.replace("%PATH%",
- WarDiscoveryHelper.getContextPath(this.contextRoot));
+ WarDiscoveryHelper.getContextPath(this.contextRoot));
servletMBeanNames = servletMBeanNames.replace("%HOST%", vhost);
ObjectNameQueryUtility queryUtility = new ObjectNameQueryUtility(servletMBeanNames);
List<EmsBean> mBeans = jmxConnection.queryBeans(queryUtility.getTranslatedQuery());
- if (mBeans.size()==0) {
+ if (mBeans.size() == 0) {
// retry with the cluster manager TODO select the local vs cluster mode on discovery
servletMBeanNames = CLUSTER_SESSION_NAME_BASE_TEMPLATE.replace("%PATH%",
- WarDiscoveryHelper.getContextPath(this.contextRoot));
+ WarDiscoveryHelper.getContextPath(this.contextRoot));
servletMBeanNames = servletMBeanNames.replace("%HOST%", vhost);
queryUtility = new ObjectNameQueryUtility(servletMBeanNames);
mBeans = jmxConnection.queryBeans(queryUtility.getTranslatedQuery());
- if (mBeans.size()>0)
+ if (mBeans.size() > 0)
isClustered = true;
-
}
String property = metricName.substring(SESSION_PREFIX.length());
@@ -247,8 +239,7 @@ public class WarComponent extends ApplicationComponent implements OperationFacet
if (o instanceof Long) {
Long l = (Long) o;
ret = Double.valueOf(l);
- }
- else {
+ } else {
Integer i = (Integer) o;
ret = Double.valueOf(i);
}
@@ -259,21 +250,18 @@ public class WarComponent extends ApplicationComponent implements OperationFacet
}
private String lookupClusteredAttributeName(String property) {
- for (int i = 0; i < CLUSTER_SESSION_ATTRIBUTE_NAMES.length ; i+=2) {
+ for (int i = 0; i < CLUSTER_SESSION_ATTRIBUTE_NAMES.length; i += 2) {
if (CLUSTER_SESSION_ATTRIBUTE_NAMES[i].equals(property))
- return CLUSTER_SESSION_ATTRIBUTE_NAMES[i+1];
+ return CLUSTER_SESSION_ATTRIBUTE_NAMES[i + 1];
}
return property;
}
private Double getServletMetric(String metricName) {
-
- EmsConnection jmxConnection = getEmsConnection();
-
String servletMBeanNames = SERVLET_NAME_BASE_TEMPLATE + ",WebModule=//" + this.vhost
- + WarDiscoveryHelper.getContextPath(this.contextRoot);
+ + WarDiscoveryHelper.getContextPath(this.contextRoot);
ObjectNameQueryUtility queryUtility = new ObjectNameQueryUtility(servletMBeanNames);
- List<EmsBean> mBeans = jmxConnection.queryBeans(queryUtility.getTranslatedQuery());
+ List<EmsBean> mBeans = getEmsConnection().queryBeans(queryUtility.getTranslatedQuery());
long min = Long.MAX_VALUE;
long max = 0;
@@ -342,21 +330,16 @@ public class WarComponent extends ApplicationComponent implements OperationFacet
throw new IllegalStateException("Could not find jboss.web MBean for WAR '" + getApplicationName() + "'.");
}
- if (operation==WarOperation.REVERT) {
- // Lets see if we have a backup of ouselves. If so, install it.
-
+ if (operation == WarOperation.REVERT) {
try {
revertFromBackupFile();
return new OperationResult("Successfully reverted from backup");
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new RuntimeException("Error reverting from Backup: " + e.getMessage());
}
}
-
// The following are MBean operations.
-
EmsOperation mbeanOperation = this.jbossWebMBean.getOperation(name);
if (mbeanOperation == null) {
throw new IllegalStateException("Operation [" + name + "] not found on bean ["
@@ -473,8 +456,6 @@ public class WarComponent extends ApplicationComponent implements OperationFacet
return deploymentInformation;
}
-
-
private enum WarOperation {
START, STOP, RELOAD, REVERT
}
diff --git a/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/util/WarDiscoveryHelper.java b/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/util/WarDiscoveryHelper.java
index 48d4c46..152f2b2 100644
--- a/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/util/WarDiscoveryHelper.java
+++ b/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/util/WarDiscoveryHelper.java
@@ -42,8 +42,6 @@ import org.apache.commons.logging.LogFactory;
import org.mc4j.ems.connection.EmsConnection;
import org.mc4j.ems.connection.bean.EmsBean;
import org.mc4j.ems.connection.bean.attribute.EmsAttribute;
-
-import org.rhq.plugins.jmx.util.ObjectNameQueryUtility;
import org.xml.sax.InputSource;
import org.rhq.core.domain.configuration.Configuration;
@@ -55,6 +53,7 @@ import org.rhq.plugins.jbossas.JBossASServerComponent;
import org.rhq.plugins.jbossas.WarComponent;
import org.rhq.plugins.jbossas.WarDiscoveryComponent;
import org.rhq.plugins.jmx.MBeanResourceComponent;
+import org.rhq.plugins.jmx.util.ObjectNameQueryUtility;
/**
* Provides helper methods that are used by both {@link WarDiscoveryComponent} and {@link EmbeddedWarDiscoveryComponent}
@@ -81,8 +80,8 @@ public class WarDiscoveryHelper {
}
public static Set<DiscoveredResourceDetails> initPluginConfigurations(
- JBossASServerComponent parentJBossASComponent, Set<DiscoveredResourceDetails> warResources,
- ApplicationComponent parentEARComponent) {
+ JBossASServerComponent<?> parentJBossASComponent, Set<DiscoveredResourceDetails> warResources,
+ ApplicationComponent parentEARComponent) {
EmsConnection jmxConnection = parentJBossASComponent.getEmsConnection();
File configPath = parentJBossASComponent.getConfigurationPath();
@@ -146,24 +145,23 @@ public class WarDiscoveryHelper {
String resourceName = baseResourceName + " (" + webModuleName + ")";
String resourceDescription = baseResourceDescription + " (" + webModuleName + ")";
myDetail = new DiscoveredResourceDetails(discoResDetail.getResourceType(), key, resourceName,
- discoResDetail.getResourceVersion(), resourceDescription, pluginConfigClone,
- discoResDetail.getProcessInfo());
+ discoResDetail.getResourceVersion(), resourceDescription, pluginConfigClone,
+ discoResDetail.getProcessInfo());
initPluginConfiguration(info, rtLogDir, warResourcesIterator, myDetail);
resultingResources.add(myDetail); // the cloned one
}
}
} else { // Our war was not in the list, the main deployer's listDeployedModules()
- if (parentEARComponent==null) {
+ if (parentEARComponent == null) {
// WAR has no associated context root, so remove it from the list of discovered resources...
// @todo Might not want to call remove, because, as an example, in EC, the EC war file would end up being removed because this happens before it is completely deployed
- warResourcesIterator.remove();
+ warResourcesIterator.remove();
if (!discoResDetail.getResourceName().equals(ROOT_WEBAPP_RESOURCE_NAME)) {
- LOG
- .debug("The deployed WAR '"
- + discoResDetail.getResourceName()
- + "' does not have a jboss.web MBean (i.e. context root) associated with it; it will not be added to inventory.");
+ LOG.debug("The deployed WAR '"
+ + discoResDetail.getResourceName()
+ + "' does not have a jboss.web MBean (i.e. context root) associated with it; it will not be added to inventory.");
}
} else { // WAR within an EAR and distributable flag set in the war
@@ -175,14 +173,14 @@ public class WarDiscoveryHelper {
if (m.find()) {
warName = m.group(1);
}
- String contextRoot = getContextRootFromEar(parentEARComponent,parentJBossASComponent,warName);
- warConfig.put(new PropertySimple(WarComponent.CONTEXT_ROOT_CONFIG_PROP,contextRoot));
+ String contextRoot = getContextRootFromEar(parentEARComponent, parentJBossASComponent, warName);
+ warConfig.put(new PropertySimple(WarComponent.CONTEXT_ROOT_CONFIG_PROP, contextRoot));
- String webName = getJbossWebNameFromContextRoot(contextRoot,parentJBossASComponent);
- warConfig.put(new PropertySimple(WarComponent.JBOSS_WEB_NAME,webName));
+ String webName = getJbossWebNameFromContextRoot(contextRoot, parentJBossASComponent);
+ warConfig.put(new PropertySimple(WarComponent.JBOSS_WEB_NAME, webName));
- warConfig.put(new PropertySimple(WarComponent.VHOST_CONFIG_PROP,"localhost"));
- setRtLogInPluginConfig(rtLogDir,warConfig,contextRoot,"localhost"); // TODO check if vhost can be != localhost
+ warConfig.put(new PropertySimple(WarComponent.VHOST_CONFIG_PROP, "localhost"));
+ setRtLogInPluginConfig(rtLogDir, warConfig, contextRoot, "localhost"); // TODO check if vhost can be != localhost
resultingResources.add(discoResDetail);
}
@@ -191,8 +189,6 @@ public class WarDiscoveryHelper {
return resultingResources;
}
-
-
/**
* Try to get the context root from the ear file this war is embedded in
* @param parentEARComponent the ApplicationComponent representing the EAR
@@ -201,17 +197,17 @@ public class WarDiscoveryHelper {
* @return context root of the war file
*/
private static String getContextRootFromEar(ApplicationComponent parentEARComponent,
- JBossASServerComponent parentJBossASComponent,
- String warName) {
+ JBossASServerComponent<?> parentJBossASComponent, String warName) {
- String contextRoot =" - invalid - ";
+ String contextRoot = " - invalid - ";
// Get the ear and then the deploymentDescriptor attribute from it - this directly contains the one and
// only context-root
- String objectNameTemplate = "jboss.management.local:J2EEServer=Local,j2eeType=J2EEApplication,name=" + parentEARComponent.getApplicationName();
+ String objectNameTemplate = "jboss.management.local:J2EEServer=Local,j2eeType=J2EEApplication,name="
+ + parentEARComponent.getApplicationName();
ObjectNameQueryUtility queryUtility = new ObjectNameQueryUtility(objectNameTemplate);
List<EmsBean> mBeans = parentJBossASComponent.getEmsConnection().queryBeans(queryUtility.getTranslatedQuery());
- if (mBeans.size() ==1) {
+ if (mBeans.size() == 1) {
EmsBean theBean = mBeans.get(0);
EmsAttribute ddAttr = theBean.getAttribute("deploymentDescriptor");
ddAttr.refresh();
@@ -224,29 +220,27 @@ public class WarDiscoveryHelper {
XPath xp = XPathFactory.newInstance().newXPath();
try {
- contextRoot = xp.evaluate("/application/module/web/web-uri['" + warName +"']/../context-root",is);
- }
- catch (XPathException xpe) {
+ contextRoot = xp.evaluate("/application/module/web/web-uri['" + warName + "']/../context-root", is);
+ } catch (XPathException xpe) {
xpe.printStackTrace(); // TODO fix this
}
}
-
return contextRoot;
}
-
private static String getJbossWebNameFromContextRoot(String contextRoot,
- JBossASServerComponent parentJBossASComponent) {
+ JBossASServerComponent<?> parentJBossASComponent) {
if (contextRoot.startsWith("/"))
contextRoot = contextRoot.substring(1);
- String objectNameTemplate = "jboss.web:j2eeType=WebModule,name=//localhost/"+ contextRoot + ",J2EEApplication=none,J2EEServer=none";
+ String objectNameTemplate = "jboss.web:j2eeType=WebModule,name=//localhost/" + contextRoot
+ + ",J2EEApplication=none,J2EEServer=none";
ObjectNameQueryUtility queryUtility = new ObjectNameQueryUtility(objectNameTemplate);
List<EmsBean> mBeans = parentJBossASComponent.getEmsConnection().queryBeans(queryUtility.getTranslatedQuery());
- if (mBeans.size() ==1) {
+ if (mBeans.size() == 1) {
EmsBean theMBean = mBeans.get(0);
return theMBean.getBeanName().getCanonicalName();
}
@@ -267,7 +261,8 @@ public class WarDiscoveryHelper {
}
public static String getContextPath(String contextRoot) {
- return ((contextRoot == null || contextRoot.equals(WarComponent.ROOT_WEBAPP_CONTEXT_ROOT)) ? "/" : "/" + contextRoot);
+ return ((contextRoot == null || contextRoot.equals(WarComponent.ROOT_WEBAPP_CONTEXT_ROOT)) ? "/" : "/"
+ + contextRoot);
}
private static void initPluginConfiguration(WarDeploymentInformation deploymentInformation, File rtLogDir,
@@ -297,7 +292,7 @@ public class WarDiscoveryHelper {
}
private static void setRtLogInPluginConfig(File rtLogDir, Configuration pluginConfig, String contextRoot,
- String vHost) {
+ String vHost) {
if (!contextRoot.equals("/")) {
contextRoot = contextRoot.replace('/', '_');
}
12 years, 2 months
[rhq] Branch 'jshaughn/avail' - .classpath
by mazz
.classpath | 1 +
1 file changed, 1 insertion(+)
New commits:
commit 71860486dcebce5c9a15d2eb5eb41f67c1acba62
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Feb 29 10:35:04 2012 -0500
oracle plugin has test classes - put in eclipse classpath
diff --git a/.classpath b/.classpath
index b91a000..0c54f16 100644
--- a/.classpath
+++ b/.classpath
@@ -232,6 +232,7 @@
<classpathentry kind="src" path="modules/plugins/postgres/src/test/java"/>
<classpathentry kind="src" path="modules/plugins/mysql/src/main/java"/>
<classpathentry kind="src" path="modules/plugins/oracle/src/main/java"/>
+ <classpathentry kind="src" path="modules/plugins/oracle/src/test/java"/>
<classpathentry kind="src" path="modules/plugins/apache/src/main/java"/>
<classpathentry kind="src" path="modules/plugins/apache/src/test/java"/>
<classpathentry kind="src" path="modules/plugins/script/src/main/java"/>
12 years, 2 months
[rhq] Branch 'jsanda/drift-mongodb' - modules/enterprise
by John Sanda
modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/Mapper.java | 65 ++++++++++
modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/MapperTest.java | 65 ++++++++++
2 files changed, 130 insertions(+)
New commits:
commit 8f06ccce4935edf163141f5ef473efd4dece0929
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Feb 28 10:29:59 2012 -0500
Initial commit for Mapper and MapperTest
This commit starts refactoring code that maps MongoDB entities into DTOs
into Mapper.java. Having a distinct DTO mapping layer makes it easier to
test and also easier to maintain.
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/Mapper.java b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/Mapper.java
new file mode 100644
index 0000000..89ceaea
--- /dev/null
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/Mapper.java
@@ -0,0 +1,65 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.server.plugins.drift.mongodb;
+
+import org.rhq.core.domain.drift.dto.DriftChangeSetDTO;
+import org.rhq.core.domain.drift.dto.DriftDTO;
+import org.rhq.core.domain.drift.dto.DriftFileDTO;
+import org.rhq.enterprise.server.plugins.drift.mongodb.entities.MongoDBChangeSet;
+import org.rhq.enterprise.server.plugins.drift.mongodb.entities.MongoDBChangeSetEntry;
+
+public class Mapper {
+
+ public DriftChangeSetDTO toDTO(MongoDBChangeSet changeSet) {
+ DriftChangeSetDTO dto = new DriftChangeSetDTO();
+ dto.setId(changeSet.getId());
+ dto.setResourceId(changeSet.getResourceId());
+ dto.setDriftDefinitionId(changeSet.getDriftDefinitionId());
+ dto.setDriftHandlingMode(changeSet.getDriftHandlingMode());
+ dto.setVersion(changeSet.getVersion());
+ dto.setCtime(changeSet.getCtime());
+ dto.setCategory(changeSet.getCategory());
+
+ return dto;
+ }
+
+ public DriftDTO toDTO(MongoDBChangeSetEntry entry) {
+ DriftDTO dto = new DriftDTO();
+ dto.setId(entry.getId());
+ dto.setCategory(entry.getCategory());
+ dto.setCtime(entry.getCtime());
+ dto.setPath(entry.getPath());
+ dto.setDirectory(entry.getDirectory());
+ if (entry.getNewFileHash() != null) {
+ dto.setNewDriftFile(newDriftFileDTO(entry.getNewFileHash()));
+ }
+ if (entry.getOldFileHash() != null) {
+ dto.setOldDriftFile(newDriftFileDTO(entry.getOldFileHash()));
+ }
+
+ return null;
+ }
+
+ private DriftFileDTO newDriftFileDTO(String hash) {
+ DriftFileDTO dto = new DriftFileDTO();
+ dto.setHashId(hash);
+ return dto;
+ }
+
+}
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/MapperTest.java b/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/MapperTest.java
new file mode 100644
index 0000000..bf7b62c
--- /dev/null
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/MapperTest.java
@@ -0,0 +1,65 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.server.plugins.drift.mongodb;
+
+import org.bson.types.ObjectId;
+import org.rhq.core.domain.drift.dto.DriftChangeSetDTO;
+import org.rhq.enterprise.server.plugins.drift.mongodb.entities.MongoDBChangeSet;
+import org.testng.annotations.Test;
+
+import static org.rhq.core.domain.drift.DriftChangeSetCategory.DRIFT;
+import static org.rhq.core.domain.drift.DriftConfigurationDefinition.DriftHandlingMode.normal;
+import static org.rhq.test.AssertUtils.assertPropertiesMatch;
+
+public class MapperTest {
+
+ @Test
+ public void mapChangeSetToDTO() {
+ MongoDBChangeSet changeSet = new MongoDBChangeSet();
+ changeSet.setId(new ObjectId());
+ changeSet.setCategory(DRIFT);
+ changeSet.setDriftDefinitionId(1);
+ changeSet.setDriftDefinitionName("testdef");
+ changeSet.setResourceId(1);
+ changeSet.setVersion(1);
+ changeSet.setDriftHandlingMode(normal);
+
+ Mapper mapper = new Mapper();
+ DriftChangeSetDTO actual = mapper.toDTO(changeSet);
+
+ DriftChangeSetDTO expected = new DriftChangeSetDTO();
+ expected.setId(changeSet.getId());
+ expected.setCategory(changeSet.getCategory());
+ expected.setCtime(changeSet.getCtime());
+ expected.setDriftDefinitionId(changeSet.getDriftDefinitionId());
+ expected.setResourceId(changeSet.getResourceId());
+ expected.setDriftHandlingMode(changeSet.getDriftHandlingMode());
+ expected.setVersion(changeSet.getVersion());
+
+ assertPropertiesMatch(expected, actual, "Failed to map " + MongoDBChangeSet.class.getSimpleName() + " to " +
+ DriftChangeSetDTO.class.getSimpleName());
+ }
+
+// @Test
+// public void mapNewEntryToDTO() {
+// MongoDBChangeSetEntry entry = new MongoDBChangeSetEntry("./foo", FILE_ADDED);
+// entry.setNewFileHash("1ab2c34d");
+// }
+
+}
12 years, 2 months
[rhq] Branch 'jshaughn/avail' - modules/enterprise
by Jay Shaughnessy
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/test/UpdateResourceTypeSubsystemTest.java | 14 +++++++---
1 file changed, 10 insertions(+), 4 deletions(-)
New commits:
commit 5fc9d60babf9d422abbcc4659e92c13b40142698
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue Feb 28 21:40:45 2012 -0500
Fix unit tests to expect built-in AvailabilityType metric def.
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/test/UpdateResourceTypeSubsystemTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/test/UpdateResourceTypeSubsystemTest.java
index dc71f4c..dd05cd6 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/test/UpdateResourceTypeSubsystemTest.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/test/UpdateResourceTypeSubsystemTest.java
@@ -169,7 +169,8 @@ public class UpdateResourceTypeSubsystemTest extends UpdatePluginMetadataTestBas
ResourceType server2 = servers2.iterator().next();
assert server2.getName().equals("testServer1");
Set<MeasurementDefinition> mdef = server2.getMetricDefinitions();
- assert mdef.size() == 1 : "Expected one MeasurementDefinition in v2";
+ // include the built-in AvailabilityType metric
+ assert mdef.size() == 2 : "Expected 2 MeasurementDefinition in v2";
getTransactionManager().rollback();
registerPlugin("update4-v1_0.xml", "3.0");
@@ -232,6 +233,7 @@ public class UpdateResourceTypeSubsystemTest extends UpdatePluginMetadataTestBas
assert platform1 != null : "I did not find myPlatform";
Set<MeasurementDefinition> defs = platform1.getMetricDefinitions();
+ // no built-in AvailabilityType metric for platforms
assert defs.size() == 1 : "I was expecting 1 metric definition at platform level in v1";
assert DisplayType.DETAIL == defs.iterator().next().getDisplayType() : "Display type should be DETAIL in v1";
@@ -240,11 +242,13 @@ public class UpdateResourceTypeSubsystemTest extends UpdatePluginMetadataTestBas
assert platformChildren.size() == 1 : "Expected 1 direct child service of platform in v1";
service1 = platformChildren.iterator().next();
assert service1.getName().equals("service1") : "Expected 'service1' as name of direct platform child in v1";
- assert service1.getMetricDefinitions().size() == 1 : "Expected 1 metric for 'service1' in v1";
+ // include the built-in AvailabilityType metric
+ assert service1.getMetricDefinitions().size() == 2 : "Expected 2 metric for 'service1' in v1";
Set<ResourceType> nestedServices = service1.getChildResourceTypes();
assert nestedServices.size() == 1 : "Expected 1 nested service of 'service1' in v1";
Set<MeasurementDefinition> nestedDefs = nestedServices.iterator().next().getMetricDefinitions();
- assert nestedDefs.size() == 1 : "Expected 1 definition within 'nestedService' in v1";
+ // include the built-in AvailabilityType metric
+ assert nestedDefs.size() == 2 : "Expected 2 definition within 'nestedService' in v1";
MeasurementDefinition defThree = nestedDefs.iterator().next();
int definitionId = defThree.getId(); // get the id of the definition "Three" and save it for later use
getTransactionManager().rollback();
@@ -262,6 +266,7 @@ public class UpdateResourceTypeSubsystemTest extends UpdatePluginMetadataTestBas
assert platform2 != null : "I did not find myPlatform";
Set<MeasurementDefinition> defs2 = platform2.getMetricDefinitions();
+ // no built-in AvailabilityType metric for platforms
assert defs2.size() == 1 : "I was expecting 1 definition at platform level in v2";
assert DisplayType.SUMMARY == defs2.iterator().next().getDisplayType() : "Display type should be SUMMARY in v2";
@@ -290,7 +295,8 @@ public class UpdateResourceTypeSubsystemTest extends UpdatePluginMetadataTestBas
for (ResourceType type : platformChildren2) {
String typeName = type.getName();
- assert type.getMetricDefinitions().size() == 1 : "Expected one definition for " + typeName + " in v2";
+ // include the built-in AvailabilityType metric
+ assert type.getMetricDefinitions().size() == 2 : "Expected two definition for " + typeName + " in v2";
if (typeName.equals("nestedOne")) // The moved one
{
Set<MeasurementDefinition> defs3 = type.getMetricDefinitions();
12 years, 2 months
[rhq] Branch 'jshaughn/avail' - 54 commits - etc/m2 etc/samples modules/cli-tests modules/common modules/core modules/enterprise modules/helpers modules/integration-tests modules/plugins modules/pom.xml modules/test-utils pom.xml release.sh
by Jay Shaughnessy
etc/m2/smartgwt-war-archetype/src/main/resources/archetype-resources/pom.xml | 4
etc/samples/perspectives/sample-perspective/perspective/pom.xml | 2
modules/cli-tests/pom.xml | 2
modules/common/ant-bundle/pom.xml | 2
modules/common/drift/pom.xml | 2
modules/common/filetemplate-bundle/pom.xml | 2
modules/common/jboss-as/pom.xml | 2
modules/common/pom.xml | 2
modules/core/client-api/pom.xml | 2
modules/core/comm-api/pom.xml | 2
modules/core/dbutils/pom.xml | 2
modules/core/dbutils/src/main/java/org/rhq/core/db/DatabaseType.java | 2
modules/core/dbutils/src/main/java/org/rhq/core/db/DbUtil.java | 7
modules/core/dbutils/src/main/java/org/rhq/core/db/ExtendedSQLException.java | 43
modules/core/dbutils/src/main/java/org/rhq/core/db/TypeMap.java | 6
modules/core/dbutils/src/main/java/org/rhq/core/db/ant/DbAntI18NFactory.java | 4
modules/core/dbutils/src/main/java/org/rhq/core/db/ant/MD5Task.java | 8
modules/core/dbutils/src/main/java/org/rhq/core/db/ant/dbupgrade/DBUpgrader.java | 1
modules/core/dbutils/src/main/java/org/rhq/core/db/reset/DBReset.java | 145
modules/core/dbutils/src/main/java/org/rhq/core/db/setup/ConstraintImpl_PK.java | 2
modules/core/dbutils/src/main/java/org/rhq/core/db/setup/DBSetup.java | 12
modules/core/dbutils/src/main/java/org/rhq/core/db/setup/DataSet.java | 12
modules/core/dbutils/src/main/java/org/rhq/core/db/setup/Table.java | 21
modules/core/dbutils/src/main/java/org/rhq/core/db/setup/View.java | 12
modules/core/dbutils/src/main/scripts/dbsetup-build.xml | 5
modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml | 2
modules/core/domain/pom.xml | 2
modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java | 18
modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftFileTest.java | 11
modules/core/gui/pom.xml | 2
modules/core/native-system/ant-run.xml | 3
modules/core/native-system/pom.xml | 2
modules/core/plugin-api/pom.xml | 2
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/availability/AvailabilityCollectorRunnable.java | 5
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleDeployRequest.java | 1
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleDeployResult.java | 2
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleFacet.java | 3
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleManagerProvider.java | 3
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundlePurgeRequest.java | 8
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundlePurgeResult.java | 1
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ConfigurationFacet.java | 2
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ResourceConfigurationFacet.java | 3
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ResourceConfigurationUpdateException.java | 2
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/event/log/LogFileEventResourceComponentHelper.java | 5
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ClassLoaderFacet.java | 1
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/CreateResourceReport.java | 13
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ManualAddFacet.java | 1
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/PluginContainerDeployment.java | 3
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceContext.java | 10
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceDiscoveryContext.java | 9
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/operation/OperationResult.java | 5
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/plugin/PluginContext.java | 2
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/plugin/PluginLifecycleListener.java | 2
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SnapshotReportRequest.java | 2
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SnapshotReportResults.java | 2
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SupportFacet.java | 1
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/upgrade/ResourceUpgradeContext.java | 16
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/upgrade/ResourceUpgradeFacet.java | 3
modules/core/plugin-container/pom.xml | 2
modules/core/plugin-container/src/main/java/org/rhq/core/pc/content/RetrieveContentBitsRunner.java | 13
modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java | 16
modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java | 9
modules/core/plugin-validator/pom.xml | 2
modules/core/pom.xml | 2
modules/core/util/pom.xml | 2
modules/core/util/src/main/java/org/rhq/core/util/stream/StreamUtil.java | 8
modules/enterprise/agent/ant-run.xml | 3
modules/enterprise/agent/pom.xml | 3
modules/enterprise/agentupdate/pom.xml | 4
modules/enterprise/binding/pom.xml | 7
modules/enterprise/binding/src/main/java/org/rhq/bindings/util/ScriptAssert.java | 442 -
modules/enterprise/binding/src/main/java/org/rhq/bindings/util/ScriptAssertionException.java | 32
modules/enterprise/binding/src/test/java/org/rhq/bindings/util/ScriptAssertTest.java | 171
modules/enterprise/comm/pom.xml | 4
modules/enterprise/gui/base-perspective-jar/pom.xml | 2
modules/enterprise/gui/base-perspective-war/pom.xml | 2
modules/enterprise/gui/content_http-war/pom.xml | 2
modules/enterprise/gui/coregui/pom.xml | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/ResourceTypeTreeView.java | 16
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java | 7
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/DurationItem.java | 1
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/TwoLevelTab.java | 47
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/TwoLevelTabSet.java | 111
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java | 10
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypePluginTreeDataSource.java | 17
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/SearchBar.java | 10
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java | 5
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/RPCDataSource.java | 7
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties | 2
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties | 2
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties | 2
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties | 2
modules/enterprise/gui/installer-war/pom.xml | 2
modules/enterprise/gui/installer-war/src/main/java/org/rhq/enterprise/installer/ServerInformation.java | 31
modules/enterprise/gui/installer-war/src/test/java/org/rhq/enterprise/installer/DBInstallationTest.java | 76
modules/enterprise/gui/installer-war/src/test/resources/org/rhq/enterprise/installer/db-data-combined-3.0.0.xml | 690 ++
modules/enterprise/gui/installer-war/src/test/resources/org/rhq/enterprise/installer/db-schema-combined-3.0.0.xml | 2649 ++++++++++
modules/enterprise/gui/pom.xml | 2
modules/enterprise/gui/portal-war/pom.xml | 2
modules/enterprise/gui/rest-war/pom.xml | 2
modules/enterprise/pom.xml | 2
modules/enterprise/remoting/cli/pom.xml | 3
modules/enterprise/remoting/cli/src/main/scripts/rhq-client.build.xml | 1
modules/enterprise/remoting/client-api/pom.xml | 3
modules/enterprise/remoting/client-deps/pom.xml | 2
modules/enterprise/remoting/pom.xml | 2
modules/enterprise/remoting/webservices/pom.xml | 2
modules/enterprise/server/client-api/pom.xml | 4
modules/enterprise/server/container-lib/pom.xml | 2
modules/enterprise/server/container/pom.xml | 2
modules/enterprise/server/ear/pom.xml | 2
modules/enterprise/server/itests/pom.xml | 2
modules/enterprise/server/itests/src/test/java/org/rhq/enterprise/server/drift/DriftServerTest.java | 32
modules/enterprise/server/jar/pom.xml | 93
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/auth/SubjectManagerBean.java | 17
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/db/DbSetupTest.java | 70
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/db/DbUpgradeTest.java | 98
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.java | 3
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java | 12
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java | 6
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/LargeGroupTestBase.java | 28
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/ldap/FakeLdapContext.java | 6
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/DbSetupUtility.java | 259
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/LoggerAntBuildListener.java | 105
modules/enterprise/server/jar/src/test/resources/log4j.xml | 31
modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/util/db-data-combined-2.3.1.xml | 663 ++
modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/util/db-schema-combined-2.3.1.xml | 1916 +++++++
modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/util/test-ds.properties | 7
modules/enterprise/server/jar/src/test/resources/testng.bak.xml | 12
modules/enterprise/server/jar/src/test/resources/testng.xml | 12
modules/enterprise/server/plugins/alert-cli/pom.xml | 4
modules/enterprise/server/plugins/alert-cli/src/main/java/org/rhq/enterprise/server/plugins/alertCli/CliSender.java | 13
modules/enterprise/server/plugins/alert-email/pom.xml | 4
modules/enterprise/server/plugins/alert-irc/pom.xml | 4
modules/enterprise/server/plugins/alert-log4j/pom.xml | 4
modules/enterprise/server/plugins/alert-microblog/pom.xml | 4
modules/enterprise/server/plugins/alert-mobicents/pom.xml | 4
modules/enterprise/server/plugins/alert-operations/pom.xml | 4
modules/enterprise/server/plugins/alert-roles/pom.xml | 4
modules/enterprise/server/plugins/alert-snmp/pom.xml | 4
modules/enterprise/server/plugins/alert-subject/pom.xml | 4
modules/enterprise/server/plugins/ant-bundle/pom.xml | 2
modules/enterprise/server/plugins/cobbler/pom.xml | 4
modules/enterprise/server/plugins/disk/pom.xml | 2
modules/enterprise/server/plugins/drift-rhq/pom.xml | 2
modules/enterprise/server/plugins/filetemplate-bundle/pom.xml | 2
modules/enterprise/server/plugins/groovy-script/pom.xml | 4
modules/enterprise/server/plugins/jboss-software/pom.xml | 2
modules/enterprise/server/plugins/packagetype-cli/pom.xml | 4
modules/enterprise/server/plugins/perspectives/core/perspective/pom.xml | 2
modules/enterprise/server/plugins/perspectives/core/pom.xml | 2
modules/enterprise/server/plugins/pom.xml | 2
modules/enterprise/server/plugins/url/pom.xml | 2
modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml | 2
modules/enterprise/server/plugins/yum/pom.xml | 2
modules/enterprise/server/pom.xml | 2
modules/enterprise/server/safe-invoker/pom.xml | 2
modules/enterprise/server/sars/agent-sar/pom.xml | 2
modules/enterprise/server/sars/pom.xml | 2
modules/enterprise/server/xml-schemas/pom.xml | 2
modules/helpers/bundleGen/pom.xml | 4
modules/helpers/jeeGen/pom.xml | 2
modules/helpers/perftest-support/pom.xml | 4
modules/helpers/pom.xml | 2
modules/helpers/rtfilter/pom.xml | 2
modules/integration-tests/apache-plugin-test/pom.xml | 2
modules/integration-tests/jboss-as-7-plugin-test/pom.xml | 2
modules/integration-tests/jndi-access/jndi-access-test/pom.xml | 2
modules/integration-tests/jndi-access/pom.xml | 2
modules/integration-tests/jndi-access/remote-server/pom.xml | 2
modules/integration-tests/pom.xml | 2
modules/plugins/aliases/pom.xml | 2
modules/plugins/ant-bundle/pom.xml | 2
modules/plugins/apache/pom.xml | 2
modules/plugins/augeas/pom.xml | 2
modules/plugins/byteman/pom.xml | 2
modules/plugins/cobbler/pom.xml | 2
modules/plugins/cron/pom.xml | 2
modules/plugins/database/pom.xml | 2
modules/plugins/filetemplate-bundle/pom.xml | 2
modules/plugins/grub/pom.xml | 2
modules/plugins/hadoop/pom.xml | 2
modules/plugins/hibernate/pom.xml | 2
modules/plugins/hosts/pom.xml | 2
modules/plugins/hudson/pom.xml | 4
modules/plugins/iis/pom.xml | 2
modules/plugins/irc/pom.xml | 2
modules/plugins/jboss-as-5/pom.xml | 2
modules/plugins/jboss-as-7/pom.xml | 2
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java | 138
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/AbstractBaseDiscovery.java | 129
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java | 8
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java | 36
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java | 64
modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/AbstractConfigurationHandlingTest.java | 35
modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/ConfigurationLoadingTest.java | 300 -
modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/OperationJsonTest.java | 194
modules/plugins/jboss-as/pom.xml | 2
modules/plugins/jboss-cache-v3/pom.xml | 2
modules/plugins/jboss-cache/pom.xml | 2
modules/plugins/jmx/pom.xml | 2
modules/plugins/kickstart/pom.xml | 2
modules/plugins/mod-cluster/pom.xml | 2
modules/plugins/mysql/pom.xml | 2
modules/plugins/netservices/pom.xml | 2
modules/plugins/oracle/pom.xml | 2
modules/plugins/pattern-generator/pom.xml | 2
modules/plugins/perftest/pom.xml | 2
modules/plugins/platform/pom.xml | 2
modules/plugins/pom.xml | 2
modules/plugins/postfix/pom.xml | 2
modules/plugins/postgres/pom.xml | 2
modules/plugins/rhq-agent/pom.xml | 16
modules/plugins/rhq-server/pom.xml | 2
modules/plugins/samba/pom.xml | 2
modules/plugins/script/pom.xml | 2
modules/plugins/script2/pom.xml | 2
modules/plugins/snmptrapd/pom.xml | 2
modules/plugins/sshd/pom.xml | 2
modules/plugins/sudoers/pom.xml | 2
modules/plugins/tomcat/pom.xml | 2
modules/plugins/twitter/pom.xml | 2
modules/plugins/validate-all-plugins/pom.xml | 2
modules/plugins/virt/pom.xml | 2
modules/pom.xml | 2
modules/test-utils/pom.xml | 2
modules/test-utils/src/main/java/org/rhq/test/testng/StdoutReporter.java | 132
pom.xml | 19
release.sh | 11
230 files changed, 8369 insertions(+), 1203 deletions(-)
New commits:
commit bc35d1e365d9bed0705939afa1568ec2566538e8
Merge: c952153 30dadb8
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue Feb 28 16:40:11 2012 -0500
Merge branch 'master' into jshaughn/avail
Conflicts:
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceContext.java
diff --cc modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceContext.java
index 8f53e9d,20d7d17..17bb214
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceContext.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceContext.java
@@@ -115,12 -115,14 +115,14 @@@ public class ResourceContext<T extends
.equals(o.parentResourceUuid)) && resourceType.equals(o.resourceType);
}
}
-
+
private static Map<Children, ResourceTypeProcesses> PROCESSES_PER_PARENT_PER_RESOURCE_TYPE = new HashMap<Children, ResourceTypeProcesses>();
-
+
/**
- * Creates a new {@link ResourceContext} object. The plugin container is responsible for instantiating these
- * objects; plugin writers should never have to actually create context objects.
+ * Creates a new {@link ResourceContext} object.
+ *
+ * <b>NOTE:</b> The plugin container is responsible for instantiating these objects; plugin writers should never
+ * have to actually create context objects.
*
* @param resource the resource whose {@link org.rhq.core.pluginapi.inventory.ResourceComponent}
* will be given this context object of the plugin
commit 30dadb8f106ceb14560767bd83f4add50396c547
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Mon Feb 27 12:59:38 2012 -0500
Add null checks on several finally close() methods
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
index e381593..63d5a6c 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
@@ -253,7 +253,9 @@ public class DriftDetector implements Runnable {
currentFullSnapshotReader = changeSetMgr.getChangeSetReader(currentFullSnapshot);
newVersion = currentFullSnapshotReader.getHeaders().getVersion() + 1;
} finally {
- currentFullSnapshotReader.close();
+ if (null != currentFullSnapshotReader) {
+ currentFullSnapshotReader.close();
+ }
}
} else {
newVersion = snapshotReader.getHeaders().getVersion() + 1;
@@ -264,7 +266,9 @@ public class DriftDetector implements Runnable {
changedEntries, removedEntries, changedPinnedEntries);
} finally {
- snapshotReader.close();
+ if (null != snapshotReader) {
+ snapshotReader.close();
+ }
}
// if necessary, re-write the pinned snapshot file because we've updated timestamp/filesize info, which
@@ -564,7 +568,9 @@ public class DriftDetector implements Runnable {
}
return newSnapshot;
} finally {
- newSnapshotWriter.close();
+ if (null != newSnapshotWriter) {
+ newSnapshotWriter.close();
+ }
}
}
@@ -584,7 +590,9 @@ public class DriftDetector implements Runnable {
return pinnedSnapshot;
} finally {
- newSnapshotWriter.close();
+ if (null != newSnapshotWriter) {
+ newSnapshotWriter.close();
+ }
}
}
commit 49db23558976f60ab1b7ed5714a09e0eb58d8ec5
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue Feb 28 15:14:58 2012 -0500
fix the maven test code in server/jar pom.xml so we don't run tests more than once when using -Dtest=
diff --git a/modules/enterprise/server/jar/pom.xml b/modules/enterprise/server/jar/pom.xml
index ac85d7d..018b3b4 100644
--- a/modules/enterprise/server/jar/pom.xml
+++ b/modules/enterprise/server/jar/pom.xml
@@ -709,19 +709,6 @@ Build-OS-Version=${os.version}
</configuration>
</execution>
- <execution>
- <id>dbTestsOnly</id>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <skipTests>${skipTests}</skipTests>
- <includes>
- <include>org/rhq/enterprise/server/db/**</include>
- </includes>
- <failIfNoTests>false</failIfNoTests>
- </configuration>
- </execution>
</executions>
</plugin>
@@ -784,6 +771,59 @@ Build-OS-Version=${os.version}
<profiles>
<profile>
+ <!-- only if we are not running an individual set of tests via -Dtest do we do this -->
+ <id>no-individual-test</id>
+ <activation>
+ <property><name>!test</name></property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <!-- Everything but the web service tests, this is the standard test execution -->
+ <configuration>
+ <skipTests>true</skipTests>
+ <excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
+ <groups>${rhq.testng.includedGroups}</groups>
+ <properties>
+ <property>
+ <name>listener</name>
+ <value>org.rhq.test.testng.StdoutReporter</value>
+ </property>
+ </properties>
+ <systemPropertyVariables>
+ <embeddedDeployment>true</embeddedDeployment>
+ <deploymentDirectory>target/classes</deploymentDirectory>
+ <hibernate.dialect>${rhq.test.ds.hibernate-dialect}</hibernate.dialect>
+ <clean.db>${clean.db}</clean.db>
+ <log4j.configDebug>false</log4j.configDebug>
+ </systemPropertyVariables>
+ <additionalClasspathElements>
+ <!-- The below is required for tests to run against Oracle. -->
+ <additionalClasspathElement>${settings.localRepository}/com/oracle/ojdbc6/${ojdbc6.version}/ojdbc6-${ojdbc6.version}.jar</additionalClasspathElement>
+ </additionalClasspathElements>
+ </configuration>
+ <executions>
+ <execution>
+ <id>dbTestsOnly</id>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skipTests>${skipTests}</skipTests>
+ <includes>
+ <include>org/rhq/enterprise/server/db/**</include>
+ </includes>
+ <failIfNoTests>false</failIfNoTests>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
<id>dev</id>
<properties>
commit 94cc4206c8525ca9b69469947dc5deab4633a13e
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Mon Feb 27 18:19:28 2012 -0500
fix unit test failures for as7 configuration.
- needed to overload the execute behavior just for these tests.
diff --git a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/AbstractConfigurationHandlingTest.java b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/AbstractConfigurationHandlingTest.java
index 1af2f2f..72166d5 100644
--- a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/AbstractConfigurationHandlingTest.java
+++ b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/AbstractConfigurationHandlingTest.java
@@ -19,6 +19,7 @@
package org.rhq.modules.plugins.jbossas7;
import java.io.BufferedReader;
+import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
@@ -31,6 +32,8 @@ import javax.xml.bind.util.ValidationEventCollector;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.codehaus.jackson.JsonNode;
+import org.codehaus.jackson.JsonParseException;
+import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.node.ObjectNode;
@@ -42,6 +45,7 @@ import org.rhq.core.clientapi.descriptor.plugin.ServerDescriptor;
import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
import org.rhq.modules.plugins.jbossas7.json.Address;
import org.rhq.modules.plugins.jbossas7.json.Operation;
+import org.rhq.modules.plugins.jbossas7.json.Result;
/**
* Base class for configuration handling tests
@@ -53,7 +57,6 @@ public class AbstractConfigurationHandlingTest {
private Log log = LogFactory.getLog(getClass());
private PluginDescriptor pluginDescriptor;
-
void loadPluginDescriptor() throws Exception {
try {
URL descriptorUrl = this.getClass().getClassLoader().getResource(DESCRIPTOR_FILENAME);
@@ -102,8 +105,7 @@ public class AbstractConfigurationHandlingTest {
builder.append(line);
}
return builder.toString();
- }
- finally {
+ } finally {
reader.close();
}
}
@@ -114,6 +116,23 @@ public class AbstractConfigurationHandlingTest {
*
*/
protected class FakeConnection extends ASConnection {
+ private ObjectMapper mapper = new ObjectMapper();
+
+ @Override
+ public Result execute(Operation op) {
+ JsonNode json = executeRaw(op);
+ Result result = null;
+ try {
+ result = mapper.readValue(json, Result.class);
+ } catch (JsonParseException e) {
+ e.printStackTrace();
+ } catch (JsonMappingException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return result;
+ }
JsonNode content;
@@ -127,11 +146,11 @@ public class AbstractConfigurationHandlingTest {
@Override
public JsonNode executeRaw(Operation operation) {
- if (content==null)
+ if (content == null)
throw new IllegalStateException("Content not yet set");
Address address = operation.getAddress();
- if (address!=null && !address.isEmpty()) {
+ if (address != null && !address.isEmpty()) {
// we need to clone the content and then for the result find the right sub-content to put into result and
// return this one.
@@ -139,17 +158,17 @@ public class AbstractConfigurationHandlingTest {
String[] parts = address.getPath().split("=");
String key = parts[0];
String val = parts[1];
- JsonNode result = content.get("result");
+ JsonNode result = content.get("result");
JsonNode keyNode = result.get(key);
JsonNode valNode = keyNode.get(val);
// clone the original content
ObjectMapper tmpMapper = new ObjectMapper();
JsonNode tmp = tmpMapper.createObjectNode();
- ((ObjectNode)tmp).putAll(((ObjectNode)content));
+ ((ObjectNode) tmp).putAll(((ObjectNode) content));
// replace the result with the sub-content
- ((ObjectNode)tmp).put("result",valNode);
+ ((ObjectNode) tmp).put("result", valNode);
return tmp;
}
diff --git a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/ConfigurationLoadingTest.java b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/ConfigurationLoadingTest.java
index 8e3704b..db086f6 100644
--- a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/ConfigurationLoadingTest.java
+++ b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/ConfigurationLoadingTest.java
@@ -18,14 +18,10 @@
*/
package org.rhq.modules.plugins.jbossas7;
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
import java.util.Collection;
import java.util.List;
import java.util.Map;
-
import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.map.ObjectMapper;
import org.testng.annotations.BeforeSuite;
@@ -58,208 +54,172 @@ public class ConfigurationLoadingTest extends AbstractConfigurationHandlingTest
}
public void test1() throws Exception {
- FakeConnection connection = new FakeConnection();
- ConfigurationDefinition definition = new ConfigurationDefinition("foo","Test1");
+ //create a fake connection so that we control the execute behavior
+ FakeConnection connection = new FakeConnection();
+ //create/mock a configuration definition. Remember definition shared between N configurations.
+ ConfigurationDefinition definition = new ConfigurationDefinition("foo", "Test1");
+ //?
definition.setConfigurationFormat(ConfigurationFormat.STRUCTURED);
- definition.put(new PropertyDefinitionSimple("access-log", "Access-Log", false,
- PropertySimpleType.STRING));
- definition.put(new PropertyDefinitionSimple("rewrite", "Rewrite", false,
- PropertySimpleType.BOOLEAN));
- definition.put(new PropertyDefinitionSimple("notThere", "NotThere", false,
- PropertySimpleType.STRING));
- definition.put(new PropertyDefinitionList("alias", "Alias", true, new PropertyDefinitionSimple(
- "alias", "alias", true, PropertySimpleType.STRING)));
+ //Add a few properties that we will be testing/exercising
+ definition.put(new PropertyDefinitionSimple("access-log", "Access-Log", false, PropertySimpleType.STRING));
+ definition.put(new PropertyDefinitionSimple("rewrite", "Rewrite", false, PropertySimpleType.BOOLEAN));
+ definition.put(new PropertyDefinitionSimple("notThere", "NotThere", false, PropertySimpleType.STRING));
+ definition.put(new PropertyDefinitionList("alias", "Alias", true, new PropertyDefinitionSimple("alias",
+ "alias", true, PropertySimpleType.STRING)));
-
- String resultString = " {\"outcome\" : \"success\", \"result\" : {\"alias\" : [\"example.com\",\"example2.com\"],"+
- " \"access-log\" : \"my.log\", \"rewrite\" : true}}";
+ //Construct the result string that we would expect back.
+ String resultString = " {\"outcome\" : \"success\", \"result\" : {\"alias\" : [\"example.com\",\"example2.com\"],"
+ + " \"access-log\" : \"my.log\", \"rewrite\" : true}}";
ObjectMapper mapper = new ObjectMapper();
- ComplexResult result = mapper.readValue(resultString,ComplexResult.class);
+ //deserialize string to ComplexResult.
+ ComplexResult result = mapper.readValue(resultString, ComplexResult.class);
+
+ //create json tree from result.
JsonNode json = mapper.valueToTree(result);
+ //add the created content to the fake connection so that we set the results to be returned.
connection.setContent(json);
- ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(definition,connection,null);
+ //We pass in null here so that the fake connection will return the value passed into setContent().
+ ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(definition, connection, null);
Configuration config = delegate.loadResourceConfiguration();
- assert config.get("alias")!=null;
+ assert config.get("alias") != null;
assert config.get("alias") instanceof PropertyList;
PropertyList aliases = (PropertyList) config.get("alias");
List<Property> list = aliases.getList();
- assert list.size()==2;
- int count=2;
- for (Property p: list) {
+ assert list.size() == 2;
+ int count = 2;
+ for (Property p : list) {
PropertySimple ps = (PropertySimple) p;
if (ps.getStringValue().equals("example.com"))
count--;
if (ps.getStringValue().equals("example2.com"))
count--;
}
- assert count==0 : "Did not find all needed aliases";
+ assert count == 0 : "Did not find all needed aliases";
Property notThere = config.get("notThere");
- assert notThere !=null;
- assert ((PropertySimple)notThere).getStringValue()==null;
+ assert notThere != null;
+ assert ((PropertySimple) notThere).getStringValue() == null;
PropertySimple property = (PropertySimple) config.get("rewrite");
- assert property!=null;
+ assert property != null;
assert property.getBooleanValue();
property = (PropertySimple) config.get("access-log");
- assert property!=null && property.getStringValue()!=null;
+ assert property != null && property.getStringValue() != null;
assert property.getStringValue().equals("my.log");
}
public void test2() throws Exception {
- String resultString = "{\n" +
- " \"outcome\" : \"success\",\n" +
- " \"result\" : {\n" +
- " \"autoflush\" : true,\n" +
- " \"encoding\" : null,\n" +
- " \"formatter\" : \"%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n\",\n" +
- " \"level\" : \"INFO\",\n" +
- " \"file\" : {\n" +
- " \"path\" : \"server.log\",\n" +
- " \"relative-to\" : \"jboss.server.log.dir\"\n" +
- " },\n" +
- " \"suffix\" : \".yyyy-MM-dd\"\n" +
- " },\n" +
- " \"response-headers\" : null\n" +
- "}";
+ String resultString = "{\n" + " \"outcome\" : \"success\",\n" + " \"result\" : {\n"
+ + " \"autoflush\" : true,\n" + " \"encoding\" : null,\n"
+ + " \"formatter\" : \"%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n\",\n" + " \"level\" : \"INFO\",\n"
+ + " \"file\" : {\n" + " \"path\" : \"server.log\",\n"
+ + " \"relative-to\" : \"jboss.server.log.dir\"\n" + " },\n" + " \"suffix\" : \".yyyy-MM-dd\"\n"
+ + " },\n" + " \"response-headers\" : null\n" + "}";
FakeConnection connection = new FakeConnection();
- ConfigurationDefinition definition = new ConfigurationDefinition("foo","Test1");
+ ConfigurationDefinition definition = new ConfigurationDefinition("foo", "Test1");
PropertyDefinitionSimple propertyDefinition = new PropertyDefinitionSimple("autoflush", "Autoflush", false,
- PropertySimpleType.BOOLEAN);
+ PropertySimpleType.BOOLEAN);
propertyDefinition.setDefaultValue("true");
definition.put(propertyDefinition);
- propertyDefinition = new PropertyDefinitionSimple("encoding", "Encoding", false,
- PropertySimpleType.STRING);
+ propertyDefinition = new PropertyDefinitionSimple("encoding", "Encoding", false, PropertySimpleType.STRING);
propertyDefinition.setDefaultValue("HelloWorld");
definition.put(propertyDefinition);
- PropertyDefinitionSimple pathProperty = new PropertyDefinitionSimple("path","File path",true,PropertySimpleType.STRING);
- PropertyDefinitionSimple relativeToProperty = new PropertyDefinitionSimple("relative-to","Relative-To",true,PropertySimpleType.STRING);
- PropertyDefinitionMap fileMapDef = new PropertyDefinitionMap("file","Log file",true,pathProperty,relativeToProperty);
+ PropertyDefinitionSimple pathProperty = new PropertyDefinitionSimple("path", "File path", true,
+ PropertySimpleType.STRING);
+ PropertyDefinitionSimple relativeToProperty = new PropertyDefinitionSimple("relative-to", "Relative-To", true,
+ PropertySimpleType.STRING);
+ PropertyDefinitionMap fileMapDef = new PropertyDefinitionMap("file", "Log file", true, pathProperty,
+ relativeToProperty);
definition.put(fileMapDef);
ObjectMapper mapper = new ObjectMapper();
- ComplexResult result = mapper.readValue(resultString,ComplexResult.class);
+ ComplexResult result = mapper.readValue(resultString, ComplexResult.class);
JsonNode json = mapper.valueToTree(result);
connection.setContent(json);
- ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(definition,connection,null);
+ ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(definition, connection, null);
Configuration config = delegate.loadResourceConfiguration();
- assert config!=null;
- assert config.get("autoflush")!=null : "Autoflush was null";
+ assert config != null;
+ assert config.get("autoflush") != null : "Autoflush was null";
assert config.getSimple("autoflush").getBooleanValue() : "Autoflush was false";
PropertyMap fileMap = (PropertyMap) config.get("file");
- assert fileMap!=null : "File Map was null";
+ assert fileMap != null : "File Map was null";
PropertySimple path = (PropertySimple) fileMap.get("path");
- assert path!=null : "File->path was null";
+ assert path != null : "File->path was null";
assert path.getStringValue().equals("server.log") : "File->path wrong";
-
}
-
public void test3() throws Exception {
- String resultString = "{\n" +
- " \"outcome\" : \"success\",\n" +
- " \"result\" : {\n" +
- " \"name\" : \"standard-sockets\",\n" +
- " \"default-interface\" : \"default\",\n" +
- " \"port-offset\" : \"0\",\n" +
- " \"socket-binding\" : {\n" +
- " \"jndi\" : {\n" +
- " \"name\" : \"jndi\",\n" +
- " \"interface\" : null,\n" +
- " \"port\" : 1099,\n" +
- " \"fixed-port\" : null,\n" +
- " \"multicast-address\" : null,\n" +
- " \"multicast-port\" : null\n" +
- " },\n" +
- " \"jmx-connector-registry\" : {\n" +
- " \"name\" : \"jmx-connector-registry\",\n" +
- " \"interface\" : null,\n" +
- " \"port\" : 1090,\n" +
- " \"fixed-port\" : null,\n" +
- " \"multicast-address\" : null,\n" +
- " \"multicast-port\" : null\n" +
- " },\n" +
- " \"jmx-connector-server\" : {\n" +
- " \"name\" : \"jmx-connector-server\",\n" +
- " \"interface\" : null,\n" +
- " \"port\" : 1091,\n" +
- " \"fixed-port\" : null,\n" +
- " \"multicast-address\" : null,\n" +
- " \"multicast-port\" : null\n" +
- " },\n" +
- " \"http\" : {\n" +
- " \"name\" : \"http\",\n" +
- " \"interface\" : null,\n" +
- " \"port\" : 8080,\n" +
- " \"fixed-port\" : null,\n" +
- " \"multicast-address\" : null,\n" +
- " \"multicast-port\" : null\n" +
- " },\n" +
- " \"https\" : {\n" +
- " \"name\" : \"https\",\n" +
- " \"interface\" : null,\n" +
- " \"port\" : 8447,\n" +
- " \"fixed-port\" : null,\n" +
- " \"multicast-address\" : \"224.1.2.3\",\n" +
- " \"multicast-port\" : 18447\n" +
- " }"+
- " }\n" +
- " }\n" +
- "}";
+ String resultString = "{\n" + " \"outcome\" : \"success\",\n" + " \"result\" : {\n"
+ + " \"name\" : \"standard-sockets\",\n" + " \"default-interface\" : \"default\",\n"
+ + " \"port-offset\" : \"0\",\n" + " \"socket-binding\" : {\n" + " \"jndi\" : {\n"
+ + " \"name\" : \"jndi\",\n" + " \"interface\" : null,\n" + " \"port\" : 1099,\n"
+ + " \"fixed-port\" : null,\n" + " \"multicast-address\" : null,\n"
+ + " \"multicast-port\" : null\n" + " },\n" + " \"jmx-connector-registry\" : {\n"
+ + " \"name\" : \"jmx-connector-registry\",\n" + " \"interface\" : null,\n"
+ + " \"port\" : 1090,\n" + " \"fixed-port\" : null,\n"
+ + " \"multicast-address\" : null,\n" + " \"multicast-port\" : null\n" + " },\n"
+ + " \"jmx-connector-server\" : {\n" + " \"name\" : \"jmx-connector-server\",\n"
+ + " \"interface\" : null,\n" + " \"port\" : 1091,\n" + " \"fixed-port\" : null,\n"
+ + " \"multicast-address\" : null,\n" + " \"multicast-port\" : null\n" + " },\n"
+ + " \"http\" : {\n" + " \"name\" : \"http\",\n" + " \"interface\" : null,\n"
+ + " \"port\" : 8080,\n" + " \"fixed-port\" : null,\n"
+ + " \"multicast-address\" : null,\n" + " \"multicast-port\" : null\n" + " },\n"
+ + " \"https\" : {\n" + " \"name\" : \"https\",\n" + " \"interface\" : null,\n"
+ + " \"port\" : 8447,\n" + " \"fixed-port\" : null,\n"
+ + " \"multicast-address\" : \"224.1.2.3\",\n" + " \"multicast-port\" : 18447\n" + " }"
+ + " }\n" + " }\n" + "}";
ConfigurationDefinition definition = loadDescriptor("socketBinding");
ObjectMapper mapper = new ObjectMapper();
- ComplexResult result = mapper.readValue(resultString,ComplexResult.class);
+ ComplexResult result = mapper.readValue(resultString, ComplexResult.class);
JsonNode json = mapper.valueToTree(result);
FakeConnection connection = new FakeConnection();
connection.setContent(json);
- ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(definition,connection,null);
+ ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(definition, connection, null);
Configuration config = delegate.loadResourceConfiguration();
-
assert config != null;
PropertyList propertyList = (PropertyList) config.get("socket-binding");
- assert propertyList!=null;
+ assert propertyList != null;
List<Property> list = propertyList.getList();
- assert list.size()==5;
+ assert list.size() == 5;
for (Property prop : list) {
PropertyMap propMap2 = (PropertyMap) prop;
- Map<String,Property> map2 = propMap2.getMap();
- assert map2.size()==6;
+ Map<String, Property> map2 = propMap2.getMap();
+ assert map2.size() == 6;
assert map2.containsKey("port");
assert map2.containsKey("multicast-port");
assert map2.containsKey("multicast-address");
- if (((PropertySimple)map2.get("name")).getStringValue().equals("https")) {
- assert ((PropertySimple)map2.get("port")).getIntegerValue()==8447;
- assert ((PropertySimple)map2.get("multicast-port")).getIntegerValue()==18447;
+ if (((PropertySimple) map2.get("name")).getStringValue().equals("https")) {
+ assert ((PropertySimple) map2.get("port")).getIntegerValue() == 8447;
+ assert ((PropertySimple) map2.get("multicast-port")).getIntegerValue() == 18447;
}
}
}
-
public void test4() throws Exception {
String resultString = loadJsonFromFile("extensions.json");
@@ -267,31 +227,30 @@ public class ConfigurationLoadingTest extends AbstractConfigurationHandlingTest
ConfigurationDefinition definition = loadDescriptor("test4");
ObjectMapper mapper = new ObjectMapper();
- Result result = mapper.readValue(resultString,Result.class);
+ Result result = mapper.readValue(resultString, Result.class);
JsonNode json = mapper.valueToTree(result);
FakeConnection connection = new FakeConnection();
connection.setContent(json);
- ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(definition,connection,null);
+ ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(definition, connection, null);
Configuration config = delegate.loadResourceConfiguration();
assert config != null;
PropertyList extensions = (PropertyList) config.get("extension");
- assert extensions !=null;
+ assert extensions != null;
List<Property> extensionList = extensions.getList();
- assert extensionList.size()==22 : "Expected 22 extensions, got " + extensionList.size();
+ assert extensionList.size() == 22 : "Expected 22 extensions, got " + extensionList.size();
PropertyMap propertyMap = (PropertyMap) extensionList.get(0);
assert propertyMap != null;
PropertyMap starMap = (PropertyMap) propertyMap.get("*");
- assert starMap!=null;
+ assert starMap != null;
PropertySimple module = (PropertySimple) starMap.get("module");
- assert module!=null : "Module was null, but should not";
+ assert module != null : "Module was null, but should not";
String stringValue = module.getStringValue();
- assert stringValue!=null : "module property has no value";
+ assert stringValue != null : "module property has no value";
assert stringValue.equals("org.jboss.as.arquillian.service");
-
}
public void test5() throws Exception {
@@ -301,27 +260,27 @@ public class ConfigurationLoadingTest extends AbstractConfigurationHandlingTest
ConfigurationDefinition definition = loadDescriptor("test5");
ObjectMapper mapper = new ObjectMapper();
- ComplexResult result = mapper.readValue(resultString,ComplexResult.class);
+ ComplexResult result = mapper.readValue(resultString, ComplexResult.class);
JsonNode json = mapper.valueToTree(result);
FakeConnection connection = new FakeConnection();
connection.setContent(json);
- ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(definition,connection,null);
+ ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(definition, connection, null);
Configuration config = delegate.loadResourceConfiguration();
assert config != null;
PropertyList locations = (PropertyList) config.get("schema-locations");
- assert locations!=null;
+ assert locations != null;
List<Property> list = locations.getList();
- assert list.size()==21 : "List does not contain 21 entries, but " + list.size();
+ assert list.size() == 21 : "List does not contain 21 entries, but " + list.size();
PropertyMap propertyMap = (PropertyMap) list.get(0);
- assert propertyMap !=null;
- Map<String,Property> map = propertyMap.getMap();
- assert map.size()==1;
+ assert propertyMap != null;
+ Map<String, Property> map = propertyMap.getMap();
+ assert map.size() == 1;
PropertySimple urnProp = (PropertySimple) map.get("*");
String stringValue = urnProp.getStringValue();
- assert stringValue!=null : "Location property has no value";
+ assert stringValue != null : "Location property has no value";
assert stringValue.endsWith(".xsd");
}
@@ -333,27 +292,27 @@ public class ConfigurationLoadingTest extends AbstractConfigurationHandlingTest
ConfigurationDefinition definition = loadDescriptor("test6and7");
ObjectMapper mapper = new ObjectMapper();
- ComplexResult result = mapper.readValue(resultString,ComplexResult.class);
+ ComplexResult result = mapper.readValue(resultString, ComplexResult.class);
JsonNode json = mapper.valueToTree(result);
FakeConnection connection = new FakeConnection();
connection.setContent(json);
- ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(definition,connection,null);
+ ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(definition, connection, null);
Configuration config = delegate.loadResourceConfiguration();
assert config != null;
PropertySimple nameProperty = (PropertySimple) config.get("name");
- assert nameProperty !=null;
+ assert nameProperty != null;
String stringValue = nameProperty.getStringValue();
- assert stringValue!=null;
+ assert stringValue != null;
assert stringValue.equals("default");
Property criteria = config.get("criteria");
- assert criteria !=null;
+ assert criteria != null;
PropertySimple critProp = (PropertySimple) criteria;
stringValue = critProp.getStringValue();
- assert stringValue!=null;
+ assert stringValue != null;
}
@@ -364,27 +323,27 @@ public class ConfigurationLoadingTest extends AbstractConfigurationHandlingTest
ConfigurationDefinition definition = loadDescriptor("test6and7");
ObjectMapper mapper = new ObjectMapper();
- ComplexResult result = mapper.readValue(resultString,ComplexResult.class);
+ ComplexResult result = mapper.readValue(resultString, ComplexResult.class);
JsonNode json = mapper.valueToTree(result);
FakeConnection connection = new FakeConnection();
connection.setContent(json);
- ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(definition,connection,null);
+ ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(definition, connection, null);
Configuration config = delegate.loadResourceConfiguration();
assert config != null;
PropertySimple nameProperty = (PropertySimple) config.get("name");
- assert nameProperty !=null;
+ assert nameProperty != null;
String stringValue = nameProperty.getStringValue();
- assert stringValue!=null;
+ assert stringValue != null;
assert stringValue.equals("public");
Property criteria = config.get("criteria");
- assert criteria !=null;
+ assert criteria != null;
PropertySimple critProp = (PropertySimple) criteria;
stringValue = critProp.getStringValue();
- assert stringValue!=null;
+ assert stringValue != null;
assert stringValue.equals("any-ipv4-address");
}
@@ -396,24 +355,25 @@ public class ConfigurationLoadingTest extends AbstractConfigurationHandlingTest
ConfigurationDefinition definition = loadDescriptor("test8");
ObjectMapper mapper = new ObjectMapper();
- ComplexResult result = mapper.readValue(resultString,ComplexResult.class);
+ ComplexResult result = mapper.readValue(resultString, ComplexResult.class);
JsonNode json = mapper.valueToTree(result);
FakeConnection connection = new FakeConnection();
connection.setContent(json);
- ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(definition,connection,null);
+ ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(definition, connection, null);
Configuration config = delegate.loadResourceConfiguration();
- assert config!=null;
- assert config.getAllProperties().size()==8 : "Did not find 8 properties, but " + config.getAllProperties().size();
+ assert config != null;
+ assert config.getAllProperties().size() == 8 : "Did not find 8 properties, but "
+ + config.getAllProperties().size();
Property prop = config.get("bean-validation-enabled");
assert prop != null;
PropertySimple ps = (PropertySimple) prop;
assert ps.getBooleanValue();
prop = config.get("cached-connection-manager-error");
- assert prop!=null;
+ assert prop != null;
ps = (PropertySimple) prop;
- assert ps.getBooleanValue()==false;
+ assert ps.getBooleanValue() == false;
}
@@ -422,45 +382,43 @@ public class ConfigurationLoadingTest extends AbstractConfigurationHandlingTest
ConfigurationDefinition definition = loadDescriptor("test9");
ObjectMapper mapper = new ObjectMapper();
- ComplexResult result = mapper.readValue(resultString,ComplexResult.class);
+ ComplexResult result = mapper.readValue(resultString, ComplexResult.class);
JsonNode json = mapper.valueToTree(result);
FakeConnection connection = new FakeConnection();
connection.setContent(json);
- ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(definition,connection,null);
+ ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(definition, connection, null);
Configuration config = delegate.loadResourceConfiguration();
- assert config!=null;
+ assert config != null;
Collection<Property> properties = config.getProperties();
- assert properties.size()==6 : "Got " + properties.size() + " props instead of 6: " + properties.toString();
+ assert properties.size() == 6 : "Got " + properties.size() + " props instead of 6: " + properties.toString();
PropertySimple simple = config.getSimple("check-interval");
- assert simple !=null;
+ assert simple != null;
Integer integerValue = simple.getIntegerValue();
- assert integerValue !=null : "check-interval was null";
- assert integerValue ==17 : "check-interval was not 17 but " + integerValue;
+ assert integerValue != null : "check-interval was null";
+ assert integerValue == 17 : "check-interval was not 17 but " + integerValue;
PropertySimple disabled = config.getSimple("disabled");
- assert disabled !=null : "disabled was null";
+ assert disabled != null : "disabled was null";
Boolean booleanValue = disabled.getBooleanValue();
- assert booleanValue !=null;
+ assert booleanValue != null;
assert booleanValue;
PropertySimple listings = config.getSimple("listings");
- assert listings !=null;
+ assert listings != null;
Boolean booleanValue1 = listings.getBooleanValue();
- assert booleanValue1 !=null;
+ assert booleanValue1 != null;
assert !booleanValue1;
PropertySimple simple1 = config.getSimple("max-depth");
- assert simple1 !=null;
+ assert simple1 != null;
Integer integerValue1 = simple1.getIntegerValue();
- assert integerValue1 !=null;
- assert integerValue1 ==3;
+ assert integerValue1 != null;
+ assert integerValue1 == 3;
PropertySimple simple2 = config.getSimple("default-virtual-server");
- assert simple2 !=null;
+ assert simple2 != null;
String stringValue = simple2.getStringValue();
- assert stringValue !=null;
+ assert stringValue != null;
assert stringValue.equals("default-host");
-
-
}
}
commit 80562eaf03271de823632c9c63439271126b13df
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Mon Feb 27 17:19:23 2012 -0500
Fix copy paste mistake.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
index 7722312..ef4506c 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
@@ -134,7 +134,7 @@ public class ASConnection {
if ((json_to_send.indexOf(JSON_SERVER_CONFIG + EAP_PREFIX) > -1)
|| (json_to_send.indexOf(JSON_SERVER_CONFIG + EDG_PREFIX) > -1)
|| (json_to_send.indexOf(JSON_NAME + EAP_PREFIX) > -1)
- || (json_to_send.indexOf(JSON_NAME + EAP_PREFIX) > -1)) {
+ || (json_to_send.indexOf(JSON_NAME + EDG_PREFIX) > -1)) {
//delve into Operation and remove prefixes
Operation purgedOperation = purgeOperation(operation);
commit 8b2e5871114d8c08545befc8b9486129f82b2d34
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Sat Feb 25 16:17:07 2012 -0500
adding more context for unparsable json change.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
index 76a630a..7722312 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
@@ -382,6 +382,8 @@ public class ASConnection {
return failure;
}
//spinder 2/22/12: if unparsable JSON detected remove it. TODO: see if fixed with later version of jackson
+ //This needs to be in place until i)Jackson version where this is fixed or
+ // ii) fix for https://issues.jboss.org/browse/JBPAPP-8233
if (as7ResultSerialization.indexOf(UNPARSABLE_JSON) > -1) {
if (verbose) {
log.warn("------ Detected unparsable JSON <" + as7ResultSerialization + ">.");
commit c70a38dd3de2d8d4a1c25634ff3ceb83bd1a36bb
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Sat Feb 25 15:06:34 2012 -0500
Return failure Result for unexpected errors instead of null.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
index 00f61d2..76a630a 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
@@ -403,7 +403,15 @@ public class ASConnection {
return res;
} catch (IOException e) {
log.error(e.getMessage());
- return null;
+ if (verbose) {
+ log.error("----------- Operation execution unparsable. Request " + ":[" + op + "] Response:<" + node
+ + ">");
+ }
+ Result failure = new Result();
+ failure.setFailureDescription("Operation <" + op + "> returned unparsable JSON, <" + node + ">.");
+ return failure;
+ //don't return null.
+ //return null;
}
}
commit cf0c1af06a5d552413bdd404b320d01bfb5c1635
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Sat Feb 25 15:03:00 2012 -0500
Modifying connection class to handle 'failure-description' responses from AS7 as we were currently detecting as invalid json.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
index 812c5ff..00f61d2 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
@@ -57,6 +57,7 @@ public class ASConnection {
Authenticator passwordAuthenticator;
private String host;
private int port;
+ private String FAILURE_DESCRIPTION = "\"failure-description\"";
private String UNPARSABLE_JSON = ",\"server-groups\":null";
private static String EAP_PREFIX = AbstractBaseDiscovery.EAP_PREFIX;
private static String EDG_PREFIX = AbstractBaseDiscovery.EDG_PREFIX;
@@ -364,8 +365,22 @@ public class ASConnection {
Result res;
try {
+ //check for failure-description indicator, otherwise ObjectMapper will try to deserialize as json. Ex.
+ // {"outcome":"failed","failure-description":"JBAS014792: Unknown attribute number-of-timed-out-transactions","rolled-back":true}
String as7ResultSerialization = node.toString();
+ if (as7ResultSerialization.indexOf(FAILURE_DESCRIPTION) > -1) {
+ if (verbose) {
+ log.warn("------ Detected 'failure-description' when communicating with server."
+ + as7ResultSerialization);
+ }
+ Result failure = new Result();
+ int failIndex = as7ResultSerialization.indexOf(FAILURE_DESCRIPTION);
+ String failMessage = "";
+ failMessage = as7ResultSerialization.substring(failIndex + FAILURE_DESCRIPTION.length() + 1);
+ failure.setFailureDescription("Operation <" + op + "> returned <" + failMessage + ">");
+ return failure;
+ }
//spinder 2/22/12: if unparsable JSON detected remove it. TODO: see if fixed with later version of jackson
if (as7ResultSerialization.indexOf(UNPARSABLE_JSON) > -1) {
if (verbose) {
commit 1bf2f81404a399f823d3f1bf7b6b8b74144ac7fb
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Sat Feb 25 14:57:36 2012 -0500
Removing extra JSON segment returned with some results from AS7.
- Jackson libraries confused by extra JSON segment returned even though the returned string is valid JSON.
- We need to check out whether this is still a problem with later jackson versions.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
index 6249bbc..812c5ff 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
@@ -57,6 +57,7 @@ public class ASConnection {
Authenticator passwordAuthenticator;
private String host;
private int port;
+ private String UNPARSABLE_JSON = ",\"server-groups\":null";
private static String EAP_PREFIX = AbstractBaseDiscovery.EAP_PREFIX;
private static String EDG_PREFIX = AbstractBaseDiscovery.EDG_PREFIX;
private static String NAME = "name";
@@ -362,6 +363,23 @@ public class ASConnection {
}
Result res;
try {
+
+ String as7ResultSerialization = node.toString();
+
+ //spinder 2/22/12: if unparsable JSON detected remove it. TODO: see if fixed with later version of jackson
+ if (as7ResultSerialization.indexOf(UNPARSABLE_JSON) > -1) {
+ if (verbose) {
+ log.warn("------ Detected unparsable JSON <" + as7ResultSerialization + ">.");
+ }
+ String trimExtraJson = "";
+ int index = as7ResultSerialization.indexOf(UNPARSABLE_JSON);
+ trimExtraJson = as7ResultSerialization.substring(0, index)
+ + as7ResultSerialization.substring(index + UNPARSABLE_JSON.length());
+ res = (isComplex) ? mapper.readValue(trimExtraJson, ComplexResult.class) : mapper.readValue(
+ trimExtraJson, Result.class);
+ return res;
+ }
+
if (isComplex) {
res = mapper.readValue(node, ComplexResult.class);
} else {
commit 3869977299956619d02c36e0bbd179c50fe97e86
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Sat Feb 25 14:53:44 2012 -0500
[BZ 785128] unable to remove managed server. Have to remove EAP/EDG
prefixes when carrying out operations on the server now since we're
prepending EAP/EDG depending on EAP server used.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
index 6a7523f..6249bbc 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
@@ -28,6 +28,7 @@ import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.SocketTimeoutException;
import java.net.URL;
+import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -36,6 +37,7 @@ import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.SerializationConfig;
import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
+import org.rhq.modules.plugins.jbossas7.json.Address;
import org.rhq.modules.plugins.jbossas7.json.ComplexResult;
import org.rhq.modules.plugins.jbossas7.json.Operation;
import org.rhq.modules.plugins.jbossas7.json.Result;
@@ -55,6 +57,12 @@ public class ASConnection {
Authenticator passwordAuthenticator;
private String host;
private int port;
+ private static String EAP_PREFIX = AbstractBaseDiscovery.EAP_PREFIX;
+ private static String EDG_PREFIX = AbstractBaseDiscovery.EDG_PREFIX;
+ private static String NAME = "name";
+ private static String OPERATION_SERVER_CONFIG = "server-config=";
+ private static String JSON_SERVER_CONFIG = "{\"server-config\":\"";
+ private static String JSON_NAME = "\"name\":\"";
/**
* Construct an ASConnection object. The real "physical" connection is done in
@@ -119,9 +127,26 @@ public class ASConnection {
OutputStream out = conn.getOutputStream();
String json_to_send = mapper.writeValueAsString(operation);
+ //BZ:785128. removing artificial prefix for messages going back to the server.
+ //check for prefixed names
+ if ((json_to_send.indexOf(JSON_SERVER_CONFIG + EAP_PREFIX) > -1)
+ || (json_to_send.indexOf(JSON_SERVER_CONFIG + EDG_PREFIX) > -1)
+ || (json_to_send.indexOf(JSON_NAME + EAP_PREFIX) > -1)
+ || (json_to_send.indexOf(JSON_NAME + EAP_PREFIX) > -1)) {
+
+ //delve into Operation and remove prefixes
+ Operation purgedOperation = purgeOperation(operation);
+ if (verbose) {
+ log.warn("---------------- Purging EAP/EDG prefixes detected. Was <" + operation + "> but now <"
+ + purgedOperation + ">.");
+ }
+ operation = purgedOperation;
+ }
+
if (verbose) {
log.info("Json to send: " + json_to_send);
}
+
mapper.writeValue(out, operation);
out.flush();
@@ -236,6 +261,67 @@ public class ASConnection {
return null;
}
+ /** This operation purges the Operation passed in of EAP/EDG prefixes in the
+ * Address portion and in the AdditionalProperties section. The returned
+ * operation should be identical in every other way and should be used
+ * instead of the unpurged operation which will cause unrecognized property
+ * errors.
+ *
+ * @param operation to be purged.
+ * @return The same operation minus the prefixes.
+ */
+ private Operation purgeOperation(Operation operation) {
+ //purge prefixes from name
+ if (operation != null) {
+ boolean prefixLocated = false;
+
+ //Ex.
+ //Operation{operation='remove', address=Address{path: host=master,server-config=EAP server-six},
+ //additionalProperties={socket-binding-port-offset=0, name=EAP server-six, auto-start=false, group=,
+ //socket-binding-group=}}
+
+ //ADDRESS parsing
+ String path = operation.getAddress().getPath();
+ if (path.indexOf(OPERATION_SERVER_CONFIG + EAP_PREFIX) > -1
+ || path.indexOf(OPERATION_SERVER_CONFIG + EDG_PREFIX) > -1) {
+ int index = -1;
+ prefixLocated = true;
+ if ((index = path.indexOf(OPERATION_SERVER_CONFIG + EAP_PREFIX)) > -1) {
+ path = path.substring(0, index + OPERATION_SERVER_CONFIG.length())
+ + path.substring(index + OPERATION_SERVER_CONFIG.length() + EAP_PREFIX.length());
+ }
+ if ((index = path.indexOf(OPERATION_SERVER_CONFIG + EDG_PREFIX)) > -1) {
+ path = path.substring(0, index + OPERATION_SERVER_CONFIG.length())
+ + path.substring(index + OPERATION_SERVER_CONFIG.length() + EDG_PREFIX.length());
+ }
+ }
+
+ //ADDITIONAL-PROPERTIES parsing
+ Map<String, Object> additionalProperties = operation.getAdditionalProperties();
+ if ((additionalProperties != null) && !additionalProperties.isEmpty()
+ && additionalProperties.containsKey(NAME)) {
+ String contents = (String) additionalProperties.get(NAME);
+ if (contents.startsWith(EAP_PREFIX) || contents.startsWith(EDG_PREFIX)) {
+ prefixLocated = true;
+ if (contents.startsWith(EAP_PREFIX)) {
+ contents = contents.substring(EAP_PREFIX.length());
+ } else if (contents.startsWith(EDG_PREFIX)) {
+ contents = contents.substring(EDG_PREFIX.length());
+ }
+ additionalProperties.put(NAME, contents);
+ }
+ }
+
+ if (prefixLocated) {
+ //create new Operation to return.
+ Operation newOperation = new Operation(operation.getOperation(), new Address(path),
+ additionalProperties);
+ return newOperation;
+ }
+ }
+ return operation;
+ }
+
/**
* Execute the passed Operation and return its Result. This is a shortcut of
* #execute(Operation, false)
@@ -274,12 +360,13 @@ public class ASConnection {
failure.setFailureDescription("Operation [" + op + "] returned null");
return failure;
}
+ Result res;
try {
- Result res;
- if (isComplex)
+ if (isComplex) {
res = mapper.readValue(node, ComplexResult.class);
- else
+ } else {
res = mapper.readValue(node, Result.class);
+ }
return res;
} catch (IOException e) {
log.error(e.getMessage());
commit e3b17d4977e91bda9bf8362817bc68290f557683
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Sat Feb 25 14:30:06 2012 -0500
Use constants where possible for EAP/EDG identifiers.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/AbstractBaseDiscovery.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/AbstractBaseDiscovery.java
index dca0b8c..54ef7d4 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/AbstractBaseDiscovery.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/AbstractBaseDiscovery.java
@@ -50,6 +50,10 @@ public class AbstractBaseDiscovery {
protected Document hostXml;
protected final Log log = LogFactory.getLog(this.getClass());
private static final String JBOSS_EAP_PREFIX = "jboss-eap-";
+ public static final String EAP = "EAP";
+ public static final String EDG = "EDG";
+ public static final String EAP_PREFIX = EAP + " ";
+ public static final String EDG_PREFIX = EDG + " ";
private XPathFactory factory;
protected AbstractBaseDiscovery() {
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
index a0faeaa..f136483 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseProcessDiscovery.java
@@ -178,11 +178,11 @@ public class BaseProcessDiscovery extends AbstractBaseDiscovery implements Resou
}
if (isEAP) {
- serverName = "EAP " + serverName;
- version = "EAP " + version;
+ serverName = EAP_PREFIX + serverName;
+ version = EAP_PREFIX + version;
} else if (isEDG) {
- serverName = "EDG " + serverName;
- version = "EDG " + version;
+ serverName = EDG_PREFIX + serverName;
+ version = EDG_PREFIX + version;
}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java
index 3d937c0..5feaab2 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java
@@ -102,12 +102,12 @@ public class ManagedASDiscovery extends AbstractBaseDiscovery implements Resourc
String resourceName = serverInfo.name;
- if (hostInfo.productName.equalsIgnoreCase("eap")) {
- version = "EAP " + hostInfo.productVersion;
+ if (hostInfo.productName.equalsIgnoreCase(EAP)) {
+ version = EAP_PREFIX + hostInfo.productVersion;
resourceDescription = "Managed JBoss Enterprise Application Platform 6 server";
- resourceName = "EAP " + resourceName;
- } else if (hostInfo.productName.equalsIgnoreCase("EDG")) {
- version = "EDG " + hostInfo.productVersion;
+ resourceName = EAP_PREFIX + resourceName;
+ } else if (hostInfo.productName.equalsIgnoreCase(EDG)) {
+ version = EDG_PREFIX + hostInfo.productVersion;
resourceDescription = "Managed JBoss Enterprise Data Grid 6 server";
} else {
resourceDescription = "Managed AS7 server";
commit ce4b1a63105f7d67bf94a19445d731ab10bfc52e
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Sat Feb 25 14:09:03 2012 -0500
- ignore this diff. No functional changes just ide formatting.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/AbstractBaseDiscovery.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/AbstractBaseDiscovery.java
index c464e4b..dca0b8c 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/AbstractBaseDiscovery.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/AbstractBaseDiscovery.java
@@ -41,7 +41,7 @@ import org.rhq.core.system.ProcessInfo;
* in the area of processes and host.xml
* @author Heiko W. Rupp
*/
-public class AbstractBaseDiscovery {
+public class AbstractBaseDiscovery {
static final String DORG_JBOSS_BOOT_LOG_FILE = "-Dorg.jboss.boot.log.file=";
private static final String DJBOSS_SERVER_HOME_DIR = "-Djboss.home.dir";
static final int DEFAULT_MGMT_PORT = 9990;
@@ -52,8 +52,6 @@ public class AbstractBaseDiscovery {
private static final String JBOSS_EAP_PREFIX = "jboss-eap-";
private XPathFactory factory;
-
-
protected AbstractBaseDiscovery() {
synchronized (this) {
factory = XPathFactory.newInstance();
@@ -68,7 +66,7 @@ public class AbstractBaseDiscovery {
* @param isDomainMode Indiates if host.xml should be read (true) or standalone.xml (false)
*/
protected void readStandaloneOrHostXml(ProcessInfo processInfo, boolean isDomainMode) {
- String hostXmlFile = getHostXmlFileLocation(processInfo,isDomainMode);
+ String hostXmlFile = getHostXmlFileLocation(processInfo, isDomainMode);
readStandaloneOrHostXmlFromFile(hostXmlFile);
}
@@ -93,11 +91,11 @@ public class AbstractBaseDiscovery {
* @return The home dir if found or empty string otherwise
*/
String getHomeDirFromCommandLine(String[] commandLine) {
- for (String line: commandLine) {
- if (line.startsWith(DJBOSS_SERVER_HOME_DIR))
- return line.substring(DJBOSS_SERVER_HOME_DIR.length()+1);
- }
- return "";
+ for (String line : commandLine) {
+ if (line.startsWith(DJBOSS_SERVER_HOME_DIR))
+ return line.substring(DJBOSS_SERVER_HOME_DIR.length() + 1);
+ }
+ return "";
}
/**
@@ -107,7 +105,7 @@ public class AbstractBaseDiscovery {
*/
String getLogFileFromCommandLine(String[] commandLine) {
- for (String line: commandLine) {
+ for (String line : commandLine) {
if (line.startsWith(DORG_JBOSS_BOOT_LOG_FILE))
return line.substring(DORG_JBOSS_BOOT_LOG_FILE.length());
}
@@ -121,7 +119,7 @@ public class AbstractBaseDiscovery {
* @param commandLine Command line arguments of the process to
*/
protected HostPort getManagementPortFromHostXml(String[] commandLine) {
- if (hostXml==null)
+ if (hostXml == null)
throw new IllegalArgumentException(CALL_READ_STANDALONE_OR_HOST_XML_FIRST);
String portString;
@@ -129,35 +127,29 @@ public class AbstractBaseDiscovery {
String socketBindingName;
- socketBindingName = obtainXmlPropertyViaXPath(
- "//management/management-interfaces/http-interface/socket-binding/@http");
- String socketInterface = obtainXmlPropertyViaXPath(
- "//management/management-interfaces/http-interface/socket/@interface");
+ socketBindingName = obtainXmlPropertyViaXPath("//management/management-interfaces/http-interface/socket-binding/@http");
+ String socketInterface = obtainXmlPropertyViaXPath("//management/management-interfaces/http-interface/socket/@interface");
if (!socketInterface.isEmpty()) {
- interfaceExpession = obtainXmlPropertyViaXPath(
- "//interfaces/interface[@name='" + socketInterface + "']/inet-address/@value");
- portString = obtainXmlPropertyViaXPath(
- "//management/management-interfaces/http-interface/socket/@port");
- }
- else if (socketBindingName.isEmpty()) {
+ interfaceExpession = obtainXmlPropertyViaXPath("//interfaces/interface[@name='" + socketInterface
+ + "']/inet-address/@value");
+ portString = obtainXmlPropertyViaXPath("//management/management-interfaces/http-interface/socket/@port");
+ } else if (socketBindingName.isEmpty()) {
// old AS7.0, early 7.1 style
portString = obtainXmlPropertyViaXPath("//management/management-interfaces/http-interface/@port");
- String interfaceName = obtainXmlPropertyViaXPath(
- "//management/management-interfaces/http-interface/@interface");
- interfaceExpession = obtainXmlPropertyViaXPath(
- "/server/interfaces/interface[@name='" + interfaceName + "']/inet-address/@value");
- }
- else {
+ String interfaceName = obtainXmlPropertyViaXPath("//management/management-interfaces/http-interface/@interface");
+ interfaceExpession = obtainXmlPropertyViaXPath("/server/interfaces/interface[@name='" + interfaceName
+ + "']/inet-address/@value");
+ } else {
// later AS7.1 and EAP6 standalone.xml
- portString = obtainXmlPropertyViaXPath(
- "/server/socket-binding-group/socket-binding[@name='" + socketBindingName + "']/@port");
- String interfaceName = obtainXmlPropertyViaXPath(
- "/server/socket-binding-group/socket-binding[@name='" + socketBindingName + "']/@interface");
+ portString = obtainXmlPropertyViaXPath("/server/socket-binding-group/socket-binding[@name='"
+ + socketBindingName + "']/@port");
+ String interfaceName = obtainXmlPropertyViaXPath("/server/socket-binding-group/socket-binding[@name='"
+ + socketBindingName + "']/@interface");
// TODO the next may also be expressed differently
- interfaceExpession = obtainXmlPropertyViaXPath(
- "/server/interfaces/interface[@name='" + interfaceName + "']/inet-address/@value");
+ interfaceExpession = obtainXmlPropertyViaXPath("/server/interfaces/interface[@name='" + interfaceName
+ + "']/inet-address/@value");
}
HostPort hp = new HostPort();
@@ -167,17 +159,14 @@ public class AbstractBaseDiscovery {
else
hp.host = "localhost"; // Fallback
-
- if (portString!=null && !portString.isEmpty()) {
- String tmp = replaceDollarExpression(portString,commandLine, "9990");
+ if (portString != null && !portString.isEmpty()) {
+ String tmp = replaceDollarExpression(portString, commandLine, "9990");
hp.port = Integer.valueOf(tmp);
- }
- else
+ } else
hp.port = 9990; // Fallback to default
return hp;
}
-
/**
* Check if the passed value has an expression in the form of ${var} or ${var:default},
* try to resolve it. Resolution is done by looking at the command line to see if
@@ -194,15 +183,14 @@ public class AbstractBaseDiscovery {
return value;
// remove ${ }
- value = value.substring(2,value.length()-1);
+ value = value.substring(2, value.length() - 1);
String fallback = lastResort;
String expression;
if (value.contains(":")) {
int i = value.indexOf(":");
- expression = value.substring(0,i);
- fallback = value.substring(i+1);
- }
- else {
+ expression = value.substring(0, i);
+ fallback = value.substring(i + 1);
+ } else {
expression = value;
}
/*
@@ -214,7 +202,7 @@ public class AbstractBaseDiscovery {
* to find the management addresss
*/
- String ret=null;
+ String ret = null;
for (int i = 0, commandLineLength = commandLine.length; i < commandLineLength; i++) {
String line = commandLine[i];
if (expression.contains("address")) {
@@ -222,7 +210,7 @@ public class AbstractBaseDiscovery {
if (line.contains("="))
ret = line.substring(line.indexOf("=") + 1); // -bmanagement=1.2.3.4
else
- ret = commandLine[i+1]; // -bmanagement 1.2.3.4
+ ret = commandLine[i + 1]; // -bmanagement 1.2.3.4
break;
}
} else if (expression.contains("port")) {
@@ -233,7 +221,7 @@ public class AbstractBaseDiscovery {
}
}
- if (ret==null)
+ if (ret == null)
ret = fallback;
return ret;
@@ -246,7 +234,7 @@ public class AbstractBaseDiscovery {
* @return server name
*/
protected String findHostName() {
- if (hostXml==null)
+ if (hostXml == null)
throw new IllegalArgumentException(CALL_READ_STANDALONE_OR_HOST_XML_FIRST);
String hostName = hostXml.getDocumentElement().getAttribute("name");
@@ -258,10 +246,9 @@ public class AbstractBaseDiscovery {
* @return host and port of the domain controller
*/
protected HostPort getDomainControllerFromHostXml() {
- if (hostXml==null)
+ if (hostXml == null)
throw new IllegalArgumentException(CALL_READ_STANDALONE_OR_HOST_XML_FIRST);
-
// first check remote, as we can't distinguish between a missing local element or
// and empty one which is the default
String remoteHost = obtainXmlPropertyViaXPath("/host/domain-controller/remote/@host");
@@ -272,8 +259,7 @@ public class AbstractBaseDiscovery {
hp = new HostPort(false);
hp.host = remoteHost;
hp.port = Integer.parseInt(portString);
- }
- else {
+ } else {
hp = new HostPort(true);
hp.port = 9999;
}
@@ -283,7 +269,7 @@ public class AbstractBaseDiscovery {
}
String getManagementSecurtiyRealmFromHostXml() {
- if (hostXml==null)
+ if (hostXml == null)
throw new IllegalArgumentException(CALL_READ_STANDALONE_OR_HOST_XML_FIRST);
String realm = obtainXmlPropertyViaXPath("//management/management-interfaces/http-interface/@security-realm");
@@ -292,21 +278,24 @@ public class AbstractBaseDiscovery {
}
String getSecurityPropertyFileFromHostXml(String baseDir, AS7Mode mode, String realm) {
- if (hostXml==null)
+ if (hostXml == null)
throw new IllegalArgumentException(CALL_READ_STANDALONE_OR_HOST_XML_FIRST);
- String fileName = obtainXmlPropertyViaXPath("//security-realms/security-realm[@name='" + realm + "']/authentication/properties/@path");
- String relDir = obtainXmlPropertyViaXPath("//security-realms/security-realm[@name='" + realm + "']/authentication/properties/@relative-to");
+ String fileName = obtainXmlPropertyViaXPath("//security-realms/security-realm[@name='" + realm
+ + "']/authentication/properties/@path");
+ String relDir = obtainXmlPropertyViaXPath("//security-realms/security-realm[@name='" + realm
+ + "']/authentication/properties/@relative-to");
String dmode;
- if (mode==AS7Mode.STANDALONE)
- dmode="server";
+ if (mode == AS7Mode.STANDALONE)
+ dmode = "server";
else
- dmode="domain";
+ dmode = "domain";
- String fullName ;
+ String fullName;
if (relDir.equals("jboss." + dmode + ".config.dir"))
- fullName = baseDir + File.separator + mode.getBaseDir() + File.separator + "configuration" + File.separator + fileName;
+ fullName = baseDir + File.separator + mode.getBaseDir() + File.separator + "configuration" + File.separator
+ + fileName;
else
fullName = relDir + File.separator + fileName;
@@ -323,7 +312,7 @@ public class AbstractBaseDiscovery {
protected String getHostXmlFileLocation(ProcessInfo processInfo, boolean isDomain) {
String home = processInfo.getEnvironmentVariable("jboss.home.dir");
- if (home==null)
+ if (home == null)
home = getHomeDirFromCommandLine(processInfo.getCommandLine());
StringBuilder builder = new StringBuilder(home);
if (isDomain)
@@ -341,7 +330,7 @@ public class AbstractBaseDiscovery {
protected String determineServerVersionFromHomeDir(String homeDir) {
String version;
- String tmp = homeDir.substring(homeDir.lastIndexOf("/")+1);
+ String tmp = homeDir.substring(homeDir.lastIndexOf("/") + 1);
if (tmp.startsWith(JBOSS_AS_PREFIX)) {
version = tmp.substring(JBOSS_AS_PREFIX.length());
} else if (tmp.startsWith(JBOSS_EAP_PREFIX)) {
@@ -362,10 +351,9 @@ public class AbstractBaseDiscovery {
*
*/
protected String obtainXmlPropertyViaXPath(String xpathExpression) {
- if (hostXml==null)
+ if (hostXml == null)
throw new IllegalArgumentException(CALL_READ_STANDALONE_OR_HOST_XML_FIRST);
-
XPath xpath = factory.newXPath();
try {
XPathExpression expr = xpath.compile(xpathExpression);
@@ -379,7 +367,6 @@ public class AbstractBaseDiscovery {
}
}
-
/**
* Helper class that holds information about the host,port tuple
*/
@@ -401,11 +388,7 @@ public class AbstractBaseDiscovery {
@Override
public String toString() {
- return "HostPort{" +
- "host='" + host + '\'' +
- ", port=" + port +
- ", isLocal=" + isLocal +
- '}';
+ return "HostPort{" + "host='" + host + '\'' + ", port=" + port + ", isLocal=" + isLocal + '}';
}
}
}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java
index b46b108..6212650 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java
@@ -44,8 +44,8 @@ public class HostControllerComponent extends BaseServerComponent implements Oper
}
@Override
- public OperationResult invokeOperation(String name,
- Configuration parameters) throws InterruptedException, Exception {
+ public OperationResult invokeOperation(String name, Configuration parameters) throws InterruptedException,
+ Exception {
if (name.equals("start")) {
return startServer(AS7Mode.DOMAIN);
@@ -54,58 +54,55 @@ public class HostControllerComponent extends BaseServerComponent implements Oper
} else if (name.equals("shutdown")) {
// This is a bit trickier, as it needs to be executed on the level on /host=xx
- String domainHost = pluginConfiguration.getSimpleValue("domainHost","");
+ String domainHost = pluginConfiguration.getSimpleValue("domainHost", "");
if (domainHost.isEmpty()) {
OperationResult result = new OperationResult();
result.setErrorMessage("No domain host found - can not continue");
return result;
}
- Operation op = new Operation("shutdown","host",domainHost);
+ Operation op = new Operation("shutdown", "host", domainHost);
Result res = getASConnection().execute(op);
- return postProcessResult(name,res);
- }
- else if (name.equals("installRhqUser")) {
+ return postProcessResult(name, res);
+ } else if (name.equals("installRhqUser")) {
return installManagementUser(parameters, pluginConfiguration, AS7Mode.HOST);
}
-
// Defer other stuff to the base component for now
return super.invokeOperation(name, parameters);
}
-
@Override
public CreateResourceReport createResource(CreateResourceReport report) {
// If Content is to be deployed, call the deployContent method
- if (report.getPackageDetails()!=null)
+ if (report.getPackageDetails() != null)
return super.deployContent(report);
// TODO check for types of children -- this is server group only at the moment.
String name = report.getUserSpecifiedResourceName();
Address address = new Address(path);
- address.add("server-group",name);
- Operation op = new Operation("add",address);
+ address.add("server-group", name);
+ Operation op = new Operation("add", address);
Configuration rc = report.getResourceConfiguration();
- String profile = rc.getSimpleValue("profile","");
+ String profile = rc.getSimpleValue("profile", "");
if (profile.isEmpty()) {
report.setErrorMessage("No profile given");
report.setStatus(CreateResourceStatus.FAILURE);
return report;
}
- op.addAdditionalProperty("profile",profile);
- String socketBindingGroup = rc.getSimpleValue("socket-binding-group","");
+ op.addAdditionalProperty("profile", profile);
+ String socketBindingGroup = rc.getSimpleValue("socket-binding-group", "");
if (socketBindingGroup.isEmpty()) {
report.setErrorMessage("No socket-binding-group given");
report.setStatus(CreateResourceStatus.FAILURE);
return report;
}
- op.addAdditionalProperty("socket-binding-group",socketBindingGroup);
+ op.addAdditionalProperty("socket-binding-group", socketBindingGroup);
PropertySimple offset = rc.getSimple("socket-binding-port-offset");
- if (offset!=null && offset.getStringValue()!=null)
- op.addAdditionalProperty("socket-binding-port-offset",offset.getIntegerValue());
+ if (offset != null && offset.getStringValue() != null)
+ op.addAdditionalProperty("socket-binding-port-offset", offset.getIntegerValue());
// TODO add jvm info
Result res = getASConnection().execute(op);
@@ -113,8 +110,7 @@ public class HostControllerComponent extends BaseServerComponent implements Oper
report.setResourceKey(address.getPath());
report.setResourceName(name);
report.setStatus(CreateResourceStatus.SUCCESS);
- }
- else {
+ } else {
report.setErrorMessage(res.getFailureDescription());
report.setStatus(CreateResourceStatus.FAILURE);
report.setException(res.getRhqThrowable());
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java
index 5890ca2..3d937c0 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java
@@ -31,7 +31,6 @@ import org.rhq.core.domain.configuration.PropertyMap;
import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.pluginapi.event.log.LogFileEventResourceComponentHelper;
import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
-import org.rhq.core.pluginapi.inventory.ProcessScanResult;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
import org.rhq.modules.plugins.jbossas7.json.Address;
@@ -64,10 +63,9 @@ public class ManagedASDiscovery extends AbstractBaseDiscovery implements Resourc
String hostName = hcConfig.getSimpleValue("domainHost", "master"); // TODO good default?
HostInfo hostInfo = getHostInfo(hostName);
- if (hostInfo==null)
+ if (hostInfo == null)
return discoveredResources;
-
try {
// get the HostController, as this is an indicator for managed AS
@@ -85,7 +83,7 @@ public class ManagedASDiscovery extends AbstractBaseDiscovery implements Resourc
config.put(new PropertySimple("socket-binding-group", serverInfo.bindingGroup));
} else {
String group = resolveSocketBindingGroup(serverInfo.group);
- config.put(new PropertySimple("socket-binding-group",group));
+ config.put(new PropertySimple("socket-binding-group", group));
}
config.put(new PropertySimple("socket-binding-port-offset", serverInfo.portOffset));
@@ -95,8 +93,9 @@ public class ManagedASDiscovery extends AbstractBaseDiscovery implements Resourc
// get from the domain or other place as soon as the domain provides it.
//XXX hardcoded separators?
- String serverLog = hcConfig.getSimpleValue("baseDir","/tmp")+File.separator+"domain/servers/"+serverInfo.name+"/log/server.log";
- initLogEventSourcesConfigProp(serverLog,config);
+ String serverLog = hcConfig.getSimpleValue("baseDir", "/tmp") + File.separator + "domain/servers/"
+ + serverInfo.name + "/log/server.log";
+ initLogEventSourcesConfigProp(serverLog, config);
String version;
String resourceDescription;
@@ -107,43 +106,42 @@ public class ManagedASDiscovery extends AbstractBaseDiscovery implements Resourc
version = "EAP " + hostInfo.productVersion;
resourceDescription = "Managed JBoss Enterprise Application Platform 6 server";
resourceName = "EAP " + resourceName;
- }
- else if (hostInfo.productName.equalsIgnoreCase("EDG")) {
+ } else if (hostInfo.productName.equalsIgnoreCase("EDG")) {
version = "EDG " + hostInfo.productVersion;
resourceDescription = "Managed JBoss Enterprise Data Grid 6 server";
- }
- else {
+ } else {
resourceDescription = "Managed AS7 server";
version = hostInfo.releaseVersion;
}
DiscoveredResourceDetails detail = new DiscoveredResourceDetails(discoveryContext.getResourceType(), // ResourceType
- hostName + "/" + serverInfo.name, // key
- resourceName, // Name
- version, // TODO get from Domain as soon as it is provided
- resourceDescription, // Description
- config, null);
+ hostName + "/" + serverInfo.name, // key
+ resourceName, // Name
+ version, // TODO get from Domain as soon as it is provided
+ resourceDescription, // Description
+ config, null);
// Add to return values
discoveredResources.add(detail);
log.info("Discovered new ... " + discoveryContext.getResourceType() + ", " + serverInfo);
}
} catch (Exception e) {
- log.warn("Discovery for a " + discoveryContext.getResourceType() + " failed for process " + " :" + e.getMessage());
+ log.warn("Discovery for a " + discoveryContext.getResourceType() + " failed for process " + " :"
+ + e.getMessage());
}
return discoveredResources;
}
private String resolveSocketBindingGroup(String serverGroup) {
- Address address = new Address("server-group",serverGroup);
- Operation operation = new ReadAttribute(address,"socket-binding-group");
+ Address address = new Address("server-group", serverGroup);
+ Operation operation = new ReadAttribute(address, "socket-binding-group");
Result result = parentComponent.getASConnection().execute(operation);
return (String) result.getResult();
}
private List<ServerInfo> getManagedServers(String domainHost) {
- Address address = new Address("host",domainHost);
- Operation operation = new ReadChildrenNames(address,"server-config");
+ Address address = new Address("host", domainHost);
+ Operation operation = new ReadChildrenNames(address, "server-config");
ASConnection connection = parentComponent.getASConnection();
Result res = connection.execute(operation);
List<String> servers = (List<String>) res.getResult();
@@ -153,15 +151,15 @@ public class ManagedASDiscovery extends AbstractBaseDiscovery implements Resourc
info.name = server;
ret.add(info);
- address= new Address("host",domainHost);
- address.add("server-config",server);
+ address = new Address("host", domainHost);
+ address.add("server-config", server);
operation = new ReadResource(address);
ComplexResult cres = connection.executeComplex(operation);
- Map<String,Object> map = cres.getResult();
+ Map<String, Object> map = cres.getResult();
info.group = (String) map.get("group");
- info.autoStart = (Boolean)map.get("auto-start");
+ info.autoStart = (Boolean) map.get("auto-start");
Integer offset = (Integer) map.get("socket-binding-port-offset");
- if (offset!=null)
+ if (offset != null)
info.portOffset = offset;
info.bindingGroup = (String) map.get("socket-binding-group");
}
@@ -170,7 +168,7 @@ public class ManagedASDiscovery extends AbstractBaseDiscovery implements Resourc
}
private HostInfo getHostInfo(String domainHost) {
- Address address = new Address("host",domainHost);
+ Address address = new Address("host", domainHost);
Operation operation = new ReadResource(address);
HostInfo info = new HostInfo();
@@ -178,11 +176,11 @@ public class ManagedASDiscovery extends AbstractBaseDiscovery implements Resourc
if (!cres.isSuccess())
return null;
- Map<String,Object> map = cres.getResult();
+ Map<String, Object> map = cres.getResult();
info.releaseCodeName = (String) map.get("release-codename");
- info.releaseVersion = (String)map.get("release-version");
+ info.releaseVersion = (String) map.get("release-version");
info.productName = (String) map.get("product-name");
- info.productVersion = (String)map.get("product-version");
+ info.productVersion = (String) map.get("product-version");
return info;
}
diff --git a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/OperationJsonTest.java b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/OperationJsonTest.java
index 2dcd49f..aefd5ee 100644
--- a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/OperationJsonTest.java
+++ b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/OperationJsonTest.java
@@ -18,21 +18,18 @@
*/
package org.rhq.modules.plugins.jbossas7;
-import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.annotate.JsonAnyGetter;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.SerializationConfig;
import org.testng.annotations.Test;
import org.rhq.modules.plugins.jbossas7.json.Address;
import org.rhq.modules.plugins.jbossas7.json.ComplexResult;
-import org.rhq.modules.plugins.jbossas7.json.PROPERTY_VALUE;
import org.rhq.modules.plugins.jbossas7.json.Operation;
+import org.rhq.modules.plugins.jbossas7.json.PROPERTY_VALUE;
import org.rhq.modules.plugins.jbossas7.json.Result;
import org.rhq.modules.plugins.jbossas7.json.WriteAttribute;
@@ -42,28 +39,26 @@ import org.rhq.modules.plugins.jbossas7.json.WriteAttribute;
@Test
public class OperationJsonTest {
+ public void operationSerDeserTest() throws Exception {
- public void operationSerDeserTest() throws Exception{
-
- Address address= new Address();
- address.add("subsystem","web");
- address.add("connector","http");
-
- Operation operation = new WriteAttribute(address,"socket-binding","jndi");
+ Address address = new Address();
+ address.add("subsystem", "web");
+ address.add("connector", "http");
+ Operation operation = new WriteAttribute(address, "socket-binding", "jndi");
ObjectMapper mapper = new ObjectMapper();
String result = mapper.writeValueAsString(operation);
- Operation op = mapper.readValue(result,Operation.class);
- assert op!=null;
- assert op.getOperation()!=null : "op.operation was null!";
+ Operation op = mapper.readValue(result, Operation.class);
+ assert op != null;
+ assert op.getOperation() != null : "op.operation was null!";
assert op.getOperation().equals(operation.getOperation()) : "Operation is " + op.getOperation();
- assert op.getName()!=null : "op.getName is null";
- assert op.getName().equals("socket-binding") : "attribute name is " + op.getName() + " and not 'socket-binding'";
+ assert op.getName() != null : "op.getName is null";
+ assert op.getName().equals("socket-binding") : "attribute name is " + op.getName()
+ + " and not 'socket-binding'";
assert op.getValue().equals("jndi") : "attribute value is " + op.getValue();
- assert op.getAddress().size()==2 : "Address did not contain 2 parts, but " + op.getAddress().size();
-
+ assert op.getAddress().size() == 2 : "Address did not contain 2 parts, but " + op.getAddress().size();
}
@@ -72,23 +67,23 @@ public class OperationJsonTest {
String json = "{\"myKey\":\"myValue\"}";
ObjectMapper mapper = new ObjectMapper();
- PROPERTY_VALUE pv = mapper.readValue(json,PROPERTY_VALUE.class);
+ PROPERTY_VALUE pv = mapper.readValue(json, PROPERTY_VALUE.class);
assert pv.getKey().equals("myKey") : "Key is " + pv.getKey();
- assert pv.getValue().equals("myValue"): "Value is " + pv.getValue();
+ assert pv.getValue().equals("myValue") : "Value is " + pv.getValue();
}
public void anyPayloadTest() throws Exception {
- Address address= new Address();
- address.add("/server-group","newOne");
+ Address address = new Address();
+ address.add("/server-group", "newOne");
- Map<String,Object> props = new HashMap<String, Object>();
- props.put("profile","default");
- props.put("someBool",true);
+ Map<String, Object> props = new HashMap<String, Object>();
+ props.put("profile", "default");
+ props.put("someBool", true);
- Operation operation = new Operation("add",address,props);
- operation.addAdditionalProperty("foo","bar");
+ Operation operation = new Operation("add", address, props);
+ operation.addAdditionalProperty("foo", "bar");
ObjectMapper mapper = new ObjectMapper();
@@ -98,7 +93,7 @@ public class OperationJsonTest {
assert !result.contains("name") : "Result contains a name property but should not : " + result;
assert !result.contains("null") : "Result contains null values but should not : " + result;
- Operation op = mapper.readValue(result,Operation.class);
+ Operation op = mapper.readValue(result, Operation.class);
assert op.getOperation().equals(operation.getOperation()) : "Operation is " + op.getOperation();
assert op.getAdditionalProperties().containsKey("someBool") : "Key someBool not found ";
Object someBool = op.getAdditionalProperties().get("someBool");
@@ -107,11 +102,11 @@ public class OperationJsonTest {
}
public void addPropsTest() throws Exception {
- Address address= new Address();
- address.add("/server-group","newOne");
+ Address address = new Address();
+ address.add("/server-group", "newOne");
- Operation operation = new Operation("add",address);
- operation.addAdditionalProperty("foo","bar");
+ Operation operation = new Operation("add", address);
+ operation.addAdditionalProperty("foo", "bar");
ObjectMapper mapper = new ObjectMapper();
@@ -125,7 +120,7 @@ public class OperationJsonTest {
String resultString = "{\"outcome\" : \"success\", \"result\" : \"no metrics available\"}";
ObjectMapper mapper = new ObjectMapper();
- Result result = mapper.readValue(resultString,Result.class);
+ Result result = mapper.readValue(resultString, Result.class);
assert result != null;
assert result.getOutcome().equals("success");
@@ -137,18 +132,19 @@ public class OperationJsonTest {
String resultString = "{\"outcome\" : \"success\", \"result\" : \"DISABLED\"}";
ObjectMapper mapper = new ObjectMapper();
- Result result = mapper.readValue(resultString,Result.class);
+ Result result = mapper.readValue(resultString, Result.class);
assert result != null;
assert result.getOutcome().equals("success");
assert result.isSuccess();
}
+
public void simpleResultWithFailure() throws Exception {
String resultString = "{\"outcome\" : \"failed\", \"failure-description\" : [{ \"java.util.NoSuchElementException\" : \"No child 'profile' exists\" }]}";
ObjectMapper mapper = new ObjectMapper();
- Result result = mapper.readValue(resultString,Result.class);
+ Result result = mapper.readValue(resultString, Result.class);
assert result != null;
assert result.getOutcome().equals("failed");
@@ -156,7 +152,7 @@ public class OperationJsonTest {
assert result.getResult() == null;
assert result.getFailureDescription() != null;
-// assert result.getFailureDescription().size() == 1;
+ // assert result.getFailureDescription().size() == 1;
}
public void complexResult1() throws Exception {
@@ -164,18 +160,18 @@ public class OperationJsonTest {
String resultString = " {\"outcome\" : \"success\", \"result\" : {\"alias\" : [\"example.com\"], \"access-log\" : null, \"rewrite\" : null}}";
ObjectMapper mapper = new ObjectMapper();
- ComplexResult result = mapper.readValue(resultString,ComplexResult.class);
+ ComplexResult result = mapper.readValue(resultString, ComplexResult.class);
assert result != null;
assert result.getOutcome().equals("success");
assert result.isSuccess();
- assert result.getResult().size()==3;
+ assert result.getResult().size() == 3;
String rewrite = (String) result.getResult().get("rewrite");
assert rewrite == null;
List<String> aliases = (List<String>) result.getResult().get("alias");
assert aliases != null;
- assert aliases.size()==1;
+ assert aliases.size() == 1;
assert aliases.get(0).equals("example.com");
}
@@ -184,13 +180,13 @@ public class OperationJsonTest {
String resultString = "{\"outcome\":\"success\",\"result\":[\"standard-sockets\",\"messaging-sockets\"],\"response-headers\":null, \"rolled-back\" : false}";
ObjectMapper mapper = new ObjectMapper();
- Result result = mapper.readValue(resultString,Result.class);
+ Result result = mapper.readValue(resultString, Result.class);
assert result != null;
assert result.getOutcome().equals("success");
assert result.isSuccess();
List<String> stringList = (List<String>) result.getResult();
- assert stringList.size()==2;
+ assert stringList.size() == 2;
assert stringList.get(0).equals("standard-sockets");
assert stringList.get(1).equals("messaging-sockets");
assert !result.isRolledBack();
@@ -202,7 +198,7 @@ public class OperationJsonTest {
String resultString = "{\"outcome\":\"failed\", \"rolled-back\" : true}";
ObjectMapper mapper = new ObjectMapper();
- Result result = mapper.readValue(resultString,Result.class);
+ Result result = mapper.readValue(resultString, Result.class);
assert result != null;
assert result.getOutcome().equals("failed");
@@ -211,77 +207,69 @@ public class OperationJsonTest {
}
-
public void complexResult2() throws Exception {
-
- String resultString =
- "{\n" +
- " \"outcome\" : \"failed\",\n" +
- " \"result\" : {\n" +
- " \"server-groups\" : {\n" +
- " \"main-server-group\" : {\n" +
- " \"server-one\" : {\n" +
- " \"host\" : \"local\",\n" +
- " \"response\" : {\n" +
- " \"outcome\" : \"success\",\n" +
- " \"result\" : null,\n" +
- " \"compensating-operation\" : {\n" +
- " \"operation\" : \"add\",\n" +
- " \"address\" : [ {\n" +
- " \"subsystem\" : \"jms\"\n" +
- " }, {\n" +
- " \"queue\" : \"flubbr\"\n" +
- " } ],\n" +
- " \"durable\" : \"true\",\n" +
- " \"entries\" : [ \"PropertySimple[id=0, name=entries, value=flubbr, override=null]\" ]\n" +
- " }\n" +
- " }\n" +
- " },\n" +
- " \"server-two\" : {\n" +
- " \"host\" : \"local\",\n" +
- " \"response\" : {\n" +
- " \"outcome\" : \"success\",\n" +
- " \"result\" : null,\n" +
- " \"compensating-operation\" : {\n" +
- " \"operation\" : \"add\",\n" +
- " \"address\" : [ {\n" +
- " \"subsystem\" : \"jms\"\n" +
- " }, {\n" +
- " \"queue\" : \"flubbr\"\n" +
- " } ],\n" +
- " \"durable\" : \"true\",\n" +
- " \"entries\" : [ \"PropertySimple[id=0, name=entries, value=flubbr, override=null]\" ]\n" +
- " }\n" +
- " }\n" +
- " },\n" +
- " \"server-demo\" : {\n" +
- " \"host\" : \"local\",\n" +
- " \"response\" : {\n" +
- " \"outcome\" : \"failed\",\n" +
- " \"failure-description\" : \"No handler for add at address [\\n (\\\"host\\\" => \\\"local\\\"),\\n (\\\"server\\\" => \\\"server-demo\\\"),\\n (\\\"subsystem\\\" => \\\"jms\\\"),\\n (\\\"queue\\\" => \\\"flubbr\\\")\\n]\"\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " }\n" +
- " },\n" +
- " \"failure-description\" : \"Operation was not applied successfully to any servers\"\n" +
- "}";
+ String resultString = "{\n"
+ + " \"outcome\" : \"failed\",\n"
+ + " \"result\" : {\n"
+ + " \"server-groups\" : {\n"
+ + " \"main-server-group\" : {\n"
+ + " \"server-one\" : {\n"
+ + " \"host\" : \"local\",\n"
+ + " \"response\" : {\n"
+ + " \"outcome\" : \"success\",\n"
+ + " \"result\" : null,\n"
+ + " \"compensating-operation\" : {\n"
+ + " \"operation\" : \"add\",\n"
+ + " \"address\" : [ {\n"
+ + " \"subsystem\" : \"jms\"\n"
+ + " }, {\n"
+ + " \"queue\" : \"flubbr\"\n"
+ + " } ],\n"
+ + " \"durable\" : \"true\",\n"
+ + " \"entries\" : [ \"PropertySimple[id=0, name=entries, value=flubbr, override=null]\" ]\n"
+ + " }\n"
+ + " }\n"
+ + " },\n"
+ + " \"server-two\" : {\n"
+ + " \"host\" : \"local\",\n"
+ + " \"response\" : {\n"
+ + " \"outcome\" : \"success\",\n"
+ + " \"result\" : null,\n"
+ + " \"compensating-operation\" : {\n"
+ + " \"operation\" : \"add\",\n"
+ + " \"address\" : [ {\n"
+ + " \"subsystem\" : \"jms\"\n"
+ + " }, {\n"
+ + " \"queue\" : \"flubbr\"\n"
+ + " } ],\n"
+ + " \"durable\" : \"true\",\n"
+ + " \"entries\" : [ \"PropertySimple[id=0, name=entries, value=flubbr, override=null]\" ]\n"
+ + " }\n"
+ + " }\n"
+ + " },\n"
+ + " \"server-demo\" : {\n"
+ + " \"host\" : \"local\",\n"
+ + " \"response\" : {\n"
+ + " \"outcome\" : \"failed\",\n"
+ + " \"failure-description\" : \"No handler for add at address [\\n (\\\"host\\\" => \\\"local\\\"),\\n (\\\"server\\\" => \\\"server-demo\\\"),\\n (\\\"subsystem\\\" => \\\"jms\\\"),\\n (\\\"queue\\\" => \\\"flubbr\\\")\\n]\"\n"
+ + " }\n" + " }\n" + " }\n" + " }\n" + " },\n"
+ + " \"failure-description\" : \"Operation was not applied successfully to any servers\"\n" + "}";
ObjectMapper mapper = new ObjectMapper();
mapper.configure(SerializationConfig.Feature.INDENT_OUTPUT, true);
- ComplexResult result = mapper.readValue(resultString,ComplexResult.class);
+ ComplexResult result = mapper.readValue(resultString, ComplexResult.class);
assert !result.isSuccess() : "Result should be 'failed', but was not";
assert result.getFailureDescription().startsWith("Operation was not applied successfully to any servers");
assert result.getResult().containsKey("server-groups");
- Map<String,Object> sgs = (Map<String, Object>) result.getResult().get("server-groups");
+ Map<String, Object> sgs = (Map<String, Object>) result.getResult().get("server-groups");
assert sgs.containsKey("main-server-group");
- Map<String,Object> mainSg = (Map<String, Object>) sgs.get("main-server-group");
- assert mainSg.size()==3 : "Main server group does not have 3 servers, but " + mainSg.size();
- Map<String,Object> s3 = (Map<String, Object>) mainSg.get("server-demo");
- Map<String,Object> response = (Map<String, Object>) s3.get("response");
- assert response!=null;
+ Map<String, Object> mainSg = (Map<String, Object>) sgs.get("main-server-group");
+ assert mainSg.size() == 3 : "Main server group does not have 3 servers, but " + mainSg.size();
+ Map<String, Object> s3 = (Map<String, Object>) mainSg.get("server-demo");
+ Map<String, Object> response = (Map<String, Object>) s3.get("response");
+ assert response != null;
}
commit 1fbdb715bd02b7cd03581165dba66cc998264e8d
Author: John Sanda <jsanda(a)redhat.com>
Date: Mon Feb 27 16:47:01 2012 -0500
Fixing test to look for correct file name
diff --git a/modules/enterprise/server/itests/src/test/java/org/rhq/enterprise/server/drift/DriftServerTest.java b/modules/enterprise/server/itests/src/test/java/org/rhq/enterprise/server/drift/DriftServerTest.java
index 5fa92b9..3b77daf 100644
--- a/modules/enterprise/server/itests/src/test/java/org/rhq/enterprise/server/drift/DriftServerTest.java
+++ b/modules/enterprise/server/itests/src/test/java/org/rhq/enterprise/server/drift/DriftServerTest.java
@@ -19,23 +19,7 @@
package org.rhq.enterprise.server.drift;
-import static org.rhq.core.domain.resource.ResourceCategory.SERVER;
-import static org.rhq.enterprise.server.util.LookupUtil.getSubjectManager;
-
-import java.io.File;
-import java.lang.reflect.Method;
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.NoResultException;
-import javax.persistence.NonUniqueResultException;
-
import org.apache.commons.io.FileUtils;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftDefinition;
@@ -49,6 +33,20 @@ import org.rhq.enterprise.server.plugin.ServerPluginsLocal;
import org.rhq.enterprise.server.test.AbstractEJB3Test;
import org.rhq.enterprise.server.test.TestServerCommunicationsService;
import org.rhq.test.TransactionCallback;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import javax.persistence.EntityManager;
+import javax.persistence.NoResultException;
+import javax.persistence.NonUniqueResultException;
+import java.io.File;
+import java.lang.reflect.Method;
+import java.util.List;
+
+import static org.rhq.core.domain.resource.ResourceCategory.SERVER;
+import static org.rhq.enterprise.server.util.LookupUtil.getSubjectManager;
@Test(groups = "drift")
public class DriftServerTest extends AbstractEJB3Test {
@@ -87,7 +85,7 @@ public class DriftServerTest extends AbstractEJB3Test {
prepareCustomServerPluginService(driftServerPluginService);
driftServerPluginService.masterConfig.getPluginDirectory().mkdirs();
- File jpaDriftPlugin = new File("../plugins/drift-rhq/target/rhq-serverplugin-drift-4.3.0-SNAPSHOT.jar");
+ File jpaDriftPlugin = new File("../plugins/drift-rhq/target/rhq-serverplugin-drift-4.4.0-SNAPSHOT.jar");
assertTrue("Drift server plugin JAR file not found at" + jpaDriftPlugin.getPath(), jpaDriftPlugin.exists());
FileUtils.copyFileToDirectory(jpaDriftPlugin, driftServerPluginService.masterConfig.getPluginDirectory());
commit 2d5d9b00387a7761487ae6a5ca63fbf2e7ca732b
Author: John Sanda <jsanda(a)localhost.localdomain>
Date: Mon Feb 27 16:38:52 2012 -0500
[BZ 751752] Do not allow grouping by edit column
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/ResourceTypeTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/ResourceTypeTreeView.java
index 3e33022..a3ca599 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/ResourceTypeTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/templates/ResourceTypeTreeView.java
@@ -18,10 +18,6 @@
*/
package org.rhq.enterprise.gui.coregui.client.admin.templates;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.EnumSet;
-
import com.smartgwt.client.data.Record;
import com.smartgwt.client.types.Alignment;
import com.smartgwt.client.types.ListGridFieldType;
@@ -39,7 +35,6 @@ import com.smartgwt.client.widgets.layout.SectionStackSection;
import com.smartgwt.client.widgets.tree.TreeGrid;
import com.smartgwt.client.widgets.tree.TreeGridField;
import com.smartgwt.client.widgets.tree.TreeNode;
-
import org.rhq.core.domain.resource.ResourceCategory;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.enterprise.gui.coregui.client.BookmarkableView;
@@ -50,11 +45,11 @@ import org.rhq.enterprise.gui.coregui.client.admin.AdministrationView;
import org.rhq.enterprise.gui.coregui.client.components.TitleBar;
import org.rhq.enterprise.gui.coregui.client.components.buttons.BackButton;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository;
-import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableListGrid;
-import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableSectionStack;
-import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableTreeGrid;
-import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
-import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.*;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.EnumSet;
/**
* A tree view of all known ResourceTypes, which includes summaries of metric schedule and alert definition templates
@@ -215,6 +210,7 @@ public abstract class ResourceTypeTreeView extends LocatableVLayout implements B
.common_title_edit());
editField.setType(ListGridFieldType.IMAGE);
editField.setAlign(Alignment.CENTER);
+ editField.setCanGroupBy(false);
editField.addRecordClickHandler(new RecordClickHandler() {
public void onRecordClick(RecordClickEvent event) {
commit 5b2151eeda854460260df8a4e195fb34167c9edc
Author: John Sanda <jsanda(a)localhost.localdomain>
Date: Mon Feb 27 14:52:15 2012 -0500
[BZ 749801] Add a dummy value to allow user to undo selections
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypePluginTreeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypePluginTreeDataSource.java
index d064680..6724d54 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypePluginTreeDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypePluginTreeDataSource.java
@@ -18,11 +18,6 @@
*/
package org.rhq.enterprise.gui.coregui.client.inventory.resource.type;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.data.DSRequest;
import com.smartgwt.client.data.DSResponse;
@@ -31,7 +26,6 @@ import com.smartgwt.client.data.fields.DataSourceTextField;
import com.smartgwt.client.types.DSDataFormat;
import com.smartgwt.client.types.DSProtocol;
import com.smartgwt.client.widgets.tree.TreeNode;
-
import org.rhq.core.domain.criteria.ResourceTypeCriteria;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.util.PageControl;
@@ -42,6 +36,11 @@ import org.rhq.enterprise.gui.coregui.client.Messages;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.gwt.ResourceTypeGWTServiceAsync;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+
/**
* @author Greg Hinkle
*/
@@ -94,7 +93,6 @@ public class ResourceTypePluginTreeDataSource extends DataSource {
if (parentIdString != null) {
processResponse(request.getRequestId(), response);
} else {
-
ResourceTypeCriteria criteria = new ResourceTypeCriteria();
criteria.fetchParentResourceTypes(true);
criteria.setPageControl(PageControl.getUnlimitedInstance());
@@ -117,6 +115,11 @@ public class ResourceTypePluginTreeDataSource extends DataSource {
HashMap<String, PluginTreeNode> pluginNodes = new HashMap<String, PluginTreeNode>();
ArrayList<TreeNode> nodes = new ArrayList<TreeNode>();
+ // Add a dummy node so that if the user selects a plugin or resource type, he has
+ // the ability to undo the selection. This data source is used with a IPickTreeItem
+ // and that widget does not allow you to select the initial value once the user
+ // selects a value. See https://bugzilla.redhat.com/show_bug.cgi?id=749801.
+ nodes.add(new TreeNode(""));
for (ResourceType type : result) {
if (type.getParentResourceTypes() == null || type.getParentResourceTypes().isEmpty()) {
commit ed441c30282dbb9a48feadb8f338cf41babe2903
Merge: 4daf768 aab1084
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Mon Feb 27 14:44:09 2012 -0500
Merge branch 'master' of ssh://git.fedorahosted.org/git/rhq/rhq
commit 4daf76814cf38969fb1873938b78a43d3119aaf6
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Mon Feb 27 14:43:57 2012 -0500
[BZ 790152] remove e.printStackTrace - log it instead
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/content/RetrieveContentBitsRunner.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/content/RetrieveContentBitsRunner.java
index b339190..a5f1838 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/content/RetrieveContentBitsRunner.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/content/RetrieveContentBitsRunner.java
@@ -24,6 +24,9 @@ package org.rhq.core.pc.content;
import java.io.InputStream;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.rhq.core.clientapi.server.content.ContentServerService;
import org.rhq.core.clientapi.server.content.ContentServiceResponse;
import org.rhq.core.clientapi.server.content.RetrievePackageBitsRequest;
@@ -37,6 +40,8 @@ import org.rhq.core.util.MessageDigestGenerator;
* @author Jason Dobies
*/
public class RetrieveContentBitsRunner implements Runnable {
+ private final Log log = LogFactory.getLog(RetrieveContentBitsRunner.class);
+
// Attributes --------------------------------------------
private ContentManager contentManager;
@@ -93,7 +98,8 @@ public class RetrieveContentBitsRunner implements Runnable {
is.close();
}
} catch (Exception e) {
- e.printStackTrace();
+ log.warn("Error calculating SHA256 [" + request.getRequestId() + "][" + request.getPackageDetails()
+ + "]", e);
}
}
if ((pkgDetails != null) && ((pkgDetails.getMD5() == null) || (pkgDetails.getMD5().trim().length() == 0))) {
@@ -106,8 +112,9 @@ public class RetrieveContentBitsRunner implements Runnable {
is.close();
}
} catch (Exception e) {
- e.printStackTrace();
+ log.warn("Error calculating MD5 [" + request.getRequestId() + "][" + request.getPackageDetails()
+ + "]", e);
}
}
}
-}
\ No newline at end of file
+}
commit aab108463187d95c26ca45fac8ce5eb7bda59af5
Author: Hudson <jboss-qa-internal(a)redhat.com>
Date: Mon Feb 27 13:46:11 2012 -0500
development RHQ_4.4.0-SNAPSHOT
diff --git a/modules/cli-tests/pom.xml b/modules/cli-tests/pom.xml
index 3a5f116..5e496d6 100644
--- a/modules/cli-tests/pom.xml
+++ b/modules/cli-tests/pom.xml
@@ -8,7 +8,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/common/ant-bundle/pom.xml b/modules/common/ant-bundle/pom.xml
index 81947ba..7ca19b5 100644
--- a/modules/common/ant-bundle/pom.xml
+++ b/modules/common/ant-bundle/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-common-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/common/drift/pom.xml b/modules/common/drift/pom.xml
index 46ad40c..5deb920 100644
--- a/modules/common/drift/pom.xml
+++ b/modules/common/drift/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-common-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<artifactId>rhq-common-drift</artifactId>
diff --git a/modules/common/filetemplate-bundle/pom.xml b/modules/common/filetemplate-bundle/pom.xml
index 89ecf98..48a3644 100644
--- a/modules/common/filetemplate-bundle/pom.xml
+++ b/modules/common/filetemplate-bundle/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-common-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<artifactId>rhq-filetemplate-bundle-common</artifactId>
diff --git a/modules/common/jboss-as/pom.xml b/modules/common/jboss-as/pom.xml
index f328660..9bc3f98 100644
--- a/modules/common/jboss-as/pom.xml
+++ b/modules/common/jboss-as/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-common-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<artifactId>rhq-jboss-as-common</artifactId>
diff --git a/modules/common/pom.xml b/modules/common/pom.xml
index 9830cbb..0c76090 100644
--- a/modules/common/pom.xml
+++ b/modules/common/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/core/client-api/pom.xml b/modules/core/client-api/pom.xml
index c0ca9be..39a5806 100644
--- a/modules/core/client-api/pom.xml
+++ b/modules/core/client-api/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/comm-api/pom.xml b/modules/core/comm-api/pom.xml
index ed0087f..11cae39 100644
--- a/modules/core/comm-api/pom.xml
+++ b/modules/core/comm-api/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index c2b8a1f..c1e900d 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/domain/pom.xml b/modules/core/domain/pom.xml
index c125944..3380c46 100644
--- a/modules/core/domain/pom.xml
+++ b/modules/core/domain/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<artifactId>rhq-core-domain</artifactId>
diff --git a/modules/core/gui/pom.xml b/modules/core/gui/pom.xml
index 086b8fd..61ff8cf 100644
--- a/modules/core/gui/pom.xml
+++ b/modules/core/gui/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/native-system/pom.xml b/modules/core/native-system/pom.xml
index 3f28672..c7b165f 100644
--- a/modules/core/native-system/pom.xml
+++ b/modules/core/native-system/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
diff --git a/modules/core/plugin-api/pom.xml b/modules/core/plugin-api/pom.xml
index df1a188..9febe64 100644
--- a/modules/core/plugin-api/pom.xml
+++ b/modules/core/plugin-api/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/plugin-container/pom.xml b/modules/core/plugin-container/pom.xml
index e38ad83..e78e26a 100644
--- a/modules/core/plugin-container/pom.xml
+++ b/modules/core/plugin-container/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<artifactId>rhq-core-plugin-container</artifactId>
diff --git a/modules/core/plugin-validator/pom.xml b/modules/core/plugin-validator/pom.xml
index c143c00..6fca67e 100644
--- a/modules/core/plugin-validator/pom.xml
+++ b/modules/core/plugin-validator/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index 99a1950..8aea247 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/core/util/pom.xml b/modules/core/util/pom.xml
index a8e5ea6..9c08830 100644
--- a/modules/core/util/pom.xml
+++ b/modules/core/util/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<artifactId>rhq-core-util</artifactId>
diff --git a/modules/enterprise/agent/pom.xml b/modules/enterprise/agent/pom.xml
index 0031cce..0759da1 100644
--- a/modules/enterprise/agent/pom.xml
+++ b/modules/enterprise/agent/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/agentupdate/pom.xml b/modules/enterprise/agentupdate/pom.xml
index daa2338..dd03d6f 100644
--- a/modules/enterprise/agentupdate/pom.xml
+++ b/modules/enterprise/agentupdate/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/binding/pom.xml b/modules/enterprise/binding/pom.xml
index 4b610cf..27e8334 100644
--- a/modules/enterprise/binding/pom.xml
+++ b/modules/enterprise/binding/pom.xml
@@ -3,10 +3,10 @@
<parent>
<artifactId>rhq-enterprise-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<artifactId>rhq-script-bindings</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<name>RHQ Script Bindings</name>
<description>Abstraction of different facilities and default configurations for script bindings</description>
diff --git a/modules/enterprise/comm/pom.xml b/modules/enterprise/comm/pom.xml
index f8aa8f9..2185aa0 100644
--- a/modules/enterprise/comm/pom.xml
+++ b/modules/enterprise/comm/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/gui/base-perspective-jar/pom.xml b/modules/enterprise/gui/base-perspective-jar/pom.xml
index 759d52d..3c48271 100644
--- a/modules/enterprise/gui/base-perspective-jar/pom.xml
+++ b/modules/enterprise/gui/base-perspective-jar/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/gui/base-perspective-war/pom.xml b/modules/enterprise/gui/base-perspective-war/pom.xml
index 0066cdd..6974e1a 100644
--- a/modules/enterprise/gui/base-perspective-war/pom.xml
+++ b/modules/enterprise/gui/base-perspective-war/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/gui/content_http-war/pom.xml b/modules/enterprise/gui/content_http-war/pom.xml
index f2919fb..6637b6c 100644
--- a/modules/enterprise/gui/content_http-war/pom.xml
+++ b/modules/enterprise/gui/content_http-war/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-enterprise-gui-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/gui/coregui/pom.xml b/modules/enterprise/gui/coregui/pom.xml
index fb53d14..33cd64b 100644
--- a/modules/enterprise/gui/coregui/pom.xml
+++ b/modules/enterprise/gui/coregui/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/gui/installer-war/pom.xml b/modules/enterprise/gui/installer-war/pom.xml
index 7f79832..eb4efa0 100644
--- a/modules/enterprise/gui/installer-war/pom.xml
+++ b/modules/enterprise/gui/installer-war/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/gui/pom.xml b/modules/enterprise/gui/pom.xml
index db45111..ac5cc39 100644
--- a/modules/enterprise/gui/pom.xml
+++ b/modules/enterprise/gui/pom.xml
@@ -8,7 +8,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/gui/portal-war/pom.xml b/modules/enterprise/gui/portal-war/pom.xml
index 8ea3d46..f51c70d 100644
--- a/modules/enterprise/gui/portal-war/pom.xml
+++ b/modules/enterprise/gui/portal-war/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/gui/rest-war/pom.xml b/modules/enterprise/gui/rest-war/pom.xml
index 7f5707c..a2b9bf3 100644
--- a/modules/enterprise/gui/rest-war/pom.xml
+++ b/modules/enterprise/gui/rest-war/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/pom.xml b/modules/enterprise/pom.xml
index eb6a9cf..baabc0f 100644
--- a/modules/enterprise/pom.xml
+++ b/modules/enterprise/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/remoting/cli/pom.xml b/modules/enterprise/remoting/cli/pom.xml
index 8424043..bcb4532 100644
--- a/modules/enterprise/remoting/cli/pom.xml
+++ b/modules/enterprise/remoting/cli/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/remoting/client-api/pom.xml b/modules/enterprise/remoting/client-api/pom.xml
index af3ecd8..97d515a 100644
--- a/modules/enterprise/remoting/client-api/pom.xml
+++ b/modules/enterprise/remoting/client-api/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/remoting/client-deps/pom.xml b/modules/enterprise/remoting/client-deps/pom.xml
index d3dcb79..fc2f25e 100644
--- a/modules/enterprise/remoting/client-deps/pom.xml
+++ b/modules/enterprise/remoting/client-deps/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/remoting/pom.xml b/modules/enterprise/remoting/pom.xml
index 22619c3..ff2bee4 100644
--- a/modules/enterprise/remoting/pom.xml
+++ b/modules/enterprise/remoting/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/remoting/webservices/pom.xml b/modules/enterprise/remoting/webservices/pom.xml
index b225ea1..f648b5d 100644
--- a/modules/enterprise/remoting/webservices/pom.xml
+++ b/modules/enterprise/remoting/webservices/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/client-api/pom.xml b/modules/enterprise/server/client-api/pom.xml
index f200744..9f86d8c 100644
--- a/modules/enterprise/server/client-api/pom.xml
+++ b/modules/enterprise/server/client-api/pom.xml
@@ -5,13 +5,13 @@
<parent>
<artifactId>rhq-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-server-client-api</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<name>RHQ Enterprise Server Client API</name>
<description>The implementation of the client API when accessing the server locally</description>
diff --git a/modules/enterprise/server/container-lib/pom.xml b/modules/enterprise/server/container-lib/pom.xml
index 0974431..ca7d3a0 100644
--- a/modules/enterprise/server/container-lib/pom.xml
+++ b/modules/enterprise/server/container-lib/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/container/pom.xml b/modules/enterprise/server/container/pom.xml
index ea9c917..cd76044 100644
--- a/modules/enterprise/server/container/pom.xml
+++ b/modules/enterprise/server/container/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/ear/pom.xml b/modules/enterprise/server/ear/pom.xml
index 429f446..2b60970 100644
--- a/modules/enterprise/server/ear/pom.xml
+++ b/modules/enterprise/server/ear/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/itests/pom.xml b/modules/enterprise/server/itests/pom.xml
index 54b193c..b6d255a 100644
--- a/modules/enterprise/server/itests/pom.xml
+++ b/modules/enterprise/server/itests/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/jar/pom.xml b/modules/enterprise/server/jar/pom.xml
index de9ceae..ac85d7d 100644
--- a/modules/enterprise/server/jar/pom.xml
+++ b/modules/enterprise/server/jar/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/plugins/alert-cli/pom.xml b/modules/enterprise/server/plugins/alert-cli/pom.xml
index d13ee76..691fadc 100644
--- a/modules/enterprise/server/plugins/alert-cli/pom.xml
+++ b/modules/enterprise/server/plugins/alert-cli/pom.xml
@@ -3,11 +3,11 @@
<parent>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>alert-cli</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<name>RHQ Enterprise Server CLI Script Alert Plugin</name>
<description>An alert sender able to execute an arbitrary CLI script as a response to an alert</description>
diff --git a/modules/enterprise/server/plugins/alert-email/pom.xml b/modules/enterprise/server/plugins/alert-email/pom.xml
index d664a1b..40d0b98 100644
--- a/modules/enterprise/server/plugins/alert-email/pom.xml
+++ b/modules/enterprise/server/plugins/alert-email/pom.xml
@@ -3,13 +3,13 @@
<parent>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq.server</groupId>
<artifactId>alert-email</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<name>RHQ Enterprise Server Email Alert Plugin</name>
diff --git a/modules/enterprise/server/plugins/alert-irc/pom.xml b/modules/enterprise/server/plugins/alert-irc/pom.xml
index 0f46399..5d7930e 100644
--- a/modules/enterprise/server/plugins/alert-irc/pom.xml
+++ b/modules/enterprise/server/plugins/alert-irc/pom.xml
@@ -3,13 +3,13 @@
<parent>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-irc</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<name>RHQ Enterprise Server IRC Alert Plugin</name>
diff --git a/modules/enterprise/server/plugins/alert-log4j/pom.xml b/modules/enterprise/server/plugins/alert-log4j/pom.xml
index b06d1ec..3aaa2f9 100644
--- a/modules/enterprise/server/plugins/alert-log4j/pom.xml
+++ b/modules/enterprise/server/plugins/alert-log4j/pom.xml
@@ -3,13 +3,13 @@
<parent>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-log4j</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<name>RHQ Enterprise Server Log4J Alert Plugin</name>
diff --git a/modules/enterprise/server/plugins/alert-microblog/pom.xml b/modules/enterprise/server/plugins/alert-microblog/pom.xml
index f6b00e3..25d4078 100644
--- a/modules/enterprise/server/plugins/alert-microblog/pom.xml
+++ b/modules/enterprise/server/plugins/alert-microblog/pom.xml
@@ -3,13 +3,13 @@
<parent>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-microblog</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<name>RHQ Enterprise Server Microblog Alert Plugin</name>
diff --git a/modules/enterprise/server/plugins/alert-mobicents/pom.xml b/modules/enterprise/server/plugins/alert-mobicents/pom.xml
index 76e49fa..b08d787 100644
--- a/modules/enterprise/server/plugins/alert-mobicents/pom.xml
+++ b/modules/enterprise/server/plugins/alert-mobicents/pom.xml
@@ -3,13 +3,13 @@
<parent>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-mobicents</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<name>RHQ Enterprise Server Mobicents Alert Plugin</name>
diff --git a/modules/enterprise/server/plugins/alert-operations/pom.xml b/modules/enterprise/server/plugins/alert-operations/pom.xml
index 46c3d61..37a4846 100644
--- a/modules/enterprise/server/plugins/alert-operations/pom.xml
+++ b/modules/enterprise/server/plugins/alert-operations/pom.xml
@@ -2,14 +2,14 @@
<parent>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-operations</artifactId>
<packaging>jar</packaging>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<name>RHQ Enterprise Server Opertions Alert Plugin</name>
diff --git a/modules/enterprise/server/plugins/alert-roles/pom.xml b/modules/enterprise/server/plugins/alert-roles/pom.xml
index 311cfa9..2cfd59c 100644
--- a/modules/enterprise/server/plugins/alert-roles/pom.xml
+++ b/modules/enterprise/server/plugins/alert-roles/pom.xml
@@ -3,13 +3,13 @@
<parent>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-roles</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<name>RHQ Enterprise Server Roles Alert Plugin</name>
diff --git a/modules/enterprise/server/plugins/alert-snmp/pom.xml b/modules/enterprise/server/plugins/alert-snmp/pom.xml
index ff7466d..a944f48 100644
--- a/modules/enterprise/server/plugins/alert-snmp/pom.xml
+++ b/modules/enterprise/server/plugins/alert-snmp/pom.xml
@@ -3,13 +3,13 @@
<parent>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-snmp</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<name>RHQ Enterprise Server SNMP Alert Plugin</name>
diff --git a/modules/enterprise/server/plugins/alert-subject/pom.xml b/modules/enterprise/server/plugins/alert-subject/pom.xml
index 9ba1fb9..a22acff 100644
--- a/modules/enterprise/server/plugins/alert-subject/pom.xml
+++ b/modules/enterprise/server/plugins/alert-subject/pom.xml
@@ -3,13 +3,13 @@
<parent>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-subject</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<name>RHQ Enterprise Server Subject Alert Plugin</name>
diff --git a/modules/enterprise/server/plugins/ant-bundle/pom.xml b/modules/enterprise/server/plugins/ant-bundle/pom.xml
index 0d36c31..5e28050 100644
--- a/modules/enterprise/server/plugins/ant-bundle/pom.xml
+++ b/modules/enterprise/server/plugins/ant-bundle/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/cobbler/pom.xml b/modules/enterprise/server/plugins/cobbler/pom.xml
index 1f6e1c4..eb74d2d 100644
--- a/modules/enterprise/server/plugins/cobbler/pom.xml
+++ b/modules/enterprise/server/plugins/cobbler/pom.xml
@@ -4,14 +4,14 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>rhq-serverplugin-cobbler</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<name>RHQ Enterprise Server Cobbler Plugin</name>
diff --git a/modules/enterprise/server/plugins/disk/pom.xml b/modules/enterprise/server/plugins/disk/pom.xml
index 2f3e0ea..526e9ac 100644
--- a/modules/enterprise/server/plugins/disk/pom.xml
+++ b/modules/enterprise/server/plugins/disk/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/drift-rhq/pom.xml b/modules/enterprise/server/plugins/drift-rhq/pom.xml
index d2181f1..390916c 100644
--- a/modules/enterprise/server/plugins/drift-rhq/pom.xml
+++ b/modules/enterprise/server/plugins/drift-rhq/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml b/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml
index a1a5025..fed59cf 100644
--- a/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml
+++ b/modules/enterprise/server/plugins/filetemplate-bundle/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/groovy-script/pom.xml b/modules/enterprise/server/plugins/groovy-script/pom.xml
index fcae8eb..23a67f8 100644
--- a/modules/enterprise/server/plugins/groovy-script/pom.xml
+++ b/modules/enterprise/server/plugins/groovy-script/pom.xml
@@ -4,14 +4,14 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>groovy-script-server-plugin</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<name>RHQ Enterprise Server Groovy Script Plugin</name>
diff --git a/modules/enterprise/server/plugins/jboss-software/pom.xml b/modules/enterprise/server/plugins/jboss-software/pom.xml
index 6fbaef6..fdd1bea 100644
--- a/modules/enterprise/server/plugins/jboss-software/pom.xml
+++ b/modules/enterprise/server/plugins/jboss-software/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/packagetype-cli/pom.xml b/modules/enterprise/server/plugins/packagetype-cli/pom.xml
index d5862ec..c525ff8 100644
--- a/modules/enterprise/server/plugins/packagetype-cli/pom.xml
+++ b/modules/enterprise/server/plugins/packagetype-cli/pom.xml
@@ -3,13 +3,13 @@
<parent>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>packagetype-cli</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<name>RHQ Enterprise Server CLI Package Type Plugin</name>
diff --git a/modules/enterprise/server/plugins/perspectives/core/perspective/pom.xml b/modules/enterprise/server/plugins/perspectives/core/perspective/pom.xml
index 94a0f6c..2b862a7 100644
--- a/modules/enterprise/server/plugins/perspectives/core/perspective/pom.xml
+++ b/modules/enterprise/server/plugins/perspectives/core/perspective/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/plugins/perspectives/core/pom.xml b/modules/enterprise/server/plugins/perspectives/core/pom.xml
index c3d755c..0f1367a 100644
--- a/modules/enterprise/server/plugins/perspectives/core/pom.xml
+++ b/modules/enterprise/server/plugins/perspectives/core/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/plugins/pom.xml b/modules/enterprise/server/plugins/pom.xml
index a51ac52..5283b98 100644
--- a/modules/enterprise/server/plugins/pom.xml
+++ b/modules/enterprise/server/plugins/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/plugins/url/pom.xml b/modules/enterprise/server/plugins/url/pom.xml
index ede0674..de0b02d 100644
--- a/modules/enterprise/server/plugins/url/pom.xml
+++ b/modules/enterprise/server/plugins/url/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml b/modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml
index 28f5f38..866241b 100644
--- a/modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml
+++ b/modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/yum/pom.xml b/modules/enterprise/server/plugins/yum/pom.xml
index 4b19d90..effd4a6 100644
--- a/modules/enterprise/server/plugins/yum/pom.xml
+++ b/modules/enterprise/server/plugins/yum/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/pom.xml b/modules/enterprise/server/pom.xml
index 8cf8acc..08204aa 100644
--- a/modules/enterprise/server/pom.xml
+++ b/modules/enterprise/server/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/safe-invoker/pom.xml b/modules/enterprise/server/safe-invoker/pom.xml
index 3b23fc0..5fb22ec 100644
--- a/modules/enterprise/server/safe-invoker/pom.xml
+++ b/modules/enterprise/server/safe-invoker/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/sars/agent-sar/pom.xml b/modules/enterprise/server/sars/agent-sar/pom.xml
index 56f2f99..556dcad 100644
--- a/modules/enterprise/server/sars/agent-sar/pom.xml
+++ b/modules/enterprise/server/sars/agent-sar/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-enterprise-server-sars-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/sars/pom.xml b/modules/enterprise/server/sars/pom.xml
index bd52c46..3a16283 100644
--- a/modules/enterprise/server/sars/pom.xml
+++ b/modules/enterprise/server/sars/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/xml-schemas/pom.xml b/modules/enterprise/server/xml-schemas/pom.xml
index c2aca81..68d8d85 100644
--- a/modules/enterprise/server/xml-schemas/pom.xml
+++ b/modules/enterprise/server/xml-schemas/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/helpers/bundleGen/pom.xml b/modules/helpers/bundleGen/pom.xml
index 9be012c..b8bddc4 100644
--- a/modules/helpers/bundleGen/pom.xml
+++ b/modules/helpers/bundleGen/pom.xml
@@ -3,13 +3,13 @@
<parent>
<artifactId>rhq-helpers</artifactId>
<groupId>org.rhq.helpers</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq.helpers</groupId>
<artifactId>bundleGen</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<build>
<plugins>
diff --git a/modules/helpers/jeeGen/pom.xml b/modules/helpers/jeeGen/pom.xml
index df620a0..496d7ea 100644
--- a/modules/helpers/jeeGen/pom.xml
+++ b/modules/helpers/jeeGen/pom.xml
@@ -9,7 +9,7 @@
<parent>
<artifactId>rhq-helpers</artifactId>
<groupId>org.rhq.helpers</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq.helpers</groupId>
diff --git a/modules/helpers/perftest-support/pom.xml b/modules/helpers/perftest-support/pom.xml
index 3b75eec..dd735f5 100644
--- a/modules/helpers/perftest-support/pom.xml
+++ b/modules/helpers/perftest-support/pom.xml
@@ -3,11 +3,11 @@
<parent>
<artifactId>rhq-helpers</artifactId>
<groupId>org.rhq.helpers</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq.helpers</groupId>
<artifactId>perftest-support</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<name>Performance Testing Support</name>
<description>To support performance testing, this is a basic tool to support extracting and later reimporting of
data from/to a database.
diff --git a/modules/helpers/pom.xml b/modules/helpers/pom.xml
index 1e75dca..797f302 100644
--- a/modules/helpers/pom.xml
+++ b/modules/helpers/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/helpers/rtfilter/pom.xml b/modules/helpers/rtfilter/pom.xml
index c80f26a..761f3ec 100644
--- a/modules/helpers/rtfilter/pom.xml
+++ b/modules/helpers/rtfilter/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq.helpers</groupId>
<artifactId>rhq-helpers</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/integration-tests/apache-plugin-test/pom.xml b/modules/integration-tests/apache-plugin-test/pom.xml
index 13241f0..fa3366b 100644
--- a/modules/integration-tests/apache-plugin-test/pom.xml
+++ b/modules/integration-tests/apache-plugin-test/pom.xml
@@ -4,7 +4,7 @@
<parent>
<artifactId>rhq-integration-tests</artifactId>
<groupId>org.rhq</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/integration-tests/jboss-as-7-plugin-test/pom.xml b/modules/integration-tests/jboss-as-7-plugin-test/pom.xml
index a1babd7..1929f5a 100644
--- a/modules/integration-tests/jboss-as-7-plugin-test/pom.xml
+++ b/modules/integration-tests/jboss-as-7-plugin-test/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-integration-tests</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
diff --git a/modules/integration-tests/jndi-access/jndi-access-test/pom.xml b/modules/integration-tests/jndi-access/jndi-access-test/pom.xml
index ff9ee56..ad97b2c 100644
--- a/modules/integration-tests/jndi-access/jndi-access-test/pom.xml
+++ b/modules/integration-tests/jndi-access/jndi-access-test/pom.xml
@@ -4,7 +4,7 @@
<parent>
<artifactId>jndi-access-test-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/integration-tests/jndi-access/pom.xml b/modules/integration-tests/jndi-access/pom.xml
index 6e9c673..2c3fc42 100644
--- a/modules/integration-tests/jndi-access/pom.xml
+++ b/modules/integration-tests/jndi-access/pom.xml
@@ -4,7 +4,7 @@
<parent>
<artifactId>rhq-integration-tests</artifactId>
<groupId>org.rhq</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/integration-tests/jndi-access/remote-server/pom.xml b/modules/integration-tests/jndi-access/remote-server/pom.xml
index 9046e6f..eec643e 100644
--- a/modules/integration-tests/jndi-access/remote-server/pom.xml
+++ b/modules/integration-tests/jndi-access/remote-server/pom.xml
@@ -4,7 +4,7 @@
<parent>
<artifactId>jndi-access-test-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/integration-tests/pom.xml b/modules/integration-tests/pom.xml
index 969b94a..dc29aef 100644
--- a/modules/integration-tests/pom.xml
+++ b/modules/integration-tests/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/modules/plugins/aliases/pom.xml b/modules/plugins/aliases/pom.xml
index f581033..a544bd4 100644
--- a/modules/plugins/aliases/pom.xml
+++ b/modules/plugins/aliases/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/ant-bundle/pom.xml b/modules/plugins/ant-bundle/pom.xml
index b00a1ce..93214ba 100644
--- a/modules/plugins/ant-bundle/pom.xml
+++ b/modules/plugins/ant-bundle/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/apache/pom.xml b/modules/plugins/apache/pom.xml
index 16854fe..3b206d6 100644
--- a/modules/plugins/apache/pom.xml
+++ b/modules/plugins/apache/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/augeas/pom.xml b/modules/plugins/augeas/pom.xml
index f8e88f8..95f8567 100644
--- a/modules/plugins/augeas/pom.xml
+++ b/modules/plugins/augeas/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/byteman/pom.xml b/modules/plugins/byteman/pom.xml
index 37101bb..34ca710 100644
--- a/modules/plugins/byteman/pom.xml
+++ b/modules/plugins/byteman/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/cobbler/pom.xml b/modules/plugins/cobbler/pom.xml
index e7da655..b6351d9 100644
--- a/modules/plugins/cobbler/pom.xml
+++ b/modules/plugins/cobbler/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/cron/pom.xml b/modules/plugins/cron/pom.xml
index 148ad63..a98c22b 100644
--- a/modules/plugins/cron/pom.xml
+++ b/modules/plugins/cron/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/database/pom.xml b/modules/plugins/database/pom.xml
index a9be07c..a12cbb2 100644
--- a/modules/plugins/database/pom.xml
+++ b/modules/plugins/database/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/filetemplate-bundle/pom.xml b/modules/plugins/filetemplate-bundle/pom.xml
index 6e80698..11d5e6f 100644
--- a/modules/plugins/filetemplate-bundle/pom.xml
+++ b/modules/plugins/filetemplate-bundle/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/grub/pom.xml b/modules/plugins/grub/pom.xml
index 131a98f..6233c99 100644
--- a/modules/plugins/grub/pom.xml
+++ b/modules/plugins/grub/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/hadoop/pom.xml b/modules/plugins/hadoop/pom.xml
index f30d2fb..825fd23 100644
--- a/modules/plugins/hadoop/pom.xml
+++ b/modules/plugins/hadoop/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/hibernate/pom.xml b/modules/plugins/hibernate/pom.xml
index 06c6470..05dd6ed 100644
--- a/modules/plugins/hibernate/pom.xml
+++ b/modules/plugins/hibernate/pom.xml
@@ -6,7 +6,7 @@
<groupId>org.rhq</groupId>
<!-- Bypass the jopr-plugins-parent which can not have children. It must build after the plugins in order to execute integration tests on them. -->
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/hosts/pom.xml b/modules/plugins/hosts/pom.xml
index 9f0aedc..fc428f9 100644
--- a/modules/plugins/hosts/pom.xml
+++ b/modules/plugins/hosts/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/hudson/pom.xml b/modules/plugins/hudson/pom.xml
index fd0b274..aa19a71 100644
--- a/modules/plugins/hudson/pom.xml
+++ b/modules/plugins/hudson/pom.xml
@@ -6,12 +6,12 @@
<parent>
<artifactId>rhq-plugins-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-hudson-plugin</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>RHQ Hudson Plugin</name>
diff --git a/modules/plugins/iis/pom.xml b/modules/plugins/iis/pom.xml
index c4c5587..8dc374d 100644
--- a/modules/plugins/iis/pom.xml
+++ b/modules/plugins/iis/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/irc/pom.xml b/modules/plugins/irc/pom.xml
index 506ffeb..bb971ba 100644
--- a/modules/plugins/irc/pom.xml
+++ b/modules/plugins/irc/pom.xml
@@ -5,7 +5,7 @@
<parent>
<artifactId>rhq-plugins-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/jboss-as-5/pom.xml b/modules/plugins/jboss-as-5/pom.xml
index a8b8f5f..6ce116e 100644
--- a/modules/plugins/jboss-as-5/pom.xml
+++ b/modules/plugins/jboss-as-5/pom.xml
@@ -9,7 +9,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jboss-as-7/pom.xml b/modules/plugins/jboss-as-7/pom.xml
index 8220355..5ed832c2 100644
--- a/modules/plugins/jboss-as-7/pom.xml
+++ b/modules/plugins/jboss-as-7/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/jboss-as/pom.xml b/modules/plugins/jboss-as/pom.xml
index a49b17e..2c68452 100644
--- a/modules/plugins/jboss-as/pom.xml
+++ b/modules/plugins/jboss-as/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jboss-cache-v3/pom.xml b/modules/plugins/jboss-cache-v3/pom.xml
index efad67d..b3e8d4e 100644
--- a/modules/plugins/jboss-cache-v3/pom.xml
+++ b/modules/plugins/jboss-cache-v3/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jboss-cache/pom.xml b/modules/plugins/jboss-cache/pom.xml
index 4ecbee4..02c8233 100644
--- a/modules/plugins/jboss-cache/pom.xml
+++ b/modules/plugins/jboss-cache/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jmx/pom.xml b/modules/plugins/jmx/pom.xml
index bcf0cf1..6f40433 100644
--- a/modules/plugins/jmx/pom.xml
+++ b/modules/plugins/jmx/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/kickstart/pom.xml b/modules/plugins/kickstart/pom.xml
index bcbb309..5727123 100644
--- a/modules/plugins/kickstart/pom.xml
+++ b/modules/plugins/kickstart/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index 44fdea9..063fa13 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/mysql/pom.xml b/modules/plugins/mysql/pom.xml
index 4068435..9ae3127 100644
--- a/modules/plugins/mysql/pom.xml
+++ b/modules/plugins/mysql/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/netservices/pom.xml b/modules/plugins/netservices/pom.xml
index 0bdb176..a7799ee 100644
--- a/modules/plugins/netservices/pom.xml
+++ b/modules/plugins/netservices/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/oracle/pom.xml b/modules/plugins/oracle/pom.xml
index ab22ead..153d231 100644
--- a/modules/plugins/oracle/pom.xml
+++ b/modules/plugins/oracle/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/pattern-generator/pom.xml b/modules/plugins/pattern-generator/pom.xml
index 269b169..ad3b050 100644
--- a/modules/plugins/pattern-generator/pom.xml
+++ b/modules/plugins/pattern-generator/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/perftest/pom.xml b/modules/plugins/perftest/pom.xml
index e296f55..7ae42c1 100644
--- a/modules/plugins/perftest/pom.xml
+++ b/modules/plugins/perftest/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/platform/pom.xml b/modules/plugins/platform/pom.xml
index f22ac8a..f2e3d72 100644
--- a/modules/plugins/platform/pom.xml
+++ b/modules/plugins/platform/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/pom.xml b/modules/plugins/pom.xml
index 389b69c..070bce1 100644
--- a/modules/plugins/pom.xml
+++ b/modules/plugins/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/plugins/postfix/pom.xml b/modules/plugins/postfix/pom.xml
index 2582d6b..30622a8 100644
--- a/modules/plugins/postfix/pom.xml
+++ b/modules/plugins/postfix/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/postgres/pom.xml b/modules/plugins/postgres/pom.xml
index a3d5cae..e59115a 100644
--- a/modules/plugins/postgres/pom.xml
+++ b/modules/plugins/postgres/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/rhq-agent/pom.xml b/modules/plugins/rhq-agent/pom.xml
index 47f2f1c..f25730f 100644
--- a/modules/plugins/rhq-agent/pom.xml
+++ b/modules/plugins/rhq-agent/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/rhq-server/pom.xml b/modules/plugins/rhq-server/pom.xml
index 86b3f7a..92825e9 100644
--- a/modules/plugins/rhq-server/pom.xml
+++ b/modules/plugins/rhq-server/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/samba/pom.xml b/modules/plugins/samba/pom.xml
index f30db8f..1bc8bac 100644
--- a/modules/plugins/samba/pom.xml
+++ b/modules/plugins/samba/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/script/pom.xml b/modules/plugins/script/pom.xml
index 94af3a5..9849343 100644
--- a/modules/plugins/script/pom.xml
+++ b/modules/plugins/script/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/script2/pom.xml b/modules/plugins/script2/pom.xml
index f89d6fc..9022495 100644
--- a/modules/plugins/script2/pom.xml
+++ b/modules/plugins/script2/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/snmptrapd/pom.xml b/modules/plugins/snmptrapd/pom.xml
index eec5fc5..25d8220 100644
--- a/modules/plugins/snmptrapd/pom.xml
+++ b/modules/plugins/snmptrapd/pom.xml
@@ -2,7 +2,7 @@
<parent>
<artifactId>rhq-plugins-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/modules/plugins/sshd/pom.xml b/modules/plugins/sshd/pom.xml
index 4ef043f..5a91a77 100644
--- a/modules/plugins/sshd/pom.xml
+++ b/modules/plugins/sshd/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/sudoers/pom.xml b/modules/plugins/sudoers/pom.xml
index 95567bb..29bfbe3 100644
--- a/modules/plugins/sudoers/pom.xml
+++ b/modules/plugins/sudoers/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/tomcat/pom.xml b/modules/plugins/tomcat/pom.xml
index 7b9473d..eecfd66 100644
--- a/modules/plugins/tomcat/pom.xml
+++ b/modules/plugins/tomcat/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/twitter/pom.xml b/modules/plugins/twitter/pom.xml
index de46080..d0850e2 100644
--- a/modules/plugins/twitter/pom.xml
+++ b/modules/plugins/twitter/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/validate-all-plugins/pom.xml b/modules/plugins/validate-all-plugins/pom.xml
index fa35f4e..628eab4 100644
--- a/modules/plugins/validate-all-plugins/pom.xml
+++ b/modules/plugins/validate-all-plugins/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/virt/pom.xml b/modules/plugins/virt/pom.xml
index bb62eee..24830d0 100644
--- a/modules/plugins/virt/pom.xml
+++ b/modules/plugins/virt/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/pom.xml b/modules/pom.xml
index ba4d1b5..fb663df 100644
--- a/modules/pom.xml
+++ b/modules/pom.xml
@@ -6,7 +6,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/test-utils/pom.xml b/modules/test-utils/pom.xml
index 0b19530..eb35e08 100644
--- a/modules/test-utils/pom.xml
+++ b/modules/test-utils/pom.xml
@@ -7,7 +7,7 @@
<parent>
<artifactId>rhq-modules-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
</parent>
<artifactId>test-utils</artifactId>
diff --git a/pom.xml b/pom.xml
index e07cf64..3381fa2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.3.0-SNAPSHOT</version>
+ <version>4.4.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>RHQ</name>
commit 30fd33737747ce87134cea2203f7b08ed2b0e526
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Mon Feb 27 10:58:56 2012 -0600
Avoid merging remote branch into local code when using branching strategy because the branch does not exist yet remotely.
diff --git a/release.sh b/release.sh
index 51ff163..af311e1 100755
--- a/release.sh
+++ b/release.sh
@@ -360,9 +360,14 @@ run_release_version_and_tag_process()
[ "$?" -ne 0 ] && abort "Tagging failed"
fi
- echo "9) Merge any remote changes into the local branch to be able to push tag and version change. This will fail if the merge process requires manual merges."
- git pull origin "$BUILD_BRANCH"
- [ "$?" -ne 0 ] && abort "Merge with remote $BUILD_BRANCH failed."
+ if [ "$SCM_STRATEGY" = "tag" ];
+ then
+ echo "9) Merge any remote changes into the local branch to be able to push tag and version change. This will fail if the merge process requires manual merges."
+ git pull origin "$BUILD_BRANCH"
+ [ "$?" -ne 0 ] && abort "Merge with remote $BUILD_BRANCH failed."
+ else
+ echo "9) DID NOT execute this step because local branch was created. No need to merge back changes."
+ fi
echo "10) If everything went well so far than means all the changes can be pushed!!!"
git push origin "refs/heads/$BUILD_BRANCH"
commit 3d0d0443d63042755967b493da3f3330f58aaea7
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Sun Feb 26 21:00:56 2012 -0500
fix bad failure message; add an additonal failure check
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftFileTest.java b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftFileTest.java
index d7dde7b..50a061b 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftFileTest.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftFileTest.java
@@ -122,10 +122,9 @@ public class DriftFileTest extends DriftDataAccessTest {
int numDriftFiles = 2;
final List<String> driftFileHashIds = new ArrayList<String>();
- for (int i = 0; i < numDriftFiles; ++i) {
+ for (int driftFileNum = 0; driftFileNum < numDriftFiles; ++driftFileNum) {
File dataFile = createDataFile("test_data.txt", 10, 'X');
final JPADriftFileBits driftFile = new JPADriftFileBits();
- final int driftFileNum = i;
driftFile.setDataSize(dataFile.length());
driftFile.setHashId(digestGen.calcDigestString(dataFile));
driftFile.setData(Hibernate.createBlob(new BufferedInputStream(new FileInputStream(dataFile))));
@@ -139,10 +138,14 @@ public class DriftFileTest extends DriftDataAccessTest {
driftFileHashIds.add(driftFile.getHashId());
}
});
+ if (driftFileNum >= 1) {
+ fail("Should not be able to store JPADriftFile with same hashId more than once.");
+ }
+
} catch (Exception e) {
- // expected for file 2 or higher
+ // expected for second file
if (driftFileNum == 0) {
- fail("Should not be able to store JPADriftFile with same hashId more than once.");
+ fail("Should be able to store JPADriftFile with unique hashId - cause: " + e);
}
}
}
commit ee4985638f67feed8d9eda5c69c0d192b8b41420
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Sun Feb 26 17:25:20 2012 -0500
[BZ 749368] add Javadoc @since tags to plugin API classes (https://bugzilla.redhat.com/show_bug.cgi?id=749368)
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/availability/AvailabilityCollectorRunnable.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/availability/AvailabilityCollectorRunnable.java
index 94e475d..e6d5bf2 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/availability/AvailabilityCollectorRunnable.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/availability/AvailabilityCollectorRunnable.java
@@ -42,13 +42,14 @@ import org.rhq.core.util.exception.ThrowableUtil;
* reporting for the rest of the resources being managed within the system.
*
* This class provides an implementation to help resource components that can't guarantee how fast its
- * availability checks will be. Some managed resources simply can't respond to avaiability checks fast enough. In this
+ * availability checks will be. Some managed resources simply can't respond to availability checks fast enough. In this
* case, this class will provide an asynchronous method that will collect availability without a timeout being involved
* (in other words, availability will be retrieved by waiting as long as it takes). In order to tell the plugin container
* what the managed resource's current availability is, this class will provide a fast method to return the last known
* availability of the resource. In other words, it will be able to return the last know availability that was last retrieved
* by the asynchronous task - this retrieval of the last known availability will be very fast.
- *
+ *
+ * @since 1.3
* @author John Mazzitelli
*/
public class AvailabilityCollectorRunnable implements Runnable {
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleDeployRequest.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleDeployRequest.java
index 8130ee3..07f2c18 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleDeployRequest.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleDeployRequest.java
@@ -30,6 +30,7 @@ import org.rhq.core.domain.content.PackageVersion;
/**
* A request to deploy a bundle.
*
+ * @since 3.0
* @author John Mazzitelli
*/
public class BundleDeployRequest implements Serializable {
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleDeployResult.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleDeployResult.java
index b2b3628..cd7f9ac 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleDeployResult.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleDeployResult.java
@@ -28,6 +28,8 @@ import org.rhq.core.util.exception.ThrowableUtil;
/**
* The results after an attempt to deploy a bundle has been completed.
+ *
+ * @since 3.0
* @author John Mazzitelli
*/
public class BundleDeployResult implements Serializable {
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleFacet.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleFacet.java
index 592e63f..18cc0f4 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleFacet.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleFacet.java
@@ -24,7 +24,8 @@ package org.rhq.core.pluginapi.bundle;
/**
* Facet that exposes a component's capabilities to process a bundle.
- *
+ *
+ * @since 3.0
* @author John Mazzitelli
*/
public interface BundleFacet {
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleManagerProvider.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleManagerProvider.java
index 5eed5c0..4fd5dac 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleManagerProvider.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundleManagerProvider.java
@@ -28,7 +28,8 @@ import org.rhq.core.domain.content.PackageVersion;
/**
* Provides bundle functionality that plugin components will need in order to process bundles.
- *
+ *
+ * @since 3.0
* @author John Mazzitelli
*/
public interface BundleManagerProvider {
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundlePurgeRequest.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundlePurgeRequest.java
index 8e9456d..3a6a481 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundlePurgeRequest.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundlePurgeRequest.java
@@ -28,6 +28,7 @@ import org.rhq.core.domain.bundle.BundleResourceDeployment;
/**
* A request to purge a bundle, essentially erasing the bundle files from the destination.
*
+ * @since 4.0
* @author John Mazzitelli
*/
public class BundlePurgeRequest implements Serializable {
@@ -45,11 +46,18 @@ public class BundlePurgeRequest implements Serializable {
* where the bundle should be deployed. This is the bundle destination's
* {@link BundleDestination#getDeployDir() relative destination directory} under the
* {@link BundleDestination#getDestinationBaseDirectoryName() destination base directory}.
+ *
+ * @since 4.1
*/
public File getAbsoluteDestinationDirectory() {
return this.absDestDir;
}
+ /**
+ * @since 4.1
+ *
+ * @param absoluteDestDir
+ */
public void setAbsoluteDestinationDirectory(File absoluteDestDir) {
this.absDestDir = absoluteDestDir;
}
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundlePurgeResult.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundlePurgeResult.java
index 71e0dfb..20eb016 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundlePurgeResult.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/bundle/BundlePurgeResult.java
@@ -29,6 +29,7 @@ import org.rhq.core.util.exception.ThrowableUtil;
/**
* The results after an attempt to purge a bundle has been completed.
*
+ * @since 4.0
* @author John Mazzitelli
*/
public class BundlePurgeResult implements Serializable {
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ConfigurationFacet.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ConfigurationFacet.java
index 02b58a2..95965fd 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ConfigurationFacet.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ConfigurationFacet.java
@@ -31,7 +31,7 @@ import org.rhq.core.domain.configuration.Property;
*
* @author Jason Dobies
*/
-public interface ConfigurationFacet extends ConfigurationFacetSupport {
+public interface ConfigurationFacet {
/**
* Returns the current values for the specified resource. Note that the returns configuration is the configuration
* settings for the managed resource itself, not to be confused with the <i>plugin configuration</i> which is used
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ResourceConfigurationFacet.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ResourceConfigurationFacet.java
index b277663..788f432 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ResourceConfigurationFacet.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ResourceConfigurationFacet.java
@@ -28,6 +28,9 @@ import org.rhq.core.domain.configuration.RawConfiguration;
import java.util.Set;
+/**
+ * @since 3.0
+ */
public interface ResourceConfigurationFacet {
Configuration loadStructuredConfiguration();
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ResourceConfigurationUpdateException.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ResourceConfigurationUpdateException.java
index fdc3018..4770f58 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ResourceConfigurationUpdateException.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/configuration/ResourceConfigurationUpdateException.java
@@ -39,6 +39,8 @@ package org.rhq.core.pluginapi.configuration;
* <br/><br/>
* With any other exception, the plugin container cannot reasonably assume that any errors were handled and as such
* reports the entire stack trace back to the server to provide additional information for debugging if necessary.
+ *
+ * @since 3.0
*/
public class ResourceConfigurationUpdateException extends RuntimeException {
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/event/log/LogFileEventResourceComponentHelper.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/event/log/LogFileEventResourceComponentHelper.java
index d134638..937c032 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/event/log/LogFileEventResourceComponentHelper.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/event/log/LogFileEventResourceComponentHelper.java
@@ -43,7 +43,10 @@ import org.rhq.core.pluginapi.inventory.ResourceContext;
import org.rhq.core.system.SystemInfoFactory;
/**
- * @author Ian Springer
+ * A helper class that plugins can use to start and stop {@link LogFileEventPoller}s.
+ *
+ * @since 1.3
+ * @author Ian Springer
*/
public class LogFileEventResourceComponentHelper {
public static final String LOG_ENTRY_EVENT_TYPE = "logEntry";
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ClassLoaderFacet.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ClassLoaderFacet.java
index df7dc31..98cb71b 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ClassLoaderFacet.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ClassLoaderFacet.java
@@ -35,6 +35,7 @@ import java.util.List;
*
* @param <T> the parent resource component type for those resources discovered by this discovery component
*
+ * @since 1.3
* @author John Mazzitelli
*/
public interface ClassLoaderFacet<T extends ResourceComponent<?>> {
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/CreateResourceReport.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/CreateResourceReport.java
index 54a6d41..5f6ad56 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/CreateResourceReport.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/CreateResourceReport.java
@@ -65,7 +65,9 @@ public class CreateResourceReport {
* may be <code>null</code>
* @param resourceConfiguration any configuration values necessary for the resource; may be <code>null</code>
* @param packageDetails information regarding the package to be deployed when creating the new
- * resource; may be <code>null</code>
+ * resource; may be <code>null</code>
+ *
+ * @since 1.1
*/
public CreateResourceReport(String userSpecifiedResourceName, ResourceType resourceType, Configuration pluginConfiguration,
Configuration resourceConfiguration, ResourcePackageDetails packageDetails) {
@@ -78,10 +80,16 @@ public class CreateResourceReport {
// Public --------------------------------------------
+ /**
+ * @since 1.1
+ */
public String getUserSpecifiedResourceName() {
return userSpecifiedResourceName;
}
+ /**
+ * @since 1.1
+ */
public void setUserSpecifiedResourceName(String userSpecifiedResourceName) {
this.userSpecifiedResourceName = userSpecifiedResourceName;
}
@@ -118,6 +126,9 @@ public class CreateResourceReport {
return resourceConfiguration;
}
+ /**
+ * @since 1.1
+ */
public ResourcePackageDetails getPackageDetails() {
return packageDetails;
}
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ManualAddFacet.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ManualAddFacet.java
index 476e8d8..54f71a1 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ManualAddFacet.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ManualAddFacet.java
@@ -38,6 +38,7 @@ import org.rhq.core.domain.configuration.Configuration;
*
* @param <T> the parent resource component type for those resources discovered by this discovery component
*
+ * @since 3.0
* @author Ian Springer
*/
public interface ManualAddFacet<T extends ResourceComponent<?>> {
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/PluginContainerDeployment.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/PluginContainerDeployment.java
index ec253ae..ef46294 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/PluginContainerDeployment.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/PluginContainerDeployment.java
@@ -24,7 +24,8 @@ package org.rhq.core.pluginapi.inventory;
/**
* This enum indicates where the plugin container (and therefore the plugins) are deployed.
- *
+ *
+ * @since 1.3
* @author John Mazzitelli
*/
public enum PluginContainerDeployment {
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceContext.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceContext.java
index bcb16a1..20d7d17 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceContext.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceContext.java
@@ -119,8 +119,10 @@ public class ResourceContext<T extends ResourceComponent<?>> {
private static Map<Children, ResourceTypeProcesses> PROCESSES_PER_PARENT_PER_RESOURCE_TYPE = new HashMap<Children, ResourceTypeProcesses>();
/**
- * Creates a new {@link ResourceContext} object. The plugin container is responsible for instantiating these
- * objects; plugin writers should never have to actually create context objects.
+ * Creates a new {@link ResourceContext} object.
+ *
+ * <b>NOTE:</b> The plugin container is responsible for instantiating these objects; plugin writers should never
+ * have to actually create context objects.
*
* @param resource the resource whose {@link org.rhq.core.pluginapi.inventory.ResourceComponent}
* will be given this context object of the plugin
@@ -206,6 +208,8 @@ public class ResourceContext<T extends ResourceComponent<?>> {
* The {@link Resource#getVersion() version} of the resource this context is associated with.
*
* @return the resource's version string
+ *
+ * @since 1.2
*/
public String getVersion() {
return this.version;
@@ -408,6 +412,8 @@ public class ResourceContext<T extends ResourceComponent<?>> {
* See {@link PluginContainerDeployment} for more information on what the return value means.
*
* @return indicator of where the plugin container is deployed and running
+ *
+ * @since 1.3
*/
public PluginContainerDeployment getPluginContainerDeployment() {
return pluginContainerDeployment;
@@ -468,6 +474,8 @@ public class ResourceContext<T extends ResourceComponent<?>> {
* for this parameter is {@link AvailabilityCollectorRunnable#MIN_INTERVAL}.
*
* @return the availability collector runnable that will perform the asynchronous checking
+ *
+ * @since 1.3
*/
public AvailabilityCollectorRunnable createAvailabilityCollectorRunnable(AvailabilityFacet availChecker,
long interval) {
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceDiscoveryContext.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceDiscoveryContext.java
index b9e9bcd..d3bedd5 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceDiscoveryContext.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceDiscoveryContext.java
@@ -85,6 +85,8 @@ public class ResourceDiscoveryContext<T extends ResourceComponent<?>> {
* @param pluginContainerName the name of the plugin container in which the discovery component is running. Components
* can be assured this name is unique across <b>all</b> plugin containers/agents running
* @param pluginContainerDeployment indicates where the plugin container is running
+ *
+ * @since 3.0
*/
public ResourceDiscoveryContext(ResourceType resourceType, T parentComponent,
ResourceContext<?> parentResourceContext, SystemInfo systemInfo, List<ProcessScanResult> processScanResults,
@@ -115,6 +117,8 @@ public class ResourceDiscoveryContext<T extends ResourceComponent<?>> {
* @param pluginContainerName the name of the plugin container in which the discovery component is running. Components
* can be assured this name is unique across <b>all</b> plugin containers/agents running
* @param pluginContainerDeployment indicates where the plugin container is running
+ *
+ * @since 1.3
*/
@SuppressWarnings("unchecked")
public ResourceDiscoveryContext(ResourceType resourceType, T parentComponent,
@@ -158,7 +162,8 @@ public class ResourceDiscoveryContext<T extends ResourceComponent<?>> {
* plugin configuration values for use in discovery of the children.
*
* @return the resource context for the parent
- * @since 1.0.1
+ *
+ * @since 1.1
*/
public ResourceContext<?> getParentResourceContext() {
return parentResourceContext;
@@ -243,6 +248,8 @@ public class ResourceDiscoveryContext<T extends ResourceComponent<?>> {
* See {@link PluginContainerDeployment} for more information on what the return value means.
*
* @return indicator of where the plugin container is deployed and running
+ *
+ * @since 1.3
*/
public PluginContainerDeployment getPluginContainerDeployment() {
return pluginContainerDeployment;
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/operation/OperationResult.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/operation/OperationResult.java
index 59ca30f..715880d 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/operation/OperationResult.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/operation/OperationResult.java
@@ -93,7 +93,10 @@ public class OperationResult {
/**
* Returns the plugin-specific error message for this operation, or null if the operation was successful.
+ *
* @return The stored message or null.
+ *
+ * @since 1.2
*/
public String getErrorMessage() {
return this.errorMessage;
@@ -106,6 +109,8 @@ public class OperationResult {
* be marked as FAILURE
*
* @param errorMessage a plugin specific error that indicates why this operation has failed
+ *
+ * @since 1.2
*/
public void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/plugin/PluginContext.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/plugin/PluginContext.java
index 029ae26..b9d52ab 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/plugin/PluginContext.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/plugin/PluginContext.java
@@ -8,6 +8,8 @@ import org.rhq.core.system.SystemInfo;
* A global context containing information about a plugin.
*
* @author John Mazzitelli
+ *
+ * @since 1.2
*/
public class PluginContext {
private final String pluginName;
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/plugin/PluginLifecycleListener.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/plugin/PluginLifecycleListener.java
index 9acc0ab..e68abb4 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/plugin/PluginLifecycleListener.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/plugin/PluginLifecycleListener.java
@@ -29,6 +29,8 @@ package org.rhq.core.pluginapi.plugin;
* a place to clean up those resources.
*
* @author John Mazzitelli
+ *
+ * @since 1.2
*/
public interface PluginLifecycleListener {
/**
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SnapshotReportRequest.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SnapshotReportRequest.java
index cbd1b4b..84b3a5f 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SnapshotReportRequest.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SnapshotReportRequest.java
@@ -28,6 +28,8 @@ import java.io.Serializable;
* Encapsulates information about a snapshot report request.
*
* @author John Mazzitelli
+ *
+ * @since 1.3
*/
public class SnapshotReportRequest implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SnapshotReportResults.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SnapshotReportResults.java
index cad67f2..30d8882 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SnapshotReportResults.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SnapshotReportResults.java
@@ -29,6 +29,8 @@ import java.io.Serializable;
* Contains the results of a snapshot report, including a stream to the contents of the snapshot.
*
* @author John Mazzitelli
+ *
+ * @since 1.3
*/
public class SnapshotReportResults implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SupportFacet.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SupportFacet.java
index 538eef6..c673923 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SupportFacet.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/support/SupportFacet.java
@@ -28,6 +28,7 @@ package org.rhq.core.pluginapi.support;
*
* @author John Mazzitelli
*
+ * @since 1.3
*/
public interface SupportFacet {
/**
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/upgrade/ResourceUpgradeContext.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/upgrade/ResourceUpgradeContext.java
index 702a768..f1d6807 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/upgrade/ResourceUpgradeContext.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/upgrade/ResourceUpgradeContext.java
@@ -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.pluginapi.upgrade;
import java.io.File;
@@ -41,7 +40,8 @@ import org.rhq.core.system.SystemInfo;
* Represents a resource during the resource upgrade phase of discovery.
*
* @see ResourceUpgradeFacet
- *
+ *
+ * @since 3.0
* @author Lukas Krejci
*/
public class ResourceUpgradeContext<T extends ResourceComponent<?>> extends ResourceContext<T> {
@@ -51,7 +51,9 @@ public class ResourceUpgradeContext<T extends ResourceComponent<?>> extends Reso
private final String description;
/**
- * @see ResourceContext#ResourceContext(Resource, ResourceComponent, ResourceDiscoveryComponent, SystemInfo, File, File, String, EventContext, OperationContext, ContentContext, Executor, PluginContainerDeployment)
+ * @see ResourceContext#ResourceContext(org.rhq.core.domain.resource.Resource, org.rhq.core.pluginapi.inventory.ResourceComponent, org.rhq.core.pluginapi.inventory.ResourceContext, org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent, org.rhq.core.system.SystemInfo, java.io.File, java.io.File, String, org.rhq.core.pluginapi.event.EventContext, org.rhq.core.pluginapi.operation.OperationContext, org.rhq.core.pluginapi.content.ContentContext, java.util.concurrent.Executor, org.rhq.core.pluginapi.inventory.PluginContainerDeployment)
+ *
+ * @since 4.0
*/
public ResourceUpgradeContext(Resource resource, ResourceContext<?> parentResourceContext,
T parentResourceComponent, ResourceDiscoveryComponent<T> resourceDiscoveryComponent, SystemInfo systemInfo,
@@ -68,6 +70,13 @@ public class ResourceUpgradeContext<T extends ResourceComponent<?>> extends Reso
this.description = resource.getDescription();
}
+ /**
+ * Returns the context of the Resource component's parent Resource component.
+ *
+ * @return the context of the Resource component's parent Resource component
+ *
+ * @since 4.0
+ */
@Override
public ResourceContext<?> getParentResourceContext() {
return super.getParentResourceContext();
@@ -84,4 +93,5 @@ public class ResourceUpgradeContext<T extends ResourceComponent<?>> extends Reso
public String getDescription() {
return description;
}
+
}
diff --git a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/upgrade/ResourceUpgradeFacet.java b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/upgrade/ResourceUpgradeFacet.java
index 13c155a..55d541f 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/upgrade/ResourceUpgradeFacet.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/upgrade/ResourceUpgradeFacet.java
@@ -31,7 +31,8 @@ import org.rhq.core.pluginapi.inventory.ResourceComponent;
* upgrading the existing resources to a new format needed by an updated resource component.
* This is useful for example in the case when a new version of plugin redefined a resource
* key generation algorithm and wants to upgrade the legacy resources to use the new format.
- *
+ *
+ * @since 3.0
* @author Lukas Krejci
*/
public interface ResourceUpgradeFacet<T extends ResourceComponent<?>> {
commit d71b22a573d7f9e576b23407fcdc4ad4c0c3d846
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Sat Feb 25 14:36:33 2012 -0500
use correct syntax for passing sysprop to surefire (fixes my previous commit)
diff --git a/modules/enterprise/comm/pom.xml b/modules/enterprise/comm/pom.xml
index ae11a4b..f8aa8f9 100644
--- a/modules/enterprise/comm/pom.xml
+++ b/modules/enterprise/comm/pom.xml
@@ -146,7 +146,7 @@
<!--
<argLine>-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</argLine>
-->
- <systemPropertyVariables>
+ <systemPropertyVariables combine.children="append">
<rhq.comm.test.connectorBindPort>${rhq.comm.test.connectorBindPort}</rhq.comm.test.connectorBindPort>
<rhq.comm.test.connector2BindPort>${rhq.comm.test.connector2BindPort}</rhq.comm.test.connector2BindPort>
</systemPropertyVariables>
diff --git a/modules/plugins/rhq-agent/pom.xml b/modules/plugins/rhq-agent/pom.xml
index 92068fd..47f2f1c 100644
--- a/modules/plugins/rhq-agent/pom.xml
+++ b/modules/plugins/rhq-agent/pom.xml
@@ -111,16 +111,10 @@
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<useSystemClassLoader>true</useSystemClassLoader>
<argLine>-Dorg.hyperic.sigar.path=${basedir}/target/itest/lib</argLine>
- <systemProperties>
- <property>
- <name>project.artifactId</name>
- <value>${project.artifactId}</value>
- </property>
- <property>
- <name>project.version</name>
- <value>${project.version}</value>
- </property>
- </systemProperties>
+ <systemPropertyVariables combine.children="append">
+ <project.artifactId>${project.artifactId}</project.artifactId>
+ <project.version>${project.version}</project.version>
+ </systemPropertyVariables>
</configuration>
</execution>
</executions>
diff --git a/pom.xml b/pom.xml
index 2e346f8..e07cf64 100644
--- a/pom.xml
+++ b/pom.xml
@@ -820,9 +820,9 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<trimStackTrace>false</trimStackTrace>
- <systemProperties>
+ <systemPropertyVariables>
<java.util.prefs.userRoot>${java.io.tmpdir}/${user.name}</java.util.prefs.userRoot>
- </systemProperties>
+ </systemPropertyVariables>
</configuration>
</plugin>
commit 82bd4233ab03a113f51e46021bf94c36deba5dd3
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Sat Feb 25 10:45:45 2012 -0500
write user prefs to /tmp/user, rather than /home/user, when running tests,
to avoid locking errors when running with NFS home dirs via Jenkins
diff --git a/pom.xml b/pom.xml
index 290a193..2e346f8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -820,6 +820,9 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<trimStackTrace>false</trimStackTrace>
+ <systemProperties>
+ <java.util.prefs.userRoot>${java.io.tmpdir}/${user.name}</java.util.prefs.userRoot>
+ </systemProperties>
</configuration>
</plugin>
commit 4a808b506c8ece503ec32fbd006d1dd1314fa3e5
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Feb 24 22:08:54 2012 -0600
Delete only changesets directory to preserve classes and resource created by the build process.
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
index 195cb4b..3f2f46f 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
@@ -134,9 +134,8 @@ public class DriftManagerBeanTest extends AbstractEJB3Test {
@Test
public void testStoreChangeSet() throws Exception {
File rootDir = toFile(getClass().getResource("."));
- deleteDirectory(rootDir);
-
File changeSetsDir = new File(rootDir, "changesets");
+ deleteDirectory(changeSetsDir);
changeSetsDir.mkdirs();
Headers headers = new Headers();
commit f09ea66e14910e5fa3490cd1c12cf8278fa6145b
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Feb 24 19:04:47 2012 -0600
No need to enable tests based on a local private variable.
Because this test class was not compiled, TestDefService was not compiled either resulting in build errors in integration tests component.
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
index 276b669..195cb4b 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
@@ -79,12 +79,9 @@ import org.rhq.enterprise.server.util.LookupUtil;
*/
// TODO: Figure out how to get this test class to run without causing issues in the test-jar generation. I don't
// understand exactly what the deal is but removing this dependency on an itests group causes the server test jar to
-// not correctly generate the drift package contents.
-@Test
+// not correctly generate the drift package contents.
public class DriftManagerBeanTest extends AbstractEJB3Test {
- private static final boolean ENABLE_TESTS = true;
-
private JPADriftServerLocal jpaDriftServer;
private DriftManagerLocal driftManager;
private Subject overlord;
@@ -134,7 +131,7 @@ public class DriftManagerBeanTest extends AbstractEJB3Test {
}
}
- @Test(enabled = ENABLE_TESTS)
+ @Test
public void testStoreChangeSet() throws Exception {
File rootDir = toFile(getClass().getResource("."));
deleteDirectory(rootDir);
@@ -214,7 +211,7 @@ public class DriftManagerBeanTest extends AbstractEJB3Test {
assertEquals(DriftFileStatus.REQUESTED, driftFile.getStatus());
}
- @Test(enabled = ENABLE_TESTS)
+ @Test
public void testDriftDef() throws Exception {
Configuration config = new Configuration();
DriftDefinition driftDefPojo = new DriftDefinition(config);
commit 00d6ba36588ff34470a018db685fe145c9ca507e
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Fri Feb 24 17:08:27 2012 -0500
in DbSetupUtility, read the test datasource connection props from Maven's rhq.test.ds.* props, rather than using hard-coded values
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/DbSetupUtility.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/DbSetupUtility.java
index 753b8f5..5affecb 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/DbSetupUtility.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/DbSetupUtility.java
@@ -20,6 +20,7 @@ package org.rhq.enterprise.server.util;
import java.io.File;
import java.io.FileOutputStream;
+import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.net.URL;
@@ -48,24 +49,35 @@ public class DbSetupUtility {
public static final String JON300_SCHEMA_VERSION = "2.116";
- private static final String DB_NAME = System.getProperty("rhq.test.ds.db-name", "rhq");
- private static final String DB_SERVER_NAME = System.getProperty("rhq.test.ds.server-name", "127.0.0.1");
- private static final String DB_CONNECTION_URL = System.getProperty("rhq.test.ds.connection-url",
- "jdbc:postgresql://" + DB_SERVER_NAME + ":5432/" + DB_NAME);
- private static final String DB_USER_NAME = System.getProperty("rhq.test.ds.user-name", "rhqadmin");
- private static final String DB_PASSWORD = System.getProperty("rhq.test.ds.password", "rhqadmin");
-
private static final String BASE_RESOURCE_PATH = DbSetupUtility.class.getPackage().getName().replace('.', '/');
+ private static TestDatasourceConfiguration testDsConfig;
+
+ private static TestDatasourceConfiguration getTestDatasourceConfiguration() {
+ if (testDsConfig == null) {
+ Properties testDsProperties = new Properties();
+ InputStream resourceAsStream = DbSetupUtility.class.getResourceAsStream("test-ds.properties");
+ try {
+ testDsProperties.load(resourceAsStream);
+ } catch (IOException e) {
+ throw new RuntimeException("Failed to load test-ds.properties from classloader.", e);
+ }
+ testDsConfig = new TestDatasourceConfiguration(testDsProperties);
+ System.out.println("Using test datasource with config " + testDsConfig + "...");
+ }
+ return testDsConfig;
+ }
+
public static void dbreset() throws Exception {
- System.out.println("Resetting DB at " + DB_CONNECTION_URL + "...");
+ TestDatasourceConfiguration testDs = getTestDatasourceConfiguration();
+ System.out.println("Resetting DB at " + testDs.connectionUrl + "...");
// NOTE: We do not use DBReset.performDBReset() here, since DBReset deletes the schema, which requires there to
// be no active connections to the DB. Liquibase.dropAll(), on the other hand, just deletes all the
// objects in the DB, which has no such requirement.
- String dbDriver = DatabaseFactory.getInstance().findDefaultDriver(DB_CONNECTION_URL);
+ String dbDriver = DatabaseFactory.getInstance().findDefaultDriver(testDs.connectionUrl);
Database database = CommandLineUtils.createDatabaseObject(DbSetupUtility.class.getClassLoader(),
- DB_CONNECTION_URL, DB_USER_NAME, DB_PASSWORD, dbDriver, null, null, null);
+ testDs.connectionUrl, testDs.userName, testDs.password, dbDriver, null, null, null);
//Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(
// new JdbcConnection(AbstractEJB3Test.getConnection()));
Liquibase liquibase = new Liquibase(null, new ClassLoaderResourceAccessor(), database);
@@ -92,7 +104,9 @@ public class DbSetupUtility {
dataFileResourcePath = "db-data-combined.xml";
}
- DBSetup dbsetup = new DBSetup(DB_CONNECTION_URL, DB_USER_NAME, DB_PASSWORD);
+ TestDatasourceConfiguration testDs = getTestDatasourceConfiguration();
+
+ DBSetup dbsetup = new DBSetup(testDs.connectionUrl, testDs.userName, testDs.password);
dbsetup.setup(schemaFileResourcePath);
dbsetup.setup(dataFileResourcePath);
}
@@ -101,20 +115,21 @@ public class DbSetupUtility {
System.out.println("Upgrading RHQ DB to schema version [" + targetSchemaVersion + "]...");
File logfile = File.createTempFile("rhq.test", "dbupgrade.log");
+ TestDatasourceConfiguration testDs = getTestDatasourceConfiguration();
try {
- // get the URL for the dbupgrade Ant script, which is located in the dbutils jar
+ // Get the URL for the dbupgrade Ant script, which is located in the dbutils jar.
URL dbupgradeXmlFileUrl = DbSetupUtility.class.getClassLoader().getResource("db-upgrade.xml");
Properties antProps = new Properties();
- antProps.setProperty("jdbc.url", DB_CONNECTION_URL);
- antProps.setProperty("jdbc.user", DB_USER_NAME);
- antProps.setProperty("jdbc.password", DB_PASSWORD);
+ antProps.setProperty("jdbc.url", testDs.connectionUrl);
+ antProps.setProperty("jdbc.user", testDs.userName);
+ antProps.setProperty("jdbc.password", testDs.password);
antProps.setProperty("target.schema.version", targetSchemaVersion);
startAnt(dbupgradeXmlFileUrl, "db-ant-tasks.properties", antProps, logfile);
} catch (Exception e) {
- throw new RuntimeException("Cannot upgrade the RHQ DB at URL " + DB_CONNECTION_URL + " to schema version "
- + targetSchemaVersion + ".", e);
+ throw new RuntimeException("Cannot upgrade the RHQ DB at [" + testDs.connectionUrl + "] to schema version ["
+ + targetSchemaVersion + "].", e);
}
return;
@@ -205,5 +220,40 @@ public class DbSetupUtility {
}
}
}
+
+ private static class TestDatasourceConfiguration {
+ abstract class Property {
+ public static final String DB_CONNECTION_URL = "rhq.test.ds.connection-url";
+ public static final String DB_SERVER_NAME = "rhq.test.ds.server-name";
+ public static final String DB_NAME = "rhq.test.ds.db-name";
+ public static final String DB_USER_NAME = "rhq.test.ds.user-name";
+ public static final String DB_PASSWORD = "rhq.test.ds.password";
+ }
+
+ String connectionUrl;
+ String serverName;
+ String dbName;
+ String userName;
+ String password;
+
+ private TestDatasourceConfiguration(Properties props) {
+ connectionUrl = props.getProperty(Property.DB_CONNECTION_URL);
+ serverName = props.getProperty(Property.DB_SERVER_NAME);
+ dbName = props.getProperty(Property.DB_NAME);
+ userName = props.getProperty(Property.DB_USER_NAME);
+ password = props.getProperty(Property.DB_PASSWORD);
+ }
+
+ @Override
+ public String toString() {
+ // NOTE: For the sake of security, we don't include the password here.
+ return "{" +
+ "connectionUrl='" + connectionUrl + '\'' +
+ ", serverName='" + serverName + '\'' +
+ ", dbName='" + dbName + '\'' +
+ ", userName='" + userName + '\'' +
+ '}';
+ }
+ }
}
diff --git a/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/util/test-ds.properties b/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/util/test-ds.properties
new file mode 100644
index 0000000..448c69e
--- /dev/null
+++ b/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/util/test-ds.properties
@@ -0,0 +1,7 @@
+# The values of these properties get substituted by Maven during the test:resources phase.
+rhq.test.ds.driver-class = ${rhq.test.ds.driver-class}
+rhq.test.ds.connection-url = ${rhq.test.ds.connection-url}
+rhq.test.ds.server-name = ${rhq.test.ds.server-name}
+rhq.test.ds.db-name = ${rhq.test.ds.db-name}
+rhq.test.ds.user-name = ${rhq.test.ds.user-name}
+rhq.test.ds.password = ${rhq.test.ds.password}
commit 44ef286191883ac429d0eddb04b7a76bffc21a68
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Feb 24 15:36:12 2012 -0600
[BZ 749315] Set max and min values for integer validators to corresponding integer limits when they are not specified other config properties.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java
index 2b76531..06330a8 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java
@@ -1563,9 +1563,16 @@ public class ConfigurationEditor extends LocatableVLayout {
if (integerConstraint.getMinimum() != null) {
validator.setMin(integerConstraint.getMinimum().intValue());
}
+ else {
+ validator.setMin(Integer.MIN_VALUE);
+ }
if (integerConstraint.getMaximum() != null) {
validator.setMax(integerConstraint.getMaximum().intValue());
}
+ else {
+ validator.setMax(Integer.MAX_VALUE);
+ }
+
validators.add(validator);
} else if (constraint instanceof FloatRangeConstraint) {
FloatRangeConstraint floatConstraint = ((FloatRangeConstraint) constraint);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/DurationItem.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/DurationItem.java
index ef4e20f..486b20b 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/DurationItem.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/DurationItem.java
@@ -125,6 +125,7 @@ public class DurationItem extends CanvasItem {
valueItem.setValue(getValue());
IntegerRangeValidator integerRangeValidator = new IntegerRangeValidator();
integerRangeValidator.setMin(1);
+ integerRangeValidator.setMax(Integer.MAX_VALUE);
valueItem.setValidators(integerRangeValidator);
valueItem.setValidateOnChange(true);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/RPCDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/RPCDataSource.java
index 20c3d2a..00a4567 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/RPCDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/RPCDataSource.java
@@ -672,9 +672,16 @@ public abstract class RPCDataSource<T, C extends BaseCriteria> extends DataSourc
if (minValue != null) {
integerRangeValidator.setMin(minValue);
}
+ else {
+ integerRangeValidator.setMin(Integer.MIN_VALUE);
+ }
if (maxValue != null) {
integerRangeValidator.setMax(maxValue);
}
+ else {
+ integerRangeValidator.setMax(Integer.MAX_VALUE);
+ }
+
textField.setValidators(integerRangeValidator);
}
return textField;
commit 5c0204f45a5f89649e44bca4c5b54f5742db39f0
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Fri Feb 24 14:41:50 2012 -0500
update maven jar plugin from 2.3.1 to 2.4
diff --git a/pom.xml b/pom.xml
index a56fcd9..290a193 100644
--- a/pom.xml
+++ b/pom.xml
@@ -579,7 +579,7 @@
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
- <version>2.3.1</version>
+ <version>2.4</version>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
commit 5fdba59819810c5ae5cd76f7132cc8fc866ee722
Author: Mike Thompson <mithomps(a)redhat.com>
Date: Fri Feb 24 10:22:37 2012 -0800
BZ795833 SearchBar Broken after gwt upgrade] Enabled enter key and fixed mangling of critera in web mode.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
index f72d12e..ad77c1a 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
@@ -339,12 +339,6 @@ public class Table<DS extends RPCDataSource> extends LocatableHLayout implements
contents.removeChild(child);
}
- if (filterForm.hasContent()) {
- contents.addMember(filterForm);
- }
-
- // add the listGrid defined in onInit
- contents.addMember(listGrid);
// Title
this.titleCanvas = new HTMLFlow();
@@ -357,6 +351,12 @@ public class Table<DS extends RPCDataSource> extends LocatableHLayout implements
contents.addMember(titleLayout, 0);
}
+ if (filterForm.hasContent()) {
+ contents.addMember(filterForm);
+ }
+ // add the listGrid defined in onInit
+ contents.addMember(listGrid);
+
// Footer
// A second toolstrip that optionally appears before the main footer - it will contain extra widgets.
@@ -1134,6 +1134,7 @@ public class Table<DS extends RPCDataSource> extends LocatableHLayout implements
@Override
public void onKeyPress(KeyPressEvent event) {
if (event.getKeyName().equals("Enter")) {
+ Log.debug("Table.TableFilter Pressed Enter key");
fetchFilteredTableData();
}
}
@@ -1149,15 +1150,18 @@ public class Table<DS extends RPCDataSource> extends LocatableHLayout implements
@Override
public void onKeyPress(com.google.gwt.event.dom.client.KeyPressEvent event) {
- if (event.getCharCode() == KeyCodes.KEY_ENTER) {
+ if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) {
// TODO (ips, 10/14/11): Figure out why this event is being sent twice. However, this is not urgent,
// since the if check below will prevent the 2nd event from triggering a redundant
// fetch request.
+ Log.debug("Table.TableFilter Pressed Enter key2");
String searchBarValue = searchBarItem.getSearchBar().getValue();
String hiddenValue = (String) hiddenItem.getValue();
+ Log.debug("Table.TableFilter searchBarValue :"+searchBarValue+ ", hiddenValue"+hiddenValue);
// Only send a fetch request if the user actually changed the search expression.
if (!equals(searchBarValue, hiddenValue)) {
hiddenItem.setValue(searchBarValue);
+ Log.debug("Table.TableFilter fetchFilteredTableData");
fetchFilteredTableData();
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java
index 15f16aa..cb39479 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java
@@ -371,7 +371,7 @@ public class FlexSearchBar extends AbstractSearchBar {
class PatternNameFieldEventHandler implements KeyPressHandler, ClickHandler, BlurHandler {
public void onKeyPress(KeyPressEvent event) {
- if (event.getCharCode() == KeyCodes.KEY_ENTER) {
+ if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) {
Log.debug("key press pattern name field");
turnNameFieldIntoLabel(true);
}
@@ -562,7 +562,7 @@ public class FlexSearchBar extends AbstractSearchBar {
}
public String getValue() {
- return autoCompletePatternField.getValue();
+ return autoCompletePatternField.getText();
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/SearchBar.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/SearchBar.java
index 3f18b97..c4dc6eb 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/SearchBar.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/SearchBar.java
@@ -20,7 +20,6 @@ package org.rhq.enterprise.gui.coregui.client.search;
import java.util.List;
-import java.util.logging.Logger;
import com.google.gwt.event.dom.client.BlurEvent;
import com.google.gwt.event.dom.client.BlurHandler;
import com.google.gwt.event.dom.client.ClickEvent;
@@ -401,8 +400,9 @@ public class SearchBar extends AbstractSearchBar {
class PatternNameFieldEventHandler implements KeyPressHandler, ClickHandler, BlurHandler {
public void onKeyPress(KeyPressEvent event) {
- if (event.getCharCode() == KeyCodes.KEY_ENTER) {
- Log.debug("key press pattern name field");
+ //if (event.getCharCode() == KeyCodes.KEY_ENTER) {
+ if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) {
+ Log.debug("ENTER key press on pattern name field");
turnNameFieldIntoLabel();
}
}
@@ -414,6 +414,7 @@ public class SearchBar extends AbstractSearchBar {
}
public void onBlur(BlurEvent event) {
+ Log.debug("onblur event on pattern name field");
lastNameFieldBlurTime = System.currentTimeMillis();
turnNameFieldIntoLabel();
}
@@ -427,6 +428,8 @@ public class SearchBar extends AbstractSearchBar {
class StarImageEventHandler implements ClickHandler, MouseOverHandler, MouseOutHandler {
public void onClick(ClickEvent event) {
+ Log.debug("onClick for StarImage");
+ lastNameFieldBlurTime = System.currentTimeMillis();
long diff = System.currentTimeMillis() - lastNameFieldBlurTime;
if (Math.abs(diff) < 750) {
/*
@@ -472,6 +475,7 @@ public class SearchBar extends AbstractSearchBar {
class ArrowImageEventHandler implements ClickHandler {
public void onClick(ClickEvent event) {
+ Log.debug("onClick for ArrowImage");
savedSearchesGrid.updateModel(new AsyncCallback<List<SavedSearch>>() {
@Override
public void onFailure(Throwable caught) {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java
index 9d92a4d..8030b2b 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java
@@ -23,7 +23,6 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.List;
-import java.util.logging.Logger;
import com.google.gwt.event.dom.client.BlurHandler;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
@@ -235,7 +234,8 @@ public class SuggestTextBox_v3 extends Composite implements HasText, HasAllFocus
}
public void onKeyPress(KeyPressEvent event) {
- if (event.getCharCode() == KeyCodes.KEY_ENTER) {
+ if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) {
+ Log.debug("****** Pressed Enter in SearchBar");
hideSuggestionList();
}
@@ -249,6 +249,7 @@ public class SuggestTextBox_v3 extends Composite implements HasText, HasAllFocus
}
public void onValueChange(ValueChangeEvent<String> event) {
+ Log.debug("OnValueChange in SearchBar: "+event.getValue());
delegateEvent(SuggestTextBox_v3.this, event);
}
commit 084b2d4a5326d821ddef145a5c961ece1b438414
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Fri Feb 24 12:07:50 2012 -0500
fix bug in Ant script triggered by -Ddbsetup, where all-*.xml files were not always regenerated when the schema version was bumped up in the pom; fix bug in dbupgrade schema version 2.119
diff --git a/modules/core/dbutils/src/main/scripts/dbsetup-build.xml b/modules/core/dbutils/src/main/scripts/dbsetup-build.xml
index e7f2c12..470fcc6 100644
--- a/modules/core/dbutils/src/main/scripts/dbsetup-build.xml
+++ b/modules/core/dbutils/src/main/scripts/dbsetup-build.xml
@@ -98,9 +98,8 @@ To run the default target, you must set one of the following properties to true:
<target name="dbsetup-combine-check">
<uptodate property="dbsetup-combine.notrequired"
targetfile="${dbsetup.tstamp.file}">
- <srcfiles dir="${dbsetup.scripts.dir}">
- <include name="*.xml"/>
- </srcfiles>
+ <srcfiles dir="${basedir}" includes="pom.xml"/>
+ <srcfiles dir="${dbsetup.scripts.dir}" includes="*.xml"/>
</uptodate>
</target>
diff --git a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
index 74b278a..02c0609 100644
--- a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
+++ b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
@@ -3961,7 +3961,7 @@
<schema-directSQL>
<statement desc="Adding VIEW_USERS global permission to all existing roles">
INSERT INTO RHQ_PERMISSION (ROLE_ID, OPERATION)
- SELECT r.ID, 17 FROM RHQ_ROLE r WHERE r.ID > 2
+ SELECT r.ID, 17 FROM RHQ_ROLE r
</statement>
</schema-directSQL>
</schemaSpec>
commit d6e5c37085923abd60816db1ce6297ed3c876a2f
Author: John Sanda <jsanda(a)redhat.com>
Date: Fri Feb 24 11:05:47 2012 -0500
Updating GWT/SmartGWT versions in smartgwt archetype
diff --git a/etc/m2/smartgwt-war-archetype/src/main/resources/archetype-resources/pom.xml b/etc/m2/smartgwt-war-archetype/src/main/resources/archetype-resources/pom.xml
index ea76777..845fd26 100644
--- a/etc/m2/smartgwt-war-archetype/src/main/resources/archetype-resources/pom.xml
+++ b/etc/m2/smartgwt-war-archetype/src/main/resources/archetype-resources/pom.xml
@@ -17,8 +17,8 @@
<!-- Explictly specify a default encoding to avoid relying on the OS locale. -->
<project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
- <gwt.version>2.0.4</gwt.version>
- <smartgwt.version>2.4</smartgwt.version>
+ <gwt.version>2.4.0</gwt.version>
+ <smartgwt.version>3.0</smartgwt.version>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
commit 53715248896279279af299e56cdf6d7918a7dcb9
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Thu Feb 23 17:45:50 2012 -0500
[BZ 786159] add test that verifies dbsetup and dbupgrade work as expected when adding the new VIEW_USERS permission to the model (https://bugzilla.redhat.com/show_bug.cgi?id=786159)
diff --git a/modules/enterprise/server/jar/pom.xml b/modules/enterprise/server/jar/pom.xml
index 5649c5f..de9ceae 100644
--- a/modules/enterprise/server/jar/pom.xml
+++ b/modules/enterprise/server/jar/pom.xml
@@ -543,6 +543,13 @@
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.liquibase</groupId>
+ <artifactId>liquibase-core</artifactId>
+ <version>2.0.3</version>
+ <scope>test</scope>
+ </dependency>
+
</dependencies>
<build>
@@ -663,23 +670,59 @@ Build-OS-Version=${os.version}
<artifactId>maven-surefire-plugin</artifactId>
<!-- Everything but the web service tests, this is the standard test execution -->
<configuration>
- <excludes>
- <exclude>com/**/*.java</exclude>
- <exclude>org/rhq/**/performance/**/*.java</exclude>
- </excludes>
+ <skipTests>true</skipTests>
<excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
<groups>${rhq.testng.includedGroups}</groups>
+ <properties>
+ <property>
+ <name>listener</name>
+ <value>org.rhq.test.testng.StdoutReporter</value>
+ </property>
+ </properties>
<systemPropertyVariables>
<embeddedDeployment>true</embeddedDeployment>
<deploymentDirectory>target/classes</deploymentDirectory>
<hibernate.dialect>${rhq.test.ds.hibernate-dialect}</hibernate.dialect>
<clean.db>${clean.db}</clean.db>
+ <log4j.configDebug>false</log4j.configDebug>
</systemPropertyVariables>
<additionalClasspathElements>
<!-- The below is required for tests to run against Oracle. -->
<additionalClasspathElement>${settings.localRepository}/com/oracle/ojdbc6/${ojdbc6.version}/ojdbc6-${ojdbc6.version}.jar</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
+
+ <executions>
+
+ <execution>
+ <id>allExceptDbTests</id>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skipTests>${skipTests}</skipTests>
+ <excludes>
+ <exclude>com/**/*.java</exclude>
+ <exclude>org/rhq/**/performance/**/*.java</exclude>
+ <exclude>org/rhq/enterprise/server/db/**</exclude>
+ </excludes>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>dbTestsOnly</id>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skipTests>${skipTests}</skipTests>
+ <includes>
+ <include>org/rhq/enterprise/server/db/**</include>
+ </includes>
+ <failIfNoTests>false</failIfNoTests>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
<plugin>
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/db/DbSetupTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/db/DbSetupTest.java
new file mode 100644
index 0000000..c21bb72
--- /dev/null
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/db/DbSetupTest.java
@@ -0,0 +1,70 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.server.db;
+
+import java.util.Set;
+
+import org.rhq.core.domain.auth.Subject;
+import org.rhq.core.domain.authz.Permission;
+import org.rhq.core.domain.authz.Role;
+import org.rhq.enterprise.server.auth.SubjectManagerLocal;
+import org.rhq.enterprise.server.authz.RoleManagerLocal;
+import org.rhq.enterprise.server.test.AbstractEJB3Test;
+import org.rhq.enterprise.server.util.DbSetupUtility;
+import org.rhq.enterprise.server.util.LookupUtil;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+/**
+ * Test that dbsetup initializes the data in the RHQ schema as intended (e.g. test that the Superuser and All Resources
+ * are created and have the correct permissions and users assigned to them.
+ *
+ * @author Ian Springer
+ */
+@Test(groups = "db", singleThreaded = true)
+public class DbSetupTest extends AbstractEJB3Test {
+
+ @BeforeClass(groups = "db")
+ public void setUp() throws Exception {
+ // Recreate a fresh JON DB with the latest schema.
+ DbSetupUtility.dbreset();
+ DbSetupUtility.dbsetup();
+ }
+
+ public void testRoles() throws Exception {
+ SubjectManagerLocal subjectManager = LookupUtil.getSubjectManager();
+ RoleManagerLocal roleManager = LookupUtil.getRoleManager();
+ Subject overlord = subjectManager.getOverlord();
+
+ Role superuserRole = roleManager.getRole(overlord, 1);
+ Set<Permission> superuserRoleOriginalPermissions = superuserRole.getPermissions();
+ assertTrue("[Superuser] role does not have all global permissions.",
+ superuserRoleOriginalPermissions.containsAll(Permission.GLOBAL_ALL));
+ assertTrue("[Superuser] role does not have all Resource permissions.",
+ superuserRoleOriginalPermissions.containsAll(Permission.RESOURCE_ALL));
+
+ Role allResourcesRole = roleManager.getRole(overlord, 2);
+ Set<Permission> allResourcesRoleOriginalPermissions = allResourcesRole.getPermissions();
+ assertTrue("[All Resources] role does not have MANAGE_INVENTORY permission.",
+ allResourcesRoleOriginalPermissions.contains(Permission.MANAGE_INVENTORY));
+ assertTrue("[All Resources] role does not have all Resource permissions.",
+ allResourcesRoleOriginalPermissions.containsAll(Permission.RESOURCE_ALL));
+ }
+
+}
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/db/DbUpgradeTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/db/DbUpgradeTest.java
new file mode 100644
index 0000000..8883419
--- /dev/null
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/db/DbUpgradeTest.java
@@ -0,0 +1,98 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.server.db;
+
+import java.util.Set;
+import java.util.UUID;
+
+import org.rhq.core.domain.auth.Subject;
+import org.rhq.core.domain.authz.Permission;
+import org.rhq.core.domain.authz.Role;
+import org.rhq.enterprise.server.auth.SubjectManagerLocal;
+import org.rhq.enterprise.server.authz.RoleManagerLocal;
+import org.rhq.enterprise.server.test.AbstractEJB3Test;
+import org.rhq.enterprise.server.util.DbSetupUtility;
+import org.rhq.enterprise.server.util.LookupUtil;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+/**
+ * Test that various dbupgrade schema versions update the data model as intended.
+ *
+ * @author Ian Springer
+ */
+@Test(groups = "db", singleThreaded = true)
+public class DbUpgradeTest extends AbstractEJB3Test {
+
+ @BeforeClass(groups = "db")
+ public void setUp() throws Exception {
+ // Recreate a fresh JON DB with the JON 2.3.1 schema, then upgrade it to the JON 3.0.0 schema.
+ DbSetupUtility.dbreset();
+ DbSetupUtility.dbsetup("2.3.1");
+ DbSetupUtility.dbupgrade(DbSetupUtility.JON300_SCHEMA_VERSION);
+ }
+
+ @AfterClass(groups = "db")
+ public void tearDown() throws Exception {
+ // Upgrade to the latest schema version so the DB is left in a state usable by other tests.
+ DbSetupUtility.dbupgrade("LATEST");
+ }
+
+ public void testUpgradeToV2_119() throws Exception {
+ SubjectManagerLocal subjectManager = LookupUtil.getSubjectManager();
+ RoleManagerLocal roleManager = LookupUtil.getRoleManager();
+ Subject overlord = subjectManager.getOverlord();
+
+ Role customRole = new Role("role" + UUID.randomUUID());
+ customRole.addPermission(Permission.MANAGE_REPOSITORIES);
+ customRole.addPermission(Permission.MANAGE_MEASUREMENTS);
+ customRole = roleManager.createRole(overlord, customRole);
+ Set<Permission> customRoleOriginalPermissions = customRole.getPermissions();
+ assertFalse(customRoleOriginalPermissions.contains(Permission.VIEW_USERS));
+
+ Role superuserRole = roleManager.getRole(overlord, 1);
+ Set<Permission> superuserRoleOriginalPermissions = superuserRole.getPermissions();
+ assertFalse(superuserRoleOriginalPermissions.contains(Permission.VIEW_USERS));
+
+ Role allResourcesRole = roleManager.getRole(overlord, 2);
+ Set<Permission> allResourcesRoleOriginalPermissions = allResourcesRole.getPermissions();
+ assertFalse(allResourcesRoleOriginalPermissions.contains(Permission.VIEW_USERS));
+
+ // Now upgrade the DB schema to v2.119, which introduces the VIEW_USERS global permission and adds it to any
+ // existing roles.
+ DbSetupUtility.dbupgrade("2.119");
+
+ customRole = roleManager.getRole(overlord, customRole.getId());
+ Set<Permission> customRoleNewPermissions = customRole.getPermissions();
+ customRoleOriginalPermissions.add(Permission.VIEW_USERS);
+ assertEquals(customRoleOriginalPermissions, customRoleNewPermissions);
+
+ superuserRole = roleManager.getRole(overlord, 1);
+ Set<Permission> superuserRoleNewPermissions = superuserRole.getPermissions();
+ superuserRoleOriginalPermissions.add(Permission.VIEW_USERS);
+ assertEquals(superuserRoleOriginalPermissions, superuserRoleNewPermissions);
+
+ allResourcesRole = roleManager.getRole(overlord, 2);
+ Set<Permission> allResourcesRoleNewPermissions = allResourcesRole.getPermissions();
+ allResourcesRoleOriginalPermissions.add(Permission.VIEW_USERS);
+ assertEquals(allResourcesRoleOriginalPermissions, allResourcesRoleNewPermissions);
+ }
+
+}
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java
index 566bc21..9cd20fc 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java
@@ -103,7 +103,7 @@ public abstract class AbstractEJB3Test extends AssertJUnit {
// Setting content location to the tmp dir
System.setProperty(ContentSourceManagerBean.FILESYSTEM_PROPERTY, System.getProperty("java.io.tmpdir"));
- System.out.println("Starting ejb3...");
+ System.out.println("Starting JBoss EJB3 Embedded Container...");
String deployDir = System.getProperty("deploymentDirectory", "target/classes");
System.out.println("Loading EJB3 deployments from directory: " + deployDir);
try {
@@ -166,9 +166,11 @@ public abstract class AbstractEJB3Test extends AssertJUnit {
//@Configuration(groups = "integration.ejb3", afterSuite = true)
@AfterSuite(alwaysRun = true)
public static void shutdownEmbeddedJboss() {
+ System.out.println("Stopping JBoss EJB3 Embedded Container...");
+
System.err.println("!!! Any errors occurring after this point !!!");
System.err.println("!!! occurred during embedded server shutdown !!!");
- System.err.println("!!! and is probably not a real problem. !!!");
+ System.err.println("!!! and are probably not a real problem. !!!");
if (deployer != null) {
try {
deployer.stop();
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/DbSetupUtility.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/DbSetupUtility.java
new file mode 100644
index 0000000..753b8f5
--- /dev/null
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/DbSetupUtility.java
@@ -0,0 +1,209 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.server.util;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.PrintWriter;
+import java.net.URL;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+import java.util.Map;
+import java.util.Properties;
+
+import liquibase.Liquibase;
+import liquibase.database.Database;
+import liquibase.database.DatabaseFactory;
+import liquibase.exception.LiquibaseException;
+import liquibase.integration.commandline.CommandLineUtils;
+import liquibase.resource.ClassLoaderResourceAccessor;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.helper.ProjectHelper2;
+import org.rhq.core.db.setup.DBSetup;
+import org.rhq.enterprise.server.test.AbstractEJB3Test;
+
+/**
+ * Provides utility methods for doing dbresets, dbsetups, and dbupgrades.
+ *
+ * @author Ian Springer
+ */
+public class DbSetupUtility {
+
+ public static final String JON300_SCHEMA_VERSION = "2.116";
+
+ private static final String DB_NAME = System.getProperty("rhq.test.ds.db-name", "rhq");
+ private static final String DB_SERVER_NAME = System.getProperty("rhq.test.ds.server-name", "127.0.0.1");
+ private static final String DB_CONNECTION_URL = System.getProperty("rhq.test.ds.connection-url",
+ "jdbc:postgresql://" + DB_SERVER_NAME + ":5432/" + DB_NAME);
+ private static final String DB_USER_NAME = System.getProperty("rhq.test.ds.user-name", "rhqadmin");
+ private static final String DB_PASSWORD = System.getProperty("rhq.test.ds.password", "rhqadmin");
+
+ private static final String BASE_RESOURCE_PATH = DbSetupUtility.class.getPackage().getName().replace('.', '/');
+
+ public static void dbreset() throws Exception {
+ System.out.println("Resetting DB at " + DB_CONNECTION_URL + "...");
+
+ // NOTE: We do not use DBReset.performDBReset() here, since DBReset deletes the schema, which requires there to
+ // be no active connections to the DB. Liquibase.dropAll(), on the other hand, just deletes all the
+ // objects in the DB, which has no such requirement.
+ String dbDriver = DatabaseFactory.getInstance().findDefaultDriver(DB_CONNECTION_URL);
+ Database database = CommandLineUtils.createDatabaseObject(DbSetupUtility.class.getClassLoader(),
+ DB_CONNECTION_URL, DB_USER_NAME, DB_PASSWORD, dbDriver, null, null, null);
+ //Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(
+ // new JdbcConnection(AbstractEJB3Test.getConnection()));
+ Liquibase liquibase = new Liquibase(null, new ClassLoaderResourceAccessor(), database);
+ liquibase.dropAll();
+ dropRhqCalltimeDataKeyTable(database);
+ }
+
+ public static void dbsetup() throws Exception {
+ dbsetup(null);
+ }
+
+ public static void dbsetup(String jonVersion) throws Exception {
+ String schemaFileResourcePath;
+ String dataFileResourcePath;
+ if (jonVersion != null) {
+ System.out.println("Installing new RHQ DB with schema from JON version [" + jonVersion + "]...");
+ schemaFileResourcePath =
+ BASE_RESOURCE_PATH + "/" + "db-schema-combined-" + jonVersion + ".xml";
+ dataFileResourcePath =
+ BASE_RESOURCE_PATH + "/" + "db-data-combined-" + jonVersion + ".xml";
+ } else {
+ System.out.println("Installing new RHQ DB with latest schema version...");
+ schemaFileResourcePath = "db-schema-combined.xml";
+ dataFileResourcePath = "db-data-combined.xml";
+ }
+
+ DBSetup dbsetup = new DBSetup(DB_CONNECTION_URL, DB_USER_NAME, DB_PASSWORD);
+ dbsetup.setup(schemaFileResourcePath);
+ dbsetup.setup(dataFileResourcePath);
+ }
+
+ public static void dbupgrade(String targetSchemaVersion) throws Exception {
+ System.out.println("Upgrading RHQ DB to schema version [" + targetSchemaVersion + "]...");
+ File logfile = File.createTempFile("rhq.test", "dbupgrade.log");
+
+ try {
+ // get the URL for the dbupgrade Ant script, which is located in the dbutils jar
+ URL dbupgradeXmlFileUrl = DbSetupUtility.class.getClassLoader().getResource("db-upgrade.xml");
+
+ Properties antProps = new Properties();
+ antProps.setProperty("jdbc.url", DB_CONNECTION_URL);
+ antProps.setProperty("jdbc.user", DB_USER_NAME);
+ antProps.setProperty("jdbc.password", DB_PASSWORD);
+ antProps.setProperty("target.schema.version", targetSchemaVersion);
+
+ startAnt(dbupgradeXmlFileUrl, "db-ant-tasks.properties", antProps, logfile);
+ } catch (Exception e) {
+ throw new RuntimeException("Cannot upgrade the RHQ DB at URL " + DB_CONNECTION_URL + " to schema version "
+ + targetSchemaVersion + ".", e);
+ }
+
+ return;
+ }
+
+ private static void dropRhqCalltimeDataKeyTable(Database database) throws LiquibaseException {
+ // For some reason Liquibase always fails to drop the rhq_calltime_data_key table, logging the following:
+ //
+ // WARNING 2/22/12 4:56 PM:liquibase: Foreign key rhq_calltime_data_value_key_id_fkey references table
+ // rhq_calltime_data_key, which is in a different schema. Retaining FK in
+ // diff, but table will not be diffed.
+ //
+ // The workaround is to manually drop the table via JDBC once Liquibase has cleared out everything else.
+
+ System.out.println("Dropping rhq_calltime_data_key table...");
+ // NOTE: The below attempt to delete the table individually via Liquibase doesn't even work...
+ /*SqlVisitor sqlVisitor = new AbstractSqlVisitor() {
+ public String modifySql(String sql, Database database) {
+ log.info("Liquibase executing SQL [" + sql + "]...");
+ return sql;
+ }
+
+ public String getName() {
+ return null;
+ }
+ };
+
+ database.execute(new SqlStatement[]{new DropTableStatement(null, "rhq_calltime_data_key", false)},
+ Arrays.asList(sqlVisitor));*/
+
+ try {
+ PreparedStatement statement = AbstractEJB3Test.getConnection().prepareStatement("DROP TABLE rhq_calltime_data_key");
+ statement.execute();
+ } catch (SQLException e) {
+ // ignore
+ }
+ }
+
+ /**
+ * Launches Ant and runs the default target in the given build file.
+ *
+ * @param buildFile the build file that Ant will run
+ * @param customTaskDefs the properties file found in classloader that contains all the taskdef definitions
+ * @param properties set of properties to set for the ANT task to access
+ * @param logFile where Ant messages will be logged (in addition to the app server's log file)
+ * @throws RuntimeException
+ */
+ private static void startAnt(URL buildFile, String customTaskDefs, Properties properties, File logFile) {
+ PrintWriter logFileOutput = null;
+
+ try {
+ logFileOutput = new PrintWriter(new FileOutputStream(logFile));
+
+ ClassLoader classLoader = DbSetupUtility.class.getClassLoader();
+
+ Properties taskDefs = new Properties();
+ InputStream taskDefsStream = classLoader.getResourceAsStream(customTaskDefs);
+ try {
+ taskDefs.load(taskDefsStream);
+ } finally {
+ taskDefsStream.close();
+ }
+
+ Project project = new Project();
+ project.setCoreLoader(classLoader);
+ project.init();
+
+ for (Map.Entry<Object, Object> property : properties.entrySet()) {
+ project.setProperty(property.getKey().toString(), property.getValue().toString());
+ }
+
+ // notice we add our listener after we set the properties - we do not want the password to be in the log file
+ // our dbupgrade script will echo the property settings, so we can still get the other values
+ project.addBuildListener(new LoggerAntBuildListener(logFileOutput));
+
+ for (Map.Entry<Object, Object> taskDef : taskDefs.entrySet()) {
+ project.addTaskDefinition(taskDef.getKey().toString(), Class.forName(taskDef.getValue().toString(),
+ true, classLoader));
+ }
+
+ new ProjectHelper2().parse(project, buildFile);
+ project.executeTarget(project.getDefaultTarget());
+ } catch (Exception e) {
+ throw new RuntimeException("Cannot run Ant on script [" + buildFile + "] - cause: " + e, e);
+ } finally {
+ if (logFileOutput != null) {
+ logFileOutput.close();
+ }
+ }
+ }
+
+}
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/LoggerAntBuildListener.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/LoggerAntBuildListener.java
new file mode 100644
index 0000000..4afe7d4
--- /dev/null
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/util/LoggerAntBuildListener.java
@@ -0,0 +1,105 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.server.util;
+
+import java.io.PrintWriter;
+import java.util.Date;
+
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.BuildListener;
+import org.apache.tools.ant.Target;
+import org.apache.tools.ant.Task;
+
+/**
+ * Listens for Ant build events and logs them to a log stream.
+ *
+ * @author John Mazzitelli
+ */
+public class LoggerAntBuildListener implements BuildListener {
+
+ private PrintWriter output;
+
+ public LoggerAntBuildListener(PrintWriter logFile) {
+ output = logFile;
+
+ // just output our first line with the date this was started
+ output.println(new Date().toString());
+ }
+
+ public void buildFinished(BuildEvent event) {
+ logEvent(event, "FINISHED!");
+ }
+
+ public void buildStarted(BuildEvent event) {
+ logEvent(event, "STARTED!");
+ }
+
+ public void messageLogged(BuildEvent event) {
+ logEvent(event, null);
+ }
+
+ public void targetFinished(BuildEvent event) {
+ logEvent(event, null);
+ }
+
+ public void targetStarted(BuildEvent event) {
+ logEvent(event, null);
+ }
+
+ public void taskFinished(BuildEvent event) {
+ logEvent(event, null);
+ }
+
+ public void taskStarted(BuildEvent event) {
+ logEvent(event, null);
+ }
+
+ private void logEvent(BuildEvent event, String additionalMessage) {
+ String message = event.getMessage();
+ Throwable exception = event.getException();
+ Target target = event.getTarget();
+ Task task = event.getTask();
+
+ if (additionalMessage != null) {
+ output.println(additionalMessage);
+ }
+
+ if (target != null) {
+ output.print("[" + target.getName() + "] ");
+ }
+
+ if (task != null) {
+ output.print("[" + task.getTaskName() + "] ");
+ }
+
+ if (message != null) {
+ output.print(message);
+ }
+
+ if (exception != null) {
+ output.println();
+ exception.printStackTrace(output);
+ }
+
+ output.println();
+
+ return;
+ }
+
+}
diff --git a/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/util/db-data-combined-2.3.1.xml b/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/util/db-data-combined-2.3.1.xml
new file mode 100644
index 0000000..f399ba4
--- /dev/null
+++ b/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/util/db-data-combined-2.3.1.xml
@@ -0,0 +1,663 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<dbsetup name="data.xml">
+<!-- BEGIN: rhq-data.xml -->
+<!-- BEGIN: auth-data.xml -->
+
+
+ <table name="RHQ_PRINCIPAL">
+ <data id="2" PRINCIPAL="rhqadmin" PASSWORD="x1XwrxKuPvYUILiOnOZTLg=="/>
+ </table>
+
+<!-- END: auth-data.xml -->
+<!-- BEGIN: authz-data.xml -->
+
+
+ <!-- the overlord user -->
+ <table name="RHQ_SUBJECT">
+ <data ID="1"
+ NAME="admin"
+ FIRST_NAME="Super"
+ LAST_NAME="User"
+ FSYSTEM="TRUE"/>
+ </table>
+
+ <!-- the initial rhqadmin user -->
+ <table name="RHQ_SUBJECT">
+ <data ID="2"
+ NAME="rhqadmin"
+ FIRST_NAME="RHQ"
+ LAST_NAME="Administrator"
+ EMAIL_ADDRESS="rhqadmin@localhost"
+ FSYSTEM="FALSE"/>
+ </table>
+
+ <!-- Define the system root role which includes our overlord and rhqadmin users -->
+ <table name="RHQ_ROLE">
+ <data ID="1"
+ NAME="Super User Role"
+ FSYSTEM="TRUE"
+ DESCRIPTION="System superuser role that provides full access to everything. This role cannot be modified."/>
+ <data ID="2"
+ NAME="All Resources Role"
+ FSYSTEM="FALSE"
+ DESCRIPTION="Provides full access to all resources in inventory. Cannot modify users, roles or server settings."/>
+ </table>
+
+ <!-- associate the root users with all security permissions -->
+ <table name="RHQ_SUBJECT_ROLE_MAP">
+ <data SUBJECT_ID="1" ROLE_ID="1"/>
+ <!-- overlord user -->
+ <data SUBJECT_ID="2" ROLE_ID="1"/>
+ <!-- rhqadmin user -->
+ </table>
+
+ <table name="RHQ_PERMISSION">
+ <!-- give super-user-role all permissions (resource perms is mainly just to show on view-role page) -->
+ <data ROLE_ID="1" OPERATION="0"/>
+ <!-- Permission.MANAGE_SECURITY -->
+ <data ROLE_ID="1" OPERATION="1"/>
+ <!-- Permission.MANAGE_INVENTORY -->
+ <data ROLE_ID="1" OPERATION="2"/>
+ <!-- Permission.MANAGE_SETTINGS -->
+ <!-- resource permissions start here-->
+ <data ROLE_ID="1" OPERATION="3"/>
+ <!-- Permission.VIEW_RESOURCE -->
+ <data ROLE_ID="1" OPERATION="4"/>
+ <!-- Permission.MODIFY_RESOURCE -->
+ <data ROLE_ID="1" OPERATION="5"/>
+ <!-- Permission.DELETE_RESOURCE -->
+ <data ROLE_ID="1" OPERATION="6"/>
+ <!-- Permission.CREATE_CHILD_RESOURCES -->
+ <data ROLE_ID="1" OPERATION="7"/>
+ <!-- Permission.MANAGE_ALERTS -->
+ <data ROLE_ID="1" OPERATION="8"/>
+ <!-- Permission.MANAGE_MEASUREMENTS -->
+ <data ROLE_ID="1" OPERATION="9"/>
+ <!-- Permission.MANAGE_CONTENT -->
+ <data ROLE_ID="1" OPERATION="10"/>
+ <!-- Permission.CONTROL -->
+ <data ROLE_ID="1" OPERATION="11"/>
+ <!-- Permission.CONFIGURE -->
+
+ <!-- give all-resources-role all permissions (resource perms is mainly just to show on view-role page) -->
+ <data ROLE_ID="2" OPERATION="1"/>
+ <!-- Permission.MANAGE_INVENTORY -->
+ <!-- resource permissions start here-->
+ <data ROLE_ID="2" OPERATION="3"/>
+ <!-- Permission.VIEW_RESOURCE -->
+ <data ROLE_ID="2" OPERATION="4"/>
+ <!-- Permission.MODIFY_RESOURCE -->
+ <data ROLE_ID="2" OPERATION="5"/>
+ <!-- Permission.DELETE_RESOURCE -->
+ <data ROLE_ID="2" OPERATION="6"/>
+ <!-- Permission.CREATE_CHILD_RESOURCES -->
+ <data ROLE_ID="2" OPERATION="7"/>
+ <!-- Permission.MANAGE_ALERTS -->
+ <data ROLE_ID="2" OPERATION="8"/>
+ <!-- Permission.MANAGE_MEASUREMENTS -->
+ <data ROLE_ID="2" OPERATION="9"/>
+ <!-- Permission.MANAGE_CONTENT -->
+ <data ROLE_ID="2" OPERATION="10"/>
+ <!-- Permission.CONTROL -->
+ <data ROLE_ID="2" OPERATION="11"/>
+ <!-- Permission.CONFIGURE -->
+ </table>
+
+<!-- END: authz-data.xml -->
+<!-- BEGIN: sysconfig-data.xml -->
+
+
+ <!--
+ This file contains the seed data for the configuration table.
+ All keys mentioned here should be referenced via the RHQConstants class
+ -->
+ <table name="RHQ_SYSTEM_CONFIG">
+ <data ID="1" PROPERTY_KEY="SERVER_VERSION" PROPERTY_VALUE="1.3.1.GA"
+ DEFAULT_PROPERTY_VALUE="1.3.1.GA" FREAD_ONLY="TRUE"/>
+ <data ID="2" PROPERTY_KEY="DB_SCHEMA_VERSION" PROPERTY_VALUE="2.59"
+ DEFAULT_PROPERTY_VALUE="2.59" FREAD_ONLY="TRUE"/>
+ <data ID="3" PROPERTY_KEY="CAM_JAAS_PROVIDER" PROPERTY_VALUE="JDBC"
+ DEFAULT_PROPERTY_VALUE="JDBC" FREAD_ONLY="FALSE"/>
+ <data ID="4" PROPERTY_KEY="CAM_BASE_URL" PROPERTY_VALUE="http://169.254.222.60:7080/"
+ DEFAULT_PROPERTY_VALUE="http://169.254.222.60:7080/" FREAD_ONLY="FALSE"/>
+ <data ID="9" PROPERTY_KEY="CAM_HELP_USER" PROPERTY_VALUE="web"
+ DEFAULT_PROPERTY_VALUE="web" FREAD_ONLY="FALSE"/>
+ <data ID="10" PROPERTY_KEY="CAM_HELP_PASSWORD" PROPERTY_VALUE="user"
+ DEFAULT_PROPERTY_VALUE="user" FREAD_ONLY="FALSE"/>
+
+ <!-- default LDAP configuration options -->
+ <data ID="11" PROPERTY_KEY="CAM_LDAP_NAMING_FACTORY_INITIAL"
+ PROPERTY_VALUE="com.sun.jndi.ldap.LdapCtxFactory"
+ DEFAULT_PROPERTY_VALUE="com.sun.jndi.ldap.LdapCtxFactory"
+ FREAD_ONLY="FALSE"/>
+ <data ID="12" PROPERTY_KEY="CAM_LDAP_NAMING_PROVIDER_URL"
+ PROPERTY_VALUE="ldap://localhost/"
+ DEFAULT_PROPERTY_VALUE="ldap://localhost/"
+ FREAD_ONLY="FALSE"/>
+ <data ID="13" PROPERTY_KEY="CAM_LDAP_LOGIN_PROPERTY"
+ PROPERTY_VALUE="cn"
+ DEFAULT_PROPERTY_VALUE="cn" FREAD_ONLY="FALSE"/>
+ <data ID="14" PROPERTY_KEY="CAM_LDAP_BASE_DN"
+ PROPERTY_VALUE="o=JBoss,c=US"
+ DEFAULT_PROPERTY_VALUE="o=JBoss,c=US"
+ FREAD_ONLY="FALSE"/>
+ <data ID="15" PROPERTY_KEY="CAM_LDAP_BIND_DN"
+ PROPERTY_VALUE=""
+ DEFAULT_PROPERTY_VALUE="" FREAD_ONLY="FALSE"/>
+ <data ID="16" PROPERTY_KEY="CAM_LDAP_BIND_PW"
+ PROPERTY_VALUE=""
+ DEFAULT_PROPERTY_VALUE="" FREAD_ONLY="FALSE"/>
+ <data ID="17" PROPERTY_KEY="CAM_LDAP_PROTOCOL"
+ PROPERTY_VALUE="" DEFAULT_PROPERTY_VALUE=""
+ FREAD_ONLY="FALSE"/>
+ <data ID="18" PROPERTY_KEY="CAM_LDAP_FILTER"
+ PROPERTY_VALUE="" DEFAULT_PROPERTY_VALUE=""
+ FREAD_ONLY="FALSE"/>
+
+ <!-- Does this build support Syslog actions? -->
+ <data ID="21" PROPERTY_KEY="CAM_SYSLOG_ACTIONS_ENABLED"
+ PROPERTY_VALUE="false" DEFAULT_PROPERTY_VALUE="false"
+ FREAD_ONLY="FALSE"/>
+ <data ID="23" PROPERTY_KEY="CAM_GUIDE_ENABLED"
+ PROPERTY_VALUE="true"
+ DEFAULT_PROPERTY_VALUE="true" FREAD_ONLY="FALSE"/>
+ <data ID="24" PROPERTY_KEY="CAM_RT_COLLECT_IP_ADDRS"
+ PROPERTY_VALUE="true"
+ DEFAULT_PROPERTY_VALUE="true" FREAD_ONLY="FALSE"/>
+
+ <!-- Default data storage options -->
+ <!-- Default 14 days -->
+ <data ID="26" PROPERTY_KEY="CAM_DATA_PURGE_1H"
+ PROPERTY_VALUE="1209600000" DEFAULT_PROPERTY_VALUE="1209600000"
+ FREAD_ONLY="FALSE"/>
+ <!-- Default 31 days -->
+ <data ID="27" PROPERTY_KEY="CAM_DATA_PURGE_6H"
+ PROPERTY_VALUE="2678400000" DEFAULT_PROPERTY_VALUE="2678400000"
+ FREAD_ONLY="FALSE"/>
+ <!-- Default 1 year -->
+ <data ID="28" PROPERTY_KEY="CAM_DATA_PURGE_1D"
+ PROPERTY_VALUE="31536000000" DEFAULT_PROPERTY_VALUE="31536000000"
+ FREAD_ONLY="FALSE"/>
+
+ <!-- Baseline options -->
+ <!-- How often to calculate, default 3 days; if 0, never calculate them automatically -->
+ <data ID="29" PROPERTY_KEY="CAM_BASELINE_FREQUENCY"
+ PROPERTY_VALUE="259200000" DEFAULT_PROPERTY_VALUE="259200000"
+ FREAD_ONLY="FALSE"/>
+ <!-- How much data to include in the calulation, default 7 days -->
+ <data ID="30" PROPERTY_KEY="CAM_BASELINE_DATASET"
+ PROPERTY_VALUE="604800000" DEFAULT_PROPERTY_VALUE="604800000"
+ FREAD_ONLY="FALSE"/>
+
+ <!-- ID 31 has been deleted -->
+
+ <!-- How often to run database maintainence routines -->
+ <data ID="32" PROPERTY_KEY="CAM_DATA_MAINTENANCE"
+ PROPERTY_VALUE="3600000" DEFAULT_PROPERTY_VALUE="3600000" FREAD_ONLY="FALSE"/>
+
+ <!-- How long to keep RT data around -->
+ <data ID="34" PROPERTY_KEY="RT_DATA_PURGE" PROPERTY_VALUE="2678400000"
+ DEFAULT_PROPERTY_VALUE="2678400000" FREAD_ONLY="FALSE"/>
+
+ <!-- Whether to reindex the data tables nightly -->
+ <data ID="35" PROPERTY_KEY="DATA_REINDEX_NIGHTLY" PROPERTY_VALUE="true"
+ DEFAULT_PROPERTY_VALUE="true" FREAD_ONLY="FALSE"/>
+
+ <!-- How long to keep alerts around -->
+ <data ID="36" PROPERTY_KEY="ALERT_PURGE" PROPERTY_VALUE="2678400000"
+ DEFAULT_PROPERTY_VALUE="2678400000" FREAD_ONLY="FALSE"/>
+
+ <!-- Determines if SNMP actions will be used -->
+ <data ID="37" PROPERTY_KEY="SNMP_VERSION" PROPERTY_VALUE="" DEFAULT_PROPERTY_VALUE="" FREAD_ONLY="FALSE"/>
+ <data ID="38" PROPERTY_KEY="SNMP_AUTH_PROTOCOL" PROPERTY_VALUE="MD5" DEFAULT_PROPERTY_VALUE=""
+ FREAD_ONLY="FALSE"/>
+ <data ID="39" PROPERTY_KEY="SNMP_AUTH_PASSPHRASE" PROPERTY_VALUE="" DEFAULT_PROPERTY_VALUE=""
+ FREAD_ONLY="FALSE"/>
+ <data ID="40" PROPERTY_KEY="SNMP_PRIV_PASSPHRASE" PROPERTY_VALUE="" DEFAULT_PROPERTY_VALUE=""
+ FREAD_ONLY="FALSE"/>
+ <data ID="41" PROPERTY_KEY="SNMP_COMMUNITY" PROPERTY_VALUE="public" DEFAULT_PROPERTY_VALUE=""
+ FREAD_ONLY="FALSE"/>
+ <data ID="42" PROPERTY_KEY="SNMP_ENGINE_ID" PROPERTY_VALUE="" DEFAULT_PROPERTY_VALUE="" FREAD_ONLY="FALSE"/>
+ <data ID="43" PROPERTY_KEY="SNMP_CONTEXT_NAME" PROPERTY_VALUE="" DEFAULT_PROPERTY_VALUE="" FREAD_ONLY="FALSE"/>
+ <data ID="44" PROPERTY_KEY="SNMP_SECURITY_NAME" PROPERTY_VALUE="" DEFAULT_PROPERTY_VALUE="" FREAD_ONLY="FALSE"/>
+ <data ID="45" PROPERTY_KEY="SNMP_TRAP_OID" PROPERTY_VALUE="" DEFAULT_PROPERTY_VALUE="" FREAD_ONLY="FALSE"/>
+ <data ID="46" PROPERTY_KEY="SNMP_ENTERPRISE_OID" PROPERTY_VALUE="" DEFAULT_PROPERTY_VALUE=""
+ FREAD_ONLY="FALSE"/>
+ <data ID="47" PROPERTY_KEY="SNMP_GENERIC_ID" PROPERTY_VALUE="" DEFAULT_PROPERTY_VALUE="" FREAD_ONLY="FALSE"/>
+ <data ID="48" PROPERTY_KEY="SNMP_SPECIFIC_ID" PROPERTY_VALUE="" DEFAULT_PROPERTY_VALUE="" FREAD_ONLY="FALSE"/>
+ <data ID="49" PROPERTY_KEY="SNMP_AGENT_ADDRESS" PROPERTY_VALUE="" DEFAULT_PROPERTY_VALUE="" FREAD_ONLY="FALSE"/>
+ <data ID="50" PROPERTY_KEY="SNMP_PRIVACY_PROTOCOL" PROPERTY_VALUE="" DEFAULT_PROPERTY_VALUE=""
+ FREAD_ONLY="FALSE"/>
+
+ <!-- How long to keep events around (1209600000 millis == 14 days) -->
+ <data ID="51" PROPERTY_KEY="EVENT_PURGE" PROPERTY_VALUE="1209600000"
+ DEFAULT_PROPERTY_VALUE="1209600000" FREAD_ONLY="FALSE"/>
+
+ <!-- How long an agent is allowed to be quiet before we consider it down and backfill it -->
+ <data ID="52" PROPERTY_KEY="AGENT_MAX_QUIET_TIME_ALLOWED" PROPERTY_VALUE="900000"
+ DEFAULT_PROPERTY_VALUE="900000" FREAD_ONLY="FALSE"/>
+
+ <!-- Will our server-cloud support agents auto-updating themselves? -->
+ <data ID="53" PROPERTY_KEY="ENABLE_AGENT_AUTO_UPDATE" PROPERTY_VALUE="true"
+ DEFAULT_PROPERTY_VALUE="true" FREAD_ONLY="FALSE"/>
+
+ <!-- How old does a trait have to be in order to get purged -->
+ <data ID="54" PROPERTY_KEY="TRAIT_PURGE" PROPERTY_VALUE="31536000000"
+ DEFAULT_PROPERTY_VALUE="31536000000" FREAD_ONLY="FALSE"/>
+
+ <!-- How old does availability have to be in order to get purged -->
+ <data ID="55" PROPERTY_KEY="AVAILABILITY_PURGE" PROPERTY_VALUE="31536000000"
+ DEFAULT_PROPERTY_VALUE="31536000000" FREAD_ONLY="FALSE"/>
+
+ </table>
+
+<!-- END: sysconfig-data.xml -->
+<!-- BEGIN: measurement-data.xml -->
+
+ <table name="RHQ_NUMBERS">
+ <data i="0"/>
+ <data i="1"/>
+ <data i="2"/>
+ <data i="3"/>
+ <data i="4"/>
+ <data i="5"/>
+ <data i="6"/>
+ <data i="7"/>
+ <data i="8"/>
+ <data i="9"/>
+ <data i="10"/>
+ <data i="11"/>
+ <data i="12"/>
+ <data i="13"/>
+ <data i="14"/>
+ <data i="15"/>
+ <data i="16"/>
+ <data i="17"/>
+ <data i="18"/>
+ <data i="19"/>
+ <data i="20"/>
+ <data i="21"/>
+ <data i="22"/>
+ <data i="23"/>
+ <data i="24"/>
+ <data i="25"/>
+ <data i="26"/>
+ <data i="27"/>
+ <data i="28"/>
+ <data i="29"/>
+ <data i="30"/>
+ <data i="31"/>
+ <data i="32"/>
+ <data i="33"/>
+ <data i="34"/>
+ <data i="35"/>
+ <data i="36"/>
+ <data i="37"/>
+ <data i="38"/>
+ <data i="39"/>
+ <data i="40"/>
+ <data i="41"/>
+ <data i="42"/>
+ <data i="43"/>
+ <data i="44"/>
+ <data i="45"/>
+ <data i="46"/>
+ <data i="47"/>
+ <data i="48"/>
+ <data i="49"/>
+ <data i="50"/>
+ <data i="51"/>
+ <data i="52"/>
+ <data i="53"/>
+ <data i="54"/>
+ <data i="55"/>
+ <data i="56"/>
+ <data i="57"/>
+ <data i="58"/>
+ <data i="59"/>
+ </table>
+
+<!-- END: measurement-data.xml -->
+<!-- BEGIN: content-data.xml -->
+
+ <table name="RHQ_ARCHITECTURE">
+ <data id="1" name="noarch"/>
+ <data id="2" name="i386"/>
+ <data id="3" name="i486"/>
+ <data id="4" name="i586"/>
+ <data id="5" name="i686"/>
+ <data id="6" name="alpha"/>
+ <data id="7" name="alphaev6"/>
+ <data id="8" name="ia64"/>
+ <data id="9" name="sparc"/>
+ <data id="10" name="sparcv9"/>
+ <data id="11" name="sparc64"/>
+ <data id="12" name="src"/>
+ <data id="13" name="s390"/>
+ <data id="14" name="athlon"/>
+ <data id="15" name="s390x"/>
+ <data id="16" name="ppc"/>
+ <data id="17" name="ppc64"/>
+ <data id="18" name="pSeries"/>
+ <data id="19" name="iSeries"/>
+ <data id="20" name="x86_64"/>
+ <data id="21" name="ppc64iseries"/>
+ <data id="22" name="ppc64pseries"/>
+ <data id="23" name="sparc-solaris"/>
+ <data id="24" name="sparc.sun4u-solaris"/>
+ <data id="25" name="tar"/>
+ <data id="26" name="ia32e"/>
+ <data id="27" name="amd64"/>
+ <data id="28" name="i386-solaris"/>
+ <data id="29" name="nosrc"/>
+ <data id="30" name="sparc-solaris-patch"/>
+ <data id="31" name="i386-solaris-patch"/>
+ <data id="32" name="sparc-solaris-patch-cluster"/>
+ <data id="33" name="i386-solaris-patch-cluster"/>
+ <data id="34" name="noarch-solaris"/>
+ <data id="35" name="noarch-solaris-patch"/>
+ <data id="36" name="noarch-solaris-patch-cluster"/>
+ <data id="37" name="solaris-patch"/>
+ <data id="38" name="solaris-patch-cluster"/>
+ </table>
+<!-- END: content-data.xml -->
+<!-- BEGIN: jms-data.xml -->
+
+<!-- the schema matches that which would be automatically created by the JMS subsystem -->
+<!-- see deploy/jms/rhq-jdbc-state-service.xml and rhq-jdbc2-service.xml -->
+<!-- the data must match that which is expected in conf/login-config.xml -->
+
+
+ <table name="JMS_USERS">
+ <data USERID="guest" PASSWD="guest" />
+ </table>
+
+ <table name="JMS_ROLES">
+ <data ROLEID="guest" USERID="guest" />
+ </table>
+
+<!-- END: jms-data.xml -->
+<!-- END: rhq-data.xml -->
+<!-- BEGIN: jon-data.xml -->
+
+
+ <!-- *** metadata *** -->
+
+ <table name="RHQ_CONFIG_DEF">
+ <data ID="101"
+ NAME="JBossASPatchSource"/>
+ </table>
+
+ <table name="RHQ_CONFIG_PROP_DEF">
+ <data ID="101"
+ NAME="url"
+ DISPLAY_NAME="Feed URL"
+ DESCRIPTION="Destination URL of the feed."
+ REQUIRED="1"
+ READONLY="0"
+ SUMMARY="0"
+ ACTIVATION_POLICY="IMMEDIATE"
+ ORDER_INDEX="0"
+ SIMPLE_TYPE="STRING"
+ ALLOW_CUSTOM_ENUM_VALUE="0"
+ DTYPE="property"
+ CONFIG_DEF_ID="101"
+ UNITS="0"/>
+ <data ID="102"
+ NAME="username"
+ DISPLAY_NAME="Username"
+ DESCRIPTION="Username used to log into the feed."
+ REQUIRED="0"
+ READONLY="0"
+ SUMMARY="0"
+ ACTIVATION_POLICY="IMMEDIATE"
+ ORDER_INDEX="1"
+ SIMPLE_TYPE="STRING"
+ ALLOW_CUSTOM_ENUM_VALUE="0"
+ DTYPE="property"
+ CONFIG_DEF_ID="101"
+ UNITS="0"/>
+ <data ID="103"
+ NAME="password"
+ DISPLAY_NAME="Password"
+ DESCRIPTION="Password used to log into the feed."
+ REQUIRED="0"
+ READONLY="0"
+ SUMMARY="0"
+ ACTIVATION_POLICY="IMMEDIATE"
+ ORDER_INDEX="2"
+ SIMPLE_TYPE="PASSWORD"
+ ALLOW_CUSTOM_ENUM_VALUE="0"
+ DTYPE="property"
+ CONFIG_DEF_ID="101"
+ UNITS="0"/>
+ <data ID="104"
+ NAME="active"
+ DISPLAY_NAME="Active"
+ DESCRIPTION="Indicates if this instance should go out and check the feed for packages."
+ REQUIRED="1"
+ READONLY="0"
+ SUMMARY="0"
+ ACTIVATION_POLICY="IMMEDIATE"
+ ORDER_INDEX="3"
+ SIMPLE_TYPE="BOOLEAN"
+ ALLOW_CUSTOM_ENUM_VALUE="0"
+ DTYPE="property"
+ CONFIG_DEF_ID="101"
+ UNITS="0"/>
+ <data ID="105"
+ NAME="proxyUrl"
+ DISPLAY_NAME="Proxy URL"
+ REQUIRED="0"
+ READONLY="0"
+ SUMMARY="0"
+ ACTIVATION_POLICY="IMMEDIATE"
+ ORDER_INDEX="4"
+ SIMPLE_TYPE="STRING"
+ ALLOW_CUSTOM_ENUM_VALUE="0"
+ DTYPE="property"
+ CONFIG_DEF_ID="101"
+ UNITS="0"/>
+ <data ID="106"
+ NAME="proxyPort"
+ DISPLAY_NAME="Proxy Port"
+ REQUIRED="0"
+ READONLY="0"
+ SUMMARY="0"
+ ACTIVATION_POLICY="IMMEDIATE"
+ ORDER_INDEX="5"
+ SIMPLE_TYPE="STRING"
+ ALLOW_CUSTOM_ENUM_VALUE="0"
+ DTYPE="property"
+ CONFIG_DEF_ID="101"
+ UNITS="0"/>
+ <data ID="107"
+ NAME="proxyUsername"
+ DISPLAY_NAME="Proxy Username"
+ REQUIRED="0"
+ READONLY="0"
+ SUMMARY="0"
+ ACTIVATION_POLICY="IMMEDIATE"
+ ORDER_INDEX="6"
+ SIMPLE_TYPE="STRING"
+ ALLOW_CUSTOM_ENUM_VALUE="0"
+ DTYPE="property"
+ CONFIG_DEF_ID="101"
+ UNITS="0"/>
+ <data ID="108"
+ NAME="proxyPassword"
+ DISPLAY_NAME="Proxy Password"
+ REQUIRED="0"
+ READONLY="0"
+ SUMMARY="0"
+ ACTIVATION_POLICY="IMMEDIATE"
+ ORDER_INDEX="7"
+ SIMPLE_TYPE="STRING"
+ ALLOW_CUSTOM_ENUM_VALUE="0"
+ DTYPE="property"
+ CONFIG_DEF_ID="101"
+ UNITS="0"/>
+ </table>
+
+ <table name="RHQ_CONTENT_SOURCE_TYPE">
+ <data ID="101"
+ NAME="JBossASPatchSource"
+ DISPLAY_NAME="JBoss CSP Patch Content Source"
+ DESCRIPTION="This content source retrieves packages from the JBoss CSP RSS feed."
+ PLUGIN_NAME="JBossASPatchContentSourcePlugin"
+ DEFAULT_LAZY_LOAD="1"
+ DEFAULT_DOWNLOAD_MODE="FILESYSTEM"
+ DEFAULT_SYNC_SCHEDULE="0 0 3 * * ?"
+ API_CLASS="org.rhq.enterprise.server.plugins.jboss.software.JBossSoftwareContentSourceAdapter"
+ SOURCE_CONFIG_DEF_ID="101"/>
+ </table>
+
+
+ <!-- Default template for the AS software content source type's configuration -->
+ <table name="RHQ_CONFIG">
+ <data ID="101"
+ VERSION="0"
+ CTIME="1267099200000"
+ MTIME="1267099200000"/>
+ </table>
+
+ <table name="RHQ_CONFIG_PROPERTY">
+ <data ID="101"
+ NAME="url"
+ CONFIGURATION_ID="101"
+ STRING_VALUE=""
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="102"
+ NAME="username"
+ CONFIGURATION_ID="101"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="103"
+ NAME="password"
+ CONFIGURATION_ID="101"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="104"
+ NAME="proxyUrl"
+ CONFIGURATION_ID="101"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="105"
+ NAME="proxyPort"
+ CONFIGURATION_ID="101"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="106"
+ NAME="active"
+ CONFIGURATION_ID="101"
+ STRING_VALUE="true"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="107"
+ NAME="proxyUsername"
+ CONFIGURATION_ID="101"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="108"
+ NAME="proxyPassword"
+ CONFIGURATION_ID="101"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ </table>
+
+ <table name="RHQ_CONFIG_TEMPLATE">
+ <data ID="101"
+ NAME="default"
+ DESCRIPTION="the default template"
+ CONFIG_ID="101"
+ CONFIG_DEF_ID="101"
+ IS_DEFAULT="1"/>
+ </table>
+
+
+ <!-- *** data *** -->
+
+ <table name="RHQ_CONFIG">
+ <data ID="102"
+ VERSION="0"
+ CTIME="1267099200000"
+ MTIME="1267099200000"/>
+ </table>
+
+ <!-- Data for the content source itself -->
+ <table name="RHQ_CONFIG_PROPERTY">
+ <data ID="111"
+ NAME="url"
+ CONFIGURATION_ID="102"
+ STRING_VALUE="https://support.redhat.com/jbossnetwork/restricted/feed/software.html?pro..."
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="112"
+ NAME="username"
+ CONFIGURATION_ID="102"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="113"
+ NAME="password"
+ CONFIGURATION_ID="102"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="114"
+ NAME="proxyUrl"
+ CONFIGURATION_ID="102"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="115"
+ NAME="proxyPort"
+ CONFIGURATION_ID="102"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="116"
+ NAME="active"
+ CONFIGURATION_ID="102"
+ STRING_VALUE="false"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="117"
+ NAME="proxyUsername"
+ CONFIGURATION_ID="102"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="118"
+ NAME="proxyPassword"
+ CONFIGURATION_ID="102"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ </table>
+
+ <table name="RHQ_CONTENT_SOURCE">
+ <data ID="101"
+ NAME="JBoss Patch Content Source"
+ DESCRIPTION="All patches provided by the JBoss Subscription"
+ LAZY_LOAD="1"
+ DOWNLOAD_MODE="FILESYSTEM"
+ SYNC_SCHEDULE="0 0 3 * * ?"
+ CREATION_TIME="1267099200000"
+ LAST_MODIFIED_TIME="1267099200000"
+ CONTENT_SOURCE_TYPE_ID="101"
+ CONFIGURATION_ID="102"/>
+ </table>
+
+ <table name="RHQ_CHANNEL">
+ <data ID="101"
+ NAME="JBoss Patch Channel"
+ DESCRIPTION="JBoss Subscription Channel"
+ CREATION_TIME="1267099200000"
+ LAST_MODIFIED_TIME="1267099200000"/>
+ </table>
+
+ <table name="RHQ_CHANNEL_CONTENT_SRC_MAP">
+ <data CHANNEL_ID="101"
+ CONTENT_SRC_ID="101"
+ CTIME="1267099200000"/>
+ </table>
+
+
+<!-- END: jon-data.xml -->
+</dbsetup>
diff --git a/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/util/db-schema-combined-2.3.1.xml b/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/util/db-schema-combined-2.3.1.xml
new file mode 100644
index 0000000..3cd91ad
--- /dev/null
+++ b/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/util/db-schema-combined-2.3.1.xml
@@ -0,0 +1,1916 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<dbsetup name="schema">
+<!-- BEGIN: config-schema.xml -->
+
+
+ <!-- Definition or Metadata tables -->
+
+ <table name="RHQ_CONFIG_DEF">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="NAME" type="VARCHAR2" required="true" size="100"/>
+ <column name="DESCRIPTION" type="VARCHAR2" required="false" size="250"/>
+ <column name="VERSION" type="VARCHAR2" required="false" size="50"/>
+ </table>
+
+ <table name="RHQ_CONFIG_PROP_GRP_DEF">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="NAME" type="VARCHAR2" required="true" size="100"/>
+ <column name="DISPLAY_NAME" type="VARCHAR2" required="false" size="100"/>
+ <column name="DESCRIPTION" type="VARCHAR2" required="false" size="250"/>
+ <column name="DEFAULT_HIDDEN" type="BOOLEAN" required="false"/>
+ <column name="ORDER_INDEX" type="INTEGER" required="false"/>
+ </table>
+
+ <table name="RHQ_CONFIG_PROP_DEF">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="NAME" type="VARCHAR2" required="false" size="100"/>
+ <column name="DISPLAY_NAME" type="VARCHAR2" required="false" size="100"/>
+ <column name="DESCRIPTION" type="VARCHAR2" required="false" size="1000"/>
+ <column name="DEFAULT_VALUE" type="VARCHAR2" required="false" size="2000"/>
+ <column name="REQUIRED" type="BOOLEAN" required="false"/>
+ <column name="READONLY" type="BOOLEAN" required="false"/>
+ <column name="SUMMARY" type="BOOLEAN" required="false"/>
+ <column name="ACTIVATION_POLICY" type="VARCHAR2" required="false" size="20"/>
+ <column name="GROUP_ID" type="INTEGER" required="false" references="RHQ_CONFIG_PROP_GRP_DEF"/>
+ <column name="ORDER_INDEX" type="INTEGER" required="false"/>
+ <column name="VERSION" type="VARCHAR2" required="false" size="50"/>
+ <column name="PARENT_MAP_DEFINITION_ID" type="INTEGER" required="false" references="RHQ_CONFIG_PROP_DEF"/>
+ <column name="PARENT_LIST_DEFINITION_ID" type="INTEGER" required="false" references="RHQ_CONFIG_PROP_DEF"/>
+ <column name="SIMPLE_TYPE" type="VARCHAR2" required="false" size="20"/>
+ <column name="ALLOW_CUSTOM_ENUM_VALUE" type="BOOLEAN" required="false"/>
+ <column name="DTYPE" type="VARCHAR2" required="true" size="10"/>
+ <column name="CONFIG_DEF_ID" type="INTEGER" required="false" references="RHQ_CONFIG_DEF"/>
+
+ <!-- only simple properties (not lists and maps) have this -->
+ <column name="UNITS" type="SMALLINT" required="false"/>
+ </table>
+
+ <table name="RHQ_CONF_PROP_DEF_ENUM">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="STRING_VALUE" type="VARCHAR2" required="false" size="500"/>
+ <column name="ORDER_INDEX" type="INTEGER" required="false"/>
+ <column name="IS_DEFAULT" type="BOOLEAN" required="false"/>
+ <column name="NAME" type="VARCHAR2" required="false" size="100"/>
+ <column name="PROPERTY_DEF_ID" type="INTEGER" required="false" references="RHQ_CONFIG_PROP_DEF"/>
+ </table>
+
+ <table name="RHQ_CONFIG_PROP_CONSTR">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="DTYPE" type="VARCHAR2" required="true" size="15"/>
+ <column name="DETAILS" type="VARCHAR2" required="false" size="250"/>
+ <column name="CONFIG_PROP_DEF_ID" type="INTEGER" required="false" references="RHQ_CONFIG_PROP_DEF"/>
+ <column name="ORDER_INDEX" type="INTEGER" required="false"/>
+ </table>
+
+
+ <!-- Content or value tables -->
+
+ <table name="RHQ_CONFIG">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="NOTES" type="VARCHAR2" required="false" size="512"/>
+ <column name="VERSION" type="VARCHAR2" required="false" size="50"/>
+ <column name="CTIME" type="LONG" required="true"/>
+ <column name="MTIME" type="LONG" required="true"/>
+ </table>
+
+ <table name="RHQ_CONFIG_PROPERTY">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="CONFIGURATION_ID" type="INTEGER" required="false" references="RHQ_CONFIG" ondelete="cascade"/>
+ <column name="STRING_VALUE" type="VARCHAR2" required="false" size="2000"/>
+ <column name="OVERRIDE" type="BOOLEAN" required="false"/>
+ <column name="NAME" type="VARCHAR2" required="true" size="100"/>
+ <column name="DTYPE" type="VARCHAR2" required="true" size="10"/>
+ <!-- Recursive cascade path to RHQ_CONFIG_PROPERTY causes constraint creation errors on SQL Server, see
+ http://support.microsoft.com/kb/321843 -->
+ <column name="PARENT_LIST_ID" type="INTEGER" required="false" references="RHQ_CONFIG_PROPERTY" ondelete="cascade" />
+ <column name="PARENT_MAP_ID" type="INTEGER" required="false" references="RHQ_CONFIG_PROPERTY" ondelete="cascade" />
+ <column name="LIST_INDEX" type="INTEGER"/>
+ <column name="ERROR_MESSAGE" type="LONGVARCHAR" required="false"/>
+ <index name="RHQ_CONFIG_PROP_idx_prop_key" unique="false">
+ <field ref="CONFIGURATION_ID"/>
+ <field ref="NAME"/>
+ </index>
+ <index name="RHQ_CONFIG_PROP_idx_map_key" unique="false">
+ <field ref="PARENT_MAP_ID"/>
+ <field ref="NAME"/>
+ </index>
+ <index name="RHQ_CONFIG_PROP_idx_list_key" unique="false">
+ <field ref="PARENT_LIST_ID"/>
+ </index>
+ <!-- List entries all have the same name -->
+ </table>
+
+ <table name="RHQ_CONFIG_TEMPLATE">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="NAME" type="VARCHAR2" required="false" size="100"/>
+ <column name="DESCRIPTION" type="VARCHAR2" required="false" size="500"/>
+ <column name="CONFIG_ID" type="INTEGER" required="false" references="RHQ_CONFIG"/>
+ <column name="CONFIG_DEF_ID" type="INTEGER" required="false" references="RHQ_CONFIG_DEF"/>
+ <column name="IS_DEFAULT" type="BOOLEAN" required="false"/>
+ </table>
+
+<!-- END: config-schema.xml -->
+<!-- BEGIN: cluster-schema.xml -->
+
+ <table name="RHQ_AFFINITY_GROUP">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" required="true" size="255" type="VARCHAR2"/>
+ </table>
+
+ <table name="RHQ_SERVER">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" required="true" size="255" type="VARCHAR2"/>
+ <column name="ADDRESS" required="true" size="255" type="VARCHAR2"/>
+ <column name="PORT" required="true" type="INTEGER"/>
+ <column name="SECURE_PORT" required="true" type="INTEGER"/>
+ <column name="CTIME" required="true" type="LONG"/>
+ <column name="MTIME" required="true" type="LONG"/>
+ <column name="AFFINITY_GROUP_ID" type="INTEGER" references="RHQ_AFFINITY_GROUP" required="false"/>
+ <column name="COMPUTE_POWER" required="true" type="INTEGER"/>
+ <column name="OPERATION_MODE" required="true" size="32" type="VARCHAR2"/>
+ <column name="STATUS" type="INTEGER" required="false" default="0" />
+
+ <!-- This index is for constraint, not performance -->
+ <index name="RHQ_SERVER_NAME_UNIQUE" unique="true">
+ <field ref="NAME"/>
+ </index>
+ </table>
+
+ <!-- new agent -->
+ <table name="RHQ_AGENT">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" required="true" size="255" type="VARCHAR2"/>
+ <column name="ADDRESS" required="true" size="255" type="VARCHAR2"/>
+ <column name="PORT" required="true" type="INTEGER"/>
+ <column name="AGENTTOKEN" required="true" size="100" type="VARCHAR2"/>
+ <column name="REMOTE_ENDPOINT" required="false" size="4000" type="VARCHAR2"/>
+ <column name="CTIME" required="true" type="LONG"/>
+ <column name="MTIME" required="true" type="LONG"/>
+ <column name="LAST_AVAILABILITY_REPORT" required="false" type="LONG"/>
+ <column name="AFFINITY_GROUP_ID" type="INTEGER" references="RHQ_AFFINITY_GROUP" required="false"/>
+ <column name="SERVER_ID" type="INTEGER" references="RHQ_SERVER" required="false"/>
+ <column name="STATUS" type="INTEGER" required="false" default="0" />
+ <column name="BACKFILLED" type="BOOLEAN" required="true" />
+
+ <index name="RHQ_AGENT_NAME_UNIQUE" unique="true">
+ <field ref="NAME"/>
+ </index>
+
+ <index name="RHQ_AGENT_ADDRESS_PORT" unique="true">
+ <field ref="ADDRESS"/>
+ <field ref="PORT"/>
+ </index>
+
+ <index name="RHQ_AGENT_TOKEN_UNIQUE" unique="true">
+ <field ref="AGENTTOKEN"/>
+ </index>
+ </table>
+
+ <table name="RHQ_PARTITION_EVENT">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="SUBJECT_NAME" required="true" size="255" type="VARCHAR2"/>
+ <column name="CTIME" required="true" type="LONG"/>
+ <column name="EVENT_TYPE" required="true" size="50" type="VARCHAR2"/>
+ <column name="EVENT_DETAIL" required="false" size="512" type="VARCHAR2"/>
+ <column name="EXECUTION_STATUS" required="true" size="32" type="VARCHAR2"/>
+ </table>
+
+ <table name="RHQ_PARTITION_DETAILS">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="PARTITION_EVENT_ID" type="INTEGER" references="RHQ_PARTITION_EVENT" required="true"/>
+ <column name="AGENT_NAME" type="VARCHAR2" size="255" required="true"/>
+ <column name="SERVER_NAME" type="VARCHAR2" size="255" required="true"/>
+ </table>
+
+ <table name="RHQ_FAILOVER_LIST">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="PARTITION_EVENT_ID" type="INTEGER" references="RHQ_PARTITION_EVENT" required="true"/>
+ <column name="AGENT_ID" type="INTEGER" references="RHQ_AGENT" required="true"/>
+ <column name="CTIME" required="true" type="LONG"/>
+ </table>
+
+ <table name="RHQ_FAILOVER_DETAILS">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="FAILOVER_LIST_ID" type="INTEGER" references="RHQ_FAILOVER_LIST" required="true"/>
+ <column name="SERVER_ID" type="INTEGER" references="RHQ_SERVER" required="true"/>
+ <column name="ORDINAL" type = "INTEGER" required="true"/>
+ </table>
+
+<!-- END: cluster-schema.xml -->
+<!-- BEGIN: inventory-schema.xml -->
+
+
+ <!-- NEW RESOURCE TYPES -->
+ <table name="RHQ_RESOURCE_TYPE">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" type="VARCHAR2" size="100" required="true"/>
+ <column name="CATEGORY" type="VARCHAR2" size="16" required="true"/>
+ <column name="CREATION_DATA_TYPE" type="VARCHAR2" size="16" required="true"/>
+ <column name="CREATE_DELETE_POLICY" type="VARCHAR2" size="16" required="true"/>
+ <column name="SINGLETON" type="BOOLEAN" required="true"/>
+ <column name="SUPPORTS_MANUAL_ADD" type="BOOLEAN" required="true"/>
+ <column name="DESCRIPTION" type="VARCHAR2" size="1000"/>
+ <column name="PLUGIN" type="VARCHAR2" size="100"/>
+ <column name="CTIME" type="LONG"/>
+ <column name="MTIME" type="LONG"/>
+ <column name="SUBCATEGORY_ID" type="INTEGER"/>
+ <!--
+ TODO add support to DB setup for tables with circular dependencies and then add back this RI
+ <column name="SUBCATEGORY_ID" type="INTEGER" references="RHQ_RESOURCE_SUBCAT" />
+ -->
+ <column name="PLUGIN_CONFIG_DEF_ID" type="INTEGER" references="RHQ_CONFIG_DEF(ID)"/>
+ <column name="RES_CONFIG_DEF_ID" type="INTEGER" references="RHQ_CONFIG_DEF(ID)"/>
+
+ <index name="RHQ_RES_TYPE_IDX_PLG_NAME">
+ <field ref="NAME"/>
+ <field ref="PLUGIN"/>
+ </index>
+ </table>
+
+ <!-- NEW RESOURCE SUBCATEGORIES -->
+ <table name="RHQ_RESOURCE_SUBCAT">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" type="VARCHAR2" size="100"/>
+ <column name="DISPLAY_NAME" type="VARCHAR2" size="100"/>
+ <column name="DESCRIPTION" type="VARCHAR2" size="1000"/>
+ <column name="CTIME" type="LONG"/>
+ <column name="MTIME" type="LONG"/>
+ <column name="PARENT_SUBCATEGORY_ID" type="INTEGER" references="RHQ_RESOURCE_SUBCAT"/>
+ <!-- resourceTypeId is not required on child sub categories -->
+ <column name="RESOURCE_TYPE_ID" type="INTEGER" references="RHQ_RESOURCE_TYPE"/>
+ </table>
+
+ <!-- Many To Many mapping for resource type to its parents -->
+ <table name="RHQ_RESOURCE_TYPE_PARENTS">
+ <column name="RESOURCE_TYPE_ID" required="true" type="INTEGER" references="RHQ_RESOURCE_TYPE"/>
+ <column name="PARENT_RESOURCE_TYPE_ID" required="true" type="INTEGER" references="RHQ_RESOURCE_TYPE"/>
+
+ <!-- not using full words to fit index name length -->
+ <constraint name="RHQ_RES_TYPE_PARENTS_KEY">
+ <primaryKey>
+ <field ref="RESOURCE_TYPE_ID"/>
+ <field ref="PARENT_RESOURCE_TYPE_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_PROCESS_SCAN">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="QUERY" type="VARCHAR2" size="256" required="true"/>
+ <column name="NAME" type="VARCHAR2" size="100" required="false"/>
+ <column name="RESOURCE_TYPE_ID" type="INTEGER" references="RHQ_RESOURCE_TYPE"/>
+
+ <index name="RHQ_PROCESS_SCAN_QUERY_INDEX" unique="true">
+ <field ref="QUERY"/>
+ <field ref="RESOURCE_TYPE_ID"/>
+ </index>
+ </table>
+
+ <table name="RHQ_PRD_VER">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="VERSION" type="VARCHAR2" size="50" required="true"/>
+ <column name="RES_TYPE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE_TYPE"/>
+ </table>
+
+ <table name="RHQ_RESOURCE">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="RESOURCE_TYPE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE_TYPE"/>
+ <column name="UUID" type="CHAR" size="36" required="true"/>
+ <column name="NAME" type="VARCHAR2" size="500"/>
+ <column name="RESOURCE_KEY" type="VARCHAR2" required="true" size="500"/>
+ <column name="AGENT_ID" required="false" type="INTEGER" references="RHQ_AGENT(id)"/>
+ <column name="INVENTORY_STATUS" type="VARCHAR2" size="20"/>
+ <column name="CONNECTED" type="BOOLEAN"/>
+ <column name="DESCRIPTION" type="VARCHAR2" size="1000"/>
+ <column name="VERSION" type="VARCHAR2" size="50"/>
+ <column name="CTIME" type="LONG"/>
+ <column name="MTIME" type="LONG"/>
+ <column name="ITIME" type="LONG"/>
+ <column name="RES_CONFIGURATION_ID" type="INTEGER" references="RHQ_CONFIG"/>
+ <column name="PLUGIN_CONFIGURATION_ID" type="INTEGER" references="RHQ_CONFIG"/>
+ <column name="MODIFIED_BY" required="false" type="INTEGER"/>
+ <column name="LOCATION" required="false" size="100" type="VARCHAR2"/>
+ <column name="PARENT_RESOURCE_ID" type="INTEGER" references="RHQ_RESOURCE"/>
+ <column name="PRODUCT_VERSION_ID" type="INTEGER" references="RHQ_PRD_VER"/>
+
+ <index name="RHQ_RESOURCE_idx_key">
+ <field ref="RESOURCE_KEY"/>
+ </index>
+
+ <index name="RHQ_RESOURCE_idx_type">
+ <field ref="RESOURCE_TYPE_ID"/>
+ </index>
+
+ <index name="RHQ_RESOURCE_idx_agent">
+ <field ref="AGENT_ID"/>
+ </index>
+
+ <index name="RHQ_RESOURCE_idx_parent">
+ <field ref="PARENT_RESOURCE_ID"/>
+ </index>
+
+ </table>
+
+ <table name="RHQ_RESOURCE_ERROR">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="RESOURCE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE"/>
+ <column name="TIME_OCCURRED" type="LONG" required="true"/>
+ <column name="ERROR_TYPE" type="VARCHAR2" required="true" size="32"/>
+ <column name="SUMMARY" type="VARCHAR2" required="true" size="1000"/>
+ <column name="DETAIL" type="LONGVARCHAR" required="false"/>
+
+ <index name="RHQ_RES_ERROR_IDX_RES_ID">
+ <field ref="RESOURCE_ID"/>
+ </index>
+ </table>
+
+ <table name="RHQ_GROUP_DEF">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" required="true" size="100" type="VARCHAR2"/>
+ <column name="DESCRIPTION" size="100" type="VARCHAR2"/>
+ <column name="CTIME" type="LONG"/>
+ <column name="MTIME" type="LONG"/>
+ <column name="CALC_TIME" type="LONG"/>
+ <column name="CALC_INTERVAL" type="LONG"/>
+ <column name="RECURSIVE" type="BOOLEAN"/>
+ <column name="EXPRESSION" type="VARCHAR2" size="1000"/>
+
+ <index name="RHQ_GROUP_DEF_NAME" unique="true">
+ <field ref="NAME"/>
+ </index>
+ </table>
+
+ <table name="RHQ_RESOURCE_GROUP">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <!-- this name can be longer than the size of the GROUP_BY column, which is used to uniquely identify it -->
+ <!-- Max bytes for Oracle Varchar2 to accommodate large cluster keys -->
+ <column name="NAME" required="true" size="4000" type="VARCHAR2"/>
+ <column name="DESCRIPTION" size="100" type="VARCHAR2"/>
+ <column name="LOCATION" required="false" size="100" type="VARCHAR2"/>
+ <column name="RESOURCE_TYPE_ID" type="INTEGER" references="RHQ_RESOURCE_TYPE"/>
+ <!-- Compatible groups only -->
+ <column name="CTIME" type="LONG"/>
+ <column name="MTIME" type="LONG"/>
+ <column name="MODIFIED_BY" required="false" type="INTEGER"/>
+ <!-- TODO: Reorder to allow this references="RHQ_SUBJECT" -->
+ <column name="RECURSIVE" type="BOOLEAN"/>
+
+ <column name="GROUP_DEFINITION_ID" required="false" type="INTEGER" references="RHQ_GROUP_DEF"/>
+ <column name="GROUP_BY" size="500" type="VARCHAR2"/>
+
+ <column name="CATEGORY" type="VARCHAR2" size="20" required="true"/>
+
+ <column name="CLUSTER_KEY" type="VARCHAR2" size="4000" required="false"/>
+
+ <!-- These two only set if this is a backing group for a resource cluster -->
+ <column name="CLUSTER_RESOURCE_GROUP_ID" type="INTEGER" references="RHQ_RESOURCE_GROUP"/>
+
+ <column name="VISIBLE" type="BOOLEAN"/>
+
+ <index name="RHQ_RES_GROUP_NAME" unique="false">
+ <field ref="NAME"/>
+ </index>
+ </table>
+
+ <!-- Many To Many mapping for groups to implicit resources -->
+ <table name="RHQ_RESOURCE_GROUP_RES_IMP_MAP">
+ <column name="RESOURCE_ID" required="true" type="INTEGER" references="RHQ_RESOURCE"/>
+ <column name="RESOURCE_GROUP_ID" required="true" type="INTEGER" references="RHQ_RESOURCE_GROUP"/>
+
+ <!-- not using full words to fit index name length -->
+ <constraint name="RHQ_RES_GROUP_RES_IMP_MAP_KEY">
+ <primaryKey>
+ <field ref="RESOURCE_ID"/>
+ <field ref="RESOURCE_GROUP_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <!-- Many To Many mapping for groups to explicit resources -->
+ <table name="RHQ_RESOURCE_GROUP_RES_EXP_MAP">
+ <column name="RESOURCE_ID" required="true" type="INTEGER" references="RHQ_RESOURCE"/>
+ <column name="RESOURCE_GROUP_ID" required="true" type="INTEGER" references="RHQ_RESOURCE_GROUP"/>
+
+ <!-- not using full words to fit index name length -->
+ <constraint name="RHQ_RES_GROUP_RES_EXP_MAP_KEY">
+ <primaryKey>
+ <field ref="RESOURCE_ID"/>
+ <field ref="RESOURCE_GROUP_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_CONFIG_GROUP_UPDATE">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="GROUP_ID" type="INTEGER" required="true" references="RHQ_RESOURCE_GROUP"/>
+ <column name="CONFIGURATION_ID" type="INTEGER" required="true" references="RHQ_CONFIG"/>
+ <column name="STATUS" type="VARCHAR2" required="true" size="16"/>
+ <column name="ERROR_MESSAGE" type="LONGVARCHAR" required="false"/>
+ <column name="SUBJECT_NAME" type="VARCHAR2" required="false" size="100"/>
+ <column name="CTIME" type="LONG" required="true"/>
+ <column name="MTIME" type="LONG" required="true"/>
+ <column name="DTYPE" type="VARCHAR2" required="true" size="10"/>
+ </table>
+
+ <table name="RHQ_CONFIG_UPDATE">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="CONFIGURATION_ID" type="INTEGER" required="true" references="RHQ_CONFIG" ondelete="cascade"/>
+ <column name="STATUS" type="VARCHAR2" required="true" size="16"/>
+ <column name="ERROR_MESSAGE" type="LONGVARCHAR" required="false"/>
+ <column name="SUBJECT_NAME" type="VARCHAR2" required="false" size="100"/>
+ <column name="CTIME" type="LONG" required="true"/>
+ <column name="MTIME" type="LONG" required="true"/>
+ <column name="CONFIG_RES_ID" type="INTEGER" required="false" references="RHQ_RESOURCE"/>
+ <column name="PLUGIN_CONFIG_RES_ID" type="INTEGER" required="false" references="RHQ_RESOURCE"/>
+ <column name="AGG_RES_UPDATE_ID" type="INTEGER" required="false" references="RHQ_CONFIG_GROUP_UPDATE"/>
+ <column name="AGG_PLUGIN_UPDATE_ID" type="INTEGER" required="false" references="RHQ_CONFIG_GROUP_UPDATE"/>
+ <column name="DTYPE" type="VARCHAR2" required="true" size="10"/>
+ </table>
+
+<!-- END: inventory-schema.xml -->
+<!-- BEGIN: auth-schema.xml -->
+
+
+ <table name="RHQ_PRINCIPAL">
+
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="PRINCIPAL" required="true" type="VARCHAR2" size="100"/>
+ <column name="PASSWORD" required="true" type="VARCHAR2" size="64"/>
+
+ <!-- ensure that principals are unique -->
+ <index name="RHQ_PRINCIPAL_PRINCIPAL_KEY" unique="true">
+ <field ref="PRINCIPAL"/>
+ </index>
+
+ </table>
+
+<!-- END: auth-schema.xml -->
+<!-- BEGIN: authz-schema.xml -->
+
+
+ <table name="RHQ_ROLE">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" required="true" size="100" type="VARCHAR2"/>
+ <column name="DESCRIPTION" size="100" type="VARCHAR2"/>
+ <column name="FSYSTEM" type="BOOLEAN" default="false"/>
+
+ <index name="RHQ_ROLE_NAME_KEY" unique="true">
+ <field ref="NAME"/>
+ </index>
+ </table>
+
+ <table name="RHQ_ROLE_RESOURCE_GROUP_MAP">
+ <column name="ROLE_ID" required="true" type="INTEGER" references="RHQ_ROLE"/>
+ <column name="RESOURCE_GROUP_ID" required="true" type="INTEGER" references="RHQ_RESOURCE_GROUP"/>
+
+ <constraint name="RHQ_ROLE_RES_GROUP_MAP_KEY">
+ <primaryKey>
+ <field ref="ROLE_ID"/>
+ <field ref="RESOURCE_GROUP_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_PERMISSION">
+ <column name="ROLE_ID" type="INTEGER" references="RHQ_ROLE" required="true"/>
+ <column name="OPERATION" type="INTEGER" required="true"/>
+ <constraint name="RHQ_PERMISSION_PK">
+ <primaryKey>
+ <field ref="ROLE_ID"/>
+ <field ref="OPERATION"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_SUBJECT">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" required="true" size="100" type="VARCHAR2"/>
+ <column name="CONFIGURATION_ID" type="INTEGER" references="RHQ_CONFIG"/>
+ <column name="FIRST_NAME" required="false" size="100" type="VARCHAR2"/>
+ <column name="LAST_NAME" required="false" size="100" type="VARCHAR2"/>
+ <column name="EMAIL_ADDRESS" size="100" type="VARCHAR2"/>
+ <column name="SMS_ADDRESS" size="100" type="VARCHAR2"/>
+ <column name="PHONE_NUMBER" size="100" type="VARCHAR2"/>
+ <column name="DEPARTMENT" size="100" type="VARCHAR2"/>
+ <column name="FACTIVE" required="true" type="BOOLEAN" default="true"/>
+ <column name="FSYSTEM" required="true" type="BOOLEAN" default="false"/>
+
+ <index name="RHQ_SUBJECT_AUTH_KEY" unique="true">
+ <field ref="NAME"/>
+ </index>
+ </table>
+
+ <table name="RHQ_SUBJECT_ROLE_MAP">
+ <column name="SUBJECT_ID" required="true" type="INTEGER" references="RHQ_SUBJECT"/>
+ <column name="ROLE_ID" required="true" type="INTEGER" references="RHQ_ROLE"/>
+
+ <constraint name="RHQ_SUBJECT_ROLE_MAPPING_KEY">
+ <primaryKey>
+ <field ref="SUBJECT_ID"/>
+ <field ref="ROLE_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+<!-- END: authz-schema.xml -->
+<!-- BEGIN: operation-schema.xml -->
+
+
+ <table name="RHQ_OPERATION_DEF">
+
+ <!-- === required columns === -->
+
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="RESOURCE_TYPE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE_TYPE(ID)"/>
+ <column name="NAME" type="VARCHAR2" required="true" size="100"/>
+
+ <!-- === optional columns === -->
+
+ <!-- an OSGI version range - if null, the operation def applies to all versions of the associated resource type -->
+ <column name="RESOURCE_VERSION_RANGE" type="VARCHAR2" size="100"/>
+
+ <!-- A parameter config definition is only required for operations that have parameters. -->
+ <!-- A results config definition is only required for operations that return data. -->
+ <column name="PARAMETER_CONFIG_DEF_ID" type="INTEGER" references="RHQ_CONFIG_DEF(ID)"/>
+ <column name="RESULTS_CONFIG_DEF_ID" type="INTEGER" references="RHQ_CONFIG_DEF(ID)"/>
+ <column name="DISPLAY_NAME" type="VARCHAR2" size="100"/>
+ <column name="DESCRIPTION" type="VARCHAR2" size="4000"/>
+ <column name="TIMEOUT" type="INTEGER"/>
+
+ <!-- === business key (RESOURCE_TYPE_ID + NAME) === -->
+ <index name="RHQ_OPERATION_DEF_KEY_IDX" unique="true">
+ <field ref="RESOURCE_TYPE_ID"/>
+ <field ref="NAME"/>
+ </index>
+
+ </table>
+
+ <table name="RHQ_OPERATION_HISTORY">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="DTYPE" type="VARCHAR2" required="true" size="8"/>
+ <column name="JOB_NAME" type="VARCHAR2" required="true" size="100"/>
+ <column name="JOB_GROUP" type="VARCHAR2" required="true" size="100"/>
+ <column name="OPERATION_DEF_ID" type="INTEGER" required="true" references="RHQ_OPERATION_DEF"/>
+ <column name="STATUS" type="VARCHAR2" required="true" size="16"/>
+ <column name="ERROR_MESSAGE" type="LONGVARCHAR" required="false"/>
+ <column name="SUBJECT_NAME" type="VARCHAR2" required="true" size="100"/>
+ <column name="CTIME" type="LONG" required="true"/>
+ <column name="STIME" type="LONG" required="true"/>
+ <column name="MTIME" type="LONG" required="true"/>
+ <column name="PARAMETERS_CONFIG_ID" type="INTEGER" required="false" references="RHQ_CONFIG"/>
+
+ <!-- for resource history -->
+ <column name="RESOURCE_ID" type="INTEGER" required="false" references="RHQ_RESOURCE"/>
+ <column name="RESULTS_CONFIG_ID" type="INTEGER" required="false" references="RHQ_CONFIG"/>
+ <column name="GROUP_HISTORY_ID" type="INTEGER" required="false" references="RHQ_OPERATION_HISTORY"/>
+
+ <!-- for group history -->
+ <column name="GROUP_ID" type="INTEGER" required="false" references="RHQ_RESOURCE_GROUP"/>
+
+ <index name="RHQ_OPERATION_HISTORY_JOB_IDX" unique="true">
+ <field ref="JOB_NAME"/>
+ <field ref="JOB_GROUP"/>
+ <field ref="CTIME"/>
+ </index>
+
+ </table>
+
+ <!--
+ This table is really just to support some specific use-cases.
+ Specifically, to be able to get a list of histories for a specific schedule (aka quartz job)
+ and to be able to query a list of all schedules along with their associated resource/group IDs
+ possibly sorted by their next fire time.
+ Note that a NULL next fire time means it won't fire again and the row is probaby about to be deleted;
+ we can probably not even insert rows with NULL and make it a non-nullable field. But rather than
+ code special conditions into the session bean, we'll allow a short-lived NULL next fire time row.
+ -->
+ <table name="RHQ_OPERATION_SCHEDULE">
+ <column name="JOB_NAME" type="VARCHAR2" required="true" size="100"/>
+ <column name="JOB_GROUP" type="VARCHAR2" required="true" size="100"/>
+ <column name="DTYPE" type="VARCHAR2" required="true" size="8"/>
+ <column name="NEXT_FIRE_TIME" type="LONG" required="false"/>
+
+ <!-- for resource history -->
+ <column name="RESOURCE_ID" type="INTEGER" required="false" references="RHQ_RESOURCE"/>
+
+ <!-- for group history -->
+ <column name="GROUP_ID" type="INTEGER" required="false" references="RHQ_RESOURCE_GROUP"/>
+
+ <!--
+ Note that this is the same primary key that Quartz uses for its schedules (RHQ_qrtz_job_details).
+ We do not need to add DTYPE to the key, because we ensure the name/group are unique
+ across resource/group schedules
+ -->
+ <constraint name="RHQ_OPERATION_SCHEDULE_KEY">
+ <primaryKey>
+ <field ref="JOB_NAME"/>
+ <field ref="JOB_GROUP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+<!-- END: operation-schema.xml -->
+<!-- BEGIN: sysconfig-schema.xml -->
+
+
+ <table name="RHQ_SYSTEM_CONFIG">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="PROPERTY_KEY" type="VARCHAR2" size="80"/>
+ <column name="PROPERTY_VALUE" type="VARCHAR2" size="300"/>
+ <column name="DEFAULT_PROPERTY_VALUE" type="VARCHAR2" size="300"/>
+ <column name="FREAD_ONLY" type="BOOLEAN" default="FALSE"/>
+
+ <index name="RHQ_SYSTEM_CONFIG_KEY_INDX" unique="true">
+ <field ref="PROPERTY_KEY"/>
+ </index>
+ </table>
+
+<!-- END: sysconfig-schema.xml -->
+<!-- BEGIN: scheduler-schema.xml -->
+
+
+ <table name="RHQ_QRTZ_JOB_DETAILS">
+ <column name="JOB_NAME" required="true" type="VARCHAR2" size="80"/>
+ <column name="JOB_GROUP" required="true" type="VARCHAR2" size="80"/>
+ <column name="DESCRIPTION" required="false" type="VARCHAR2" size="120"/>
+ <column name="JOB_CLASS_NAME" required="true" type="VARCHAR2" size="128"/>
+ <column name="IS_DURABLE" required="true" type="BOOLEAN" default="FALSE"/>
+ <column name="IS_VOLATILE" required="true" type="BOOLEAN"/>
+ <column name="IS_STATEFUL" required="true" type="BOOLEAN" default="FALSE"/>
+ <column name="REQUESTS_RECOVERY" required="true" type="BOOLEAN" default="FALSE"/>
+ <column name="JOB_DATA" required="false" type="BLOB"/>
+
+ <constraint name="RHQ_PK_QRTZ_JOB_DETAILS">
+ <primaryKey>
+ <field ref="JOB_NAME"/>
+ <field ref="JOB_GROUP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_QRTZ_JOB_LISTENERS">
+ <column name="JOB_NAME" required="true" type="VARCHAR2" size="80"/>
+ <column name="JOB_GROUP" required="true" type="VARCHAR2" size="80"/>
+ <column name="JOB_LISTENER" required="true" type="VARCHAR2" size="80"/>
+
+ <constraint name="RHQ_PK_QRTZ_JOB_LISTENERS">
+ <primaryKey>
+ <field ref="JOB_NAME"/>
+ <field ref="JOB_GROUP"/>
+ <field ref="JOB_LISTENER"/>
+ </primaryKey>
+ </constraint>
+ <constraint name="RHQ_FK_QRTZ_JOB_LSTNRS_JN_JG">
+ <foreignKey local="JOB_NAME,JOB_GROUP"
+ references="RHQ_QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)"
+ ondelete="cascade"/>
+ </constraint>
+ </table>
+
+ <table name="RHQ_QRTZ_TRIGGERS">
+ <column name="TRIGGER_NAME" type="VARCHAR2" required="true" size="80"/>
+ <column name="TRIGGER_GROUP" type="VARCHAR2" required="true" size="80"/>
+ <column name="JOB_NAME" type="VARCHAR2" required="true" size="80"/>
+ <column name="JOB_GROUP" type="VARCHAR2" required="true" size="80"/>
+ <column name="IS_VOLATILE" type="BOOLEAN" required="true"/>
+ <column name="DESCRIPTION" type="VARCHAR2" required="false" size="120"/>
+ <column name="NEXT_FIRE_TIME" type="LONG" required="false"/>
+ <column name="PREV_FIRE_TIME" type="LONG" required="false"/>
+ <column name="PRIORITY" type="INTEGER" required="false"/>
+ <column name="TRIGGER_STATE" type="VARCHAR" required="true" size="16"/>
+ <column name="TRIGGER_TYPE" type="VARCHAR" required="true" size="8"/>
+ <column name="START_TIME" type="LONG" required="true"/>
+ <column name="END_TIME" type="LONG" required="false"/>
+ <column name="CALENDAR_NAME" type="VARCHAR2" required="false" size="80"/>
+ <column name="MISFIRE_INSTR" type="INTEGER" required="false"/>
+ <column name="JOB_DATA" type="BLOB" required="false"/>
+
+ <constraint name="RHQ_PK_QRTZ_TRIGGERS">
+ <primaryKey>
+ <field ref="TRIGGER_NAME"/>
+ <field ref="TRIGGER_GROUP"/>
+ </primaryKey>
+ </constraint>
+ <constraint name="RHQ_FK_QRTZ_TRIGGERS_JN_JG">
+ <foreignKey local="JOB_NAME,JOB_GROUP"
+ references="RHQ_QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)"
+ ondelete="cascade"/>
+ </constraint>
+
+ <!-- Quartz docs recommend these indexes. -->
+ <index name="RHQ_QRTZ_TRIGGERS_JN_JG_IDX">
+ <field ref="JOB_NAME"/>
+ <field ref="JOB_GROUP"/>
+ </index>
+ <index name="RHQ_QRTZ_TRIGGERS_NFT_IDX">
+ <field ref="NEXT_FIRE_TIME"/>
+ </index>
+ <index name="RHQ_QRTZ_TRIGGERS_TS_IDX">
+ <field ref="TRIGGER_STATE"/>
+ </index>
+ <index name="RHQ_QRTZ_TRIGGERS_TS_NFT_IDX">
+ <field ref="TRIGGER_STATE"/>
+ <field ref="NEXT_FIRE_TIME"/>
+ </index>
+
+ </table>
+
+ <table name="RHQ_QRTZ_SIMPLE_TRIGGERS">
+ <column name="TRIGGER_NAME" type="VARCHAR2" required="true" size="80"/>
+ <column name="TRIGGER_GROUP" type="VARCHAR2" required="true" size="80"/>
+ <column name="REPEAT_COUNT" type="LONG" required="true"/>
+ <column name="REPEAT_INTERVAL" type="LONG" required="true"/>
+ <column name="TIMES_TRIGGERED" type="LONG" required="true"/>
+
+ <constraint name="RHQ_PK_QRTZ_SIMPLE_TRIGGERS">
+ <primaryKey>
+ <field ref="TRIGGER_NAME"/>
+ <field ref="TRIGGER_GROUP"/>
+ </primaryKey>
+ </constraint>
+ <constraint name="RHQ_FK_QRTZ_SIMPLE_TRGRS_TN_TG">
+ <foreignKey local="TRIGGER_NAME,TRIGGER_GROUP"
+ references="RHQ_QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)"
+ ondelete="cascade"/>
+ </constraint>
+
+ <!-- Quartz docs recommend this index. -->
+ <!-- Commenting out, because Oracle auto-creates an index for the
+ primary key column(s) and fails if you try to create another
+ index for the same column(s) (ips, 03/29/07).
+ -->
+ <!--
+ <index name="RHQ_QRTZ_SIMPLE_TRGRS_TN_TG_IDX">
+ <field ref="TRIGGER_NAME"/>
+ <field ref="TRIGGER_GROUP"/>
+ </index>
+ -->
+ </table>
+
+ <table name="RHQ_QRTZ_CRON_TRIGGERS">
+ <column name="TRIGGER_NAME" type="VARCHAR2" size="80" required="true"/>
+ <column name="TRIGGER_GROUP" type="VARCHAR2" size="80" required="true"/>
+ <column name="CRON_EXPRESSION" type="VARCHAR2" size="80" required="true"/>
+ <column name="TIME_ZONE_ID" type="VARCHAR2" size="80" required="false"/>
+
+ <constraint name="RHQ_PK_QRTZ_CRON_TRIGGERS">
+ <primaryKey>
+ <field ref="TRIGGER_NAME"/>
+ <field ref="TRIGGER_GROUP"/>
+ </primaryKey>
+ </constraint>
+ <constraint name="RHQ_FK_QRTZ_CRON_TRIG_TN_TG">
+ <foreignKey local="TRIGGER_NAME,TRIGGER_GROUP"
+ references="RHQ_QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)"
+ ondelete="cascade"/>
+ </constraint>
+
+ <!-- Quartz docs recommend this index. -->
+ <!-- Commenting out, because Oracle auto-creates an index for the
+ primary key column(s) and fails if you try to create another
+ index for the same column(s) (ips, 03/29/07).
+ -->
+ <!--
+ <index name="RHQ_QRTZ_CRON_TRGRS_TN_TG_IDX">
+ <field ref="TRIGGER_NAME"/>
+ <field ref="TRIGGER_GROUP"/>
+ </index>
+ -->
+ </table>
+
+ <table name="RHQ_QRTZ_BLOB_TRIGGERS">
+ <column name="TRIGGER_NAME" type="VARCHAR2" size="80" required="true"/>
+ <column name="TRIGGER_GROUP" type="VARCHAR2" size="80" required="true"/>
+ <column name="BLOB_DATA" type="BLOB" required="false"/>
+
+ <constraint name="RHQ_PK_QRTZ_BLOB_TRIGGERS">
+ <primaryKey>
+ <field ref="TRIGGER_NAME"/>
+ <field ref="TRIGGER_GROUP"/>
+ </primaryKey>
+ </constraint>
+ <constraint name="RHQ_FK_QRTZ_BLOB_TRIGG_TN_TG">
+ <foreignKey local="TRIGGER_NAME,TRIGGER_GROUP"
+ references="RHQ_QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)"
+ ondelete="cascade"/>
+ </constraint>
+
+ <!-- Quartz docs recommend this index. -->
+ <!-- Commenting out, because Oracle auto-creates an index for the
+ primary key column(s) and fails if you try to create another
+ index for the same column(s) (ips, 03/29/07).
+ -->
+ <!--
+ <index name="RHQ_QRTZ_BLOB_TRGRS_TN_TG_IDX">
+ <field ref="TRIGGER_NAME"/>
+ <field ref="TRIGGER_GROUP"/>
+ </index>
+ -->
+ </table>
+
+ <table name="RHQ_QRTZ_TRIGGER_LISTENERS">
+ <column name="TRIGGER_NAME" type="VARCHAR2" size="80" required="true"/>
+ <column name="TRIGGER_GROUP" type="VARCHAR2" size="80" required="true"/>
+ <column name="TRIGGER_LISTENER" type="VARCHAR2" size="80" required="true"/>
+
+ <constraint name="RHQ_PK_QRTZ_TRIGGER_LISTENERS">
+ <primaryKey>
+ <field ref="TRIGGER_NAME"/>
+ <field ref="TRIGGER_GROUP"/>
+ <field ref="TRIGGER_LISTENER"/>
+ </primaryKey>
+ </constraint>
+ <constraint name="RHQ_FK_QRTZ_TRGR_LSTNRS_TN_TG">
+ <foreignKey local="TRIGGER_NAME,TRIGGER_GROUP"
+ references="RHQ_QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)"
+ ondelete="cascade"/>
+ </constraint>
+
+ <!-- Quartz docs recommend this index. -->
+ <index name="RHQ_QRTZ_TRGR_LSTNRS_TN_TG_IDX">
+ <field ref="TRIGGER_NAME"/>
+ <field ref="TRIGGER_GROUP"/>
+ </index>
+
+ </table>
+
+ <table name="RHQ_QRTZ_FIRED_TRIGGERS">
+ <column name="ENTRY_ID" primarykey="true" type="VARCHAR2" size="95" required="true"/>
+ <column name="TRIGGER_NAME" type="VARCHAR2" size="80" required="true"/>
+ <column name="TRIGGER_GROUP" type="VARCHAR2" size="80" required="true"/>
+ <column name="INSTANCE_NAME" type="VARCHAR2" size="80" required="true"/>
+ <column name="FIRED_TIME" type="LONG" required="true"/>
+ <column name="PRIORITY" type="INTEGER" required="false"/>
+ <column name="STATE" type="VARCHAR2" size="16" required="true"/>
+ <column name="IS_VOLATILE" type="BOOLEAN" required="true"/>
+ <column name="JOB_NAME" type="VARCHAR2" size="80" required="false"/>
+ <column name="JOB_GROUP" type="VARCHAR2" size="80" required="false"/>
+ <column name="IS_STATEFUL" type="BOOLEAN" required="false"/>
+ <column name="REQUESTS_RECOVERY" type="BOOLEAN" required="false"/>
+
+ <!-- Quartz docs recommend these indexes. -->
+ <index name="RHQ_QRTZ_FIRED_TRGRS_TN_IDX">
+ <field ref="TRIGGER_NAME"/>
+ </index>
+ <index name="RHQ_QRTZ_FIRED_TRGRS_TG_IDX">
+ <field ref="TRIGGER_GROUP"/>
+ </index>
+ <index name="RHQ_QRTZ_FIRED_TRGRS_TN_TG_IDX">
+ <field ref="TRIGGER_NAME"/>
+ <field ref="TRIGGER_GROUP"/>
+ </index>
+ <index name="RHQ_QRTZ_FIRED_TRGRS_IN_IDX">
+ <field ref="INSTANCE_NAME"/>
+ </index>
+ <index name="RHQ_QRTZ_FIRED_TRGRS_JN_IDX">
+ <field ref="JOB_NAME"/>
+ </index>
+ <index name="RHQ_QRTZ_FIRED_TRGRS_JG_IDX">
+ <field ref="JOB_GROUP"/>
+ </index>
+
+ </table>
+
+ <table name="RHQ_QRTZ_CALENDARS">
+ <column name="CALENDAR_NAME" primarykey="true" type="VARCHAR2" size="80" required="true"/>
+ <column name="CALENDAR" type="BLOB" required="true"/>
+ </table>
+
+ <table name="RHQ_QRTZ_PAUSED_TRIGGER_GRPS">
+ <column name="TRIGGER_GROUP" primarykey="true" type="VARCHAR2" size="80" required="true"/>
+ </table>
+
+ <table name="RHQ_QRTZ_SCHEDULER_STATE">
+ <column name="INSTANCE_NAME" primarykey="true" type="VARCHAR2" size="80" required="true"/>
+ <column name="LAST_CHECKIN_TIME" type="LONG" required="true"/>
+ <column name="CHECKIN_INTERVAL" type="LONG" required="true"/>
+ <column name="RECOVERER" type="VARCHAR2" size="80" required="false"/>
+ </table>
+
+ <table name="RHQ_QRTZ_LOCKS">
+ <column name="LOCK_NAME" primarykey="true" type="VARCHAR2" size="40" required="true"/>
+ <data LOCK_NAME="TRIGGER_ACCESS"/>
+ <data LOCK_NAME="JOB_ACCESS"/>
+ <data LOCK_NAME="CALENDAR_ACCESS"/>
+ <data LOCK_NAME="STATE_ACCESS"/>
+ <data LOCK_NAME="MISFIRE_ACCESS"/>
+ </table>
+
+<!-- END: scheduler-schema.xml -->
+<!-- BEGIN: amps-schema.xml -->
+
+
+
+ <table name="RHQ_PLUGIN">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" size="200" type="VARCHAR2" required="true"/>
+ <column name="DISPLAY_NAME" size="200" type="VARCHAR2" required="true"/>
+ <column name="DESCRIPTION" size="4000" type="VARCHAR2" required="false"/>
+ <column name="VERSION" size="200" type="VARCHAR2" required="false"/>
+ <column name="ENABLED" type="BOOLEAN" required="true"/>
+ <column name="HELP" type="CLOB" required="false"/>
+ <column name="PATH" size="500" type="VARCHAR2" required="true"/>
+ <column name="MD5" size="100" type="VARCHAR2" required="true"/>
+ <column name="CTIME" type="LONG" required="true"/>
+ <column name="MTIME" type="LONG" required="true"/>
+ <column name="CONTENT" type="BLOB" required="false"/>
+
+ <index name="RHQ_PLUGIN_NAME_IDX" unique="true">
+ <field ref="NAME"/>
+ </index>
+ </table>
+
+<!-- END: amps-schema.xml -->
+<!-- BEGIN: measurement-schema.xml -->
+
+ <table name="RHQ_MEASUREMENT_DEF">
+
+ <!-- === required columns === -->
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="RESOURCE_TYPE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE_TYPE(ID)"/>
+ <column name="NAME" type="VARCHAR2" size="100" required="true"/>
+
+ <!-- === optional columns === -->
+ <!-- an OSGI version range - if null, the metric def applies to all versions of the associated resource type -->
+ <column name="RESOURCE_VERSION_RANGE" type="VARCHAR2" size="100"/>
+ <column name="CATEGORY" type="SMALLINT"/>
+ <column name="UNITS" type="SMALLINT"/>
+ <column name="NUMERIC_TYPE" type="SMALLINT"/>
+ <column name="DISPLAY_TYPE" type="SMALLINT"/>
+ <column name="DATA_TYPE" type="SMALLINT"/>
+ <column name="RAW_NUMERIC_TYPE" type="SMALLINT"/>
+ <column name="DEFAULT_ON" type="BOOLEAN" default="false"/>
+ <column name="DEFAULT_INTERVAL" type="LONG" />
+ <column name="DISPLAY_NAME" type="VARCHAR2" size="100"/>
+ <column name="DISPLAY_ORDER" type="INTEGER" default="1000"/>
+ <column name="DESCRIPTION" type="VARCHAR2" size="500"/>
+ <column name="DESTINATION_TYPE" type="VARCHAR2" size="100"/>
+
+ <column name="VERSION" type="INTEGER"/>
+ <!-- for optimistic locking -->
+
+ <!-- === business key (RESOURCE_TYPE_ID + NAME + RAW_NUMERIC_TYPE) === -->
+ <index name="RHQ_METRIC_DEF_KEY_IDX" unique="true">
+ <field ref="RESOURCE_TYPE_ID"/>
+ <field ref="NAME"/>
+ <field ref="RAW_NUMERIC_TYPE"/>
+ </index>
+ </table>
+
+
+ <table name="RHQ_MEASUREMENT_SCHED">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+
+ <column name="ENABLED" type="BOOLEAN" default="false"/>
+ <column name="MTIME" type="LONG" />
+ <column name="DEFINITION" type="INTEGER" references="RHQ_MEASUREMENT_DEF(ID)"/>
+ <column name="VERSION" type="INTEGER" />
+ <column name="COLL_INTERVAL" type="LONG" />
+ <column name="RESOURCE_ID" type="INTEGER" references="RHQ_RESOURCE(ID)"/>
+ <index name="RHQ_MEAS_SCHED_UNIQ" unique="true">
+ <field ref="RESOURCE_ID"/>
+ <field ref="DEFINITION"/>
+ </index>
+ </table>
+
+
+ <table name="RHQ_MEASUREMENT_BLINE">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+
+ <column name="BL_USER_ENTERED" type="BOOLEAN" default="false" required="true"/>
+ <column name="BL_MIN" type="DOUBLE" required="true"/>
+ <column name="BL_MAX" type="DOUBLE" required="true"/>
+ <column name="BL_MEAN" type="DOUBLE" required="true"/>
+ <column name="BL_COMPUTE_TIME" type="LONG" required="true"/>
+ <column name="SCHEDULE_ID" type="INTEGER" required="true" references="RHQ_MEASUREMENT_SCHED(ID)"/>
+ <index name="RHQ_MEAS_BASELINE_CTIME_IDX">
+ <field ref="BL_COMPUTE_TIME"/>
+ </index>
+ <index name="RHQ_MEAS_BASELINE_SID_IDX">
+ <field ref="SCHEDULE_ID"/>
+ </index>
+ </table>
+
+
+ <table name="RHQ_MEASUREMENT_DATA_NUM_1H" logging="false" cache="true"
+ tablespace="DEFAULT" storage-options="freelists 20">
+
+ <column name="TIME_STAMP" required="true" type="LONG"/>
+ <column name="SCHEDULE_ID" required="true" type="INTEGER"/>
+ <column name="VALUE" required="false" type="DOUBLE"/>
+ <column name="MINVALUE" required="false" type="DOUBLE"/>
+ <column name="MAXVALUE" required="false" type="DOUBLE"/>
+
+ <constraint name="RHQ_MEAS_DATA_1H_ID_TIME_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+
+ <index name="RHQ_MEAS_DATA_1H_TIME_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ </table>
+
+
+ <table name="RHQ_MEASUREMENT_DATA_NUM_6H" logging="false" cache="true"
+ tablespace="DEFAULT" storage-options="freelists 20">
+
+ <column name="TIME_STAMP" required="true" type="LONG"/>
+ <column name="SCHEDULE_ID" required="true" type="INTEGER"/>
+ <column name="VALUE" required="false" type="DOUBLE"/>
+ <column name="MINVALUE" required="false" type="DOUBLE"/>
+ <column name="MAXVALUE" required="false" type="DOUBLE"/>
+
+ <constraint name="RHQ_MEAS_DATA_6H_ID_TIME_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+
+ <index name="RHQ_MEAS_DATA_6H_TIME_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ </table>
+
+
+ <table name="RHQ_MEASUREMENT_DATA_NUM_1D" logging="false" cache="true"
+ tablespace="DEFAULT" storage-options="freelists 20">
+
+ <column name="TIME_STAMP" required="true" type="LONG"/>
+ <column name="SCHEDULE_ID" required="true" type="INTEGER"/>
+ <column name="VALUE" required="false" type="DOUBLE"/>
+ <column name="MINVALUE" required="false" type="DOUBLE"/>
+ <column name="MAXVALUE" required="false" type="DOUBLE"/>
+
+ <constraint name="RHQ_MEAS_DATA_1D_ID_TIME_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+
+ <table name="RHQ_MEASUREMENT_DATA_TRAIT">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER" />
+ <column name="VALUE" type="VARCHAR2" size="4000" />
+ <constraint name="RHQ_MEAS_DATA_TRAIT_ID_TIME_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+
+ <table name="RHQ_CALLTIME_DATA_KEY">
+ <column name="ID" type="INTEGER" default="sequence-only" initial="10001" primarykey="true" required="true"/>
+ <column name="SCHEDULE_ID" type="INTEGER" required="true"/>
+ <column name="CALL_DESTINATION" type="VARCHAR2" size="4000" required="true"/>
+ <index name="RHQ_CALLTIME_DATA_KEY_IDX" unique="true">
+ <field ref="SCHEDULE_ID"/>
+ <field ref="CALL_DESTINATION"/>
+ </index>
+ </table>
+
+
+ <table name="RHQ_CALLTIME_DATA_VALUE">
+ <column name="ID" type="INTEGER" default="sequence-only" initial="10001" primarykey="true" required="true"/>
+ <column name="KEY_ID" type="INTEGER" references="RHQ_CALLTIME_DATA_KEY(ID)" required="true"/>
+ <column name="BEGIN_TIME" type="LONG" required="true"/>
+ <column name="END_TIME" type="LONG" required="true"/>
+ <column name="MINIMUM" type="DOUBLE" required="true"/>
+ <column name="MAXIMUM" type="DOUBLE" required="true"/>
+ <column name="TOTAL" type="DOUBLE" required="true"/>
+ <column name="COUNT" type="LONG" required="true"/>
+ </table>
+
+
+ <table name="RHQ_AVAILABILITY">
+ <column name="ID" type="INTEGER" default="sequence-only" initial="10001" primarykey="true" required="true"/>
+ <column name="RESOURCE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE(ID)"/>
+ <column name="START_TIME" type="LONG" required="true" />
+ <column name="END_TIME" type="LONG" required="false" />
+ <column name="AVAILABILITY_TYPE" type="SMALLINT" required="false" />
+ <index name="RHQ_AVAIL_RESOURCE_START_IDX">
+ <field ref="RESOURCE_ID"/>
+ <field ref="START_TIME"/>
+ </index>
+ <!-- only one null row can exist for any resource -->
+ <index name="RHQ_AVAIL_RESOURCE_END_IDX" condition="END_TIME IS NULL">
+ <field ref="RESOURCE_ID"/>
+ <field ref="END_TIME" />
+ </index>
+ </table>
+
+ <table name="RHQ_RESOURCE_AVAIL">
+ <column name="ID" type="INTEGER" default="sequence-only" initial="10001" primarykey="true" required="true"/>
+ <column name="RESOURCE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE(ID)" ondelete="cascade"/>
+ <column name="AVAILABILITY_TYPE" type="SMALLINT" required="false" />
+ <index name="RHQ_RESOURCE_AVAIL_IDX">
+ <field ref="RESOURCE_ID" />
+ </index>
+ </table>
+
+ <!-- !!!!! REMOVED !!!!! -->
+ <table name="RHQ_MEASUREMENT_OOB" obsolete="true">
+ <column name="ID" type="INTEGER" default="sequence-only" initial="10001" primarykey="true" required="true"/>
+ <column name="SCHEDULE_ID" type="INTEGER" references="RHQ_MEASUREMENT_SCHED(ID)" required="true"/>
+ <column name="OCCURRED" type="LONG" required="true"/>
+ <column name="DIFF" type="DOUBLE" required="true"/>
+
+ <index name="RHQ_MEASUREMENT_OOB_IDX" unique="true">
+ <field ref="SCHEDULE_ID" />
+ <field ref="OCCURRED" />
+ </index>
+ </table>
+
+ <table name="RHQ_MEASUREMENT_OOB">
+ <column name="SCHEDULE_ID" type="INTEGER" references="RHQ_MEASUREMENT_SCHED(ID)" required="true"/>
+ <column name="TIME_STAMP" type="LONG" required="true"/>
+ <column name="OOB_FACTOR" type="INTEGER" required="true" />
+ <constraint name="RHQ_MEAS_OOB_ID_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_MEASUREMENT_OOB_TMP">
+ <column name="SCHEDULE_ID" type="INTEGER" required="true"/>
+ <column name="TIME_STAMP" type="LONG" required="true"/>
+ <column name="OOB_FACTOR" type="INTEGER" required="true" />
+ <constraint name="RHQ_MEAS_OOB_TMP_ID_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_NUMBERS">
+ <column name="i" type="INTEGER" default="sequence-only" initial="10001" primarykey="true" required="true" />
+ </table>
+
+
+ <table name="RHQ_MEAS_DATA_NUM_R00">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R00_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R00_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R01">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R01_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R01_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R02">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R02_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R02_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R03">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R03_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R03_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R04">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R04_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R04_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R05">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R05_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R05_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R06">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R06_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R06_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R07">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R07_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R07_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R08">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R08_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R08_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R09">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R09_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R09_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R10">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R10_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R10_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R11">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R11_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R11_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R12">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R12_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R12_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R13">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R13_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R13_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R14">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R14_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R14_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+<!-- END: measurement-schema.xml -->
+<!-- BEGIN: content-schema.xml -->
+
+
+ <table name="RHQ_ARCHITECTURE">
+ <column name="ID" default="sequence-only" initial="100" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" size="50" type="VARCHAR2" required="true"/>
+ <index name="RHQ_ARCHITECTURE_NAME_IDX" unique="true">
+ <field ref="NAME"/>
+ </index>
+ </table>
+
+ <table name="RHQ_CONTENT_SOURCE_TYPE">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" size="200" type="VARCHAR2" required="true"/>
+ <column name="DISPLAY_NAME" size="200" type="VARCHAR2" required="false"/>
+ <column name="DESCRIPTION" size="500" type="VARCHAR2" required="false"/>
+ <column name="PLUGIN_NAME" size="100" type="VARCHAR2" required="false"/>
+ <!-- we might want this as part of natural key -->
+ <column name="DEFAULT_LAZY_LOAD" type="BOOLEAN" required="true"/>
+ <column name="DEFAULT_DOWNLOAD_MODE" size="16" type="VARCHAR2" required="true"/>
+ <column name="DEFAULT_SYNC_SCHEDULE" size="64" type="VARCHAR2" required="false"/>
+ <column name="API_CLASS" size="100" type="VARCHAR2" required="true"/>
+
+ <column name="SOURCE_CONFIG_DEF_ID" type="INTEGER" references="RHQ_CONFIG_DEF" required="false"/>
+
+ <index name="RHQ_CONTENT_SOURCE_TYPE_IDX" unique="true">
+ <field ref="NAME"/>
+ <!-- <field ref="PLUGIN_NAME"/> -->
+ </index>
+ </table>
+
+ <table name="RHQ_CONTENT_SOURCE">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" size="200" type="VARCHAR2" required="true"/>
+ <column name="DESCRIPTION" size="500" type="VARCHAR2" required="false"/>
+ <column name="LAZY_LOAD" type="BOOLEAN" required="true"/>
+ <column name="DOWNLOAD_MODE" size="16" type="VARCHAR2" required="true"/>
+ <column name="SYNC_SCHEDULE" size="64" type="VARCHAR2" required="false"/>
+ <column name="LOAD_ERROR_MESSAGE" type="LONGVARCHAR" required="false"/>
+ <column name="CREATION_TIME" type="LONG" required="true"/>
+ <column name="LAST_MODIFIED_TIME" type="LONG" required="true"/>
+
+ <column name="CONTENT_SOURCE_TYPE_ID" type="INTEGER" references="RHQ_CONTENT_SOURCE_TYPE" required="true"/>
+ <column name="CONFIGURATION_ID" type="INTEGER" references="RHQ_CONFIG" required="false"/>
+
+ <index name="RHQ_CONTENT_SOURCE_IDX" unique="true">
+ <field ref="NAME"/>
+ <field ref="CONTENT_SOURCE_TYPE_ID"/>
+ </index>
+ </table>
+
+ <table name="RHQ_CHANNEL">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" size="200" type="VARCHAR2" required="true"/>
+ <column name="DESCRIPTION" size="500" type="VARCHAR2" required="false"/>
+ <column name="CREATION_TIME" type="LONG" required="true"/>
+ <column name="LAST_MODIFIED_TIME" type="LONG" required="true"/>
+
+ <index name="RHQ_CHANNEL_IDX" unique="true">
+ <field ref="NAME"/>
+ </index>
+ </table>
+
+ <table name="RHQ_PACKAGE_TYPE">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" size="200" type="VARCHAR2" required="true"/>
+ <column name="DISPLAY_NAME" size="200" type="VARCHAR2" required="false"/>
+ <column name="DESCRIPTION" size="500" type="VARCHAR2" required="false"/>
+ <column name="CATEGORY" size="50" type="VARCHAR2" required="false"/>
+ <column name="DISCOVERY_INTERVAL" type="INTEGER" required="false"/>
+ <column name="IS_CREATION_DATA" type="BOOLEAN" required="true"/>
+ <column name="SUPPORTS_ARCHITECTURE" type="BOOLEAN" required="true"/>
+
+ <column name="RESOURCE_TYPE_ID" type="INTEGER" references="RHQ_RESOURCE_TYPE" required="true"/>
+ <column name="DEPLOYMENT_CONFIG_DEF_ID" type="INTEGER" references="RHQ_CONFIG_DEF" required="false"/>
+ <column name="PACKAGE_EXTRA_CONFIG_ID" type="INTEGER" references="RHQ_CONFIG_DEF" required="false"/>
+
+ <index name="RHQ_PACKAGE_TYPE_IDX" unique="true">
+ <field ref="NAME"/>
+ <field ref="RESOURCE_TYPE_ID"/>
+ </index>
+
+ </table>
+
+ <table name="RHQ_PACKAGE">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" size="200" type="VARCHAR2" required="true"/>
+ <column name="CLASSIFICATION" size="200" type="VARCHAR2" required="false"/>
+
+ <column name="PACKAGE_TYPE_ID" type="INTEGER" references="RHQ_PACKAGE_TYPE" required="true"/>
+
+ <index name="RHQ_PACKAGE_IDX" unique="true">
+ <field ref="NAME"/>
+ <field ref="PACKAGE_TYPE_ID"/>
+ </index>
+ </table>
+
+ <table name="RHQ_PACKAGE_BITS">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="BITS" type="BLOB" required="false"/>
+ </table>
+
+ <table name="RHQ_PACKAGE_VERSION">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="DISPLAY_NAME" size="200" type="VARCHAR2" required="false"/>
+ <column name="SHORT_DESCRIPTION" size="10000" type="CLOB" required="false"/>
+ <column name="LONG_DESCRIPTION" size="50000" type="CLOB" required="false"/>
+ <column name="VERSION" size="500" type="VARCHAR2" required="true"/>
+ <column name="DISPLAY_VERSION" size="500" type="VARCHAR2" required="false"/>
+ <column name="FILE_NAME" size="255" type="VARCHAR2" required="false"/>
+ <column name="FILE_SIZE" type="LONG" required="false"/>
+ <column name="FILE_MD5" size="32" type="VARCHAR2" required="false"/>
+ <column name="FILE_SHA256" size="64" type="VARCHAR2" required="false"/>
+ <column name="FILE_CREATION_TIME" type="LONG" required="false"/>
+ <column name="LICENSE_NAME" size="255" type="VARCHAR2" required="false"/>
+ <column name="LICENSE_VERSION" size="20" type="VARCHAR2" required="false"/>
+ <column name="METADATA" type="BLOB" required="false"/>
+
+ <column name="PACKAGE_ID" type="INTEGER" references="RHQ_PACKAGE" required="true"/>
+ <column name="ARCHITECTURE_ID" type="INTEGER" references="RHQ_ARCHITECTURE" required="true"/>
+ <column name="CONFIG_ID" type="INTEGER" references="RHQ_CONFIG" required="false"/>
+ <column name="PACKAGE_BITS_ID" type="INTEGER" references="RHQ_PACKAGE_BITS" required="false"/>
+
+ <index name="RHQ_PACKAGE_VERSION_IDX" unique="true">
+ <field ref="PACKAGE_ID"/>
+ <field ref="VERSION"/>
+ <field ref="ARCHITECTURE_ID"/>
+ </index>
+
+ </table>
+
+ <table name="RHQ_CONTENT_REQ">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="RESOURCE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE"/>
+ <column name="STATUS" type="VARCHAR2" required="true" size="16"/>
+ <column name="ERROR_MESSAGE" type="LONGVARCHAR" required="false"/>
+ <column name="SUBJECT_NAME" type="VARCHAR2" required="true" size="100"/>
+ <column name="CTIME" type="LONG" required="true"/>
+ <column name="MTIME" type="LONG" required="true"/>
+ <column name="REQUEST_TYPE" type="VARCHAR2" required="true" size="20"/>
+ <column name="NOTES" type="VARCHAR2" required="false" size="512"/>
+ </table>
+
+ <table name="RHQ_INSTALLED_PACKAGE">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="INSTALLATION_TIME" type="LONG" required="false"/>
+
+ <column name="RESOURCE_ID" type="INTEGER" references="RHQ_RESOURCE" required="true"/>
+ <column name="PACKAGE_VERSION_ID" type="INTEGER" references="RHQ_PACKAGE_VERSION" required="true"/>
+ <column name="SUBJECT_ID" type="INTEGER" references="RHQ_SUBJECT" required="false"/>
+ </table>
+
+ <table name="RHQ_INSTALLED_PKG_HIST">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="STATUS" type="VARCHAR2" size="24" required="true"/>
+ <column name="ERROR_MESSAGE" type="LONGVARCHAR" required="false"/>
+ <column name="HISTORY_TIMESTAMP" type="LONG" required="false"/>
+
+ <column name="PACKAGE_VERSION_ID" type="INTEGER" references="RHQ_PACKAGE_VERSION" required="true"/>
+ <column name="RESOURCE_ID" type="INTEGER" references="RHQ_RESOURCE" required="true"/>
+ <column name="DEPLOYMENT_CONFIG_ID" type="INTEGER" references="RHQ_CONFIG" required="false"/>
+ <column name="CONTENT_SERVICE_REQUEST_ID" type="INTEGER" references="RHQ_CONTENT_REQ" required="false"/>
+ </table>
+
+ <table name="RHQ_CONTENT_SRC_SYNC">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="STATUS" type="VARCHAR2" size="16" required="true"/>
+ <column name="START_TIME" type="LONG" required="true"/>
+ <column name="END_TIME" type="LONG" required="false"/>
+ <column name="RESULTS" type="LONGVARCHAR" required="false"/>
+
+ <column name="CONTENT_SRC_ID" type="INTEGER" required="true" references="RHQ_CONTENT_SOURCE"/>
+ </table>
+
+ <table name="RHQ_PACKAGE_INST_STEP">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="STEP_KEY" type="VARCHAR2" size="500" required="true"/>
+ <column name="STEP_ORDER" type="INTEGER" required="true"/>
+ <column name="DESCRIPTION" type="VARCHAR2" size="4000" required="true"/>
+ <column name="ERROR_MSG" type="LONGVARCHAR" required="false"/>
+ <column name="RESULT" type="VARCHAR2" size="25" required="true"/>
+
+ <column name="INSTALLED_PKG_HIST_ID" type="INTEGER" references="RHQ_INSTALLED_PKG_HIST"/>
+ </table>
+
+ <table name="RHQ_CHANNEL_RESOURCE_MAP">
+ <column name="CHANNEL_ID" type="INTEGER" required="true" references="RHQ_CHANNEL"/>
+ <column name="RESOURCE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE"/>
+ <column name="CTIME" type="LONG" required="true"/>
+
+ <constraint name="RHQ_CHANNEL_RESOURCE_MAP_KEY">
+ <primaryKey>
+ <field ref="CHANNEL_ID"/>
+ <field ref="RESOURCE_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_CHANNEL_CONTENT_SRC_MAP">
+ <column name="CHANNEL_ID" type="INTEGER" required="true" references="RHQ_CHANNEL"/>
+ <column name="CONTENT_SRC_ID" type="INTEGER" required="true" references="RHQ_CONTENT_SOURCE"/>
+ <column name="CTIME" type="LONG" required="true"/>
+
+ <constraint name="RHQ_CHAN_CONTENT_SRC_MAP_KEY">
+ <primaryKey>
+ <field ref="CHANNEL_ID"/>
+ <field ref="CONTENT_SRC_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_CHANNEL_PKG_VERSION_MAP">
+ <column name="CHANNEL_ID" type="INTEGER" required="true" references="RHQ_CHANNEL"/>
+ <column name="PACKAGE_VERSION_ID" type="INTEGER" required="true" references="RHQ_PACKAGE_VERSION"/>
+ <column name="CTIME" type="LONG" required="true"/>
+
+ <constraint name="RHQ_CHANNEL_PKG_VER_MAP_KEY">
+ <primaryKey>
+ <field ref="CHANNEL_ID"/>
+ <field ref="PACKAGE_VERSION_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_PKG_VER_CONTENT_SRC_MAP">
+ <column name="PACKAGE_VERSION_ID" type="INTEGER" required="true" references="RHQ_PACKAGE_VERSION"/>
+ <column name="CONTENT_SRC_ID" type="INTEGER" required="true" references="RHQ_CONTENT_SOURCE"/>
+ <column name="LOCATION" type="VARCHAR2" size="4000" required="true"/>
+
+ <constraint name="RHQ_PKG_VER_CONTENT_SRC_KEY">
+ <primaryKey>
+ <field ref="PACKAGE_VERSION_ID"/>
+ <field ref="CONTENT_SRC_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_PKG_PRD_MAP">
+ <column name="PKG_ID" type="INTEGER" required="true" references="RHQ_PACKAGE_VERSION"/>
+ <column name="PRD_ID" type="INTEGER" required="true" references="RHQ_PRD_VER"/>
+
+ <constraint name="RHQ_PKG_PRD_KEY">
+ <primaryKey>
+ <field ref="PKG_ID"/>
+ <field ref="PRD_ID"/>
+ </primaryKey>
+ </constraint>
+
+ </table>
+
+<!-- END: content-schema.xml -->
+<!-- BEGIN: resource-request-schema.xml -->
+
+
+ <table name="RHQ_CREATE_RES_HIST">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="PARENT_RESOURCE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE"/>
+ <column name="CREATED_RESOURCE_NAME" type="VARCHAR2" size="500" required="false"/>
+ <column name="NEW_RESOURCE_KEY" type="VARCHAR2" required="false" size="500"/>
+ <column name="STATUS" type="VARCHAR2" required="true" size="16"/>
+ <column name="ERROR_MESSAGE" type="LONGVARCHAR" required="false"/>
+ <column name="SUBJECT_NAME" type="VARCHAR2" required="true" size="100"/>
+ <column name="CTIME" type="LONG" required="true"/>
+ <column name="MTIME" type="LONG" required="true"/>
+ <column name="RESOURCE_TYPE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE_TYPE"/>
+ <column name="CONFIGURATION_ID" type="INTEGER" required="false" references="RHQ_CONFIG"/>
+ <column name="INSTALLED_PACKAGE_ID" type="INTEGER" required="false" references="RHQ_INSTALLED_PACKAGE"/>
+ </table>
+
+ <table name="RHQ_DELETE_RES_HIST">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="ERROR_MESSAGE" type="LONGVARCHAR" required="false"/>
+ <column name="SUBJECT_NAME" type="VARCHAR2" required="true" size="100"/>
+ <column name="CTIME" type="LONG" required="true"/>
+ <column name="MTIME" type="LONG" required="true"/>
+ <column name="STATUS" type="VARCHAR2" required="true" size="16"/>
+ <column name="RESOURCE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE"/>
+ </table>
+
+<!-- END: resource-request-schema.xml -->
+<!-- BEGIN: jms-schema.xml -->
+
+<!-- the schema matches that which would be automatically created by the JMS subsystem -->
+<!-- see deploy/jms/rhq-jdbc-state-service.xml and rhq-jdbc2-service.xml -->
+
+
+ <table name="JMS_MESSAGES">
+ <column name="MESSAGEID" required="true" type="INTEGER" />
+ <column name="DESTINATION" required="true" type="VARCHAR2" size="255" />
+ <column name="TXID" required="false" type="INTEGER" />
+ <column name="TXOP" required="false" type="CHAR" size="1" />
+ <column name="MESSAGEBLOB" required="false" type="BLOB" />
+
+ <constraint name="JMS_MESSAGES_PKEY">
+ <primaryKey>
+ <field ref="MESSAGEID"/>
+ <field ref="DESTINATION"/>
+ </primaryKey>
+ </constraint>
+
+ <index name="JMS_MESSAGES_TXOP_TXID">
+ <field ref="TXOP"/>
+ <field ref="TXID"/>
+ </index>
+ <index name="JMS_MESSAGES_DESTINATION">
+ <field ref="DESTINATION"/>
+ </index>
+ </table>
+
+ <table name="JMS_TRANSACTIONS">
+ <column name="TXID" required="true" type="INTEGER" primarykey="true" />
+ </table>
+
+ <table name="JMS_USERS">
+ <column name="USERID" required="true" type="VARCHAR2" size="32" primarykey="true" />
+ <column name="PASSWD" required="true" type="VARCHAR2" size="32" />
+ <column name="CLIENTID" required="false" type="VARCHAR2" size="128" />
+ </table>
+
+ <table name="JMS_ROLES">
+ <column name="ROLEID" required="true" type="VARCHAR2" size="32" />
+ <column name="USERID" required="true" type="VARCHAR2" size="32" />
+
+ <constraint name="JMS_ROLES_PKEY">
+ <primaryKey>
+ <field ref="USERID"/>
+ <field ref="ROLEID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="JMS_SUBSCRIPTIONS">
+ <column name="CLIENTID" required="true" type="VARCHAR2" size="128" />
+ <column name="SUBNAME" required="true" type="VARCHAR2" size="128" />
+ <column name="TOPIC" required="true" type="VARCHAR2" size="255" />
+ <column name="SELECTOR" required="false" type="VARCHAR2" size="255" />
+
+ <constraint name="JMS_SUBSCRIPTIONS_PKEY">
+ <primaryKey>
+ <field ref="CLIENTID"/>
+ <field ref="SUBNAME"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+<!-- END: jms-schema.xml -->
+<!-- BEGIN: alert-schema.xml -->
+
+
+ <table name="RHQ_ALERT_DEFINITION">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" required="true" size="100" type="VARCHAR2"/>
+ <column name="CTIME" type="LONG" required="true"/>
+ <column name="MTIME" type="LONG" required="true"/>
+ <column name="PARENT_ID" type="INTEGER" required="false"/>
+ <column name="GROUP_ALERT_DEF_ID" type="INTEGER" required="false"/>
+ <column name="DESCRIPTION" required="false" size="250" type="VARCHAR2"/>
+ <column name="PRIORITY" type="VARCHAR2" size="15" required="true"/>
+ <column name="RESOURCE_TYPE_ID" type="INTEGER" references="RHQ_RESOURCE_TYPE" required="false"/>
+ <column name="RESOURCE_ID" type="INTEGER" references="RHQ_RESOURCE" required="false"/>
+ <column name="RESOURCE_GROUP_ID" type="INTEGER" references="RHQ_RESOURCE_GROUP" required="false"/>
+ <column name="ENABLED" required="true" default="TRUE" type="BOOLEAN"/>
+
+ <column name="REQUIRED" required="true" type="SMALLINT"/>
+
+ <column name="RECOVERY_ID" type="INTEGER" required="true"/>
+ <!-- required, but 0 effectively means null -->
+ <column name="WILL_RECOVER" required="true" default="false" type="BOOLEAN"/>
+ <column name="NOTIFY_FILTERED" required="true" default="false" type="BOOLEAN"/>
+ <column name="CONTROL_FILTERED" required="true" default="FALSE" type="BOOLEAN"/>
+
+ <column name="DELETED" required="true" default="FALSE" type="BOOLEAN"/>
+ <column name="READ_ONLY" required="true" default="FALSE" type="BOOLEAN"/>
+
+ <column name="DAMPENING_CATEGORY" type="SMALLINT" required="true"/>
+ <column name="DAMPENING_VALUE" type="INTEGER"/>
+ <column name="DAMPENING_VALUE_UNITS" type="SMALLINT"/>
+ <column name="DAMPENING_PERIOD" type="INTEGER"/>
+ <column name="DAMPENING_PERIOD_UNITS" type="SMALLINT"/>
+
+ <column name="OPERATION_DEF_ID" type="INTEGER" references="RHQ_OPERATION_DEF(ID)"/>
+ </table>
+
+ <table name="RHQ_ALERT_DAMPEN_EVENT">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="ALERT_DEFINITION_ID" required="false" type="INTEGER" references="RHQ_ALERT_DEFINITION(ID)"/>
+ <column name="EVENT_TYPE" required="true" type="SMALLINT"/>
+ <column name="EVENT_TIMESTAMP" required="true" type="LONG"/>
+
+ <index name="RHQ_DAMPENING_EVENT_TYPE_IDX">
+ <field ref="EVENT_TYPE"/>
+ </index>
+ <index name="RHQ_DAMPENING_EVENT_TS_IDX">
+ <field ref="EVENT_TIMESTAMP"/>
+ </index>
+ </table>
+
+ <table name="RHQ_ALERT_CONDITION">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="TYPE" required="true" type="VARCHAR2" size="15"/>
+ <!--
+ <column name="REQUIRED" required="true" type="BOOLEAN"/>
+ -->
+ <column name="MEASUREMENT_DEFINITION_ID" required="false" type="INTEGER"/>
+ <column name="NAME" required="false" size="100" type="VARCHAR2"/>
+ <column name="COMPARATOR" required="false" size="2" type="VARCHAR2"/>
+ <column name="THRESHOLD" required="false" type="DOUBLE"/>
+ <!-- event-based conditions use OPTION_STATUS for the string match, so should be a decent length -->
+ <column name="OPTION_STATUS" required="false" size="256" type="VARCHAR2"/>
+ <column name="ALERT_DEFINITION_ID" required="false" type="INTEGER" references="RHQ_ALERT_DEFINITION(ID)"/>
+ <column name="TRIGGER_ID" required="false" type="INTEGER"/>
+ </table>
+
+ <table name="RHQ_ALERT" tablespace="DEFAULT"
+ storage-options="freelists 5" cache="true" logging="false">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="ALERT_DEFINITION_ID" required="false" type="INTEGER" references="RHQ_ALERT_DEFINITION(ID)"/>
+ <column name="CTIME" required="true" type="LONG"/>
+ <column name="TRIGGERED_OPERATION" required="false" type="VARCHAR2" size="255"/>
+ <column name="RECOVERY_ID" type="INTEGER" required="true"/>
+ <!-- required, but 0 effectively means null -->
+ <column name="WILL_RECOVER" required="true" default="false" type="BOOLEAN"/>
+ <index name="RHQ_ALERT_IDX_TIME" unique="false">
+ <field ref="CTIME"/>
+ </index>
+ <index name="RHQ_ALERT_IDX_ALERTDEF" unique="false">
+ <field ref="ALERT_DEFINITION_ID"/>
+ </index>
+ </table>
+
+ <table name="RHQ_ALERT_NOTIF_LOG" tablespace="DEFAULT"
+ storage-options="freelists 5" cache="true" logging="false">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="ALERT_ID" required="true" type="INTEGER" references="RHQ_ALERT(ID)"/>
+ <index name="RHQ_ALERT_IDX_ALERT" unique="true">
+ <field ref="ALERT_ID"/>
+ </index>
+ <column name="ROLES" required="false" size="200" type="VARCHAR2"/>
+ <column name="SUBJECTS" required="false" size="200" type="VARCHAR2"/>
+ <column name="EMAILS" required="false" size="200" type="VARCHAR2"/>
+ </table>
+
+ <table name="RHQ_ALERT_CONDITION_LOG" tablespace="DEFAULT"
+ storage-options="freelists 5" cache="true" logging="false">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="CTIME" required="true" type="LONG"/>
+ <column name="ALERT_ID" required="false" type="INTEGER" references="RHQ_ALERT(ID)"/>
+ <column name="CONDITION_ID" required="true" type="INTEGER" references="RHQ_ALERT_CONDITION(ID)"/>
+ <column name="VALUE" required="false" size="250" type="VARCHAR2"/>
+ <index name="RHQ_ALERT_COND_LOG_IDX_TIME">
+ <field ref="CTIME" />
+ </index>
+ <index name="RHQ_ALERT_COND_LOG_IDX_ALERT">
+ <field ref="ALERT_ID"/>
+ </index>
+ </table>
+
+ <table name="RHQ_ALERT_NOTIFICATION" tablespace="DEFAULT"
+ storage-options="freelists 5" cache="true" logging="false">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="NOTIFICATION_TYPE" required="true" size="20" type="VARCHAR2"/>
+ <column name="ALERT_DEFINITION_ID" required="false" type="INTEGER" references="RHQ_ALERT_DEFINITION(ID)"/>
+ <column name="ROLE_ID" type="INTEGER" references="RHQ_ROLE(ID)"/>
+ <column name="SUBJECT_ID" type="INTEGER" references="RHQ_SUBJECT(ID)"/>
+ <column name="EMAIL_ADDRESS" size="100" type="VARCHAR2"/>
+ <column name="SNMP_HOST" size="100" type="VARCHAR2"/>
+ <column name="SNMP_PORT" type="INTEGER"/>
+ <column name="SNMP_OID" size="250" type="VARCHAR2"/>
+ </table>
+
+<!-- END: alert-schema.xml -->
+<!-- BEGIN: event-schema.xml -->
+
+
+ <!-- metadata -->
+
+ <table name="RHQ_EVENT_DEF">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="RESOURCE_TYPE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE_TYPE(ID)"/>
+
+ <column name="NAME" type="VARCHAR2" size="100" required="true"/>
+ <column name="DISPLAY_NAME" type="VARCHAR2" size="100"/>
+ <column name="DESCRIPTION" type="VARCHAR2" size="1000"/>
+
+ <index name="RHQ_EVENT_DEF_IDX" unique="true">
+ <field ref="RESOURCE_TYPE_ID"/>
+ <field ref="NAME"/>
+ </index>
+ </table>
+
+ <!-- instance data -->
+
+ <table name="RHQ_EVENT_SOURCE">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="EVENT_DEF_ID" type="INTEGER" required="true" references="RHQ_EVENT_DEF(ID)"/>
+ <column name="RESOURCE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE(ID)"/>
+
+ <column name="LOCATION" required="true" size="2000" type="VARCHAR2"/>
+
+ <index name="RHQ_EVENT_SOURCE_IDX" unique="true">
+ <field ref="EVENT_DEF_ID"/>
+ <field ref="RESOURCE_ID"/>
+ <field ref="LOCATION"/>
+ </index>
+ </table>
+
+ <table name="RHQ_EVENT">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="EVENT_SOURCE_ID" type="INTEGER" required="true" references="RHQ_EVENT_SOURCE(ID)"/>
+
+ <column name="TIMESTAMP" required="true" type="LONG"/>
+ <column name="SEVERITY" required="true" size="20" type="VARCHAR2"/>
+ <column name="DETAIL" required="true" size="4000" type="VARCHAR2"/>
+ <index name="RHQ_EVENT_IDX" unique="false">
+ <field ref="EVENT_SOURCE_ID"/>
+ <field ref="TIMESTAMP"/>
+ </index>
+ </table>
+
+<!-- END: event-schema.xml -->
+</dbsetup>
diff --git a/modules/enterprise/server/jar/src/test/resources/testng.bak.xml b/modules/enterprise/server/jar/src/test/resources/testng.bak.xml
new file mode 100644
index 0000000..1452edb
--- /dev/null
+++ b/modules/enterprise/server/jar/src/test/resources/testng.bak.xml
@@ -0,0 +1,12 @@
+<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
+
+<suite name="EJB3 Testsuite" >
+ <test name="EJB3 tests" >
+ <groups>
+ <run>
+ <include name="integration.ejb3"/>
+ </run>
+ </groups>
+
+ </test>
+</suite>
diff --git a/modules/enterprise/server/jar/src/test/resources/testng.xml b/modules/enterprise/server/jar/src/test/resources/testng.xml
deleted file mode 100644
index 1452edb..0000000
--- a/modules/enterprise/server/jar/src/test/resources/testng.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
-
-<suite name="EJB3 Testsuite" >
- <test name="EJB3 tests" >
- <groups>
- <run>
- <include name="integration.ejb3"/>
- </run>
- </groups>
-
- </test>
-</suite>
commit 2a0b794d884b5132a9e90e4343e0de5ee248cce5
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Thu Feb 23 17:23:00 2012 -0500
remove dependsOnGroups="drift" attribute from @Test annotation on class, since that group is not defined anywhere
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
index 9294ec8..276b669 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/drift/DriftManagerBeanTest.java
@@ -80,7 +80,7 @@ import org.rhq.enterprise.server.util.LookupUtil;
// TODO: Figure out how to get this test class to run without causing issues in the test-jar generation. I don't
// understand exactly what the deal is but removing this dependency on an itests group causes the server test jar to
// not correctly generate the drift package contents.
-@Test(dependsOnGroups = "drift")
+@Test
public class DriftManagerBeanTest extends AbstractEJB3Test {
private static final boolean ENABLE_TESTS = true;
commit 2803655a41840e91d8a455d12391bf1a50623224
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Thu Feb 23 17:21:23 2012 -0500
minor: comment out some println's that were cluttering stdout
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/ldap/FakeLdapContext.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/ldap/FakeLdapContext.java
index 0df53e8..dad31ce 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/ldap/FakeLdapContext.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/ldap/FakeLdapContext.java
@@ -107,9 +107,9 @@ public class FakeLdapContext implements LdapContext {
public FakeLdapContext() throws NamingException {
super();
- System.out.println("------------------------------------------------");
- System.out.println(FakeLdapContext.class.getCanonicalName() + " initialized");
- System.out.println("------------------------------------------------");
+ //System.out.println("------------------------------------------------");
+ //System.out.println(FakeLdapContext.class.getCanonicalName() + " initialized");
+ //System.out.println("------------------------------------------------");
}
@Override
commit 75d9aa1649ee2608602e91d6c174be917b7f2c10
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Thu Feb 23 17:20:19 2012 -0500
minor: don't print quite so many dots to stdout while creating member Resources of large groups
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/LargeGroupTestBase.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/LargeGroupTestBase.java
index cbafd46..27a08b2 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/LargeGroupTestBase.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/LargeGroupTestBase.java
@@ -176,9 +176,8 @@ public abstract class LargeGroupTestBase extends AbstractEJB3Test {
"LargeGroupTestCompatGroup", lge.serverType);
// create our many server resources
- System.out.print(" Creating resources, this might take some time");
+ System.out.print("=====> Creating member Resources (this might take some time)...");
for (int i = 1; i <= groupSize; i++) {
- System.out.print(((i % 100) == 0) ? String.valueOf(i) : ".");
Resource res = SessionTestHelper.createNewResourceForGroup(em, lge.compatibleGroup,
"LargeGroupTestServer", lge.serverType, (i % 100) == 0);
res.setAgent(lge.agent);
@@ -190,8 +189,14 @@ public abstract class LargeGroupTestBase extends AbstractEJB3Test {
pc.put(new PropertySimple(PC_PROP2_NAME, res.getId()));
em.persist(pc);
res.setPluginConfiguration(pc);
+
+ if ((i % 100) == 0) {
+ System.out.print(i);
+ } else if ((i % 10) == 0) {
+ System.out.print('.');
+ }
}
- System.out.println("Done.");
+ System.out.println(" Done.");
em.flush();
return null;
@@ -205,8 +210,9 @@ public abstract class LargeGroupTestBase extends AbstractEJB3Test {
}
/**
- * Purges all the entities that were created by the {@link #createLargeGroupWithNormalUserRoleAccess(int)} method.
- * This includes the user, role, agent and all resources along with the group itself.
+ * Purges all the entities that were created by the
+ * {@link #createLargeGroupWithNormalUserRoleAccess(int, org.rhq.core.domain.authz.Permission...)} method.
+ * This includes the user, role, agent and all resources, along with the group itself.
*
* @param lge contains information that was created which needs to be deleted
*/
@@ -219,13 +225,17 @@ public abstract class LargeGroupTestBase extends AbstractEJB3Test {
// purge all resources by performing in-band and out-of-band work in quick succession.
// this takes a long time but trying to get this right using native queries is hard to get right so just do it this way.
// only need to delete the platform which will delete all children servers AND the agent itself
- System.out.print(" Removing resources, this might take some time");
+ System.out.print("=====> Removing member Resources (this might take some time)...");
final List<Integer> deletedIds = resourceManager.uninventoryResource(getOverlord(),
lge.platformResource.getId());
- int i = deletedIds.size();
- for (Integer deletedResourceId : deletedIds) {
- System.out.print(((--i % 100) == 0) ? String.valueOf(i) : ".");
+ for (int i = 1, deletedIdsSize = deletedIds.size(); i <= deletedIdsSize; i++) {
+ Integer deletedResourceId = deletedIds.get(i - 1);
resourceManager.uninventoryResourceAsyncWork(getOverlord(), deletedResourceId);
+ if ((i % 100) == 0) {
+ System.out.print(i);
+ } else if ((i % 10) == 0) {
+ System.out.print('.');
+ }
}
System.out.println(" Done.");
commit 7fa87c5a56b90f5296184c74605d2a0dc5c1084b
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Thu Feb 23 17:19:03 2012 -0500
minor: remove unused import
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.java
index 6bda968..989e508 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.java
@@ -57,13 +57,12 @@ import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.enterprise.server.core.comm.ServerCommunicationsService;
import org.rhq.enterprise.server.core.comm.ServerCommunicationsServiceMBean;
-import org.rhq.enterprise.server.resource.ResourceManagerLocal;
import org.rhq.enterprise.server.test.AbstractEJB3Test;
import org.rhq.enterprise.server.util.LookupUtil;
public class DiscoveryBossBeanTest extends AbstractEJB3Test {
private DiscoveryBossLocal discoveryBoss;
- private ResourceManagerLocal resourceManager;
+
private MBeanServer dummyJBossMBeanServer;
private ResourceType platformType;
commit c0737c0f5e6420243137b3c0582afeba4719ec3f
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Thu Feb 23 17:17:38 2012 -0500
turn down log levels to make log file less verbose
diff --git a/modules/enterprise/server/jar/src/test/resources/log4j.xml b/modules/enterprise/server/jar/src/test/resources/log4j.xml
index bc65329..e65d303 100644
--- a/modules/enterprise/server/jar/src/test/resources/log4j.xml
+++ b/modules/enterprise/server/jar/src/test/resources/log4j.xml
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<!-- ===================================================================== -->
@@ -10,8 +11,8 @@
<!-- $Id: log4j.xml 39945 2006-01-12 02:44:07Z bill $ -->
<!--
- | For more configuration infromation and examples see the Jakarta Log4j
- | owebsite: http://jakarta.apache.org/log4j
+ | For more configuration information and examples see the Jakarta Log4j
+ | website: http://jakarta.apache.org/log4j
-->
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="true">
@@ -19,7 +20,7 @@
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="Target" value="System.out"/>
- <param name="Threshold" value="WARN"/>
+ <param name="Threshold" value="ERROR"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Messagen -->
@@ -44,6 +45,30 @@
</layout>
</appender>
+ <category name="STDOUT" additivity="false">
+ <priority value="INFO"/>
+ </category>
+
+ <category name="STDERR" additivity="false">
+ <priority value="ERROR"/>
+ </category>
+
+ <category name="org">
+ <priority value="WARN"/>
+ </category>
+
+ <category name="org.rhq">
+ <priority value="DEBUG"/>
+ </category>
+
+ <category name="org.rhq.enterprise.server.scheduler.SchedulerService">
+ <priority value="WARN"/>
+ </category>
+
+ <category name="org.rhq.enterprise.server.configuration.ConfigurationManagerBean">
+ <priority value="WARN"/>
+ </category>
+
<!-- Hibernate logs WARNINGS frequent from this class, in test envs. -->
<category name="org.hibernate.hql.ast.QueryTranslatorImpl">
<priority value="ERROR"/>
commit ffad3bbe5d11cf62073fe02f67d2cc45010ec98f
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Thu Feb 23 17:16:11 2012 -0500
[BZ 796437] make sure superusers or users w/ MANAGE_SECURITY can view other users, even if they don't have VIEW_USERS (https://bugzilla.redhat.com/show_bug.cgi?id=796437)
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/auth/SubjectManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/auth/SubjectManagerBean.java
index 1265aa7..3562b3f 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/auth/SubjectManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/auth/SubjectManagerBean.java
@@ -776,11 +776,18 @@ public class SubjectManagerBean implements SubjectManagerLocal, SubjectManagerRe
CriteriaQueryGenerator generator = new CriteriaQueryGenerator(subject, criteria);
CriteriaQueryRunner<Subject> queryRunner = new CriteriaQueryRunner<Subject>(criteria, generator, entityManager);
PageList<Subject> subjects = queryRunner.execute();
- if (!authorizationManager.hasGlobalPermission(subject, Permission.VIEW_USERS)) {
- subjects.clear();
- Subject attachedSubject = entityManager.find(Subject.class, subject.getId());
- subjects.add(attachedSubject);
- subjects.setTotalSize(1);
+ boolean canViewUsers = (authorizationManager.isSystemSuperuser(subject) ||
+ authorizationManager.hasGlobalPermission(subject, Permission.MANAGE_SECURITY) ||
+ authorizationManager.hasGlobalPermission(subject, Permission.VIEW_USERS));
+ if (!canViewUsers) {
+ if (subjects.contains(subject)) {
+ Subject attachedSubject = subjects.get(subjects.indexOf(subject));
+ subjects.clear();
+ subjects.add(attachedSubject);
+ } else {
+ subjects.clear();
+ }
+ subjects.setTotalSize(subjects.size());
}
return subjects;
}
commit e23eb584ae46e54b93606cebf3a61d98fc7228e6
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Thu Feb 23 17:04:31 2012 -0500
upgrade Log4J from 1.2.14 to 1.2.16 and define this version once in the root pom, from which all other poms will inherit it
diff --git a/etc/samples/perspectives/sample-perspective/perspective/pom.xml b/etc/samples/perspectives/sample-perspective/perspective/pom.xml
index ce97a56..d29d240 100644
--- a/etc/samples/perspectives/sample-perspective/perspective/pom.xml
+++ b/etc/samples/perspectives/sample-perspective/perspective/pom.xml
@@ -48,7 +48,7 @@
<!-- uncomment the one of the three logging systems your plugin uses: log4j, commons-logging or i18nlog -->
<!-- all three are provided to your plugin by the server/plugin-container -->
<!--
- <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.14</version>
+ <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId>
<scope>provided</scope> </dependency>
-->
diff --git a/modules/core/native-system/ant-run.xml b/modules/core/native-system/ant-run.xml
index b1a23fd..51507a7 100644
--- a/modules/core/native-system/ant-run.xml
+++ b/modules/core/native-system/ant-run.xml
@@ -12,10 +12,11 @@ Ant Script that builds a test jar to run SIGAR bug replication code.
<property name="settings.localRepository" location="${user.home}/.m2/repository"/>
<property name="project.version" value="3.0.0-SNAPSHOT"/>
<property name="sigar.version" value="1.6.5.132"/>
+ <property name="log4j.version" value="1.2.16"/>
<fileset dir="${settings.localRepository}" id="jar.fileset">
<include name="i18nlog/i18nlog/1.0.10/i18nlog-1.0.10.jar" />
- <include name="log4j/log4j/1.2.14/log4j-1.2.14.jar" />
+ <include name="log4j/log4j/${log4j.version}/log4j-${log4j.version}.jar" />
<include name="org/testng/testng/5.1/testng-5.1-jdk15.jar" />
<include name="commons-logging/commons-logging/1.1/commons-logging-1.1.jar" />
<include name="org/rhq/rhq-core-util/${project.version}/rhq-core-util-${project.version}.jar" />
diff --git a/modules/enterprise/agent/ant-run.xml b/modules/enterprise/agent/ant-run.xml
index ddaeeba..456a260 100644
--- a/modules/enterprise/agent/ant-run.xml
+++ b/modules/enterprise/agent/ant-run.xml
@@ -20,6 +20,7 @@ Ant Script that provides ways to package the Agent.
<property name="getopt.version" value="1.0.13"/>
<property name="jaxb-api.version" value="2.1"/>
<property name="jaxb-impl.version" value="2.1"/>
+ <property name="log4j.version" value="1.2.16"/>
<!--
=======================================================================
@@ -38,7 +39,7 @@ Ant Script that provides ways to package the Agent.
<fileset dir="${settings.localRepository}" id="run.classpath.fileset">
<include name="javax/persistence/persistence-api/1.0/persistence-api-1.0.jar" />
<include name="i18nlog/i18nlog/1.0.10/i18nlog-1.0.10.jar" />
- <include name="log4j/log4j/1.2.14/log4j-1.2.14.jar" />
+ <include name="log4j/log4j/${log4j.version}/log4j-${log4j.version}.jar" />
<include name="jline/jline/${jline.version}/jline-${jline.version}.jar" />
<include name="commons-logging/commons-logging/1.1.0.jboss/commons-logging-1.1.0.jboss.jar" />
<include name="gnu-getopt/getopt/${getopt.version}/getopt-${getopt.version}.jar" />
diff --git a/modules/enterprise/agent/pom.xml b/modules/enterprise/agent/pom.xml
index b446c3d..0031cce 100644
--- a/modules/enterprise/agent/pom.xml
+++ b/modules/enterprise/agent/pom.xml
@@ -183,6 +183,7 @@ Build-Number=${buildNumber}
<property name="augeas.zip.location" value="${augeas.zip.location}"/>
<property name="augeas.zip.mask" value="${augeas.zip.mask}"/>
<property name="augeas.zip.version" value="${augeas.zip.version}" />
+ <property name="log4j.version" value="${log4j.version}" />
</ant>
</tasks>
</configuration>
diff --git a/modules/enterprise/agentupdate/pom.xml b/modules/enterprise/agentupdate/pom.xml
index cb61cfd..daa2338 100644
--- a/modules/enterprise/agentupdate/pom.xml
+++ b/modules/enterprise/agentupdate/pom.xml
@@ -92,7 +92,7 @@ rhq-agent.latest.build-number=${buildNumber}
<copy file="${settings.localRepository}/org/rhq/rhq-enterprise-agent/${project.version}/rhq-enterprise-agent-${project.version}.zip" todir="${project.build.outputDirectory}" />
<fileset dir="${settings.localRepository}" id="run.classpath.fileset">
<!-- we do not need logging (yet) in AgentUpdate
- <include name="log4j/log4j/1.2.14/log4j-1.2.14.jar" />
+ <include name="log4j/log4j/${log4j.version}/log4j-${log4j.version}.jar" />
<include name="commons-logging/commons-logging/${commons-logging.version}/commons-logging-${commons-logging.version}.jar" />
-->
<include name="gnu-getopt/getopt/${getopt.version}/getopt-${getopt.version}.jar" />
diff --git a/modules/enterprise/remoting/cli/pom.xml b/modules/enterprise/remoting/cli/pom.xml
index 21e9c47..8424043 100644
--- a/modules/enterprise/remoting/cli/pom.xml
+++ b/modules/enterprise/remoting/cli/pom.xml
@@ -15,7 +15,6 @@
<description>RHQ Enterprise Remote Command Line Interface</description>
<properties>
- <log4j.version>1.2.14</log4j.version>
<persistence-api.version>1.0</persistence-api.version>
<hibernate-all.version>1.0.0.Alpha9</hibernate-all.version>
<opencsv.version>1.8</opencsv.version>
diff --git a/modules/enterprise/remoting/client-api/pom.xml b/modules/enterprise/remoting/client-api/pom.xml
index 257a9dd..af3ecd8 100644
--- a/modules/enterprise/remoting/client-api/pom.xml
+++ b/modules/enterprise/remoting/client-api/pom.xml
@@ -15,7 +15,6 @@
<description>a set of client APIs used to connect to an RHQ Server and invoke methods on it</description>
<properties>
- <log4j.version>1.2.14</log4j.version>
<persistence-api.version>1.0</persistence-api.version>
<hibernate-all.version>1.0.0.Alpha9</hibernate-all.version>
</properties>
diff --git a/pom.xml b/pom.xml
index 344848c..a56fcd9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -78,6 +78,7 @@
<jaxb-impl.version>2.1.9</jaxb-impl.version>
<jsf-api.version>1.2_14</jsf-api.version>
<jsf-impl.version>1.2_14</jsf-impl.version>
+ <log4j.version>1.2.16</log4j.version>
<ojdbc6.version>11.2.0.3.0</ojdbc6.version>
<ems.version>1.3</ems.version>
<postgresql.version>9.1-901.jdbc4</postgresql.version>
@@ -92,7 +93,7 @@
<twitter4j.version>2.2.4</twitter4j.version>
<commons-codec.version>1.4</commons-codec.version>
<!-- NOTE (ips, 10/04/11): Upgrading testng to 6.2.x causes 10 server-jar tests to fail for an unknown reason. -->
- <!-- NOTE (jshaughn, 01/20/12): With the latest work, the sserver-jar tests passed using testng to 6.3.1, so perhaps an upgrade is possible -->
+ <!-- NOTE (jshaughn, 01/20/12): With the latest work, the server-jar tests passed using testng to 6.3.1, so perhaps an upgrade is possible -->
<testng.version>6.1.1</testng.version>
<cobertura.version>1.9.4.1</cobertura.version>
<augeas.version>0.9.0</augeas.version>
@@ -234,7 +235,8 @@
<dependency>
<groupId>jboss</groupId>
- <artifactId>jboss-ejb3-client</artifactId>
+ <artifactId>jboss-ejb3</artifactId>
+ <classifier>client</classifier>
<version>${jboss.version}</version>
</dependency>
@@ -479,7 +481,7 @@
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
- <version>1.2.14</version>
+ <version>${log4j.version}</version>
<scope>provided</scope>
</dependency>
@@ -609,9 +611,11 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
+ <!-- NOTE: We cannot upgrade to 2.11 or later until http://jira.codehaus.org/browse/SUREFIRE-831 is fixed,
+ since a bunch of our test group names contain dashes. -->
<version>2.10</version>
<configuration>
- <argLine>-Xms16M -Xmx512M</argLine>
+ <argLine>-Xms32M -Xmx512M</argLine>
</configuration>
</plugin>
<plugin>
commit 62ab38e11d1fef13bc0eb13d4c269d9a58ffa69d
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Thu Feb 23 17:01:23 2012 -0500
add a TestNG suite/test lifecycle listener that prints info to stdout as suites and tests start and finish
diff --git a/modules/test-utils/src/main/java/org/rhq/test/testng/StdoutReporter.java b/modules/test-utils/src/main/java/org/rhq/test/testng/StdoutReporter.java
new file mode 100644
index 0000000..a345cda
--- /dev/null
+++ b/modules/test-utils/src/main/java/org/rhq/test/testng/StdoutReporter.java
@@ -0,0 +1,132 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.test.testng;
+
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import org.testng.ISuite;
+import org.testng.ISuiteListener;
+import org.testng.ITestContext;
+import org.testng.ITestListener;
+import org.testng.ITestNGMethod;
+import org.testng.ITestResult;
+
+/**
+ * Prints messages to stdout during a TestNG execution, as suites, test classes, and tests are started and finished.
+ *
+ * @author Ian Springer
+ */
+public class StdoutReporter implements ISuiteListener, ITestListener {
+
+ @Override
+ public void onStart(ISuite suite) {
+ List<String> testMethodNames = getTestMethodNames(suite);
+ System.out.println("(" + getDateTime() + ")" + " Running suite [" + suite.getName() + "] containing tests "
+ + testMethodNames + " --- excluding tests " + getTestMethodNames(suite.getExcludedMethods()) + "...");
+ }
+
+ @Override
+ public void onFinish(ISuite suite) {
+ System.out.println("(" + getDateTime() + ")" + " Done running suite [" + suite.getName() + "].");
+ }
+
+ @Override
+ public void onTestStart(ITestResult result) {
+ String testMethodName = getQualifiedMethodName(result.getMethod());
+ System.out.println("(" + getDateTime() + ")" + " Running test [" + testMethodName + "]...");
+ }
+
+ @Override
+ public void onTestSuccess(ITestResult result) {
+ return;
+ }
+
+ @Override
+ public void onTestFailure(ITestResult result) {
+ return;
+ }
+
+ @Override
+ public void onTestSkipped(ITestResult result) {
+ return;
+ }
+
+ @Override
+ public void onTestFailedButWithinSuccessPercentage(ITestResult result) {
+ return;
+ }
+
+ @Override
+ public void onStart(ITestContext context) {
+ String testClassName = getTestClassName(context);
+ System.out.println("(" + getDateTime() + ")" + " Running test class [" + testClassName + "]...");
+ }
+
+ @Override
+ public void onFinish(ITestContext context) {
+ String testClassName = getTestClassName(context);
+ System.out.println("(" + getDateTime() + ")" + " Done running test class [" + testClassName + "].");
+ }
+
+ private static String getDateTime() {
+ return SimpleDateFormat.getTimeInstance().format(new Date());
+ }
+
+ private static List<String> getTestMethodNames(ISuite suite) {
+ List<String> testMethodNames = new ArrayList<String>();
+ Map<String, Collection<ITestNGMethod>> methodsByGroups = suite.getMethodsByGroups();
+ for (String group : methodsByGroups.keySet()) {
+ Collection<ITestNGMethod> methods = methodsByGroups.get(group);
+ testMethodNames.addAll(getTestMethodNames(methods));
+ }
+ return testMethodNames;
+ }
+
+ private static List<String> getTestMethodNames(Collection<ITestNGMethod> methods) {
+ List<String> testMethodNames = new ArrayList<String>();
+ for (ITestNGMethod method : methods) {
+ if (method.isTest()) {
+ String testMethodName = getQualifiedMethodName(method);
+ testMethodNames.add(testMethodName);
+ }
+ }
+ return testMethodNames;
+ }
+
+ private static String getQualifiedMethodName(ITestNGMethod method) {
+ return method.getTestClass().getRealClass().getSimpleName() + "." + method.getMethodName();
+ }
+
+ private static String getTestClassName(ITestContext context) {
+ String testClassName;
+ ITestNGMethod[] testMethods = context.getAllTestMethods();
+ if (testMethods != null && testMethods.length != 0) {
+ testClassName = testMethods[0].getTestClass().getRealClass().getSimpleName();
+ } else {
+ testClassName = "?";
+ }
+ return testClassName;
+ }
+
+}
commit 67a7aad645a0792dd5b4bc55074edae485ede0ad
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Thu Feb 23 16:59:09 2012 -0500
if an SQLException is thrown, wrap it in an ExtendedSQLException, so an outer catch block can include the SQL when logging the SQLException
diff --git a/modules/core/dbutils/src/main/java/org/rhq/core/db/reset/DBReset.java b/modules/core/dbutils/src/main/java/org/rhq/core/db/reset/DBReset.java
index ce12786..c09d315 100644
--- a/modules/core/dbutils/src/main/java/org/rhq/core/db/reset/DBReset.java
+++ b/modules/core/dbutils/src/main/java/org/rhq/core/db/reset/DBReset.java
@@ -16,17 +16,18 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
package org.rhq.core.db.reset;
import java.sql.Connection;
import java.sql.PreparedStatement;
+import java.sql.SQLException;
import java.sql.Statement;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.rhq.core.db.DbUtil;
+import org.rhq.core.db.ExtendedSQLException;
//import groovy.sql.Sql;
@@ -68,72 +69,90 @@ public class DBReset {
public void performDBReset(String dbTypeMapping, String dbUrl, String dbName, String user, String adminUser,
String adminPassword) throws Exception {
- if (dbTypeMapping.equals("PostgreSQL")) {
- System.out.println("PostgreSQL started!");
- Connection connection = null;
- Statement dropDB = null;
- Statement createDB = null;
-
- try {
- connection = DbUtil.getConnection(dbUrl.replace(dbName, "postgres"), adminUser, adminPassword);
-
- dropDB = connection.createStatement();
- dropDB.execute("drop database if exists " + dbName);
-
- createDB = connection.createStatement();
- createDB.execute("create database " + dbName + " with owner " + user);
-
- log.info("Dropped and created postgres database " + dbName + ".");
- } finally {
- if (dropDB != null) {
- dropDB.close();
- }
- if (createDB != null) {
- createDB.close();
+ try {
+ if (dbTypeMapping.equals("PostgreSQL")) {
+ System.out.println("PostgreSQL started!");
+ Connection connection = null;
+ Statement dropDB = null;
+ Statement createDB = null;
+
+ try {
+ connection = DbUtil.getConnection(dbUrl.replace(dbName, "postgres"), adminUser, adminPassword);
+
+ dropDB = connection.createStatement();
+ String dropSql = "drop database if exists " + dbName;
+ try {
+ dropDB.execute(dropSql);
+ } catch (SQLException e) {
+ throw new ExtendedSQLException(e, dropSql);
+ }
+
+ createDB = connection.createStatement();
+ String createSql = "create database " + dbName + " with owner " + user;
+ try {
+ createDB.execute(createSql);
+ } catch (SQLException e) {
+ throw new ExtendedSQLException(e, createSql);
+ }
+
+ log.info("Dropped and created postgres database " + dbName + ".");
+ } finally {
+ if (dropDB != null) {
+ dropDB.close();
+ }
+ if (createDB != null) {
+ createDB.close();
+ }
+ if (connection != null) {
+ connection.close();
+ }
}
- if (connection != null) {
- connection.close();
+ } else if (dbTypeMapping.equals("Oracle10g")) {
+ Connection connection = null;
+ PreparedStatement cleanUserStatement = null;
+
+ try {
+ connection = DbUtil.getConnection(dbUrl, adminUser, adminPassword);
+ connection.setAutoCommit(false);
+
+ String plsql = "declare cursor all_objects_to_drop is\n"
+ + "select * from user_objects where object_type in ('TABLE', 'VIEW', 'FUNCTION', 'SEQUENCE');\n"
+ + "begin\n"
+ + " for obj in all_objects_to_drop loop\n"
+ + " begin\n"
+ + " if obj.object_type = 'TABLE' then\n"
+ + " execute immediate('DROP '||obj.object_type||' '||obj.object_name||' CASCADE CONSTRAINTS PURGE');\n"
+ + " else\n"
+ + " execute immediate('DROP '||obj.object_type||' '||obj.object_name);\n"
+ + " end if;\n"
+ + " exception when others then null;\n"
+ + " end;\n"
+ + " end loop;\n"
+ + " end;\n";
+ try {
+ cleanUserStatement = connection.prepareStatement(plsql);
+ } catch (SQLException e) {
+ throw new ExtendedSQLException(e, plsql);
+ }
+ cleanUserStatement.execute();
+ connection.commit();
+
+ log.info("Cleaned Oracle database " + dbName + ".");
+ } finally {
+ if (cleanUserStatement != null) {
+ cleanUserStatement.close();
+ }
+ if (connection != null) {
+ connection.close();
+ }
}
-
}
- } else if (dbTypeMapping.equals("Oracle10g")) {
- Connection connection = null;
- PreparedStatement cleanUserStatement = null;
-
- try {
- connection = DbUtil.getConnection(dbUrl, adminUser, adminPassword);
- connection.setAutoCommit(false);
-
- String plsql = "declare cursor all_objects_to_drop is\n"
- + "select * from user_objects where object_type in ('TABLE', 'VIEW', 'FUNCTION', 'SEQUENCE');\n"
- + "begin\n"
- + " for obj in all_objects_to_drop loop\n"
- + " begin\n"
- + " if obj.object_type = 'TABLE' then\n"
- + " execute immediate('DROP '||obj.object_type||' '||obj.object_name||' CASCADE CONSTRAINTS PURGE');\n"
- + " else\n"
- + " execute immediate('DROP '||obj.object_type||' '||obj.object_name);\n"
- + " end if;\n"
- + " exception when others then null;\n"
- + " end;\n"
- + " end loop;\n"
- + " end;\n";
- cleanUserStatement = connection.prepareStatement(plsql);
- cleanUserStatement.execute();
- connection.commit();
-
- log.info("Cleaned Oracle database " + dbName + ".");
- } finally {
- if (cleanUserStatement != null) {
- cleanUserStatement.close();
- }
- if (connection != null) {
- connection.close();
- }
+ else {
+ throw new Exception("dbreset not supported for "+ dbTypeMapping +"!");
}
- }
- else {
- throw new Exception("dbreset not supported for "+ dbTypeMapping +"!");
+ } catch (SQLException e) {
+ log.error(DbUtil.getSQLExceptionString(e));
+ throw e;
}
}
}
commit f89134fbef3b076ccdb048a77296375e83d5c3cd
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Wed Feb 22 23:54:04 2012 +0100
[BZ 796405] - Catching any throwable while running a CLI script alert
notification. This will ensure that whatever exception happens (that the
script engine doesn't catch and rethrow as ScriptException) will cause the
notification to fail and be reported as such.
diff --git a/modules/enterprise/server/plugins/alert-cli/src/main/java/org/rhq/enterprise/server/plugins/alertCli/CliSender.java b/modules/enterprise/server/plugins/alert-cli/src/main/java/org/rhq/enterprise/server/plugins/alertCli/CliSender.java
index deba524..da003f6 100644
--- a/modules/enterprise/server/plugins/alert-cli/src/main/java/org/rhq/enterprise/server/plugins/alertCli/CliSender.java
+++ b/modules/enterprise/server/plugins/alert-cli/src/main/java/org/rhq/enterprise/server/plugins/alertCli/CliSender.java
@@ -103,6 +103,7 @@ public class CliSender extends AlertSender<CliComponent> {
private static class ExceptionHolder {
public ScriptException scriptException;
+ public Throwable throwable;
}
public SenderResult send(Alert alert) {
@@ -136,11 +137,14 @@ public class CliSender extends AlertSender<CliComponent> {
final ScriptEngine e = engine;
Thread scriptRunner = new Thread(new Runnable() {
+ @Override
public void run() {
try {
- e.eval(rdr);
+ e.eval(rdr);
} catch (ScriptException e) {
exceptionHolder.scriptException = e;
+ } catch (Throwable e) {
+ exceptionHolder.throwable = e;
}
}
}, "Script Runner for alert " + alert);
@@ -166,6 +170,11 @@ public class CliSender extends AlertSender<CliComponent> {
int line = exceptionHolder.scriptException.getLineNumber();
String scriptName = createSummary(config, "script $packageName ($packageVersion) in repo $repoName");
throw new ScriptException(message, scriptName, line, col);
+ } else if (exceptionHolder.throwable != null) {
+ LOG.info("The script execution for CLI notification of alert [" + alert + "] failed.",
+ exceptionHolder.throwable);
+
+ throw exceptionHolder.throwable;
}
scriptOut.flush();
@@ -184,7 +193,7 @@ public class CliSender extends AlertSender<CliComponent> {
return result;
} catch (IllegalArgumentException e) {
return SenderResult.getSimpleFailure(e.getMessage()); //well, let's just hope the message doesn't exceed 4k.
- } catch (Exception e) {
+ } catch (Throwable e) {
result.addFailureMessage(ThrowableUtil.getAllMessages(e, true, remainingResultSize(result)));
return result;
} finally {
commit 4b1400bfbccef58edceb6e76ae46aeec19e36bdd
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Thu Feb 23 13:10:39 2012 +0100
[BZ 786795] - rewritten the ScriptAssert class to not depend on TestNG (and
added a bunch of unit tests). Removed the testng runtime dependency and
removed testng from the CLI deployment.
diff --git a/modules/enterprise/binding/pom.xml b/modules/enterprise/binding/pom.xml
index 52def8e..4b610cf 100644
--- a/modules/enterprise/binding/pom.xml
+++ b/modules/enterprise/binding/pom.xml
@@ -181,8 +181,7 @@
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>${testng.version}</version>
- <scope>compile</scope> <!-- yes, this is meant to be in compile, because we're providing assertions
- to the scripts -->
+ <scope>test</scope>
</dependency>
<dependency>
diff --git a/modules/enterprise/binding/src/main/java/org/rhq/bindings/util/ScriptAssert.java b/modules/enterprise/binding/src/main/java/org/rhq/bindings/util/ScriptAssert.java
index 8575883..15ed37c 100644
--- a/modules/enterprise/binding/src/main/java/org/rhq/bindings/util/ScriptAssert.java
+++ b/modules/enterprise/binding/src/main/java/org/rhq/bindings/util/ScriptAssert.java
@@ -23,16 +23,48 @@
package org.rhq.bindings.util;
+import java.lang.reflect.Array;
+import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
import javax.script.ScriptEngine;
-import org.testng.Assert;
-
+/**
+ * This class provides the assertion functions to the scripts.
+ * It is heavily inspired by and in part copied from org.testng.Assert class.
+ * <p>
+ * We specifically do not use the TestNG class here so that we avoid a runtime
+ * dependency on TestNG.
+ */
public class ScriptAssert {
private ScriptEngine scriptEngine;
+ //borrowed from TestNG
+ private static String format(Object actual, Object expected, String message) {
+ String formatted = "";
+ if (null != message) {
+ formatted = message + " ";
+ }
+
+ return formatted + "expected:<" + expected + "> but was:<" + actual + ">";
+ }
+
+ private void failNotEquals(Object actual, Object expected, String message) {
+ fail(format(actual, expected, message));
+ }
+
+ private void failAssertNoEqual(Object[] actual, Object[] expected, String message, String defaultMessage) {
+ if (message != null) {
+ fail(message);
+ } else {
+ fail(defaultMessage);
+ }
+ }
+
public ScriptAssert() {
}
@@ -47,347 +79,226 @@ public class ScriptAssert {
}
public void assertTrue(boolean condition, String msg) {
- try {
- Assert.assertTrue(condition, msg);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
+ if (!condition) {
+ failNotEquals(Boolean.valueOf(condition), Boolean.TRUE, msg);
}
}
public void assertTrue(boolean condition) {
- try {
- Assert.assertTrue(condition);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
- }
+ assertTrue(condition, null);
}
public void assertFalse(boolean condition, String msg) {
- try {
- Assert.assertFalse(condition, msg);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
+ if (condition) {
+ failNotEquals(Boolean.valueOf(condition), Boolean.FALSE, msg);
}
}
public void assertFalse(boolean condition) {
- try {
- Assert.assertFalse(condition);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
- }
+ assertFalse(condition, null);
}
public void fail(String msg, Throwable throwable) {
- try {
- Assert.fail(msg, throwable);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
- }
+ throw new ScriptAssertionException(msg, throwable);
}
public void fail(String msg) {
- try {
- Assert.fail(msg);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
- }
+ throw new ScriptAssertionException(msg);
}
public void fail() {
- throw new ScriptAssertionException(new AssertionError());
+ throw new ScriptAssertionException();
}
public void assertEquals(Object actual, Object expected, String msg) {
- try {
- Assert.assertEquals(actual, expected, msg);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
- }
- }
-
- public void assertEquals(Object actual, Object expected) {
- try {
- Assert.assertEquals(actual, expected);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
- }
- }
-
- public void assertEquals(String actual, String expected, String msg) {
- try {
- Assert.assertEquals(actual, expected, msg);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
- }
- }
-
- public void assertEquals(String actual, String expected) {
- try {
- Assert.assertEquals(actual, expected);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
- }
- }
-
- public void assertEquals(double actual, double expected, double delta, String msg) {
- try {
- Assert.assertEquals(actual, expected, delta, msg);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
- }
- }
-
- public void assertEquals(double actual, double expected, double delta) {
- try {
- Assert.assertEquals(actual, expected, delta);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
- }
- }
-
- public void assertEquals(float actual, float expected, float delta, String msg) {
- try {
- Assert.assertEquals(actual, expected, delta, msg);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
- }
- }
-
- public void assertEquals(float actual, float expected, float delta) {
- try {
- Assert.assertEquals(actual, expected, delta);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
+ if ((expected == null) && (actual == null)) {
+ return;
}
- }
-
- public void assertEquals(long actual, long expected, String msg) {
- try {
- Assert.assertEquals(actual, expected, msg);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
+ if (expected != null) {
+ if (expected.getClass().isArray()) {
+ assertArrayEquals(actual, expected, msg);
+ return;
+ } else if (expected.equals(actual)) {
+ return;
+ }
}
+ failNotEquals(actual, expected, msg);
}
+
+ /**
+ * <b>COPIED FROM TESTNG</b>
+ * Asserts that two objects are equal. It they are not, an AssertionError,
+ * with given message, is thrown.
+ * @param actual the actual value
+ * @param expected the expected value (should be an non-null array value)
+ * @param message the assertion error message
+ */
+ private void assertArrayEquals(Object actual, Object expected, String message) {
+ //is called only when expected is an array
+ if (actual.getClass().isArray()) {
+ int expectedLength = Array.getLength(expected);
+ if (expectedLength == Array.getLength(actual)) {
+ for (int i = 0; i < expectedLength; i++) {
+ Object _actual = Array.get(actual, i);
+ Object _expected = Array.get(expected, i);
+ try {
+ assertEquals(_actual, _expected);
+ } catch (AssertionError ae) {
+ failNotEquals(actual, expected, message == null ? "" : message + " (values as index " + i
+ + " are not the same)");
+ }
+ }
+ //array values matched
+ return;
+ } else {
+ failNotEquals(Array.getLength(actual), expectedLength, message == null ? "" : message
+ + " (Array lengths are not the same)");
+ }
+ }
+ failNotEquals(actual, expected, message);
+ }
- public void assertEquals(long actual, long expected) {
- try {
- Assert.assertEquals(actual, expected);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
- }
+ public void assertEquals(Object actual, Object expected) {
+ assertEquals(actual, expected, null);
}
- public void assertEquals(boolean actual, boolean expected, String msg) {
- try {
- Assert.assertEquals(actual, expected, msg);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
- }
+ public void assertNotNull(Object object) {
+ assertNotNull(object, null);
}
- public void assertEquals(boolean actual, boolean expected) {
- try {
- Assert.assertEquals(actual, expected);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
+ public void assertNotNull(Object object, String msg) {
+ if (object == null) {
+ String message = "";
+ if (msg != null) {
+ message += msg + " ";
+ }
+
+ message = "expected the object to not be null";
+ fail(message);
}
}
- public void assertEquals(byte actual, byte expected, String msg) {
- try {
- Assert.assertEquals(actual, expected, msg);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
- }
+ public void assertNull(Object object) {
+ assertNull(object, null);
}
- public void assertEquals(byte actual, byte expected) {
- try {
- Assert.assertEquals(actual, expected);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
+ public void assertNull(Object object, String msg) {
+ if (object != null) {
+ failNotEquals(object, null, msg);
}
}
- public void assertEquals(char actual, char expected, String msg) {
- try {
- Assert.assertEquals(actual, expected, msg);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
+ public void assertSame(Object actual, Object expected, String msg) {
+ if (actual != expected) {
+ failNotEquals(actual, expected, msg);
}
}
- public void assertEquals(char actual, char expected) {
- try {
- Assert.assertEquals(actual, expected);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
- }
+ public void assertSame(Object actual, Object expected) {
+ assertSame(actual, expected, null);
}
- public void assertEquals(short actual, short expected, String msg) {
- try {
- Assert.assertEquals(actual, expected, msg);
- } catch(AssertionError e) {
- throw new ScriptAssertionException(e);
+ public void assertNotSame(Object actual, Object expected, String msg) {
+ if (actual == expected) {
+ String formatted = "";
+ if (msg != null) {
+ formatted = msg + " ";
+ }
+ fail(formatted + "expected not same with:<" + expected + "> but was same:<" + actual + ">");
}
}
- public void assertEquals(short actual, short expected) {
- try {
- Assert.assertEquals(actual, expected);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
- }
+ public void assertNotSame(Object actual, Object expected) {
+ assertNotSame(actual, expected, null);
}
- public void assertEquals(int actual, int expected, String msg) {
- try {
- Assert.assertEquals(actual, expected, msg);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
- }
+ public void assertEquals(Collection<?> actual, Collection<?> expected) {
+ assertEquals(actual, expected, null);
}
- public void assertEquals(int actual, int expected) {
- try {
- Assert.assertEquals(actual, expected);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
- }
- }
+ public void assertEquals(Collection<?> actual, Collection<?> expected, String msg) {
+ if(actual == expected) {
+ return;
+ }
- public void assertNotNull(Object object) {
- try {
- Assert.assertNotNull(object);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
- }
- }
+ if (actual == null || expected == null) {
+ if (msg != null) {
+ fail(msg);
+ } else {
+ fail("Collections not equal: expected: " + expected + " and actual: " + actual);
+ }
+ }
- public void assertNotNull(Object object, String msg) {
- try {
- Assert.assertNotNull(object, msg);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
- }
- }
+ assertEquals(actual.size(), expected.size(), msg + ": lists don't have the same size");
- public void assertNull(Object object) {
- try {
- Assert.assertNull(object);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
- }
- }
+ Iterator<?> actIt = actual.iterator();
+ Iterator<?> expIt = expected.iterator();
+ int i = -1;
+ while(actIt.hasNext() && expIt.hasNext()) {
+ i++;
+ Object e = expIt.next();
+ Object a = actIt.next();
+ String explanation = "Lists differ at element [" + i + "]: " + e + " != " + a;
+ String errorMessage = msg == null ? explanation : msg + ": " + explanation;
- public void assertNull(Object object, String msg) {
- try {
- Assert.assertNull(object, msg);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
- }
+ assertEquals(a, e, errorMessage);
+ }
}
- public void assertSame(Object actual, Object expected, String msg) {
- try {
- Assert.assertSame(actual, expected, msg);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
+ public void assertEquals(Object[] actual, Object[] expected, String msg) {
+ if (actual == expected) {
+ return;
}
- }
- public void assertSame(Object actual, Object expected) {
- try {
- Assert.assertSame(actual, expected);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
+ if ((actual == null && expected != null) || (actual != null && expected == null)) {
+ if (msg != null) {
+ fail(msg);
+ } else {
+ fail("Arrays not equal: " + Arrays.toString(expected) + " and " + Arrays.toString(actual));
+ }
}
+ assertEquals(Arrays.asList(actual), Arrays.asList(expected), msg);
}
- public void assertNotSame(Object actual, Object expected, String msg) {
- try {
- Assert.assertNotSame(actual, expected, msg);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
+ public void assertEqualsNoOrder(Object[] actual, Object[] expected, String msg) {
+ if (actual == expected) {
+ return;
}
- }
- public void assertNotSame(Object actual, Object expected) {
- try {
- Assert.assertNotSame(actual, expected);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
+ if ((actual == null && expected != null) || (actual != null && expected == null)) {
+ failAssertNoEqual(actual, expected,
+ "Arrays not equal: " + Arrays.toString(expected) + " and " + Arrays.toString(actual), msg);
}
- }
- public void assertEquals(Collection actual, Collection expected) {
- try {
- Assert.assertEquals(actual, expected);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
+ if (actual.length != expected.length) {
+ failAssertNoEqual(actual, expected, "Arrays do not have the same size:" + actual.length + " != "
+ + expected.length, msg);
}
- }
- public void assertEquals(Collection actual, Collection expected, String msg) {
- try {
- Assert.assertEquals(actual, expected, msg);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
+ List<Object> actualCollection = new ArrayList<Object>();
+ for (Object a : actual) {
+ actualCollection.add(a);
}
- }
-
- public void assertEquals(Object[] actual, Object[] expected, String msg) {
- try {
- Assert.assertEquals(actual, expected, msg);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
+ for (Object o : expected) {
+ actualCollection.remove(o);
}
- }
-
- public void assertEqualsNoOrder(Object[] actual, Object[] expected, String msg) {
- try {
- Assert.assertEqualsNoOrder(actual, expected, msg);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
+ if (actualCollection.size() != 0) {
+ failAssertNoEqual(actual, expected,
+ "Arrays not equal: " + Arrays.toString(expected) + " and " + Arrays.toString(actual), msg);
}
}
public void assertEquals(Object[] actual, Object[] expected) {
- try {
- Assert.assertEquals(actual, expected);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
- }
+ assertEquals(actual, expected, null);
}
public void assertEqualsNoOrder(Object[] actual, Object[] expected) {
- try {
- Assert.assertEqualsNoOrder(actual, expected);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
- }
- }
-
- public void assertEquals(byte[] actual, byte[] expected) {
- try {
- Assert.assertEquals(actual, expected);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
- }
- }
-
- public void assertEquals(byte[] actual, byte[] expected, String msg) {
- try {
- Assert.assertEquals(actual, expected, msg);
- } catch (AssertionError e) {
- throw new ScriptAssertionException(e);
- }
+ assertEqualsNoOrder(actual, expected, null);
}
public void assertExists(String identifier) {
- assertNotNull(scriptEngine.get(identifier), identifier + " is not defined");
+ Object value = scriptEngine.get(identifier);
+ assertNotNull(value, identifier + " is not defined");
}
/**
@@ -414,9 +325,12 @@ public class ScriptAssert {
* @param actual The actual value
* @param expected The expected value
* @param msg A useful, meaningful error message
+ *
+ * @deprecated - it is now possible to use assertEquals() with numbers from within javascript because we
+ * now only provide {@link #assertEquals(Object, Object)} to which the numbers convert to correctly.
*/
+ @Deprecated
public void assertNumberEqualsJS(double actual, double expected, String msg) {
assertEquals(actual, expected, msg);
}
-
}
diff --git a/modules/enterprise/binding/src/main/java/org/rhq/bindings/util/ScriptAssertionException.java b/modules/enterprise/binding/src/main/java/org/rhq/bindings/util/ScriptAssertionException.java
index f0305f3..a505b7a 100644
--- a/modules/enterprise/binding/src/main/java/org/rhq/bindings/util/ScriptAssertionException.java
+++ b/modules/enterprise/binding/src/main/java/org/rhq/bindings/util/ScriptAssertionException.java
@@ -35,21 +35,23 @@ import javax.script.ScriptException;
*/
public class ScriptAssertionException extends RuntimeException {
-// public ScriptAssertionException() {
-// super();
-// }
-//
-// public ScriptAssertionException(String message) {
-// super(message);
-// }
-//
-// public ScriptAssertionException(String message, Throwable cause) {
-// super(message, cause);
-// }
-//
-// public ScriptAssertionException(Throwable cause) {
-// super(cause);
-// }
+ private static final long serialVersionUID = 1L;
+
+ public ScriptAssertionException() {
+ super();
+ }
+
+ public ScriptAssertionException(String message) {
+ super(message);
+ }
+
+ public ScriptAssertionException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public ScriptAssertionException(Throwable cause) {
+ super(cause);
+ }
public ScriptAssertionException(AssertionError error) {
super(new ScriptException(error.getMessage()));
diff --git a/modules/enterprise/binding/src/test/java/org/rhq/bindings/util/ScriptAssertTest.java b/modules/enterprise/binding/src/test/java/org/rhq/bindings/util/ScriptAssertTest.java
index cfd06b5..8fed153 100644
--- a/modules/enterprise/binding/src/test/java/org/rhq/bindings/util/ScriptAssertTest.java
+++ b/modules/enterprise/binding/src/test/java/org/rhq/bindings/util/ScriptAssertTest.java
@@ -23,70 +23,153 @@
package org.rhq.bindings.util;
-import static org.testng.Assert.*;
+import static org.testng.Assert.fail;
-import org.testng.annotations.Test;
-import org.testng.annotations.BeforeClass;
-
-import org.rhq.bindings.util.ScriptAssert;
+import java.io.File;
+import java.io.PrintWriter;
+import java.util.Collections;
import javax.script.ScriptEngine;
-import javax.script.ScriptEngineManager;
+import javax.script.ScriptException;
+
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Test;
+
+import org.rhq.bindings.FakeRhqFacade;
+import org.rhq.bindings.ScriptEngineFactory;
+import org.rhq.bindings.StandardBindings;
public class ScriptAssertTest {
+ private ScriptEngine engine;
+
+ @BeforeTest
+ public void verifyScriptEngineIsAvailable() throws Exception {
+ StandardBindings bindings = new StandardBindings(new PrintWriter(System.out), new FakeRhqFacade());
+ engine =
+ ScriptEngineFactory.getScriptEngine("JavaScript", new PackageFinder(Collections.<File> emptyList()),
+ bindings);
+ }
+
@Test
- public void dummyTest() {
- // Dummy test while the other tests are disabled
+ public void testAssertExists() {
+ testWorks("var a = 1; assertExists('a');", "assertExists should succeed for a defined variable.");
+ testThrowsAssertion("assertExists('foo')", "assertExists should fail for an undefined variable.");
+ testWorks("function func() { return 42 }; assertExists('func');",
+ "assertExists should succeed for a defined function.");
}
- // @BeforeClass
- public void verifyScriptEngineIsAvailable() {
- assertNotNull(createScriptEngine(), "ScriptEngine is not available. Are the required libraries on the classpath?");
+ @Test
+ public void testAssertTrue() {
+ testWorks("var a = true; assertTrue(a);", "assertTrue of a true variable should succeed");
+ testWorks("assertTrue(1 == 1)", "assertTrue on a true boolean expression should succeed");
+ testThrowsAssertion("var a = false; assertTrue(a)", "assertTrue should fail on a false variable");
+ testThrowsAssertion("assertTrue(1 == 2)", "assertTrue should fail on a false boolean expression");
+ }
+
+ @Test
+ public void testAssertFalse() {
+ testWorks("var a = false; assertFalse(a);", "assertFalse of a false variable should succeed");
+ testWorks("assertFalse(1 == 2)", "assertFalse on a false boolean expression should succeed");
+ testThrowsAssertion("var a = true; assertFalse(a)", "assertFalse should fail on a true variable");
+ testThrowsAssertion("assertFalse(1 == 1)", "assertFalse should fail on a true boolean expression");
+ }
+
+ @Test
+ public void testAssertNull() {
+ testWorks("assertNull(foo)", "assertNull should succeed on an undefined variable");
+ testWorks("var foo = null; assertNull(foo);", "assertNull should succeed on a null variable");
+ testWorks("assertNull(null)", "assertNull should succeed on a null literal");
+ testThrowsAssertion("assertNull(1)", "assertNull should fail on a number");
+ testThrowsAssertion("var foo = '1'; assertNull(foo)", "assertNull should fail on a non-null variable");
+ }
+
+ @Test
+ public void testAssertNotNull() {
+ testWorks("assertNotNull(1)", "assertNotNull should succeed on a number");
+ testWorks("var foo = '1'; assertNotNull(foo)", "assertNotNull should succeed on a non-null variable");
+ testThrowsAssertion("assertNotNull(foo)", "assertNotNull should fail on an undefined variable");
+ testThrowsAssertion("var foo = null; assertNotNull(foo);", "assertNotNull should fail on a null variable");
+ testThrowsAssertion("assertNotNull(null)", "assertNotNull should fail on a null literal");
+ }
+
+ @Test
+ public void testAssertEquals_Numbers() {
+ testWorks("assertEquals(1, 1)", "1 == 1");
+ testWorks("assertEquals(1.0, 1)", "1.0 == 1");
+ testWorks("assertEquals(1.0, 1.0)", "1.0 == 1.0");
+ testThrowsAssertion("assertEquals(1, 2)", "1 == 2");
+ }
+
+ @Test
+ public void testAssertEquals_Arrays() {
+ testWorks("assertEquals(['a', 'b'], ['a', 'b'])", "native array comparison");
+ testThrowsAssertion("assertEquals(['a', 'b'], ['c', 'd'])", "native array comparison with difference");
}
- // @Test
- public void assertExistsShouldReturnTrueWhenVariableIsBound() {
- ScriptEngine scriptEngine = createScriptEngine();
- scriptEngine.put("foo", "bar");
+ @Test
+ public void testAssertEquals_Collections() {
+ testWorks("a = new java.util.ArrayList; " + "b = new java.util.ArrayList; " + "a.add('a'); " + "b.add('a'); "
+ + "assertEquals(a, b)", "ArrayList comparison");
+ testThrowsAssertion("a = new java.util.ArrayList; " + "b = new java.util.ArrayList; " + "a.add('a'); "
+ + "b.add('b'); " + "assertEquals(a, b)", "ArrayList comparison with difference");
+ }
- ScriptAssert scriptAssert = new ScriptAssert(scriptEngine);
+ @Test
+ public void testAssertEqualsNoOrder() {
+ testWorks("assertEqualsNoOrder(['a', 'b'], ['b', 'a'])", "native array comparison");
+ }
+ @Test
+ public void testAssertSame() {
+ testWorks("var a = '1'; assertSame(a, a)", "assertSame should succeed comparing one variable");
+ testWorks("var a = '1'; b = a; assertSame(a, b)", "asserSame should succeed comparing 2 references of the same object");
+ testWorks("assertSame(null, null);", "assertSame should succeed on null values");
+ testThrowsAssertion("var a = '1'; b = '2'; assertSame(a, b)", "assertSame should fail comparing 2 different variables");
+ testThrowsAssertion("var a = 1; assertSame(a, null)", "assertSame should fail comparing non-null variable with a null value");
+ }
+
+ @Test
+ public void testAssertNotSame() {
+ testThrowsAssertion("var a = '1'; assertNotSame(a, a)", "assertNotSame should fail comparing one variable");
+ testThrowsAssertion("var a = '1'; b = a; assertNotSame(a, b)", "asserNotSame should fail comparing 2 references of the same object");
+ testThrowsAssertion("assertNotSame(null, null);", "assertNotSame should fail on null values");
+ testWorks("var a = '1'; b = '2'; assertNotSame(a, b)", "assertNotSame should succeed comparing 2 different variables");
+ testWorks("var a = 1; assertNotSame(a, null)", "assertNotSame should succeed comparing non-null variable with a null value");
+ }
+
+ private void testWorks(String script, String message) {
try {
- scriptAssert.assertExists("foo");
- assert true;
- } catch (AssertionError ae) {
- assert false : "Expected isDefined() to return true when the variable is bound.";
+ engine.eval(script);
+ } catch (ScriptException e) {
+ fail(message, e);
}
}
- // @Test(expectedExceptions={ScriptAssertionException.class})
- public void assertExistsShouldReturnFalseWhenVariableIsNotBound() {
- ScriptEngine scriptEngine = createScriptEngine();
-
- ScriptAssert scriptAssert = new ScriptAssert(scriptEngine);
-
- scriptAssert.assertExists("foo");
- }
-
- // @Test
- public void assertExistsShouldReturnTrueWhenFunctionIsBound() {
- ScriptEngine scriptEngine = createScriptEngine();
- scriptEngine.put("func", "function func() { return 123; }");
-
- ScriptAssert scriptAssert = new ScriptAssert(scriptEngine);
-
+ private void testThrowsAssertion(String script, String message) {
try {
- scriptAssert.assertExists("func");
- assert true;
- } catch (AssertionError ae) {
- assert false : "Expected isDefined() to return true when function is bound.";
+ engine.eval(script);
+ } catch (ScriptException e) {
+ checkExpectedAssertionException(e, message);
}
}
- ScriptEngine createScriptEngine() {
- ScriptEngineManager scriptEngineMgr = new ScriptEngineManager();
- return scriptEngineMgr.getEngineByName("JavaScript");
- }
+ private static void checkExpectedAssertionException(Throwable t, String message) {
+ boolean ok = false;
+ while (t != null) {
+ if (t instanceof ScriptAssertionException) {
+ ok = true;
+ break;
+ } else if ((t instanceof ScriptException) && (t.getMessage().contains("ScriptAssertionException"))) {
+ ok = true;
+ break;
+ }
+
+ t = t.getCause();
+ }
+ if (!ok) {
+ fail((message == null ? "" : message) + " ScriptAssertException expected but wasn't found.", t);
+ }
+ }
}
diff --git a/modules/enterprise/remoting/cli/src/main/scripts/rhq-client.build.xml b/modules/enterprise/remoting/cli/src/main/scripts/rhq-client.build.xml
index b7dfe30..ecf304e 100644
--- a/modules/enterprise/remoting/cli/src/main/scripts/rhq-client.build.xml
+++ b/modules/enterprise/remoting/cli/src/main/scripts/rhq-client.build.xml
@@ -65,7 +65,6 @@
<copy file="${settings.localRepository}/javax/persistence/persistence-api/${persistence-api.version}/persistence-api-${persistence-api.version}.jar" tofile="${lib.home}/persistence-api-${persistence-api.version}.jar" verbose="true" />
<copy file="${basedir}/target/${project.artifactId}-${project.version}.jar" tofile="${lib.home}/${project.artifactId}-${project.version}.jar" verbose="true" />
<copy file="${settings.localRepository}/net/sf/opencsv/opencsv/${opencsv.version}/opencsv-${opencsv.version}.jar" tofile="${lib.home}/opencsv-${opencsv.version}.jar" verbose="true" />
- <copy file="${settings.localRepository}/org/testng/testng/${testng.version}/testng-${testng.version}.jar" tofile="${lib.home}/testng-${testng.version}.jar" verbose="true" />
<copy file="${settings.localRepository}/org/rhq/rhq-script-bindings/${project.version}/rhq-script-bindings-${project.version}.jar" tofile="${lib.home}/rhq-script-bindings-${project.version}.jar" verbose="true" />
<copy file="${settings.localRepository}/hibernate-annotations/hibernate-annotations/${hibernate-annotations.version}/hibernate-annotations-${hibernate-annotations.version}.jar" todir="${lib.home}" verbose="true" />
</target>
commit d2fc9d3481eaaae707b5556ec3c86571f2d5ba40
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Wed Feb 22 13:17:59 2012 -0500
fix recent regression where this.childResources wasn't getting initialized when certain constructors were used
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java
index 2dd01e2..d0f49cd 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java
@@ -1120,6 +1120,7 @@ public class Resource implements Comparable<Resource>, Serializable {
* @param id the Resource's id
*/
public Resource(int id) {
+ this();
this.id = id;
}
@@ -1127,6 +1128,7 @@ public class Resource implements Comparable<Resource>, Serializable {
@NotNull String resourceKey, //
String name, //
@NotNull ResourceType type) {
+ this();
this.resourceKey = resourceKey;
this.name = name;
this.resourceType = type;
commit f72e85045d942cda36f85a0594267b45c0c1f929
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Feb 22 12:24:57 2012 -0500
[BZ 796315] Adjust layout so search bar appears above list grid
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
index 222b5b2..f72d12e 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
@@ -339,6 +339,10 @@ public class Table<DS extends RPCDataSource> extends LocatableHLayout implements
contents.removeChild(child);
}
+ if (filterForm.hasContent()) {
+ contents.addMember(filterForm);
+ }
+
// add the listGrid defined in onInit
contents.addMember(listGrid);
@@ -353,10 +357,6 @@ public class Table<DS extends RPCDataSource> extends LocatableHLayout implements
contents.addMember(titleLayout, 0);
}
- if (filterForm.hasContent()) {
- contents.addMember(filterForm);
- }
-
// Footer
// A second toolstrip that optionally appears before the main footer - it will contain extra widgets.
commit 3e149ee4fef7d33bfc93837032e834427407957c
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Tue Feb 21 17:55:20 2012 -0500
add a new Resource constructor that allows setting the childResources field (useful if caller wants to use a Set impl other than HashSet)
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java
index e920c51..2dd01e2 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java
@@ -971,12 +971,12 @@ public class Resource implements Comparable<Resource>, Serializable {
@Summary(index = 4)
private ResourceType resourceType;
- // do not cascade remove - would take forever to delete a full platform hierarchy
- // we will manually delete the children ourselves
+ // do not cascade remove; it would take forever to delete a full platform hierarchy,
+ // so we will manually delete the children ourselves
@OneToMany(mappedBy = "parentResource", fetch = FetchType.LAZY, cascade = { CascadeType.PERSIST })
@OrderBy
// primary key
- private Set<Resource> childResources = new HashSet<Resource>();
+ private Set<Resource> childResources;
// LAZY fetch otherwise this will recursively call all parents until null is found
@JoinColumn(name = "PARENT_RESOURCE_ID", nullable = true)
@@ -1101,9 +1101,19 @@ public class Resource implements Comparable<Resource>, Serializable {
private Set<DriftDefinition> driftDefinitions = null;
public Resource() {
+ this(new HashSet<Resource>());
}
/**
+ * Constructor that allows the caller to choose what Set impl is used for the {@link #childResources} field.
+ *
+ * @param childResources the Set that will be used to hold this Resource's child Resources
+ */
+ public Resource(Set<Resource> childResources) {
+ setChildResources(childResources);
+ }
+
+ /**
* Primarily for deserialization and cases where the resource object is just a reference to the real one in the db.
* (Key is this avoids the irrelevant UUID generation that has contention problems.
*
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java
index fad45b9..6f2d55e 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java
@@ -840,7 +840,10 @@ public class InventoryManager extends AgentService implements ContainerService,
}
static Resource createNewResource(DiscoveredResourceDetails details) {
- Resource resource = new Resource();
+ // Use a ConcurrentHashMap-based Set for childResources to allow the field to be concurrently accessed safely
+ // (i.e. to avoid ConcurrentModificationExceptions).
+ Set<Resource> childResources = Collections.newSetFromMap(new ConcurrentHashMap<Resource, Boolean>());
+ Resource resource = new Resource(childResources);
resource.setUuid(UUID.randomUUID().toString());
resource.setResourceKey(details.getResourceKey());
@@ -854,10 +857,6 @@ public class InventoryManager extends AgentService implements ContainerService,
.getPluginConfigurationDefinition());
resource.setPluginConfiguration(pluginConfiguration);
- // Use a ConcurrentHashMap-based Set for childResources to allow the field to be concurrently accessed safely
- // (i.e. to avoid ConcurrentModificationExceptions).
- resource.setChildResources(Collections.newSetFromMap(new ConcurrentHashMap<Resource, Boolean>()));
-
return resource;
}
commit 50858043c711b85ab33a59f928936e0cabb040fd
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Tue Feb 21 16:48:36 2012 -0500
when an SQLException occurs in DBSetup.doSQL(), catch it, wrap it in an ExtendedSQLException that includes the SQL
which failed, and then rethrow it; add support to DbUtil.getSQLExceptionString() for including the SQL in the returned
string if passed an ExtendedSQLException; various minor improvements throughout dbutils
diff --git a/modules/core/dbutils/src/main/java/org/rhq/core/db/DatabaseType.java b/modules/core/dbutils/src/main/java/org/rhq/core/db/DatabaseType.java
index eb2f6a7..aea077d 100644
--- a/modules/core/dbutils/src/main/java/org/rhq/core/db/DatabaseType.java
+++ b/modules/core/dbutils/src/main/java/org/rhq/core/db/DatabaseType.java
@@ -237,7 +237,7 @@ public abstract class DatabaseType {
*
* @return <code>true</code> if the column exists in the table, <code>false</code> otherwise
*
- * @exception SQLException
+ * @throws SQLException
*/
public boolean checkColumnExists(Connection conn, String table, String column) throws SQLException {
PreparedStatement ps = null;
diff --git a/modules/core/dbutils/src/main/java/org/rhq/core/db/DbUtil.java b/modules/core/dbutils/src/main/java/org/rhq/core/db/DbUtil.java
index 3188f07..d9617f0 100644
--- a/modules/core/dbutils/src/main/java/org/rhq/core/db/DbUtil.java
+++ b/modules/core/dbutils/src/main/java/org/rhq/core/db/DbUtil.java
@@ -100,14 +100,17 @@ public class DbUtil {
/**
* Given an SQL exception, this will return a string that contains the error code and message for it and its causes.
*
- * @param e
+ * @param e the SQL exception
*
* @return error message containing all the SQL error codes and messages
*/
public static String getSQLExceptionString(SQLException e) {
- StringBuffer str = new StringBuffer();
+ StringBuilder str = new StringBuilder();
do {
+ if (e instanceof ExtendedSQLException) {
+ str.append("SQL=[" + ((ExtendedSQLException) e).getSQL() + "]; ");
+ }
str.append("ErrorCode=[" + e.getErrorCode() + "]; ");
str.append("SQLState=[" + e.getSQLState() + "]; ");
str.append("Message=[" + e.getMessage() + "]; ");
diff --git a/modules/core/dbutils/src/main/java/org/rhq/core/db/ExtendedSQLException.java b/modules/core/dbutils/src/main/java/org/rhq/core/db/ExtendedSQLException.java
new file mode 100644
index 0000000..189869b
--- /dev/null
+++ b/modules/core/dbutils/src/main/java/org/rhq/core/db/ExtendedSQLException.java
@@ -0,0 +1,43 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2012 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.core.db;
+
+import java.sql.SQLException;
+
+/**
+ * Wraps another SQLException, providing one additional field for specifying the SQL that caused the exception.
+ *
+ * @author Ian Springer
+ */
+public class ExtendedSQLException extends SQLException {
+
+ private String sql;
+
+ public ExtendedSQLException(SQLException sqlException, String sql) {
+ super(sqlException.getMessage(), sqlException.getSQLState(), sqlException.getErrorCode(), sqlException);
+ setNextException(sqlException.getNextException());
+ setStackTrace(sqlException.getStackTrace());
+ this.sql = sql;
+ }
+
+ public String getSQL() {
+ return sql;
+ }
+
+}
diff --git a/modules/core/dbutils/src/main/java/org/rhq/core/db/TypeMap.java b/modules/core/dbutils/src/main/java/org/rhq/core/db/TypeMap.java
index 0d2661a..7ad3c9a 100644
--- a/modules/core/dbutils/src/main/java/org/rhq/core/db/TypeMap.java
+++ b/modules/core/dbutils/src/main/java/org/rhq/core/db/TypeMap.java
@@ -18,7 +18,6 @@
*/
package org.rhq.core.db;
-import java.io.File;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collection;
@@ -113,7 +112,8 @@ public class TypeMap {
/**
* Given a DOM node, this will ensure it is a valid <i>typemap</i> node and parses it. This constructor is private,
- * use {@link #loadTypeMapsFromFile(File)} to create instances of this object.
+ * use {@link #loadKnownTypeMaps()} TypeMapsFromFile(File)} or {@link #loadTypeMapsFromStream(java.io.InputStream)}
+ * to create instances of this object.
*
* @param typemap_node the top-level <i>typemap</i> DOM node
*
@@ -227,7 +227,7 @@ public class TypeMap {
*/
@Override
public String toString() {
- StringBuffer str = new StringBuffer(m_genericTypeName);
+ StringBuilder str = new StringBuilder(m_genericTypeName);
str.append('=');
str.append(m_databaseTypeMap);
return str.toString();
diff --git a/modules/core/dbutils/src/main/java/org/rhq/core/db/ant/DbAntI18NFactory.java b/modules/core/dbutils/src/main/java/org/rhq/core/db/ant/DbAntI18NFactory.java
index 2649226..3275f5f 100644
--- a/modules/core/dbutils/src/main/java/org/rhq/core/db/ant/DbAntI18NFactory.java
+++ b/modules/core/dbutils/src/main/java/org/rhq/core/db/ant/DbAntI18NFactory.java
@@ -24,8 +24,8 @@ import mazz.i18n.LoggerLocale;
import mazz.i18n.Msg;
/**
- * Convienence utility that creates I18N {@link Logger loggers} and {@link Msg messages} for the ant tools. These
- * factory methods are used to create I18N objects that access the propery resource bundle for the ant tools.
+ * Convenience utility that creates I18N {@link Logger loggers} and {@link Msg messages} for the ant tools. These
+ * factory methods are used to create I18N objects that access the proper resource bundle for the ant tools.
*
* @author John Mazzitelli
*
diff --git a/modules/core/dbutils/src/main/java/org/rhq/core/db/ant/MD5Task.java b/modules/core/dbutils/src/main/java/org/rhq/core/db/ant/MD5Task.java
index a08f0da..824b777 100644
--- a/modules/core/dbutils/src/main/java/org/rhq/core/db/ant/MD5Task.java
+++ b/modules/core/dbutils/src/main/java/org/rhq/core/db/ant/MD5Task.java
@@ -67,11 +67,11 @@ public class MD5Task extends Task {
md5 = Base64.encode(md5_bytes);
} else {
// put the md5 bytes in string form
- StringBuffer md5_string = new StringBuffer(md5_bytes.length * 2);
+ StringBuilder md5_string = new StringBuilder(md5_bytes.length * 2);
- for (int i = 0; i < md5_bytes.length; i++) {
- int hi = (md5_bytes[i] >> 4) & 0xf;
- int lo = md5_bytes[i] & 0xf;
+ for (byte md5_byte : md5_bytes) {
+ int hi = (md5_byte >> 4) & 0xf;
+ int lo = md5_byte & 0xf;
md5_string.append(Character.forDigit(hi, 16));
md5_string.append(Character.forDigit(lo, 16));
}
diff --git a/modules/core/dbutils/src/main/java/org/rhq/core/db/ant/dbupgrade/DBUpgrader.java b/modules/core/dbutils/src/main/java/org/rhq/core/db/ant/dbupgrade/DBUpgrader.java
index 9a0c91b..5ad70e4 100644
--- a/modules/core/dbutils/src/main/java/org/rhq/core/db/ant/dbupgrade/DBUpgrader.java
+++ b/modules/core/dbutils/src/main/java/org/rhq/core/db/ant/dbupgrade/DBUpgrader.java
@@ -355,6 +355,7 @@ public class DBUpgrader extends Task {
try {
fis.close();
} catch (IOException e) {
+ // ignore
}
}
}
diff --git a/modules/core/dbutils/src/main/java/org/rhq/core/db/setup/ConstraintImpl_PK.java b/modules/core/dbutils/src/main/java/org/rhq/core/db/setup/ConstraintImpl_PK.java
index 456387d..1f9ed19 100644
--- a/modules/core/dbutils/src/main/java/org/rhq/core/db/setup/ConstraintImpl_PK.java
+++ b/modules/core/dbutils/src/main/java/org/rhq/core/db/setup/ConstraintImpl_PK.java
@@ -70,7 +70,7 @@ class ConstraintImpl_PK implements ConstraintImpl {
}
private String listItems(List<String> list) {
- StringBuffer ret_items = new StringBuffer();
+ StringBuilder ret_items = new StringBuilder();
if (list != null) {
for (String string : list) {
diff --git a/modules/core/dbutils/src/main/java/org/rhq/core/db/setup/DBSetup.java b/modules/core/dbutils/src/main/java/org/rhq/core/db/setup/DBSetup.java
index f8d27a0..b426361 100644
--- a/modules/core/dbutils/src/main/java/org/rhq/core/db/setup/DBSetup.java
+++ b/modules/core/dbutils/src/main/java/org/rhq/core/db/setup/DBSetup.java
@@ -39,6 +39,7 @@ import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import mazz.i18n.Logger;
import mazz.i18n.Msg;
+import org.rhq.core.db.ExtendedSQLException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
@@ -696,7 +697,7 @@ public class DBSetup {
}
}
- // our second pass - hopefully, we've cleared out data that caused contraint errors in the first pass
+ // our second pass - hopefully, we've cleared out data that caused constraint errors in the first pass
if (failed_tables.size() > 0) {
log(LogPriority.DEBUG, DbUtilsI18NResourceKeys.DBSETUP_CLEAR_SECOND_PASS, failed_tables.size());
@@ -989,8 +990,10 @@ public class DBSetup {
* just prepares it in a statement and expects the caller to execute the statement. The caller must close the
* returned prepared statement (which occurs if <code>returnPreparedStatement</code> is <code>true</code>)
*
- * @param sql
- * @param returnPreparedStatement if <code>true</code>, the SQL isn't executed, it is just prepared
+ * @param sql an SQL Data Manipulation Language (DML) statement, such as <code>INSERT</code>, <code>UPDATE</code>
+ * or <code>DELETE</code>; or an SQL statement that returns nothing,
+ * such as a DDL statement
+ * @param returnPreparedStatement if <code>true</code>, the SQL isn't executed; it is just prepared
*
* @return the statement (which may be a prepared statement or may be the statement that was executed)
*
@@ -1027,7 +1030,7 @@ public class DBSetup {
// Log this?
}
- throw e;
+ throw new ExtendedSQLException(e, sql);
} finally {
if (stmt != null) {
stmt.close();
@@ -1120,6 +1123,7 @@ public class DBSetup {
try {
m_connection.close();
} catch (Exception e) {
+ // ignore
} finally {
m_connection = null;
m_databaseType = null;
diff --git a/modules/core/dbutils/src/main/java/org/rhq/core/db/setup/DataSet.java b/modules/core/dbutils/src/main/java/org/rhq/core/db/setup/DataSet.java
index 32694c4..3b834f5 100644
--- a/modules/core/dbutils/src/main/java/org/rhq/core/db/setup/DataSet.java
+++ b/modules/core/dbutils/src/main/java/org/rhq/core/db/setup/DataSet.java
@@ -18,7 +18,6 @@
*/
package org.rhq.core.db.setup;
-import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
@@ -39,7 +38,6 @@ abstract class DataSet {
}
protected int create() throws SQLException {
- PreparedStatement stmt = null;
int rowcnt = 0;
try {
@@ -60,10 +58,6 @@ abstract class DataSet {
}
throw e;
- } finally {
- if (stmt != null) {
- stmt.close();
- }
}
return rowcnt; // The number of rows created.
@@ -103,7 +97,7 @@ abstract class DataSet {
protected String getInsertCommand() throws SQLException {
int iCols = this.getNumberColumns();
- StringBuffer strCmd = new StringBuffer("INSERT INTO ");
+ StringBuilder strCmd = new StringBuilder("INSERT INTO ");
strCmd.append(this.getTableName());
strCmd.append(" (");
@@ -154,7 +148,7 @@ abstract class DataSet {
protected String getUpdateCommand() throws SQLException {
int iCols = this.getNumberColumns();
- StringBuffer strCmd = new StringBuffer("UPDATE ");
+ StringBuilder strCmd = new StringBuilder("UPDATE ");
strCmd.append(this.getTableName());
strCmd.append(" SET ");
@@ -206,7 +200,7 @@ abstract class DataSet {
}
need_AND_keyword = true;
- strCmd.append(data.getActualColumnName() + " = ");
+ strCmd.append(data.getActualColumnName()).append(" = ");
String key_value = data.getValue();
if (key_value != null) {
diff --git a/modules/core/dbutils/src/main/java/org/rhq/core/db/setup/Table.java b/modules/core/dbutils/src/main/java/org/rhq/core/db/setup/Table.java
index cac0ef9..9455aea 100644
--- a/modules/core/dbutils/src/main/java/org/rhq/core/db/setup/Table.java
+++ b/modules/core/dbutils/src/main/java/org/rhq/core/db/setup/Table.java
@@ -115,26 +115,23 @@ class Table {
List collCmds = new java.util.Vector();
this.getCreateCommands(collCmds, typemaps, m_parent.getDatabaseType());
- Iterator iter = collCmds.iterator();
- while (iter.hasNext()) {
- String strCmd = (String) iter.next();
+ for (Object collCmd : collCmds) {
+ String strCmd = (String) collCmd;
m_parent.doSQL(strCmd);
}
}
private void doCmd(List collCmds) throws SQLException {
- Iterator iter = collCmds.iterator();
- while (iter.hasNext()) {
- String strCmd = (String) iter.next();
+ for (Object collCmd : collCmds) {
+ String strCmd = (String) collCmd;
m_parent.doSQL(strCmd);
}
}
private void doCmdsWithoutAbortingOnErrors(List collCmds) throws SQLException {
SQLException sqlException = null;
- Iterator cmdsIter = collCmds.iterator();
- while (cmdsIter.hasNext()) {
- String strCmd = (String) cmdsIter.next();
+ for (Object collCmd : collCmds) {
+ String strCmd = (String) collCmd;
try {
m_parent.doSQL(strCmd);
} catch (SQLException e) {
@@ -326,10 +323,8 @@ class Table {
String strCmd = "DROP TABLE " + this.getName();
cmds.add(strCmd);
- Iterator iter = this.getColumns().iterator();
-
- while (iter.hasNext()) {
- ((Column) iter.next()).getDropCommands(cmds);
+ for (Object o : this.getColumns()) {
+ ((Column) o).getDropCommands(cmds);
}
}
diff --git a/modules/core/dbutils/src/main/java/org/rhq/core/db/setup/View.java b/modules/core/dbutils/src/main/java/org/rhq/core/db/setup/View.java
index 522cc05..031b25c 100644
--- a/modules/core/dbutils/src/main/java/org/rhq/core/db/setup/View.java
+++ b/modules/core/dbutils/src/main/java/org/rhq/core/db/setup/View.java
@@ -21,7 +21,6 @@ package org.rhq.core.db.setup;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Iterator;
import java.util.List;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
@@ -78,17 +77,15 @@ class View {
protected void create(Collection typemaps) throws SQLException {
List commands = new java.util.Vector();
this.getCreateCommands(commands, typemaps, m_parent.getDatabaseType());
- Iterator iter = commands.iterator();
- while (iter.hasNext()) {
- String strCmd = (String) iter.next();
+ for (Object command : commands) {
+ String strCmd = (String) command;
m_parent.doSQL(strCmd);
}
}
private void doCmd(List collCmds) throws SQLException {
- Iterator iter = collCmds.iterator();
- while (iter.hasNext()) {
- String strCmd = (String) iter.next();
+ for (Object collCmd : collCmds) {
+ String strCmd = (String) collCmd;
m_parent.doSQL(strCmd);
}
}
@@ -142,6 +139,7 @@ class View {
try {
colResult.add(new View(nodeView, dbtype, parent));
} catch (SAXException e) {
+ // ignore
}
}
}
commit 63e54e5f79177a00beb1bbbdc630701e1a29844a
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Tue Feb 21 16:04:23 2012 -0500
fix some javadoc typos
diff --git a/modules/core/util/src/main/java/org/rhq/core/util/stream/StreamUtil.java b/modules/core/util/src/main/java/org/rhq/core/util/stream/StreamUtil.java
index d21ab62..41eb9e3 100644
--- a/modules/core/util/src/main/java/org/rhq/core/util/stream/StreamUtil.java
+++ b/modules/core/util/src/main/java/org/rhq/core/util/stream/StreamUtil.java
@@ -23,8 +23,6 @@
package org.rhq.core.util.stream;
import java.io.BufferedInputStream;
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.Closeable;
@@ -60,7 +58,7 @@ public class StreamUtil {
/**
* Reads in the entire contents of the given input stream and returns the data in a byte array. Be careful - if the
- * stream has alot of data, you run the risk of an <code>OutOfMemoryError</code>.
+ * stream has a lot of data, you run the risk of an <code>OutOfMemoryError</code>.
*
* @param stream the stream to read
*
@@ -120,7 +118,7 @@ public class StreamUtil {
/**
* Copies data from the input stream to the output stream. Upon completion or on an exception, the streams will be
* closed but only if <code>closeStreams</code> is <code>true</code>. If <code>closeStreams</code> is <code>
- * false</code>, the streams are left open; the caller has the reponsibility to close them.
+ * false</code>, the streams are left open; the caller has the responsibility to close them.
*
* @param input the originating stream that contains the data to be copied
* @param output the destination stream where the data should be copied to
@@ -209,7 +207,7 @@ public class StreamUtil {
}
/**
- * Copies data from the input stream to the output stream. The caller has the reponsibility to close them. This
+ * Copies data from the input stream to the output stream. The caller has the responsibility to close them. This
* method allows you to copy a byte range from the input stream. The start byte is the index (where the first byte
* of the stream is index #0) that starts to be copied. <code>length</code> indicates how many bytes to copy, a
* negative length indicates copy everything up to the EOF of the input stream.
commit e3cf06eef81d67b8b026bc6d7c5c35169cf0c9b6
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Tue Feb 21 16:02:57 2012 -0500
use StreamUtil.copy() (from rhq-core-util.jar), rather than private copyStreamData()
diff --git a/modules/enterprise/gui/installer-war/src/main/java/org/rhq/enterprise/installer/ServerInformation.java b/modules/enterprise/gui/installer-war/src/main/java/org/rhq/enterprise/installer/ServerInformation.java
index 6162bdd..871c112 100644
--- a/modules/enterprise/gui/installer-war/src/main/java/org/rhq/enterprise/installer/ServerInformation.java
+++ b/modules/enterprise/gui/installer-war/src/main/java/org/rhq/enterprise/installer/ServerInformation.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
+ * Copyright (C) 2005-2012 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -18,7 +18,6 @@
*/
package org.rhq.enterprise.installer;
-import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
@@ -26,7 +25,6 @@ import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.io.OutputStream;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.PreparedStatement;
@@ -62,6 +60,7 @@ import org.rhq.core.db.SQLServerDatabaseType;
import org.rhq.core.db.setup.DBSetup;
import org.rhq.core.util.PropertiesFileUpdate;
import org.rhq.core.util.jdbc.JDBCUtil;
+import org.rhq.core.util.stream.StreamUtil;
import org.rhq.enterprise.communications.util.SecurityUtil;
/**
@@ -690,7 +689,7 @@ public class ServerInformation {
// first slurp the file contents in memory
InputStream resourceInStream = this.getClass().getClassLoader().getResourceAsStream(xmlFileName);
ByteArrayOutputStream contentOutStream = new ByteArrayOutputStream();
- copyStreamData(resourceInStream, contentOutStream);
+ StreamUtil.copy(resourceInStream, contentOutStream);
// now replace their replacement strings with values from the properties
String content = contentOutStream.toString();
@@ -716,33 +715,11 @@ public class ServerInformation {
File xmlFile = new File(getLogDirectory(), xmlFileName);
FileOutputStream xmlFileOutStream = new FileOutputStream(xmlFile);
ByteArrayInputStream contentInStream = new ByteArrayInputStream(content.getBytes());
- copyStreamData(contentInStream, xmlFileOutStream);
+ StreamUtil.copy(contentInStream, xmlFileOutStream);
return xmlFile.getAbsolutePath();
}
- private void copyStreamData(InputStream input, OutputStream output) throws IOException {
- int bufferSize = 32768;
-
- try {
- // make sure we buffer the input
- input = new BufferedInputStream(input, bufferSize);
-
- byte[] buffer = new byte[bufferSize];
-
- for (int bytesRead = input.read(buffer); bytesRead != -1; bytesRead = input.read(buffer)) {
- output.write(buffer, 0, bytesRead);
- }
-
- output.flush();
- } finally {
- JDBCUtil.safeClose(output);
- JDBCUtil.safeClose(input);
- }
-
- return;
- }
-
/**
* Launches ANT and runs the default target in the given build file.
*
commit 9a4e00af87aa3b90b3ffd5a848389bcb8ec41f86
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Tue Feb 21 16:01:37 2012 -0500
add tests that test overwriting and upgrading a JON 3.0 DB schema
diff --git a/modules/enterprise/gui/installer-war/src/test/java/org/rhq/enterprise/installer/DBInstallationTest.java b/modules/enterprise/gui/installer-war/src/test/java/org/rhq/enterprise/installer/DBInstallationTest.java
index e4fb711..a211e27 100644
--- a/modules/enterprise/gui/installer-war/src/test/java/org/rhq/enterprise/installer/DBInstallationTest.java
+++ b/modules/enterprise/gui/installer-war/src/test/java/org/rhq/enterprise/installer/DBInstallationTest.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
+ * Copyright (C) 2005-2012 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -20,21 +20,25 @@
* if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-
package org.rhq.enterprise.installer;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
import java.net.URL;
import java.util.Properties;
+import org.rhq.core.util.stream.StreamUtil;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import org.rhq.core.db.reset.DBReset;
import org.rhq.core.db.setup.DBSetup;
-import org.rhq.enterprise.installer.ServerInformation;
-import org.rhq.enterprise.installer.ServerProperties;
/**
* The tests in this class exercise the dbsetup/dbupgrade code that is run in the installer. The tests currently only
@@ -110,6 +114,18 @@ public class DBInstallationTest {
installer.upgradeExistingDatabaseSchema(getInstallProperties());
}
+ @Test
+ public void overwriteJON300Schema() throws Exception {
+ installSchemaAndData("3.0.0");
+ installer.createNewDatabaseSchema(getInstallProperties());
+ }
+
+ @Test
+ public void upgradeJON300Schema() throws Exception {
+ installSchemaAndData("3.0.0");
+ installer.upgradeExistingDatabaseSchema(getInstallProperties());
+ }
+
private void initLogDirectory() {
File logDir = new File(LOG_DIRECTORY);
if (logDir.exists()) {
@@ -125,8 +141,10 @@ public class DBInstallationTest {
private void installSchemaAndData(String jonVersion) throws Exception {
DBSetup dbsetup = new DBSetup(DB_URL, USERNAME, PASSWORD);
- dbsetup.setup(getSchemaFile(jonVersion).getAbsolutePath());
- dbsetup.setup(getDataFile(jonVersion).getAbsolutePath());
+ File schemaFile = getSchemaFile(jonVersion);
+ dbsetup.setup(schemaFile.getAbsolutePath());
+ File dataFile = getDataFile(jonVersion);
+ dbsetup.setup(dataFile.getAbsolutePath());
}
private File getSchemaFile(String version) throws Exception {
@@ -136,7 +154,10 @@ public class DBInstallationTest {
throw new RuntimeException("Failed to find schema file for version " + version);
}
- return new File(url.toURI().getPath());
+ File file = new File(url.toURI().getPath());
+ File filteredFile = filterXmlFile(file, getInstallProperties());
+
+ return filteredFile;
}
private File getDataFile(String version) throws Exception {
@@ -146,7 +167,10 @@ public class DBInstallationTest {
throw new RuntimeException("Failed to find data file for version " + version);
}
- return new File(url.toURI().getPath());
+ File file = new File(url.toURI().getPath());
+ File filteredFile = filterXmlFile(file, getInstallProperties());
+
+ return filteredFile;
}
private Properties getInstallProperties() {
@@ -157,4 +181,40 @@ public class DBInstallationTest {
dbProperties.put(ServerProperties.PROP_EMAIL_FROM_ADDRESS, "rhqadmin(a)localhost.com");
return dbProperties;
}
+
+ private static File filterXmlFile(File xmlFile, Properties props) throws IOException {
+ // first slurp the file contents in memory
+ InputStream fileInStream = new FileInputStream(xmlFile);
+ ByteArrayOutputStream contentOutStream = new ByteArrayOutputStream();
+ StreamUtil.copy(fileInStream, contentOutStream);
+
+ // now replace their replacement strings with values from the properties
+ String content = contentOutStream.toString();
+ content = content.replaceAll("@@@LARGE_TABLESPACE_FOR_DATA@@@", "DEFAULT");
+ content = content.replaceAll("@@@LARGE_TABLESPACE_FOR_INDEX@@@", "DEFAULT");
+ content = content.replaceAll("@@@ADMINUSERNAME@@@", "rhqadmin");
+ content = content.replaceAll("@@@ADMINPASSWORD@@@", "x1XwrxKuPvYUILiOnOZTLg=="); // rhqadmin
+ content = content.replaceAll("@@@ADMINEMAIL@@@", props.getProperty(ServerProperties.PROP_EMAIL_FROM_ADDRESS));
+ content = content.replaceAll("@@@BASEURL@@@", "http://" + ServerProperties.getValidServerBindAddress(props)
+ + ":" + ServerProperties.getHttpPort(props) + "/");
+ content = content.replaceAll("@@@JAASPROVIDER@@@", "JDBC");
+ content = content.replaceAll("@@@LDAPURL@@@", "ldap://localhost/");
+ content = content.replaceAll("@@@LDAPPROTOCOL@@@", "");
+ content = content.replaceAll("@@@LDAPLOGINPROP@@@", "cn");
+ content = content.replaceAll("@@@LDAPBASEDN@@@", "o=JBoss,c=US");
+ content = content.replaceAll("@@@LDAPSEARCHFILTER@@@", "");
+ content = content.replaceAll("@@@LDAPBINDDN@@@", "");
+ content = content.replaceAll("@@@LDAPBINDPW@@@", "");
+ content = content.replaceAll("@@@MULTICAST_ADDR@@@", "");
+ content = content.replaceAll("@@@MULTICAST_PORT@@@", "");
+
+ // we now have the finished XML content - write out the file to the tmp directory
+ File filteredXmlFile = File.createTempFile("rhq", xmlFile.getName());
+ FileOutputStream xmlFileOutStream = new FileOutputStream(xmlFile);
+ ByteArrayInputStream contentInStream = new ByteArrayInputStream(content.getBytes());
+ StreamUtil.copy(contentInStream, xmlFileOutStream);
+
+ return xmlFile.getAbsoluteFile();
+ }
+
}
diff --git a/modules/enterprise/gui/installer-war/src/test/resources/org/rhq/enterprise/installer/db-data-combined-3.0.0.xml b/modules/enterprise/gui/installer-war/src/test/resources/org/rhq/enterprise/installer/db-data-combined-3.0.0.xml
new file mode 100644
index 0000000..060f241
--- /dev/null
+++ b/modules/enterprise/gui/installer-war/src/test/resources/org/rhq/enterprise/installer/db-data-combined-3.0.0.xml
@@ -0,0 +1,690 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<dbsetup name="data.xml">
+<!-- BEGIN: rhq-data.xml -->
+<!-- BEGIN: auth-data.xml -->
+
+
+ <table name="RHQ_PRINCIPAL">
+ <data id="2" PRINCIPAL="@@@ADMINUSERNAME@@@" PASSWORD="@@@ADMINPASSWORD@@@"/>
+ </table>
+
+<!-- END: auth-data.xml -->
+<!-- BEGIN: authz-data.xml -->
+
+
+ <!-- the overlord user -->
+ <table name="RHQ_SUBJECT">
+ <data ID="1"
+ NAME="admin"
+ FIRST_NAME="Super"
+ LAST_NAME="User"
+ FSYSTEM="TRUE"/>
+ </table>
+
+ <!-- the initial rhqadmin user -->
+ <table name="RHQ_SUBJECT">
+ <data ID="2"
+ NAME="@@@ADMINUSERNAME@@@"
+ FIRST_NAME="RHQ"
+ LAST_NAME="Administrator"
+ EMAIL_ADDRESS="@@@ADMINEMAIL@@@"
+ FSYSTEM="FALSE"/>
+ </table>
+
+ <!-- Define the system root role which includes our overlord and rhqadmin users -->
+ <table name="RHQ_ROLE">
+ <data ID="1"
+ NAME="Super User Role"
+ FSYSTEM="TRUE"
+ DESCRIPTION="System superuser role that provides full access to everything. This role cannot be modified."/>
+ <data ID="2"
+ NAME="All Resources Role"
+ FSYSTEM="FALSE"
+ DESCRIPTION="Provides full access to all resources in inventory. Cannot modify users, roles or server settings."/>
+ </table>
+
+ <!-- associate the root users with all security permissions -->
+ <table name="RHQ_SUBJECT_ROLE_MAP">
+ <!-- overlord user -->
+ <data SUBJECT_ID="1" ROLE_ID="1"/>
+ <!-- rhqadmin user -->
+ <data SUBJECT_ID="2" ROLE_ID="1"/>
+ </table>
+
+ <table name="RHQ_PERMISSION">
+ <!-- give super-user-role all permissions
+ (explicitly add resource perms, even though they are implied by MANAGE_INVENTORY) -->
+ <data ROLE_ID="1" OPERATION="0"/> <!-- Permission.MANAGE_SECURITY -->
+ <data ROLE_ID="1" OPERATION="1"/> <!-- Permission.MANAGE_INVENTORY -->
+ <data ROLE_ID="1" OPERATION="2"/> <!-- Permission.MANAGE_SETTINGS -->
+ <data ROLE_ID="1" OPERATION="12"/> <!-- Permission.MANAGE_BUNDLE -->
+ <data ROLE_ID="1" OPERATION="15"/> <!-- Permission.MANAGE_REPOSITORIES -->
+ <!-- resource permissions start here-->
+ <data ROLE_ID="1" OPERATION="3"/> <!-- Permission.VIEW_RESOURCE -->
+ <data ROLE_ID="1" OPERATION="4"/> <!-- Permission.MODIFY_RESOURCE -->
+ <data ROLE_ID="1" OPERATION="5"/> <!-- Permission.DELETE_RESOURCE -->
+ <data ROLE_ID="1" OPERATION="6"/> <!-- Permission.CREATE_CHILD_RESOURCES -->
+ <data ROLE_ID="1" OPERATION="7"/> <!-- Permission.MANAGE_ALERTS -->
+ <data ROLE_ID="1" OPERATION="8"/> <!-- Permission.MANAGE_MEASUREMENTS -->
+ <data ROLE_ID="1" OPERATION="9"/> <!-- Permission.MANAGE_CONTENT -->
+ <data ROLE_ID="1" OPERATION="10"/> <!-- Permission.CONTROL -->
+ <data ROLE_ID="1" OPERATION="11"/> <!-- Permission.CONFIGURE_WRITE -->
+ <data ROLE_ID="1" OPERATION="13"/> <!-- Permission.CONFIGURE_READ -->
+ <data ROLE_ID="1" OPERATION="14"/> <!-- Permission.MANAGE_EVENTS -->
+ <data ROLE_ID="1" OPERATION="16"/> <!-- Permission.MANAGE_DRIFT -->
+
+ <!-- give all-resources-role MANAGE_INVENTORY and MANAGE_BUNDLE permissions
+ (explicitly add resource perms as well, even though they are implied by MANAGE_INVENTORY) -->
+ <data ROLE_ID="2" OPERATION="1"/> <!-- Permission.MANAGE_INVENTORY -->
+ <data ROLE_ID="2" OPERATION="12"/> <!-- Permission.MANAGE_BUNDLE -->
+ <!-- resource permissions start here-->
+ <data ROLE_ID="2" OPERATION="3"/> <!-- Permission.VIEW_RESOURCE -->
+ <data ROLE_ID="2" OPERATION="4"/> <!-- Permission.MODIFY_RESOURCE -->
+ <data ROLE_ID="2" OPERATION="5"/> <!-- Permission.DELETE_RESOURCE -->
+ <data ROLE_ID="2" OPERATION="6"/> <!-- Permission.CREATE_CHILD_RESOURCES -->
+ <data ROLE_ID="2" OPERATION="7"/> <!-- Permission.MANAGE_ALERTS -->
+ <data ROLE_ID="2" OPERATION="8"/> <!-- Permission.MANAGE_MEASUREMENTS -->
+ <data ROLE_ID="2" OPERATION="9"/> <!-- Permission.MANAGE_CONTENT -->
+ <data ROLE_ID="2" OPERATION="10"/> <!-- Permission.CONTROL -->
+ <data ROLE_ID="2" OPERATION="11"/> <!-- Permission.CONFIGURE_WRITE -->
+ <data ROLE_ID="2" OPERATION="13"/> <!-- Permission.CONFIGURE_READ -->
+ <data ROLE_ID="2" OPERATION="14"/> <!-- Permission.MANAGE_EVENTS -->
+ <data ROLE_ID="2" OPERATION="16"/> <!-- Permission.MANAGE_DRIFT -->
+ </table>
+
+<!-- END: authz-data.xml -->
+<!-- BEGIN: search-data.xml -->
+
+
+ <!-- overlord-created, global, default saved searches -->
+ <table name="RHQ_SAVED_SEARCH">
+ <data ID="1"
+ CONTEXT="RESOURCE"
+ NAME="Downed Platforms"
+ DESCRIPTION="All downed machines across the entire enterprise"
+ PATTERN="availability=down category=platform"
+ LAST_COMPUTE_TIME="0"
+ SUBJECT_ID="1"
+ GLOBAL="TRUE" />
+ <data ID="2"
+ CONTEXT="RESOURCE"
+ NAME="Downed Servers"
+ DESCRIPTION="All downed servers across the entire enterprise"
+ PATTERN="availability=down category=server"
+ LAST_COMPUTE_TIME="0"
+ SUBJECT_ID="1"
+ GLOBAL="TRUE" />
+ </table>
+
+<!-- END: search-data.xml -->
+<!-- BEGIN: sysconfig-data.xml -->
+
+
+ <!--
+ This file contains the seed data for the configuration table.
+ All keys mentioned here should be referenced via the RHQConstants class
+ -->
+ <table name="RHQ_SYSTEM_CONFIG">
+ <data ID="1" PROPERTY_KEY="SERVER_VERSION" PROPERTY_VALUE="4.2.0.JON300.GA"
+ DEFAULT_PROPERTY_VALUE="4.2.0.JON300.GA" FREAD_ONLY="TRUE"/>
+ <data ID="2" PROPERTY_KEY="DB_SCHEMA_VERSION" PROPERTY_VALUE="2.116"
+ DEFAULT_PROPERTY_VALUE="2.116" FREAD_ONLY="TRUE"/>
+ <data ID="3" PROPERTY_KEY="CAM_JAAS_PROVIDER" PROPERTY_VALUE="@@@JAASPROVIDER@@@"
+ DEFAULT_PROPERTY_VALUE="JDBC" FREAD_ONLY="FALSE"/>
+ <data ID="4" PROPERTY_KEY="CAM_BASE_URL" PROPERTY_VALUE="@@@BASEURL@@@"
+ DEFAULT_PROPERTY_VALUE="@@@BASEURL@@@" FREAD_ONLY="FALSE"/>
+ <data ID="9" PROPERTY_KEY="CAM_HELP_USER" PROPERTY_VALUE="web"
+ DEFAULT_PROPERTY_VALUE="web" FREAD_ONLY="FALSE"/>
+ <data ID="10" PROPERTY_KEY="CAM_HELP_PASSWORD" PROPERTY_VALUE="user"
+ DEFAULT_PROPERTY_VALUE="user" FREAD_ONLY="FALSE"/>
+
+ <!-- default LDAP configuration options -->
+ <data ID="11" PROPERTY_KEY="CAM_LDAP_NAMING_FACTORY_INITIAL"
+ PROPERTY_VALUE="com.sun.jndi.ldap.LdapCtxFactory"
+ DEFAULT_PROPERTY_VALUE="com.sun.jndi.ldap.LdapCtxFactory"
+ FREAD_ONLY="FALSE"/>
+ <data ID="12" PROPERTY_KEY="CAM_LDAP_NAMING_PROVIDER_URL"
+ PROPERTY_VALUE="@@@LDAPURL@@@"
+ DEFAULT_PROPERTY_VALUE="ldap://localhost/"
+ FREAD_ONLY="FALSE"/>
+ <data ID="13" PROPERTY_KEY="CAM_LDAP_LOGIN_PROPERTY"
+ PROPERTY_VALUE="@@@LDAPLOGINPROP@@@"
+ DEFAULT_PROPERTY_VALUE="cn" FREAD_ONLY="FALSE"/>
+ <data ID="14" PROPERTY_KEY="CAM_LDAP_BASE_DN"
+ PROPERTY_VALUE="@@@LDAPBASEDN@@@"
+ DEFAULT_PROPERTY_VALUE="o=JBoss,c=US"
+ FREAD_ONLY="FALSE"/>
+ <data ID="15" PROPERTY_KEY="CAM_LDAP_BIND_DN"
+ PROPERTY_VALUE="@@@LDAPBINDDN@@@"
+ DEFAULT_PROPERTY_VALUE="" FREAD_ONLY="FALSE"/>
+ <data ID="16" PROPERTY_KEY="CAM_LDAP_BIND_PW"
+ PROPERTY_VALUE="@@@LDAPBINDPW@@@"
+ DEFAULT_PROPERTY_VALUE="" FREAD_ONLY="FALSE"/>
+ <data ID="17" PROPERTY_KEY="CAM_LDAP_PROTOCOL"
+ PROPERTY_VALUE="@@@LDAPPROTOCOL@@@" DEFAULT_PROPERTY_VALUE=""
+ FREAD_ONLY="FALSE"/>
+ <data ID="18" PROPERTY_KEY="CAM_LDAP_FILTER"
+ PROPERTY_VALUE="@@@LDAPSEARCHFILTER@@@" DEFAULT_PROPERTY_VALUE=""
+ FREAD_ONLY="FALSE"/>
+
+ <!-- Does this build support Syslog actions? -->
+ <data ID="21" PROPERTY_KEY="CAM_SYSLOG_ACTIONS_ENABLED"
+ PROPERTY_VALUE="false" DEFAULT_PROPERTY_VALUE="false"
+ FREAD_ONLY="FALSE"/>
+ <data ID="23" PROPERTY_KEY="CAM_GUIDE_ENABLED"
+ PROPERTY_VALUE="true"
+ DEFAULT_PROPERTY_VALUE="true" FREAD_ONLY="FALSE"/>
+ <data ID="24" PROPERTY_KEY="CAM_RT_COLLECT_IP_ADDRS"
+ PROPERTY_VALUE="true"
+ DEFAULT_PROPERTY_VALUE="true" FREAD_ONLY="FALSE"/>
+
+ <!-- Default data storage options -->
+ <!-- Default 14 days -->
+ <data ID="26" PROPERTY_KEY="CAM_DATA_PURGE_1H"
+ PROPERTY_VALUE="1209600000" DEFAULT_PROPERTY_VALUE="1209600000"
+ FREAD_ONLY="FALSE"/>
+ <!-- Default 31 days -->
+ <data ID="27" PROPERTY_KEY="CAM_DATA_PURGE_6H"
+ PROPERTY_VALUE="2678400000" DEFAULT_PROPERTY_VALUE="2678400000"
+ FREAD_ONLY="FALSE"/>
+ <!-- Default 1 year -->
+ <data ID="28" PROPERTY_KEY="CAM_DATA_PURGE_1D"
+ PROPERTY_VALUE="31536000000" DEFAULT_PROPERTY_VALUE="31536000000"
+ FREAD_ONLY="FALSE"/>
+
+ <!-- Baseline options -->
+ <!-- How often to calculate, default 3 days; if 0, never calculate them automatically -->
+ <data ID="29" PROPERTY_KEY="CAM_BASELINE_FREQUENCY"
+ PROPERTY_VALUE="259200000" DEFAULT_PROPERTY_VALUE="259200000"
+ FREAD_ONLY="FALSE"/>
+ <!-- How much data to include in the calulation, default 7 days -->
+ <data ID="30" PROPERTY_KEY="CAM_BASELINE_DATASET"
+ PROPERTY_VALUE="604800000" DEFAULT_PROPERTY_VALUE="604800000"
+ FREAD_ONLY="FALSE"/>
+
+ <!-- ID 31 has been deleted -->
+
+ <!-- How often to run database maintainence routines -->
+ <data ID="32" PROPERTY_KEY="CAM_DATA_MAINTENANCE"
+ PROPERTY_VALUE="3600000" DEFAULT_PROPERTY_VALUE="3600000" FREAD_ONLY="FALSE"/>
+
+ <!-- How long to keep RT data around -->
+ <data ID="34" PROPERTY_KEY="RT_DATA_PURGE" PROPERTY_VALUE="2678400000"
+ DEFAULT_PROPERTY_VALUE="2678400000" FREAD_ONLY="FALSE"/>
+
+ <!-- Whether to reindex the data tables nightly -->
+ <data ID="35" PROPERTY_KEY="DATA_REINDEX_NIGHTLY" PROPERTY_VALUE="true"
+ DEFAULT_PROPERTY_VALUE="true" FREAD_ONLY="FALSE"/>
+
+ <!-- How long to keep alerts around -->
+ <data ID="36" PROPERTY_KEY="ALERT_PURGE" PROPERTY_VALUE="2678400000"
+ DEFAULT_PROPERTY_VALUE="2678400000" FREAD_ONLY="FALSE"/>
+
+ <!-- How long to keep events around (1209600000 millis == 14 days) -->
+ <data ID="51" PROPERTY_KEY="EVENT_PURGE" PROPERTY_VALUE="1209600000"
+ DEFAULT_PROPERTY_VALUE="1209600000" FREAD_ONLY="FALSE"/>
+
+ <!-- How long an agent is allowed to be quiet before we consider it down and backfill it -->
+ <data ID="52" PROPERTY_KEY="AGENT_MAX_QUIET_TIME_ALLOWED" PROPERTY_VALUE="900000"
+ DEFAULT_PROPERTY_VALUE="900000" FREAD_ONLY="FALSE"/>
+
+ <!-- Will our server-cloud support agents auto-updating themselves? -->
+ <data ID="53" PROPERTY_KEY="ENABLE_AGENT_AUTO_UPDATE" PROPERTY_VALUE="true"
+ DEFAULT_PROPERTY_VALUE="true" FREAD_ONLY="FALSE"/>
+
+ <!-- How old does a trait have to be in order to get purged -->
+ <data ID="54" PROPERTY_KEY="TRAIT_PURGE" PROPERTY_VALUE="31536000000"
+ DEFAULT_PROPERTY_VALUE="31536000000" FREAD_ONLY="FALSE"/>
+
+ <!-- How old does availability have to be in order to get purged -->
+ <data ID="55" PROPERTY_KEY="AVAILABILITY_PURGE" PROPERTY_VALUE="31536000000"
+ DEFAULT_PROPERTY_VALUE="31536000000" FREAD_ONLY="FALSE"/>
+
+ <data ID="56" PROPERTY_KEY="RESOURCE_GENERIC_PROPERTIES_UPGRADE" PROPERTY_VALUE="false"
+ DEFAULT_PROPERTY_VALUE="false" FREAD_ONLY="FALSE"/>
+
+ <!-- default drift server plugin settings -->
+ <data ID="57" PROPERTY_KEY="ACTIVE_DRIFT_PLUGIN" PROPERTY_VALUE="drift-jpa"
+ DEFAULT_PROPERTY_VALUE="drift-jpa" FREAD_ONLY="FALSE"/>
+
+ <!-- purge drift files older than 31 days by default -->
+ <data ID="58" PROPERTY_KEY="DRIFT_FILE_PURGE" PROPERTY_VALUE="2678400000"
+ DEFAULT_PROPERTY_VALUE="2678400000" FREAD_ONLY="FALSE"/>
+
+ </table>
+
+<!-- END: sysconfig-data.xml -->
+<!-- BEGIN: measurement-data.xml -->
+
+ <table name="RHQ_NUMBERS">
+ <data i="0"/>
+ <data i="1"/>
+ <data i="2"/>
+ <data i="3"/>
+ <data i="4"/>
+ <data i="5"/>
+ <data i="6"/>
+ <data i="7"/>
+ <data i="8"/>
+ <data i="9"/>
+ <data i="10"/>
+ <data i="11"/>
+ <data i="12"/>
+ <data i="13"/>
+ <data i="14"/>
+ <data i="15"/>
+ <data i="16"/>
+ <data i="17"/>
+ <data i="18"/>
+ <data i="19"/>
+ <data i="20"/>
+ <data i="21"/>
+ <data i="22"/>
+ <data i="23"/>
+ <data i="24"/>
+ <data i="25"/>
+ <data i="26"/>
+ <data i="27"/>
+ <data i="28"/>
+ <data i="29"/>
+ <data i="30"/>
+ <data i="31"/>
+ <data i="32"/>
+ <data i="33"/>
+ <data i="34"/>
+ <data i="35"/>
+ <data i="36"/>
+ <data i="37"/>
+ <data i="38"/>
+ <data i="39"/>
+ <data i="40"/>
+ <data i="41"/>
+ <data i="42"/>
+ <data i="43"/>
+ <data i="44"/>
+ <data i="45"/>
+ <data i="46"/>
+ <data i="47"/>
+ <data i="48"/>
+ <data i="49"/>
+ <data i="50"/>
+ <data i="51"/>
+ <data i="52"/>
+ <data i="53"/>
+ <data i="54"/>
+ <data i="55"/>
+ <data i="56"/>
+ <data i="57"/>
+ <data i="58"/>
+ <data i="59"/>
+ </table>
+
+<!-- END: measurement-data.xml -->
+<!-- BEGIN: content-data.xml -->
+
+ <table name="RHQ_ARCHITECTURE">
+ <data id="1" name="noarch"/>
+ <data id="2" name="i386"/>
+ <data id="3" name="i486"/>
+ <data id="4" name="i586"/>
+ <data id="5" name="i686"/>
+ <data id="6" name="alpha"/>
+ <data id="7" name="alphaev6"/>
+ <data id="8" name="ia64"/>
+ <data id="9" name="sparc"/>
+ <data id="10" name="sparcv9"/>
+ <data id="11" name="sparc64"/>
+ <data id="12" name="src"/>
+ <data id="13" name="s390"/>
+ <data id="14" name="athlon"/>
+ <data id="15" name="s390x"/>
+ <data id="16" name="ppc"/>
+ <data id="17" name="ppc64"/>
+ <data id="18" name="pSeries"/>
+ <data id="19" name="iSeries"/>
+ <data id="20" name="x86_64"/>
+ <data id="21" name="ppc64iseries"/>
+ <data id="22" name="ppc64pseries"/>
+ <data id="23" name="sparc-solaris"/>
+ <data id="24" name="sparc.sun4u-solaris"/>
+ <data id="25" name="tar"/>
+ <data id="26" name="ia32e"/>
+ <data id="27" name="amd64"/>
+ <data id="28" name="i386-solaris"/>
+ <data id="29" name="nosrc"/>
+ <data id="30" name="sparc-solaris-patch"/>
+ <data id="31" name="i386-solaris-patch"/>
+ <data id="32" name="sparc-solaris-patch-cluster"/>
+ <data id="33" name="i386-solaris-patch-cluster"/>
+ <data id="34" name="noarch-solaris"/>
+ <data id="35" name="noarch-solaris-patch"/>
+ <data id="36" name="noarch-solaris-patch-cluster"/>
+ <data id="37" name="solaris-patch"/>
+ <data id="38" name="solaris-patch-cluster"/>
+ </table>
+
+ <table name="RHQ_REPO_GROUP_TYPE">
+ <data id="1" name="family"/>
+ </table>
+
+ <table name="RHQ_REPO_RELATION_TYPE">
+ <data id="1" name="parent"/>
+ <data id="2" name="clone"/>
+ </table>
+
+ <table name="RHQ_DISTRIBUTION_TYPE">
+ <data id="1" name="kickstart" description="Linux kickstart distribution"/>
+ <data id="2" name="jumpstart" description="solaris jumpstart distribution"/>
+ </table>
+
+<!-- END: content-data.xml -->
+<!-- BEGIN: jms-data.xml -->
+
+<!-- the schema matches that which would be automatically created by the JMS subsystem -->
+<!-- see deploy/jms/rhq-jdbc-state-service.xml and rhq-jdbc2-service.xml -->
+<!-- the data must match that which is expected in conf/login-config.xml -->
+
+
+ <table name="JMS_USERS">
+ <data USERID="guest" PASSWD="guest" />
+ </table>
+
+ <table name="JMS_ROLES">
+ <data ROLEID="guest" USERID="guest" />
+ </table>
+
+<!-- END: jms-data.xml -->
+<!-- END: rhq-data.xml -->
+<!-- BEGIN: jon-data.xml -->
+
+<!-- This dbsetup config file defines a content source and
+ associated repo for the JBoss CP RSS patch feed. -->
+
+
+ <!-- ********* metadata (the content source type and its config def) ********* -->
+
+ <table name="RHQ_CONFIG_DEF">
+ <data ID="101"
+ NAME="JBoss CP Patch Feed Content Source"/>
+ </table>
+
+ <table name="RHQ_CONFIG_PROP_DEF">
+ <data ID="101"
+ NAME="url"
+ DISPLAY_NAME="Feed URL"
+ DESCRIPTION="URL of the feed (e.g. https://access.redhat.com/jbossnetwork/restricted/feed/software.html?prod...)."
+ REQUIRED="1"
+ READONLY="0"
+ SUMMARY="0"
+ ACTIVATION_POLICY="IMMEDIATE"
+ ORDER_INDEX="0"
+ SIMPLE_TYPE="STRING"
+ ALLOW_CUSTOM_ENUM_VALUE="0"
+ DTYPE="property"
+ CONFIG_DEF_ID="101"
+ UNITS="0"/>
+ <data ID="102"
+ NAME="username"
+ DISPLAY_NAME="Username"
+ DESCRIPTION="Username used to access the feed URL."
+ REQUIRED="1"
+ READONLY="0"
+ SUMMARY="0"
+ ACTIVATION_POLICY="IMMEDIATE"
+ ORDER_INDEX="1"
+ SIMPLE_TYPE="STRING"
+ ALLOW_CUSTOM_ENUM_VALUE="0"
+ DTYPE="property"
+ CONFIG_DEF_ID="101"
+ UNITS="0"/>
+ <data ID="103"
+ NAME="password"
+ DISPLAY_NAME="Password"
+ DESCRIPTION="Password used to access the feed URL."
+ REQUIRED="1"
+ READONLY="0"
+ SUMMARY="0"
+ ACTIVATION_POLICY="IMMEDIATE"
+ ORDER_INDEX="2"
+ SIMPLE_TYPE="PASSWORD"
+ ALLOW_CUSTOM_ENUM_VALUE="0"
+ DTYPE="property"
+ CONFIG_DEF_ID="101"
+ UNITS="0"/>
+ <data ID="104"
+ NAME="active"
+ DISPLAY_NAME="Active"
+ DESCRIPTION="Indicates if the feed should be checked for new patches."
+ REQUIRED="1"
+ READONLY="0"
+ SUMMARY="0"
+ ACTIVATION_POLICY="IMMEDIATE"
+ ORDER_INDEX="3"
+ SIMPLE_TYPE="BOOLEAN"
+ ALLOW_CUSTOM_ENUM_VALUE="0"
+ DTYPE="property"
+ CONFIG_DEF_ID="101"
+ UNITS="0"/>
+ <data ID="105"
+ NAME="proxyUrl"
+ DISPLAY_NAME="Proxy URL"
+ REQUIRED="0"
+ READONLY="0"
+ SUMMARY="0"
+ ACTIVATION_POLICY="IMMEDIATE"
+ ORDER_INDEX="4"
+ SIMPLE_TYPE="STRING"
+ ALLOW_CUSTOM_ENUM_VALUE="0"
+ DTYPE="property"
+ CONFIG_DEF_ID="101"
+ UNITS="0"/>
+ <data ID="106"
+ NAME="proxyPort"
+ DISPLAY_NAME="Proxy Port"
+ REQUIRED="0"
+ READONLY="0"
+ SUMMARY="0"
+ ACTIVATION_POLICY="IMMEDIATE"
+ ORDER_INDEX="5"
+ SIMPLE_TYPE="STRING"
+ ALLOW_CUSTOM_ENUM_VALUE="0"
+ DTYPE="property"
+ CONFIG_DEF_ID="101"
+ UNITS="0"/>
+ <data ID="107"
+ NAME="proxyUsername"
+ DISPLAY_NAME="Proxy Username"
+ REQUIRED="0"
+ READONLY="0"
+ SUMMARY="0"
+ ACTIVATION_POLICY="IMMEDIATE"
+ ORDER_INDEX="6"
+ SIMPLE_TYPE="STRING"
+ ALLOW_CUSTOM_ENUM_VALUE="0"
+ DTYPE="property"
+ CONFIG_DEF_ID="101"
+ UNITS="0"/>
+ <data ID="108"
+ NAME="proxyPassword"
+ DISPLAY_NAME="Proxy Password"
+ REQUIRED="0"
+ READONLY="0"
+ SUMMARY="0"
+ ACTIVATION_POLICY="IMMEDIATE"
+ ORDER_INDEX="7"
+ SIMPLE_TYPE="STRING"
+ ALLOW_CUSTOM_ENUM_VALUE="0"
+ DTYPE="property"
+ CONFIG_DEF_ID="101"
+ UNITS="0"/>
+ </table>
+
+ <!-- NOTE: The values of the NAME, PLUGIN_NAME, and API_CLASS columns must match what is
+ defined in RHQ/modules/enterprise/server/plugins/jboss-software/src/main/resources/META-INF/rhq-serverplugin.xml. -->
+ <!-- default sync chedule: 1st of every month at 12am -->
+ <table name="RHQ_CONTENT_SOURCE_TYPE">
+ <data ID="101"
+ NAME="JBossASPatchSource"
+ DISPLAY_NAME="JBoss Patch Content Source"
+ DESCRIPTION="a content source that retrieves package metadata from an RSS feed; the feed must be in the format used by the JBoss CP"
+ PLUGIN_NAME="JBossASPatchContentSourcePlugin"
+ DEFAULT_LAZY_LOAD="1"
+ DEFAULT_DOWNLOAD_MODE="DATABASE"
+ DEFAULT_SYNC_SCHEDULE="0 0 0 1 * ?"
+ API_CLASS="org.rhq.enterprise.server.plugins.jboss.software.JBossSoftwareContentSourceAdapter"
+ SOURCE_CONFIG_DEF_ID="101"/>
+ </table>
+
+
+ <!-- the default template -->
+ <table name="RHQ_CONFIG">
+ <data ID="101"
+ VERSION="0"
+ CTIME="1270066600000"
+ MTIME="1270066600000"/>
+ </table>
+
+ <table name="RHQ_CONFIG_PROPERTY">
+ <data ID="101"
+ NAME="url"
+ CONFIGURATION_ID="101"
+ STRING_VALUE=""
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="102"
+ NAME="username"
+ CONFIGURATION_ID="101"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="103"
+ NAME="password"
+ CONFIGURATION_ID="101"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="104"
+ NAME="proxyUrl"
+ CONFIGURATION_ID="101"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="105"
+ NAME="proxyPort"
+ CONFIGURATION_ID="101"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="106"
+ NAME="active"
+ CONFIGURATION_ID="101"
+ STRING_VALUE="true"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="107"
+ NAME="proxyUsername"
+ CONFIGURATION_ID="101"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="108"
+ NAME="proxyPassword"
+ CONFIGURATION_ID="101"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ </table>
+
+ <table name="RHQ_CONFIG_TEMPLATE">
+ <data ID="101"
+ NAME="default"
+ DESCRIPTION="the default initial values for the configuration of a JBossASPatchSource content source"
+ CONFIG_ID="101"
+ CONFIG_DEF_ID="101"
+ IS_DEFAULT="1"/>
+ </table>
+
+
+ <!-- ********* data (the content source and its config) ********* -->
+
+ <table name="RHQ_CONFIG">
+ <data ID="102"
+ VERSION="0"
+ CTIME="1270066600000"
+ MTIME="1270066600000"/>
+ </table>
+
+ <table name="RHQ_CONFIG_PROPERTY">
+ <data ID="111"
+ NAME="url"
+ CONFIGURATION_ID="102"
+ STRING_VALUE="https://access.redhat.com/jbossnetwork/restricted/feed/software.html?prod..."
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="112"
+ NAME="username"
+ CONFIGURATION_ID="102"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="113"
+ NAME="password"
+ CONFIGURATION_ID="102"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="114"
+ NAME="proxyUrl"
+ CONFIGURATION_ID="102"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="115"
+ NAME="proxyPort"
+ CONFIGURATION_ID="102"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="116"
+ NAME="active"
+ CONFIGURATION_ID="102"
+ STRING_VALUE="false"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="117"
+ NAME="proxyUsername"
+ CONFIGURATION_ID="102"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ <data ID="118"
+ NAME="proxyPassword"
+ CONFIGURATION_ID="102"
+ OVERRIDE="0"
+ DTYPE="property"/>
+ </table>
+
+ <!-- sync chedule: 1st of every month at 12am -->
+ <table name="RHQ_CONTENT_SOURCE">
+ <data ID="101"
+ NAME="JBoss CP Patch Feed"
+ DESCRIPTION="an RSS feed published by the JBoss Customer Portal (CP) website which provides a list of all JBoss product patches available for the subscription of a given CP user; the feed entries for most cumulative patches (CPs) include automated install instructions that can be used by JON to install those CPs to inventoried server Resources (e.g. JBoss EAP servers)"
+ LAZY_LOAD="1"
+ DOWNLOAD_MODE="DATABASE"
+ SYNC_SCHEDULE="0 0 0 1 * ?"
+ CREATION_TIME="1270066600000"
+ LAST_MODIFIED_TIME="1270066600000"
+ CONTENT_SOURCE_TYPE_ID="101"
+ CONFIGURATION_ID="102"/>
+ </table>
+
+ <!-- sync chedule: every Mon at 1am -->
+ <table name="RHQ_REPO">
+ <data ID="101"
+ NAME="JBoss Patches"
+ DESCRIPTION="the patches obtained from the JBoss CP patch feed"
+ SYNC_SCHEDULE="0 0 1 ? * 1"
+ CREATION_TIME="1270066600000"
+ LAST_MODIFIED_TIME="1270066600000"
+ IS_PRIVATE="0"
+ IS_CANDIDATE="0"/>
+ </table>
+
+ <table name="RHQ_REPO_CONTENT_SRC_MAP">
+ <data REPO_ID="101"
+ CONTENT_SRC_ID="101"
+ CTIME="1270066600000"/>
+ </table>
+
+
+<!-- END: jon-data.xml -->
+</dbsetup>
diff --git a/modules/enterprise/gui/installer-war/src/test/resources/org/rhq/enterprise/installer/db-schema-combined-3.0.0.xml b/modules/enterprise/gui/installer-war/src/test/resources/org/rhq/enterprise/installer/db-schema-combined-3.0.0.xml
new file mode 100644
index 0000000..4c07e1a
--- /dev/null
+++ b/modules/enterprise/gui/installer-war/src/test/resources/org/rhq/enterprise/installer/db-schema-combined-3.0.0.xml
@@ -0,0 +1,2649 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<dbsetup name="schema">
+<!-- BEGIN: config-schema.xml -->
+
+
+ <!-- Definition or Metadata tables -->
+
+ <table name="RHQ_CONFIG_DEF">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="NAME" type="VARCHAR2" required="true" size="100"/>
+ <column name="DESCRIPTION" type="VARCHAR2" required="false" size="250"/>
+ <column name="VERSION" type="VARCHAR2" required="false" size="50"/>
+ <column name="CONFIG_FORMAT" type="VARCHAR2" required="false" size="32"/>
+ </table>
+
+ <table name="RHQ_CONFIG_PROP_GRP_DEF">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="NAME" type="VARCHAR2" required="true" size="100"/>
+ <column name="DISPLAY_NAME" type="VARCHAR2" required="false" size="100"/>
+ <column name="DESCRIPTION" type="VARCHAR2" required="false" size="250"/>
+ <column name="DEFAULT_HIDDEN" type="BOOLEAN" required="false"/>
+ <column name="ORDER_INDEX" type="INTEGER" required="false"/>
+ </table>
+
+ <table name="RHQ_CONFIG_PROP_DEF">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="NAME" type="VARCHAR2" required="false" size="255"/>
+ <column name="DISPLAY_NAME" type="VARCHAR2" required="false" size="100"/>
+ <column name="DESCRIPTION" type="VARCHAR2" required="false" size="1000"/>
+ <column name="DEFAULT_VALUE" type="VARCHAR2" required="false" size="2000"/>
+ <column name="REQUIRED" type="BOOLEAN" required="false"/>
+ <column name="READONLY" type="BOOLEAN" required="false"/>
+ <column name="SUMMARY" type="BOOLEAN" required="false"/>
+ <column name="ACTIVATION_POLICY" type="VARCHAR2" required="false" size="20"/>
+ <column name="GROUP_ID" type="INTEGER" required="false" references="RHQ_CONFIG_PROP_GRP_DEF"/>
+ <column name="ORDER_INDEX" type="INTEGER" required="false"/>
+ <column name="VERSION" type="VARCHAR2" required="false" size="50"/>
+ <column name="PARENT_MAP_DEFINITION_ID" type="INTEGER" required="false" references="RHQ_CONFIG_PROP_DEF"/>
+ <column name="PARENT_LIST_DEFINITION_ID" type="INTEGER" required="false" references="RHQ_CONFIG_PROP_DEF"/>
+ <column name="SIMPLE_TYPE" type="VARCHAR2" required="false" size="20"/>
+ <column name="ALLOW_CUSTOM_ENUM_VALUE" type="BOOLEAN" required="false"/>
+ <column name="DTYPE" type="VARCHAR2" required="true" size="10"/>
+ <column name="CONFIG_DEF_ID" type="INTEGER" required="false" references="RHQ_CONFIG_DEF"/>
+
+ <!-- only simple properties (not lists and maps) have this -->
+ <column name="UNITS" type="SMALLINT" required="false"/>
+
+ <!-- only dynamic properties (not simple) have this -->
+ <column name="DYNAMIC_TYPE" type="VARCHAR2" size="20" required="false"/>
+ <column name="DYNAMIC_KEY" type="VARCHAR2" size="128" required="false"/>
+ </table>
+
+ <table name="RHQ_CONF_PROP_DEF_ENUM">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="STRING_VALUE" type="VARCHAR2" required="false" size="500"/>
+ <column name="ORDER_INDEX" type="INTEGER" required="false"/>
+ <column name="NAME" type="VARCHAR2" required="false" size="100"/>
+ <column name="PROPERTY_DEF_ID" type="INTEGER" required="false" references="RHQ_CONFIG_PROP_DEF"/>
+ </table>
+
+ <table name="RHQ_CONFIG_PD_OSRC">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="LINK_TO_TARGET" type="BOOLEAN" required="false"/>
+ <column name="FILTER" type="VARCHAR2" required="false" size="40"/>
+ <column name="EXPRESSION" type="VARCHAR2" required="true" size="400"/>
+ <column name="TARGET_TYPE" type="VARCHAR2" required="true" size="20"/>
+ <column name="PROPERTY_DEF_ID" type="INTEGER" required="false" references="RHQ_CONFIG_PROP_DEF"/>
+ </table>
+
+ <table name="RHQ_CONFIG_PROP_CONSTR">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="DTYPE" type="VARCHAR2" required="true" size="15"/>
+ <column name="DETAILS" type="VARCHAR2" required="false" size="250"/>
+ <column name="CONFIG_PROP_DEF_ID" type="INTEGER" required="false" references="RHQ_CONFIG_PROP_DEF"/>
+ <column name="ORDER_INDEX" type="INTEGER" required="false"/>
+ </table>
+
+
+ <!-- Content or value tables -->
+
+ <table name="RHQ_CONFIG">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="NOTES" type="VARCHAR2" required="false" size="512"/>
+ <column name="VERSION" type="VARCHAR2" required="false" size="50"/>
+ <column name="CTIME" type="LONG" required="true"/>
+ <column name="MTIME" type="LONG" required="true"/>
+ </table>
+
+ <table name="RHQ_CONFIG_PROPERTY">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="CONFIGURATION_ID" type="INTEGER" required="false" references="RHQ_CONFIG" ondelete="cascade"/>
+ <column name="STRING_VALUE" type="VARCHAR2" required="false" size="2000"/>
+ <column name="OVERRIDE" type="BOOLEAN" required="false"/>
+ <column name="NAME" type="VARCHAR2" required="true" size="255"/>
+ <column name="DTYPE" type="VARCHAR2" required="true" size="10"/>
+ <!-- Recursive cascade path to RHQ_CONFIG_PROPERTY causes constraint creation errors on SQL Server, see
+ http://support.microsoft.com/kb/321843 -->
+ <column name="PARENT_LIST_ID" type="INTEGER" required="false" references="RHQ_CONFIG_PROPERTY" ondelete="cascade" />
+ <column name="PARENT_MAP_ID" type="INTEGER" required="false" references="RHQ_CONFIG_PROPERTY" ondelete="cascade" />
+ <column name="LIST_INDEX" type="INTEGER"/>
+ <column name="ERROR_MESSAGE" type="LONGVARCHAR" required="false"/>
+ <index name="RHQ_CONFIG_PROP_idx_prop_key" unique="false">
+ <field ref="CONFIGURATION_ID"/>
+ <field ref="NAME"/>
+ </index>
+ <index name="RHQ_CONFIG_PROP_idx_map_key" unique="false">
+ <field ref="PARENT_MAP_ID"/>
+ <field ref="NAME"/>
+ </index>
+ <index name="RHQ_CONFIG_PROP_idx_list_key" unique="false">
+ <field ref="PARENT_LIST_ID"/>
+ </index>
+ <!-- List entries all have the same name -->
+ </table>
+
+ <table name="RHQ_CONFIG_TEMPLATE">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="NAME" type="VARCHAR2" required="false" size="100"/>
+ <column name="DESCRIPTION" type="VARCHAR2" required="false" size="500"/>
+ <column name="CONFIG_ID" type="INTEGER" required="false" references="RHQ_CONFIG"/>
+ <column name="CONFIG_DEF_ID" type="INTEGER" required="false" references="RHQ_CONFIG_DEF"/>
+ <column name="IS_DEFAULT" type="BOOLEAN" required="false"/>
+ </table>
+
+ <table name="RHQ_RAW_CONFIG">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="CONFIG_ID" type="INTEGER" required="true" references="RHQ_CONFIG(ID)"/>
+ <column name="PATH" type="VARCHAR2" required="false" size="512"/>
+ <column name="CONTENTS" type="CLOB" required="true"/>
+ <column name="SHA256" type="VARCHAR2" size="64" required="true"/>
+ <column name="CTIME" type="LONG" required="true"/>
+ <column name="MTIME" type="LONG" required="true"/>
+ </table>
+
+<!-- END: config-schema.xml -->
+<!-- BEGIN: cluster-schema.xml -->
+
+ <table name="RHQ_AFFINITY_GROUP">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" required="true" size="255" type="VARCHAR2"/>
+ </table>
+
+ <table name="RHQ_SERVER">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" required="true" size="255" type="VARCHAR2"/>
+ <column name="ADDRESS" required="true" size="255" type="VARCHAR2"/>
+ <column name="PORT" required="true" type="INTEGER"/>
+ <column name="SECURE_PORT" required="true" type="INTEGER"/>
+ <column name="CTIME" required="true" type="LONG"/>
+ <column name="MTIME" required="true" type="LONG"/>
+ <column name="AFFINITY_GROUP_ID" type="INTEGER" references="RHQ_AFFINITY_GROUP" required="false"/>
+ <column name="COMPUTE_POWER" required="true" type="INTEGER"/>
+ <column name="OPERATION_MODE" required="true" size="32" type="VARCHAR2"/>
+ <column name="STATUS" type="INTEGER" required="false" default="0" />
+
+ <!-- This index is for constraint, not performance -->
+ <index name="RHQ_SERVER_NAME_UNIQUE" unique="true">
+ <field ref="NAME"/>
+ </index>
+ </table>
+
+ <!-- new agent -->
+ <table name="RHQ_AGENT">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" required="true" size="255" type="VARCHAR2"/>
+ <column name="ADDRESS" required="true" size="255" type="VARCHAR2"/>
+ <column name="PORT" required="true" type="INTEGER"/>
+ <column name="AGENTTOKEN" required="true" size="100" type="VARCHAR2"/>
+ <column name="REMOTE_ENDPOINT" required="false" size="4000" type="VARCHAR2"/>
+ <column name="CTIME" required="true" type="LONG"/>
+ <column name="MTIME" required="true" type="LONG"/>
+ <column name="LAST_AVAILABILITY_REPORT" required="false" type="LONG"/>
+ <column name="AFFINITY_GROUP_ID" type="INTEGER" references="RHQ_AFFINITY_GROUP" required="false"/>
+ <column name="SERVER_ID" type="INTEGER" references="RHQ_SERVER" required="false"/>
+ <column name="STATUS" type="INTEGER" required="false" default="0" />
+ <column name="BACKFILLED" type="BOOLEAN" required="true" />
+
+ <index name="RHQ_AGENT_NAME_UNIQUE" unique="true">
+ <field ref="NAME"/>
+ </index>
+
+ <index name="RHQ_AGENT_ADDRESS_PORT" unique="true">
+ <field ref="ADDRESS"/>
+ <field ref="PORT"/>
+ </index>
+
+ <index name="RHQ_AGENT_TOKEN_UNIQUE" unique="true">
+ <field ref="AGENTTOKEN"/>
+ </index>
+ </table>
+
+ <table name="RHQ_PARTITION_EVENT">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="SUBJECT_NAME" required="true" size="100" type="VARCHAR2"/>
+ <column name="CTIME" required="true" type="LONG"/>
+ <column name="EVENT_TYPE" required="true" size="50" type="VARCHAR2"/>
+ <column name="EVENT_DETAIL" required="false" size="512" type="VARCHAR2"/>
+ <column name="EXECUTION_STATUS" required="true" size="32" type="VARCHAR2"/>
+ </table>
+
+ <table name="RHQ_PARTITION_DETAILS">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="PARTITION_EVENT_ID" type="INTEGER" references="RHQ_PARTITION_EVENT" required="true"/>
+ <column name="AGENT_NAME" type="VARCHAR2" size="255" required="true"/>
+ <column name="SERVER_NAME" type="VARCHAR2" size="255" required="true"/>
+ </table>
+
+ <table name="RHQ_FAILOVER_LIST">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="PARTITION_EVENT_ID" type="INTEGER" references="RHQ_PARTITION_EVENT" required="true"/>
+ <column name="AGENT_ID" type="INTEGER" references="RHQ_AGENT" required="true"/>
+ <column name="CTIME" required="true" type="LONG"/>
+ </table>
+
+ <table name="RHQ_FAILOVER_DETAILS">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="FAILOVER_LIST_ID" type="INTEGER" references="RHQ_FAILOVER_LIST" required="true"/>
+ <column name="SERVER_ID" type="INTEGER" references="RHQ_SERVER" required="true"/>
+ <column name="ORDINAL" type = "INTEGER" required="true"/>
+ </table>
+
+<!-- END: cluster-schema.xml -->
+<!-- BEGIN: auth-schema.xml -->
+
+
+ <table name="RHQ_PRINCIPAL">
+
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="PRINCIPAL" required="true" type="VARCHAR2" size="100"/>
+ <column name="PASSWORD" required="true" type="VARCHAR2" size="64"/>
+
+ <!-- ensure that principals are unique -->
+ <index name="RHQ_PRINCIPAL_PRINCIPAL_KEY" unique="true">
+ <field ref="PRINCIPAL"/>
+ </index>
+
+ </table>
+
+ <table name="RHQ_SUBJECT">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" required="true" size="100" type="VARCHAR2"/>
+ <column name="CONFIGURATION_ID" type="INTEGER" references="RHQ_CONFIG"/>
+ <column name="FIRST_NAME" required="false" size="100" type="VARCHAR2"/>
+ <column name="LAST_NAME" required="false" size="100" type="VARCHAR2"/>
+ <column name="EMAIL_ADDRESS" size="100" type="VARCHAR2"/>
+ <column name="SMS_ADDRESS" size="100" type="VARCHAR2"/>
+ <column name="PHONE_NUMBER" size="100" type="VARCHAR2"/>
+ <column name="DEPARTMENT" size="100" type="VARCHAR2"/>
+ <column name="FACTIVE" required="true" type="BOOLEAN" default="true"/>
+ <column name="FSYSTEM" required="true" type="BOOLEAN" default="false"/>
+
+ <index name="RHQ_SUBJECT_AUTH_KEY" unique="true">
+ <field ref="NAME"/>
+ </index>
+ </table>
+
+<!-- END: auth-schema.xml -->
+<!-- BEGIN: inventory-schema.xml -->
+
+
+ <!-- NEW RESOURCE TYPES -->
+ <table name="RHQ_RESOURCE_TYPE">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" type="VARCHAR2" size="100" required="true"/>
+ <column name="CATEGORY" type="VARCHAR2" size="16" required="true"/>
+ <column name="CREATION_DATA_TYPE" type="VARCHAR2" size="16" required="true"/>
+ <column name="CREATE_DELETE_POLICY" type="VARCHAR2" size="16" required="true"/>
+ <column name="SINGLETON" type="BOOLEAN" required="true"/>
+ <column name="SUPPORTS_MANUAL_ADD" type="BOOLEAN" required="true"/>
+ <column name="DESCRIPTION" type="VARCHAR2" size="1000"/>
+ <column name="PLUGIN" type="VARCHAR2" size="100"/>
+ <column name="CTIME" type="LONG"/>
+ <column name="MTIME" type="LONG"/>
+ <column name="DELETED" type="BOOLEAN" default="FALSE" required="TRUE"/>
+ <column name="SUBCATEGORY_ID" type="INTEGER"/>
+ <!--
+ TODO add support to DB setup for tables with circular dependencies and then add back this RI
+ <column name="SUBCATEGORY_ID" type="INTEGER" references="RHQ_RESOURCE_SUBCAT" />
+ -->
+ <column name="PLUGIN_CONFIG_DEF_ID" type="INTEGER" references="RHQ_CONFIG_DEF(ID)"/>
+ <column name="RES_CONFIG_DEF_ID" type="INTEGER" references="RHQ_CONFIG_DEF(ID)"/>
+ <column name="BUNDLE_CONFIG_ID" type="INTEGER" references="RHQ_CONFIG"/>
+
+ <index name="RHQ_RES_TYPE_IDX_PLG_NAME" unique="true">
+ <field ref="NAME"/>
+ <field ref="PLUGIN"/>
+ </index>
+ </table>
+
+ <!-- NEW RESOURCE SUBCATEGORIES -->
+ <table name="RHQ_RESOURCE_SUBCAT">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" type="VARCHAR2" size="100"/>
+ <column name="DISPLAY_NAME" type="VARCHAR2" size="100"/>
+ <column name="DESCRIPTION" type="VARCHAR2" size="1000"/>
+ <column name="CTIME" type="LONG"/>
+ <column name="MTIME" type="LONG"/>
+ <column name="PARENT_SUBCATEGORY_ID" type="INTEGER" references="RHQ_RESOURCE_SUBCAT"/>
+ <!-- resourceTypeId is not required on child sub categories -->
+ <column name="RESOURCE_TYPE_ID" type="INTEGER" references="RHQ_RESOURCE_TYPE"/>
+ </table>
+
+ <!-- Many To Many mapping for resource type to its parents -->
+ <table name="RHQ_RESOURCE_TYPE_PARENTS">
+ <column name="RESOURCE_TYPE_ID" required="true" type="INTEGER" references="RHQ_RESOURCE_TYPE"/>
+ <column name="PARENT_RESOURCE_TYPE_ID" required="true" type="INTEGER" references="RHQ_RESOURCE_TYPE"/>
+
+ <!-- not using full words to fit index name length -->
+ <constraint name="RHQ_RES_TYPE_PARENTS_KEY">
+ <primaryKey>
+ <field ref="RESOURCE_TYPE_ID"/>
+ <field ref="PARENT_RESOURCE_TYPE_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_PROCESS_SCAN">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="QUERY" type="VARCHAR2" size="256" required="true"/>
+ <column name="NAME" type="VARCHAR2" size="100" required="false"/>
+ <column name="RESOURCE_TYPE_ID" type="INTEGER" references="RHQ_RESOURCE_TYPE"/>
+
+ <index name="RHQ_PROCESS_SCAN_QUERY_INDEX" unique="true">
+ <field ref="QUERY"/>
+ <field ref="RESOURCE_TYPE_ID"/>
+ </index>
+ </table>
+
+ <table name="RHQ_PRD_VER">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="VERSION" type="VARCHAR2" size="100" required="true"/>
+ <column name="RES_TYPE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE_TYPE"/>
+ </table>
+
+ <table name="RHQ_RESOURCE">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="RESOURCE_TYPE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE_TYPE"/>
+ <column name="UUID" type="CHAR" size="36" required="true"/>
+ <column name="NAME" type="VARCHAR2" size="500"/>
+ <!-- ancestry holds the full parental ancestry, used for disambiguation -->
+ <column name="ANCESTRY" type="VARCHAR2" required="false" size="4000"/>
+ <column name="RESOURCE_KEY" type="VARCHAR2" required="true" size="500"/>
+ <column name="AGENT_ID" required="false" type="INTEGER" references="RHQ_AGENT(id)"/>
+ <column name="INVENTORY_STATUS" type="VARCHAR2" size="20"/>
+ <column name="CONNECTED" type="BOOLEAN"/>
+ <column name="DESCRIPTION" type="VARCHAR2" size="1000"/>
+ <column name="VERSION" type="VARCHAR2" size="100"/>
+ <column name="CTIME" type="LONG"/>
+ <column name="MTIME" type="LONG"/>
+ <column name="ITIME" type="LONG"/>
+ <column name="RES_CONFIGURATION_ID" type="INTEGER" references="RHQ_CONFIG"/>
+ <column name="PLUGIN_CONFIGURATION_ID" type="INTEGER" references="RHQ_CONFIG"/>
+ <column name="MODIFIED_BY" required="false" size="100" type="VARCHAR2"/>
+ <column name="LOCATION" required="false" size="100" type="VARCHAR2"/>
+ <column name="PARENT_RESOURCE_ID" type="INTEGER" references="RHQ_RESOURCE"/>
+ <column name="PRODUCT_VERSION_ID" type="INTEGER" references="RHQ_PRD_VER"/>
+
+ <index name="RHQ_RESOURCE_idx_key">
+ <field ref="RESOURCE_KEY"/>
+ </index>
+
+ <index name="RHQ_RESOURCE_idx_type">
+ <field ref="RESOURCE_TYPE_ID"/>
+ </index>
+
+ <index name="RHQ_RESOURCE_idx_agent">
+ <field ref="AGENT_ID"/>
+ </index>
+
+ <index name="RHQ_RESOURCE_idx_parent">
+ <field ref="PARENT_RESOURCE_ID"/>
+ </index>
+
+ </table>
+
+ <table name="RHQ_RESOURCE_ERROR">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="RESOURCE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE"/>
+ <column name="TIME_OCCURRED" type="LONG" required="true"/>
+ <column name="ERROR_TYPE" type="VARCHAR2" required="true" size="32"/>
+ <column name="SUMMARY" type="VARCHAR2" required="true" size="1000"/>
+ <column name="DETAIL" type="LONGVARCHAR" required="false"/>
+
+ <index name="RHQ_RES_ERROR_IDX_RES_ID">
+ <field ref="RESOURCE_ID"/>
+ </index>
+ </table>
+
+ <table name="RHQ_GROUP_DEF">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" required="true" size="100" type="VARCHAR2"/>
+ <column name="DESCRIPTION" size="100" type="VARCHAR2"/>
+ <column name="CTIME" type="LONG"/>
+ <column name="MTIME" type="LONG"/>
+ <column name="CALC_TIME" type="LONG"/>
+ <column name="CALC_INTERVAL" type="LONG"/>
+ <column name="RECURSIVE" type="BOOLEAN"/>
+ <column name="EXPRESSION" type="VARCHAR2" size="1000"/>
+
+ <index name="RHQ_GROUP_DEF_NAME" unique="true">
+ <field ref="NAME"/>
+ </index>
+ </table>
+
+ <table name="RHQ_RESOURCE_GROUP">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <!-- this name can be longer than the size of the GROUP_BY column, which is used to uniquely identify it -->
+ <!-- Max bytes for Oracle Varchar2 to accommodate large cluster keys -->
+ <column name="NAME" required="true" size="4000" type="VARCHAR2"/>
+ <column name="DESCRIPTION" size="100" type="VARCHAR2"/>
+ <column name="RESOURCE_TYPE_ID" type="INTEGER" references="RHQ_RESOURCE_TYPE"/>
+ <!-- Compatible groups only -->
+ <column name="CTIME" type="LONG"/>
+ <column name="MTIME" type="LONG"/>
+ <column name="MODIFIED_BY" required="false" size="100" type="VARCHAR2"/>
+ <column name="RECURSIVE" type="BOOLEAN"/>
+
+ <column name="GROUP_DEFINITION_ID" required="false" type="INTEGER" references="RHQ_GROUP_DEF"/>
+ <column name="GROUP_BY" size="500" type="VARCHAR2"/>
+
+ <column name="CATEGORY" type="VARCHAR2" size="20" required="true"/>
+
+ <!-- This is only set if this is a subject-owned group (like an autogroup) -->
+ <column name="SUBJECT_ID" type="INTEGER" references="RHQ_SUBJECT"/>
+
+ <!-- These two only set if this is a backing group for a resource auto-cluster -->
+ <column name="CLUSTER_KEY" type="VARCHAR2" size="4000" required="false"/>
+ <column name="CLUSTER_RESOURCE_GROUP_ID" type="INTEGER" references="RHQ_RESOURCE_GROUP"/>
+
+ <!-- This is only set if this is a backing group for a resource auto-group -->
+ <column name="AUTO_GROUP_PARENT_RESOURCE_ID" type="INTEGER" references="RHQ_RESOURCE"/>
+
+ <column name="VISIBLE" type="BOOLEAN"/>
+
+ <index name="RHQ_RES_GROUP_NAME" unique="false">
+ <field ref="NAME"/>
+ </index>
+ </table>
+
+ <!-- Many To Many mapping for groups to implicit resources -->
+ <table name="RHQ_RESOURCE_GROUP_RES_IMP_MAP">
+ <column name="RESOURCE_ID" required="true" type="INTEGER" references="RHQ_RESOURCE"/>
+ <column name="RESOURCE_GROUP_ID" required="true" type="INTEGER" references="RHQ_RESOURCE_GROUP"/>
+
+ <!-- not using full words to fit index name length -->
+ <constraint name="RHQ_RES_GROUP_RES_IMP_MAP_KEY">
+ <primaryKey>
+ <field ref="RESOURCE_ID"/>
+ <field ref="RESOURCE_GROUP_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <!-- Many To Many mapping for groups to explicit resources -->
+ <table name="RHQ_RESOURCE_GROUP_RES_EXP_MAP">
+ <column name="RESOURCE_ID" required="true" type="INTEGER" references="RHQ_RESOURCE"/>
+ <column name="RESOURCE_GROUP_ID" required="true" type="INTEGER" references="RHQ_RESOURCE_GROUP"/>
+
+ <!-- not using full words to fit index name length -->
+ <constraint name="RHQ_RES_GROUP_RES_EXP_MAP_KEY">
+ <primaryKey>
+ <field ref="RESOURCE_ID"/>
+ <field ref="RESOURCE_GROUP_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_CONFIG_GROUP_UPDATE">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="GROUP_ID" type="INTEGER" required="true" references="RHQ_RESOURCE_GROUP"/>
+ <column name="CONFIGURATION_ID" type="INTEGER" required="true" references="RHQ_CONFIG"/>
+ <column name="STATUS" type="VARCHAR2" required="true" size="16"/>
+ <column name="ERROR_MESSAGE" type="LONGVARCHAR" required="false"/>
+ <column name="SUBJECT_NAME" type="VARCHAR2" required="false" size="100"/>
+ <column name="CTIME" type="LONG" required="true"/>
+ <column name="MTIME" type="LONG" required="true"/>
+ <column name="DTYPE" type="VARCHAR2" required="true" size="10"/>
+ </table>
+
+ <table name="RHQ_CONFIG_UPDATE">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="CONFIGURATION_ID" type="INTEGER" required="true" references="RHQ_CONFIG" ondelete="cascade"/>
+ <column name="STATUS" type="VARCHAR2" required="true" size="16"/>
+ <column name="ERROR_MESSAGE" type="LONGVARCHAR" required="false"/>
+ <column name="SUBJECT_NAME" type="VARCHAR2" required="false" size="100"/>
+ <column name="CTIME" type="LONG" required="true"/>
+ <column name="MTIME" type="LONG" required="true"/>
+ <column name="CONFIG_RES_ID" type="INTEGER" required="false" references="RHQ_RESOURCE"/>
+ <column name="PLUGIN_CONFIG_RES_ID" type="INTEGER" required="false" references="RHQ_RESOURCE"/>
+ <column name="AGG_RES_UPDATE_ID" type="INTEGER" required="false" references="RHQ_CONFIG_GROUP_UPDATE"/>
+ <column name="AGG_PLUGIN_UPDATE_ID" type="INTEGER" required="false" references="RHQ_CONFIG_GROUP_UPDATE"/>
+ <column name="DTYPE" type="VARCHAR2" required="true" size="10"/>
+ </table>
+
+
+ <table name="RHQ_TAGGING">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="NAMESPACE" type="VARCHAR2" required="false" size="20"/>
+ <column name="SEMANTIC" type="VARCHAR2" required="false" size="50"/>
+ <column name="NAME" type="VARCHAR2" required="true" size="100"/>
+ </table>
+
+ <table name="RHQ_TAGGING_RESOURCE_MAP">
+ <column name="RESOURCE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE"/>
+ <column name="TAG_ID" type="INTEGER" required="true" references="RHQ_TAGGING"/>
+ <constraint name="RHQ_TAGGING_RESOURCE_MAP_KEY">
+ <primaryKey>
+ <field ref="RESOURCE_ID"/>
+ <field ref="TAG_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_TAGGING_RES_GROUP_MAP">
+ <column name="RESOURCE_GROUP_ID" type="INTEGER" required="true" references="RHQ_RESOURCE_GROUP"/>
+ <column name="TAG_ID" type="INTEGER" required="true" references="RHQ_TAGGING"/>
+ <constraint name="RHQ_TAGGING_RES_GROUP_MAP_KEY">
+ <primaryKey>
+ <field ref="RESOURCE_GROUP_ID"/>
+ <field ref="TAG_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+<!-- END: inventory-schema.xml -->
+<!-- BEGIN: authz-schema.xml -->
+
+
+ <table name="RHQ_ROLE">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" required="true" size="100" type="VARCHAR2"/>
+ <column name="DESCRIPTION" size="100" type="VARCHAR2"/>
+ <column name="FSYSTEM" type="BOOLEAN" default="false"/>
+
+ <index name="RHQ_ROLE_NAME_KEY" unique="true">
+ <field ref="NAME"/>
+ </index>
+ </table>
+
+ <table name="RHQ_ROLE_RESOURCE_GROUP_MAP">
+ <column name="ROLE_ID" required="true" type="INTEGER" references="RHQ_ROLE"/>
+ <column name="RESOURCE_GROUP_ID" required="true" type="INTEGER" references="RHQ_RESOURCE_GROUP"/>
+
+ <constraint name="RHQ_ROLE_RES_GROUP_MAP_KEY">
+ <primaryKey>
+ <field ref="ROLE_ID"/>
+ <field ref="RESOURCE_GROUP_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_ROLE_LDAP_GROUP">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="ROLE_ID" required="true" type="INTEGER" references="RHQ_ROLE"/>
+ <column name="LDAP_GROUP_NAME" size="128" required="true" type="VARCHAR2"/>
+
+ <index name="RHQ_ROLE_LDAP_GROUP_IDX" unique="true">
+ <field ref="ROLE_ID"/>
+ <field ref="LDAP_GROUP_NAME"/>
+ </index>
+ </table>
+
+ <table name="RHQ_PERMISSION">
+ <column name="ROLE_ID" type="INTEGER" references="RHQ_ROLE" required="true"/>
+ <column name="OPERATION" type="INTEGER" required="true"/>
+ <constraint name="RHQ_PERMISSION_PK">
+ <primaryKey>
+ <field ref="ROLE_ID"/>
+ <field ref="OPERATION"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_SUBJECT_ROLE_MAP">
+ <column name="SUBJECT_ID" required="true" type="INTEGER" references="RHQ_SUBJECT"/>
+ <column name="ROLE_ID" required="true" type="INTEGER" references="RHQ_ROLE"/>
+
+ <constraint name="RHQ_SUBJECT_ROLE_MAPPING_KEY">
+ <primaryKey>
+ <field ref="SUBJECT_ID"/>
+ <field ref="ROLE_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_SUBJECT_ROLE_LDAP_MAP">
+ <column name="SUBJECT_ID" required="true" type="INTEGER" references="RHQ_SUBJECT"/>
+ <column name="ROLE_ID" required="true" type="INTEGER" references="RHQ_ROLE"/>
+ <constraint name="RHQ_SUBJECT_ROLE_LDAP_MAP_PK">
+ <primaryKey>
+ <field ref="SUBJECT_ID" />
+ <field ref="ROLE_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+<!-- END: authz-schema.xml -->
+<!-- BEGIN: search-schema.xml -->
+
+
+ <table name="RHQ_SAVED_SEARCH">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="CONTEXT" type="VARCHAR2" size="25" required="true"/>
+
+ <column name="NAME" type="VARCHAR2" size="200" required="true"/>
+ <column name="DESCRIPTION" type="VARCHAR2" size="500" required="false"/>
+ <column name="PATTERN" type="VARCHAR2" size="1000" required="true"/>
+
+ <column name="LAST_COMPUTE_TIME" type="LONG" required="true"/>
+ <column name="RESULT_COUNT" type="LONG" required="false"/>
+
+ <column name="SUBJECT_ID" type="INTEGER" references="RHQ_SUBJECT" required="true"/>
+ <column name="GLOBAL" type="BOOLEAN" required="true"/>
+ </table>
+
+<!-- END: search-schema.xml -->
+<!-- BEGIN: dashboard-schema.xml -->
+
+
+
+ <table name="RHQ_DASHBOARD">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" type="VARCHAR2" size="200" required="true"/>
+ <column name="SUBJECT_ID" type="INTEGER" required="true" references="RHQ_SUBJECT"/>
+ <column name="RESOURCE_ID" type="INTEGER" required="false" references="RHQ_RESOURCE"/>
+ <column name="GROUP_ID" type="INTEGER" required="false" references="RHQ_RESOURCE_GROUP"/>
+ <column name="CATEGORY" type="VARCHAR2" size="20" required="true"/>
+ <column name="SHARED" type="BOOLEAN" required="true"/>
+ <column name="CONFIGURATION_ID" type="INTEGER" required="false" references="RHQ_CONFIG"/>
+ </table>
+
+
+ <table name="RHQ_DASHBOARD_PORTLET">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" type="VARCHAR2" size="200" required="true"/>
+ <column name="PORTLET_KEY" type="VARCHAR2" size="200" required="true"/>
+ <column name="COL" type="INTEGER" required="true"/>
+ <column name="COL_INDEX" type="INTEGER" required="true"/>
+ <column name="HEIGHT" type="INTEGER" required="true"/>
+ <column name="CONFIGURATION_ID" type="INTEGER" required="false" references="RHQ_CONFIG"/>
+ <column name="DASHBOARD_ID" type="INTEGER" required="false" references="RHQ_DASHBOARD"/>
+ </table>
+
+<!-- END: dashboard-schema.xml -->
+<!-- BEGIN: operation-schema.xml -->
+
+
+ <table name="RHQ_OPERATION_DEF">
+
+ <!-- === required columns === -->
+
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="RESOURCE_TYPE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE_TYPE(ID)"/>
+ <column name="NAME" type="VARCHAR2" required="true" size="100"/>
+
+ <!-- === optional columns === -->
+
+ <!-- an OSGI version range - if null, the operation def applies to all versions of the associated resource type -->
+ <column name="RESOURCE_VERSION_RANGE" type="VARCHAR2" size="100"/>
+
+ <!-- A parameter config definition is only required for operations that have parameters. -->
+ <!-- A results config definition is only required for operations that return data. -->
+ <column name="PARAMETER_CONFIG_DEF_ID" type="INTEGER" references="RHQ_CONFIG_DEF(ID)"/>
+ <column name="RESULTS_CONFIG_DEF_ID" type="INTEGER" references="RHQ_CONFIG_DEF(ID)"/>
+ <column name="DISPLAY_NAME" type="VARCHAR2" size="100"/>
+ <column name="DESCRIPTION" type="VARCHAR2" size="4000"/>
+ <column name="TIMEOUT" type="INTEGER"/>
+
+ <!-- === business key (RESOURCE_TYPE_ID + NAME) === -->
+ <index name="RHQ_OPERATION_DEF_KEY_IDX" unique="true">
+ <field ref="RESOURCE_TYPE_ID"/>
+ <field ref="NAME"/>
+ </index>
+
+ </table>
+
+ <table name="RHQ_OPERATION_HISTORY">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="DTYPE" type="VARCHAR2" required="true" size="8"/>
+ <column name="JOB_NAME" type="VARCHAR2" required="true" size="100"/>
+ <column name="JOB_GROUP" type="VARCHAR2" required="true" size="100"/>
+ <column name="OPERATION_DEF_ID" type="INTEGER" required="true" references="RHQ_OPERATION_DEF"/>
+ <column name="STATUS" type="VARCHAR2" required="true" size="16"/>
+ <column name="ERROR_MESSAGE" type="LONGVARCHAR" required="false"/>
+ <column name="SUBJECT_NAME" type="VARCHAR2" required="true" size="100"/>
+ <column name="CTIME" type="LONG" required="true"/>
+ <column name="STIME" type="LONG" required="true"/>
+ <column name="MTIME" type="LONG" required="true"/>
+ <column name="PARAMETERS_CONFIG_ID" type="INTEGER" required="false" references="RHQ_CONFIG"/>
+
+ <!-- for resource history -->
+ <column name="RESOURCE_ID" type="INTEGER" required="false" references="RHQ_RESOURCE"/>
+ <column name="RESULTS_CONFIG_ID" type="INTEGER" required="false" references="RHQ_CONFIG"/>
+ <column name="GROUP_HISTORY_ID" type="INTEGER" required="false" references="RHQ_OPERATION_HISTORY"/>
+
+ <!-- for group history -->
+ <column name="GROUP_ID" type="INTEGER" required="false" references="RHQ_RESOURCE_GROUP"/>
+
+ <index name="RHQ_OPERATION_HISTORY_JOB_IDX" unique="true">
+ <field ref="JOB_NAME"/>
+ <field ref="JOB_GROUP"/>
+ <field ref="CTIME"/>
+ </index>
+
+ </table>
+
+ <!--
+ This table is really just to support some specific use-cases.
+ Specifically, to be able to get a list of histories for a specific schedule (aka quartz job)
+ and to be able to query a list of all schedules along with their associated resource/group IDs
+ possibly sorted by their next fire time.
+ Note that a NULL next fire time means it won't fire again and the row is probaby about to be deleted;
+ we can probably not even insert rows with NULL and make it a non-nullable field. But rather than
+ code special conditions into the session bean, we'll allow a short-lived NULL next fire time row.
+ -->
+ <table name="RHQ_OPERATION_SCHEDULE">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+
+ <column name="JOB_NAME" type="VARCHAR2" required="true" size="100"/>
+ <column name="JOB_GROUP" type="VARCHAR2" required="true" size="100"/>
+ <column name="DTYPE" type="VARCHAR2" required="true" size="8"/>
+ <column name="NEXT_FIRE_TIME" type="LONG" required="false"/>
+
+ <!-- for resource history -->
+ <column name="RESOURCE_ID" type="INTEGER" required="false" references="RHQ_RESOURCE"/>
+
+ <!-- for group history -->
+ <column name="GROUP_ID" type="INTEGER" required="false" references="RHQ_RESOURCE_GROUP"/>
+
+ <!--
+ Note, this is the same as the primary key that Quartz uses for its schedules (RHQ_QRTZ_JOB_DETAILS).
+ We do not need to add DTYPE to the key, because we ensure the name/group are unique across resource/group
+ schedules
+ -->
+ <!-- === business key (JOB_NAME + JOB_GROUP) === -->
+ <index name="RHQ_OPERATION_SCHEDULE_KEY_IDX" unique="true">
+ <field ref="JOB_NAME"/>
+ <field ref="JOB_GROUP"/>
+ </index>
+ </table>
+
+<!-- END: operation-schema.xml -->
+<!-- BEGIN: event-schema.xml -->
+
+
+ <!-- metadata -->
+
+ <table name="RHQ_EVENT_DEF">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="RESOURCE_TYPE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE_TYPE(ID)"/>
+
+ <column name="NAME" type="VARCHAR2" size="100" required="true"/>
+ <column name="DISPLAY_NAME" type="VARCHAR2" size="100"/>
+ <column name="DESCRIPTION" type="VARCHAR2" size="1000"/>
+
+ <index name="RHQ_EVENT_DEF_IDX" unique="true">
+ <field ref="RESOURCE_TYPE_ID"/>
+ <field ref="NAME"/>
+ </index>
+ </table>
+
+ <!-- instance data -->
+
+ <table name="RHQ_EVENT_SOURCE">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="EVENT_DEF_ID" type="INTEGER" required="true" references="RHQ_EVENT_DEF(ID)"/>
+ <column name="RESOURCE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE(ID)"/>
+
+ <column name="LOCATION" required="true" size="2000" type="VARCHAR2"/>
+
+ <index name="RHQ_EVENT_SOURCE_IDX" unique="true">
+ <field ref="EVENT_DEF_ID"/>
+ <field ref="RESOURCE_ID"/>
+ <field ref="LOCATION"/>
+ </index>
+ </table>
+
+ <table name="RHQ_EVENT">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="EVENT_SOURCE_ID" type="INTEGER" required="true" references="RHQ_EVENT_SOURCE(ID)"/>
+
+ <column name="TIMESTAMP" required="true" type="LONG"/>
+ <column name="SEVERITY" required="true" size="20" type="VARCHAR2"/>
+ <column name="DETAIL" required="true" size="4000" type="VARCHAR2"/>
+ <index name="RHQ_EVENT_IDX" unique="false">
+ <field ref="EVENT_SOURCE_ID"/>
+ <field ref="TIMESTAMP"/>
+ </index>
+ </table>
+
+<!-- END: event-schema.xml -->
+<!-- BEGIN: alert-schema.xml -->
+
+
+ <table name="RHQ_ALERT_DEFINITION">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" required="true" size="100" type="VARCHAR2"/>
+ <column name="CTIME" type="LONG" required="true"/>
+ <column name="MTIME" type="LONG" required="true"/>
+ <column name="PARENT_ID" type="INTEGER" required="false"/>
+ <column name="GROUP_ALERT_DEF_ID" type="INTEGER" required="false"/>
+ <column name="DESCRIPTION" required="false" size="250" type="VARCHAR2"/>
+ <column name="PRIORITY" type="VARCHAR2" size="15" required="true"/>
+ <column name="RESOURCE_TYPE_ID" type="INTEGER" references="RHQ_RESOURCE_TYPE" required="false"/>
+ <column name="RESOURCE_ID" type="INTEGER" references="RHQ_RESOURCE" required="false"/>
+ <column name="RESOURCE_GROUP_ID" type="INTEGER" references="RHQ_RESOURCE_GROUP" required="false"/>
+ <column name="ENABLED" required="true" default="TRUE" type="BOOLEAN"/>
+
+ <column name="REQUIRED" required="true" type="SMALLINT"/>
+
+ <column name="RECOVERY_ID" type="INTEGER" required="true"/>
+ <!-- required, but 0 effectively means null -->
+ <column name="WILL_RECOVER" required="true" default="false" type="BOOLEAN"/>
+ <column name="NOTIFY_FILTERED" required="true" default="false" type="BOOLEAN"/>
+ <column name="CONTROL_FILTERED" required="true" default="FALSE" type="BOOLEAN"/>
+
+ <column name="DELETED" required="true" default="FALSE" type="BOOLEAN"/>
+ <column name="READ_ONLY" required="true" default="FALSE" type="BOOLEAN"/>
+
+ <column name="DAMPENING_CATEGORY" type="SMALLINT" required="true"/>
+ <column name="DAMPENING_VALUE" type="INTEGER"/>
+ <column name="DAMPENING_VALUE_UNITS" type="SMALLINT"/>
+ <column name="DAMPENING_PERIOD" type="INTEGER"/>
+ <column name="DAMPENING_PERIOD_UNITS" type="SMALLINT"/>
+ </table>
+
+ <table name="RHQ_ALERT_DAMPEN_EVENT">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="ALERT_DEFINITION_ID" required="false" type="INTEGER" references="RHQ_ALERT_DEFINITION(ID)"/>
+ <column name="EVENT_TYPE" required="true" type="SMALLINT"/>
+ <column name="EVENT_TIMESTAMP" required="true" type="LONG"/>
+
+ <index name="RHQ_DAMPENING_EVENT_TYPE_IDX">
+ <field ref="EVENT_TYPE"/>
+ </index>
+ <index name="RHQ_DAMPENING_EVENT_TS_IDX">
+ <field ref="EVENT_TIMESTAMP"/>
+ </index>
+ </table>
+
+ <table name="RHQ_ALERT_CONDITION">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="TYPE" required="true" type="VARCHAR2" size="15"/>
+ <!--
+ <column name="REQUIRED" required="true" type="BOOLEAN"/>
+ -->
+ <column name="MEASUREMENT_DEFINITION_ID" required="false" type="INTEGER"/>
+ <column name="NAME" required="false" size="100" type="VARCHAR2"/>
+ <column name="COMPARATOR" required="false" size="2" type="VARCHAR2"/>
+ <column name="THRESHOLD" required="false" type="DOUBLE"/>
+ <!-- event-based conditions use OPTION_STATUS for the string match, so should be a decent length -->
+ <column name="OPTION_STATUS" required="false" size="256" type="VARCHAR2"/>
+ <column name="ALERT_DEFINITION_ID" required="false" type="INTEGER" references="RHQ_ALERT_DEFINITION(ID)"/>
+ <column name="TRIGGER_ID" required="false" type="INTEGER"/>
+ </table>
+
+ <table name="RHQ_ALERT" tablespace="@@@LARGE_TABLESPACE_FOR_DATA@@@"
+ storage-options="freelists 5" cache="true" logging="false">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="ALERT_DEFINITION_ID" required="false" type="INTEGER" references="RHQ_ALERT_DEFINITION(ID)"/>
+ <column name="CTIME" required="true" type="LONG"/>
+ <column name="RECOVERY_ID" type="INTEGER" required="true"/>
+ <!-- required, but 0 effectively means null -->
+ <column name="WILL_RECOVER" required="true" default="false" type="BOOLEAN"/>
+ <column name="ACK_TIME" required="false" type="LONG"/>
+ <column name="ACK_SUBJECT" required="false" size="100" type="VARCHAR2"/>
+ <index name="RHQ_ALERT_IDX_TIME" unique="false">
+ <field ref="CTIME"/>
+ </index>
+ <index name="RHQ_ALERT_IDX_ALERTDEF" unique="false">
+ <field ref="ALERT_DEFINITION_ID"/>
+ </index>
+ </table>
+
+ <table name="RHQ_ALERT_NOTIF_LOG" tablespace="@@@LARGE_TABLESPACE_FOR_DATA@@@"
+ storage-options="freelists 5" cache="true" logging="false">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="ALERT_ID" required="true" type="INTEGER" references="RHQ_ALERT(ID)"/>
+ <index name="RHQ_ALERT_IDX_ALERT" unique="false">
+ <field ref="ALERT_ID"/>
+ </index>
+ <column name="SENDER" required="false" size="100" type="VARCHAR2"/>
+ <column name="RESULT_STATE" required="false" size="20" type="VARCHAR2"/>
+ <column name="MESSAGE" required="false" size="4000" type="VARCHAR2"/>
+ </table>
+
+ <table name="RHQ_ALERT_CONDITION_LOG" tablespace="@@@LARGE_TABLESPACE_FOR_DATA@@@"
+ storage-options="freelists 5" cache="true" logging="false">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="CTIME" required="true" type="LONG"/>
+ <column name="ALERT_ID" required="false" type="INTEGER" references="RHQ_ALERT(ID)"/>
+ <column name="CONDITION_ID" required="true" type="INTEGER" references="RHQ_ALERT_CONDITION(ID)"/>
+ <column name="VALUE" required="true" size="250" type="VARCHAR2"/>
+ <index name="RHQ_ALERT_COND_LOG_IDX_TIME">
+ <field ref="CTIME" />
+ </index>
+ <index name="RHQ_ALERT_COND_LOG_IDX_ALERT">
+ <field ref="ALERT_ID"/>
+ </index>
+ <index name="RHQ_ALERT_COND_LOG_COND_IDX">
+ <field ref="CONDITION_ID"/>
+ </index>
+ </table>
+
+ <table name="RHQ_ALERT_NOTIFICATION" tablespace="@@@LARGE_TABLESPACE_FOR_DATA@@@"
+ storage-options="freelists 5" cache="true" logging="false">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="ALERT_DEFINITION_ID" required="false" type="INTEGER" references="RHQ_ALERT_DEFINITION(ID)"/>
+ <column name="SENDER_CONFIG_ID" required="false" type="INTEGER" references="RHQ_CONFIG(ID)"/>
+ <column name="EXTRA_CONFIG_ID" required="false" type="INTEGER" references="RHQ_CONFIG(ID)"/>
+ <column name="SENDER_NAME" required="true" size="100" type="VARCHAR2" />
+ </table>
+
+<!-- END: alert-schema.xml -->
+<!-- BEGIN: sysconfig-schema.xml -->
+
+
+ <table name="RHQ_SYSTEM_CONFIG">
+ <column name="ID" default="sequence-only" initial="10001"
+ primarykey="true" required="true" type="INTEGER"/>
+ <column name="PROPERTY_KEY" type="VARCHAR2" size="80"/>
+ <column name="PROPERTY_VALUE" type="VARCHAR2" size="300"/>
+ <column name="DEFAULT_PROPERTY_VALUE" type="VARCHAR2" size="300"/>
+ <column name="FREAD_ONLY" type="BOOLEAN" default="FALSE"/>
+
+ <index name="RHQ_SYSTEM_CONFIG_KEY_INDX" unique="true">
+ <field ref="PROPERTY_KEY"/>
+ </index>
+ </table>
+
+<!-- END: sysconfig-schema.xml -->
+<!-- BEGIN: scheduler-schema.xml -->
+
+
+ <table name="RHQ_QRTZ_JOB_DETAILS">
+ <column name="JOB_NAME" required="true" type="VARCHAR2" size="80"/>
+ <column name="JOB_GROUP" required="true" type="VARCHAR2" size="80"/>
+ <column name="DESCRIPTION" required="false" type="VARCHAR2" size="120"/>
+ <column name="JOB_CLASS_NAME" required="true" type="VARCHAR2" size="128"/>
+ <column name="IS_DURABLE" required="true" type="BOOLEAN" default="FALSE"/>
+ <column name="IS_VOLATILE" required="true" type="BOOLEAN"/>
+ <column name="IS_STATEFUL" required="true" type="BOOLEAN" default="FALSE"/>
+ <column name="REQUESTS_RECOVERY" required="true" type="BOOLEAN" default="FALSE"/>
+ <column name="JOB_DATA" required="false" type="BLOB"/>
+
+ <constraint name="RHQ_PK_QRTZ_JOB_DETAILS">
+ <primaryKey>
+ <field ref="JOB_NAME"/>
+ <field ref="JOB_GROUP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_QRTZ_JOB_LISTENERS">
+ <column name="JOB_NAME" required="true" type="VARCHAR2" size="80"/>
+ <column name="JOB_GROUP" required="true" type="VARCHAR2" size="80"/>
+ <column name="JOB_LISTENER" required="true" type="VARCHAR2" size="80"/>
+
+ <constraint name="RHQ_PK_QRTZ_JOB_LISTENERS">
+ <primaryKey>
+ <field ref="JOB_NAME"/>
+ <field ref="JOB_GROUP"/>
+ <field ref="JOB_LISTENER"/>
+ </primaryKey>
+ </constraint>
+ <constraint name="RHQ_FK_QRTZ_JOB_LSTNRS_JN_JG">
+ <foreignKey local="JOB_NAME,JOB_GROUP"
+ references="RHQ_QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)"
+ ondelete="cascade"/>
+ </constraint>
+ </table>
+
+ <table name="RHQ_QRTZ_TRIGGERS">
+ <column name="TRIGGER_NAME" type="VARCHAR2" required="true" size="80"/>
+ <column name="TRIGGER_GROUP" type="VARCHAR2" required="true" size="80"/>
+ <column name="JOB_NAME" type="VARCHAR2" required="true" size="80"/>
+ <column name="JOB_GROUP" type="VARCHAR2" required="true" size="80"/>
+ <column name="IS_VOLATILE" type="BOOLEAN" required="true"/>
+ <column name="DESCRIPTION" type="VARCHAR2" required="false" size="120"/>
+ <column name="NEXT_FIRE_TIME" type="LONG" required="false"/>
+ <column name="PREV_FIRE_TIME" type="LONG" required="false"/>
+ <column name="PRIORITY" type="INTEGER" required="false"/>
+ <column name="TRIGGER_STATE" type="VARCHAR" required="true" size="16"/>
+ <column name="TRIGGER_TYPE" type="VARCHAR" required="true" size="8"/>
+ <column name="START_TIME" type="LONG" required="true"/>
+ <column name="END_TIME" type="LONG" required="false"/>
+ <column name="CALENDAR_NAME" type="VARCHAR2" required="false" size="80"/>
+ <column name="MISFIRE_INSTR" type="INTEGER" required="false"/>
+ <column name="JOB_DATA" type="BLOB" required="false"/>
+
+ <constraint name="RHQ_PK_QRTZ_TRIGGERS">
+ <primaryKey>
+ <field ref="TRIGGER_NAME"/>
+ <field ref="TRIGGER_GROUP"/>
+ </primaryKey>
+ </constraint>
+ <constraint name="RHQ_FK_QRTZ_TRIGGERS_JN_JG">
+ <foreignKey local="JOB_NAME,JOB_GROUP"
+ references="RHQ_QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP)"
+ ondelete="cascade"/>
+ </constraint>
+
+ <!-- Quartz docs recommend these indexes. -->
+ <index name="RHQ_QRTZ_TRIGGERS_JN_JG_IDX">
+ <field ref="JOB_NAME"/>
+ <field ref="JOB_GROUP"/>
+ </index>
+ <index name="RHQ_QRTZ_TRIGGERS_NFT_IDX">
+ <field ref="NEXT_FIRE_TIME"/>
+ </index>
+ <index name="RHQ_QRTZ_TRIGGERS_TS_IDX">
+ <field ref="TRIGGER_STATE"/>
+ </index>
+ <index name="RHQ_QRTZ_TRIGGERS_TS_NFT_IDX">
+ <field ref="TRIGGER_STATE"/>
+ <field ref="NEXT_FIRE_TIME"/>
+ </index>
+
+ </table>
+
+ <table name="RHQ_QRTZ_SIMPLE_TRIGGERS">
+ <column name="TRIGGER_NAME" type="VARCHAR2" required="true" size="80"/>
+ <column name="TRIGGER_GROUP" type="VARCHAR2" required="true" size="80"/>
+ <column name="REPEAT_COUNT" type="LONG" required="true"/>
+ <column name="REPEAT_INTERVAL" type="LONG" required="true"/>
+ <column name="TIMES_TRIGGERED" type="LONG" required="true"/>
+
+ <constraint name="RHQ_PK_QRTZ_SIMPLE_TRIGGERS">
+ <primaryKey>
+ <field ref="TRIGGER_NAME"/>
+ <field ref="TRIGGER_GROUP"/>
+ </primaryKey>
+ </constraint>
+ <constraint name="RHQ_FK_QRTZ_SIMPLE_TRGRS_TN_TG">
+ <foreignKey local="TRIGGER_NAME,TRIGGER_GROUP"
+ references="RHQ_QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)"
+ ondelete="cascade"/>
+ </constraint>
+
+ <!-- Quartz docs recommend this index. -->
+ <!-- Commenting out, because Oracle auto-creates an index for the
+ primary key column(s) and fails if you try to create another
+ index for the same column(s) (ips, 03/29/07).
+ -->
+ <!--
+ <index name="RHQ_QRTZ_SIMPLE_TRGRS_TN_TG_IDX">
+ <field ref="TRIGGER_NAME"/>
+ <field ref="TRIGGER_GROUP"/>
+ </index>
+ -->
+ </table>
+
+ <table name="RHQ_QRTZ_CRON_TRIGGERS">
+ <column name="TRIGGER_NAME" type="VARCHAR2" size="80" required="true"/>
+ <column name="TRIGGER_GROUP" type="VARCHAR2" size="80" required="true"/>
+ <column name="CRON_EXPRESSION" type="VARCHAR2" size="80" required="true"/>
+ <column name="TIME_ZONE_ID" type="VARCHAR2" size="80" required="false"/>
+
+ <constraint name="RHQ_PK_QRTZ_CRON_TRIGGERS">
+ <primaryKey>
+ <field ref="TRIGGER_NAME"/>
+ <field ref="TRIGGER_GROUP"/>
+ </primaryKey>
+ </constraint>
+ <constraint name="RHQ_FK_QRTZ_CRON_TRIG_TN_TG">
+ <foreignKey local="TRIGGER_NAME,TRIGGER_GROUP"
+ references="RHQ_QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)"
+ ondelete="cascade"/>
+ </constraint>
+
+ <!-- Quartz docs recommend this index. -->
+ <!-- Commenting out, because Oracle auto-creates an index for the
+ primary key column(s) and fails if you try to create another
+ index for the same column(s) (ips, 03/29/07).
+ -->
+ <!--
+ <index name="RHQ_QRTZ_CRON_TRGRS_TN_TG_IDX">
+ <field ref="TRIGGER_NAME"/>
+ <field ref="TRIGGER_GROUP"/>
+ </index>
+ -->
+ </table>
+
+ <table name="RHQ_QRTZ_BLOB_TRIGGERS">
+ <column name="TRIGGER_NAME" type="VARCHAR2" size="80" required="true"/>
+ <column name="TRIGGER_GROUP" type="VARCHAR2" size="80" required="true"/>
+ <column name="BLOB_DATA" type="BLOB" required="false"/>
+
+ <constraint name="RHQ_PK_QRTZ_BLOB_TRIGGERS">
+ <primaryKey>
+ <field ref="TRIGGER_NAME"/>
+ <field ref="TRIGGER_GROUP"/>
+ </primaryKey>
+ </constraint>
+ <constraint name="RHQ_FK_QRTZ_BLOB_TRIGG_TN_TG">
+ <foreignKey local="TRIGGER_NAME,TRIGGER_GROUP"
+ references="RHQ_QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)"
+ ondelete="cascade"/>
+ </constraint>
+
+ <!-- Quartz docs recommend this index. -->
+ <!-- Commenting out, because Oracle auto-creates an index for the
+ primary key column(s) and fails if you try to create another
+ index for the same column(s) (ips, 03/29/07).
+ -->
+ <!--
+ <index name="RHQ_QRTZ_BLOB_TRGRS_TN_TG_IDX">
+ <field ref="TRIGGER_NAME"/>
+ <field ref="TRIGGER_GROUP"/>
+ </index>
+ -->
+ </table>
+
+ <table name="RHQ_QRTZ_TRIGGER_LISTENERS">
+ <column name="TRIGGER_NAME" type="VARCHAR2" size="80" required="true"/>
+ <column name="TRIGGER_GROUP" type="VARCHAR2" size="80" required="true"/>
+ <column name="TRIGGER_LISTENER" type="VARCHAR2" size="80" required="true"/>
+
+ <constraint name="RHQ_PK_QRTZ_TRIGGER_LISTENERS">
+ <primaryKey>
+ <field ref="TRIGGER_NAME"/>
+ <field ref="TRIGGER_GROUP"/>
+ <field ref="TRIGGER_LISTENER"/>
+ </primaryKey>
+ </constraint>
+ <constraint name="RHQ_FK_QRTZ_TRGR_LSTNRS_TN_TG">
+ <foreignKey local="TRIGGER_NAME,TRIGGER_GROUP"
+ references="RHQ_QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP)"
+ ondelete="cascade"/>
+ </constraint>
+
+ <!-- Quartz docs recommend this index. -->
+ <index name="RHQ_QRTZ_TRGR_LSTNRS_TN_TG_IDX">
+ <field ref="TRIGGER_NAME"/>
+ <field ref="TRIGGER_GROUP"/>
+ </index>
+
+ </table>
+
+ <table name="RHQ_QRTZ_FIRED_TRIGGERS">
+ <column name="ENTRY_ID" primarykey="true" type="VARCHAR2" size="95" required="true"/>
+ <column name="TRIGGER_NAME" type="VARCHAR2" size="80" required="true"/>
+ <column name="TRIGGER_GROUP" type="VARCHAR2" size="80" required="true"/>
+ <column name="INSTANCE_NAME" type="VARCHAR2" size="80" required="true"/>
+ <column name="FIRED_TIME" type="LONG" required="true"/>
+ <column name="PRIORITY" type="INTEGER" required="false"/>
+ <column name="STATE" type="VARCHAR2" size="16" required="true"/>
+ <column name="IS_VOLATILE" type="BOOLEAN" required="true"/>
+ <column name="JOB_NAME" type="VARCHAR2" size="80" required="false"/>
+ <column name="JOB_GROUP" type="VARCHAR2" size="80" required="false"/>
+ <column name="IS_STATEFUL" type="BOOLEAN" required="false"/>
+ <column name="REQUESTS_RECOVERY" type="BOOLEAN" required="false"/>
+
+ <!-- Quartz docs recommend these indexes. -->
+ <index name="RHQ_QRTZ_FIRED_TRGRS_TN_IDX">
+ <field ref="TRIGGER_NAME"/>
+ </index>
+ <index name="RHQ_QRTZ_FIRED_TRGRS_TG_IDX">
+ <field ref="TRIGGER_GROUP"/>
+ </index>
+ <index name="RHQ_QRTZ_FIRED_TRGRS_TN_TG_IDX">
+ <field ref="TRIGGER_NAME"/>
+ <field ref="TRIGGER_GROUP"/>
+ </index>
+ <index name="RHQ_QRTZ_FIRED_TRGRS_IN_IDX">
+ <field ref="INSTANCE_NAME"/>
+ </index>
+ <index name="RHQ_QRTZ_FIRED_TRGRS_JN_IDX">
+ <field ref="JOB_NAME"/>
+ </index>
+ <index name="RHQ_QRTZ_FIRED_TRGRS_JG_IDX">
+ <field ref="JOB_GROUP"/>
+ </index>
+
+ </table>
+
+ <table name="RHQ_QRTZ_CALENDARS">
+ <column name="CALENDAR_NAME" primarykey="true" type="VARCHAR2" size="80" required="true"/>
+ <column name="CALENDAR" type="BLOB" required="true"/>
+ </table>
+
+ <table name="RHQ_QRTZ_PAUSED_TRIGGER_GRPS">
+ <column name="TRIGGER_GROUP" primarykey="true" type="VARCHAR2" size="80" required="true"/>
+ </table>
+
+ <table name="RHQ_QRTZ_SCHEDULER_STATE">
+ <column name="INSTANCE_NAME" primarykey="true" type="VARCHAR2" size="80" required="true"/>
+ <column name="LAST_CHECKIN_TIME" type="LONG" required="true"/>
+ <column name="CHECKIN_INTERVAL" type="LONG" required="true"/>
+ <column name="RECOVERER" type="VARCHAR2" size="80" required="false"/>
+ </table>
+
+ <table name="RHQ_QRTZ_LOCKS">
+ <column name="LOCK_NAME" primarykey="true" type="VARCHAR2" size="40" required="true"/>
+ <data LOCK_NAME="TRIGGER_ACCESS"/>
+ <data LOCK_NAME="JOB_ACCESS"/>
+ <data LOCK_NAME="CALENDAR_ACCESS"/>
+ <data LOCK_NAME="STATE_ACCESS"/>
+ <data LOCK_NAME="MISFIRE_ACCESS"/>
+ </table>
+
+<!-- END: scheduler-schema.xml -->
+<!-- BEGIN: amps-schema.xml -->
+
+
+ <table name="RHQ_PLUGIN">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" size="200" type="VARCHAR2" required="true"/>
+ <column name="DISPLAY_NAME" size="200" type="VARCHAR2" required="true"/>
+ <column name="DESCRIPTION" size="4000" type="VARCHAR2" required="false"/>
+ <column name="VERSION" size="200" type="VARCHAR2" required="false"/>
+ <column name="AMPS_VERSION" size="16" type="VARCHAR2" required="false"/>
+ <column name="ENABLED" type="BOOLEAN" required="true"/>
+ <column name="STATUS" size="16" type="VARCHAR2" required="true"/>
+ <column name="HELP" type="CLOB" required="false"/>
+ <column name="PATH" size="500" type="VARCHAR2" required="true"/>
+ <column name="MD5" size="100" type="VARCHAR2" required="true"/>
+ <column name="CTIME" type="LONG" required="true"/>
+ <column name="MTIME" type="LONG" required="true"/>
+ <column name="DEPLOYMENT" size="8" type="VARCHAR2" required="true"/>
+ <column name="PTYPE" size="200" type="VARCHAR2" required="false"/>
+ <column name="PLUGIN_CONFIG_ID" type="INTEGER" references="RHQ_CONFIG" required="false"/>
+ <column name="JOBS_CONFIG_ID" type="INTEGER" references="RHQ_CONFIG" required="false"/>
+ <column name="CONTENT" type="BLOB" required="false"/>
+
+ <index name="RHQ_PLUGIN_NAME_DEPLOY_IDX" unique="true">
+ <field ref="NAME"/>
+ <field ref="DEPLOYMENT"/>
+ </index>
+ </table>
+
+<!-- END: amps-schema.xml -->
+<!-- BEGIN: measurement-schema.xml -->
+
+ <table name="RHQ_MEASUREMENT_DEF">
+
+ <!-- === required columns === -->
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="RESOURCE_TYPE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE_TYPE(ID)"/>
+ <column name="NAME" type="VARCHAR2" size="100" required="true"/>
+
+ <!-- === optional columns === -->
+ <!-- an OSGI version range - if null, the metric def applies to all versions of the associated resource type -->
+ <column name="RESOURCE_VERSION_RANGE" type="VARCHAR2" size="100"/>
+ <column name="CATEGORY" type="SMALLINT"/>
+ <column name="UNITS" type="SMALLINT"/>
+ <column name="NUMERIC_TYPE" type="SMALLINT"/>
+ <column name="DISPLAY_TYPE" type="SMALLINT"/>
+ <column name="DATA_TYPE" type="SMALLINT"/>
+ <column name="RAW_NUMERIC_TYPE" type="SMALLINT"/>
+ <column name="DEFAULT_ON" type="BOOLEAN" default="false"/>
+ <column name="DEFAULT_INTERVAL" type="LONG" />
+ <column name="DISPLAY_NAME" type="VARCHAR2" size="100"/>
+ <column name="DISPLAY_ORDER" type="INTEGER" default="1000"/>
+ <column name="DESCRIPTION" type="VARCHAR2" size="500"/>
+ <column name="DESTINATION_TYPE" type="VARCHAR2" size="100"/>
+
+ <column name="VERSION" type="INTEGER"/>
+ <!-- for optimistic locking -->
+
+ <!-- === business key (RESOURCE_TYPE_ID + NAME + RAW_NUMERIC_TYPE) === -->
+ <index name="RHQ_METRIC_DEF_KEY_IDX" unique="true">
+ <field ref="RESOURCE_TYPE_ID"/>
+ <field ref="NAME"/>
+ <field ref="RAW_NUMERIC_TYPE"/>
+ </index>
+ <index name="RHQ_METRIC_DEF_NT_IDX">
+ <field ref="NUMERIC_TYPE"/>
+ </index>
+ </table>
+
+
+ <table name="RHQ_MEASUREMENT_SCHED">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+
+ <column name="ENABLED" type="BOOLEAN" default="false"/>
+ <column name="MTIME" type="LONG" />
+ <column name="DEFINITION" type="INTEGER" references="RHQ_MEASUREMENT_DEF(ID)"/>
+ <column name="VERSION" type="INTEGER" />
+ <column name="COLL_INTERVAL" type="LONG" />
+ <column name="RESOURCE_ID" type="INTEGER" references="RHQ_RESOURCE(ID)"/>
+ <index name="RHQ_MEAS_SCHED_UNIQ" unique="true">
+ <field ref="RESOURCE_ID"/>
+ <field ref="DEFINITION"/>
+ </index>
+ <index name="RHQ_MEAS_SCHED_RESID_IDX">
+ <field ref="RESOURCE_ID"/>
+ </index>
+ </table>
+
+
+ <table name="RHQ_MEASUREMENT_BLINE">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+
+ <column name="BL_USER_ENTERED" type="BOOLEAN" default="false" required="true"/>
+ <column name="BL_MIN" type="DOUBLE" required="true"/>
+ <column name="BL_MAX" type="DOUBLE" required="true"/>
+ <column name="BL_MEAN" type="DOUBLE" required="true"/>
+ <column name="BL_COMPUTE_TIME" type="LONG" required="true"/>
+ <column name="SCHEDULE_ID" type="INTEGER" required="true" references="RHQ_MEASUREMENT_SCHED(ID)"/>
+ <index name="RHQ_MEAS_BASELINE_CTIME_IDX">
+ <field ref="BL_COMPUTE_TIME"/>
+ </index>
+ <index name="RHQ_MEAS_BASELINE_SID_IDX">
+ <field ref="SCHEDULE_ID"/>
+ </index>
+ </table>
+
+
+ <table name="RHQ_MEASUREMENT_DATA_NUM_1H" logging="false" cache="true"
+ tablespace="@@@LARGE_TABLESPACE_FOR_DATA@@@" storage-options="freelists 20">
+
+ <column name="TIME_STAMP" required="true" type="LONG"/>
+ <column name="SCHEDULE_ID" required="true" type="INTEGER"/>
+ <column name="VALUE" required="false" type="DOUBLE"/>
+ <column name="MINVALUE" required="false" type="DOUBLE"/>
+ <column name="MAXVALUE" required="false" type="DOUBLE"/>
+
+ <constraint name="RHQ_MEAS_DATA_1H_ID_TIME_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+
+ <index name="RHQ_MEAS_DATA_1H_TIME_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ </table>
+
+
+ <table name="RHQ_MEASUREMENT_DATA_NUM_6H" logging="false" cache="true"
+ tablespace="@@@LARGE_TABLESPACE_FOR_DATA@@@" storage-options="freelists 20">
+
+ <column name="TIME_STAMP" required="true" type="LONG"/>
+ <column name="SCHEDULE_ID" required="true" type="INTEGER"/>
+ <column name="VALUE" required="false" type="DOUBLE"/>
+ <column name="MINVALUE" required="false" type="DOUBLE"/>
+ <column name="MAXVALUE" required="false" type="DOUBLE"/>
+
+ <constraint name="RHQ_MEAS_DATA_6H_ID_TIME_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+
+ <index name="RHQ_MEAS_DATA_6H_TIME_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ </table>
+
+
+ <table name="RHQ_MEASUREMENT_DATA_NUM_1D" logging="false" cache="true"
+ tablespace="@@@LARGE_TABLESPACE_FOR_DATA@@@" storage-options="freelists 20">
+
+ <column name="TIME_STAMP" required="true" type="LONG"/>
+ <column name="SCHEDULE_ID" required="true" type="INTEGER"/>
+ <column name="VALUE" required="false" type="DOUBLE"/>
+ <column name="MINVALUE" required="false" type="DOUBLE"/>
+ <column name="MAXVALUE" required="false" type="DOUBLE"/>
+
+ <constraint name="RHQ_MEAS_DATA_1D_ID_TIME_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+
+ <index name="RHQ_MEAS_DATA_1D_TIME_IDX">
+ <field ref="TIME_STAMP" />
+ </index>
+ </table>
+
+
+ <table name="RHQ_MEASUREMENT_DATA_TRAIT">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER" />
+ <column name="VALUE" type="VARCHAR2" size="4000" />
+ <constraint name="RHQ_MEAS_DATA_TRAIT_ID_TIME_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+
+ <table name="RHQ_CALLTIME_DATA_KEY">
+ <column name="ID" type="INTEGER" default="sequence-only" initial="10001" primarykey="true" required="true"/>
+ <column name="SCHEDULE_ID" type="INTEGER" required="true"/>
+ <column name="CALL_DESTINATION" type="VARCHAR2" size="4000" required="true"/>
+ <index name="RHQ_CALLTIME_DATA_KEY_IDX" unique="true">
+ <field ref="SCHEDULE_ID"/>
+ <field ref="CALL_DESTINATION"/>
+ </index>
+ </table>
+
+
+ <table name="RHQ_CALLTIME_DATA_VALUE">
+ <column name="ID" type="INTEGER" default="sequence-only" initial="10001" primarykey="true" required="true"/>
+ <column name="KEY_ID" type="INTEGER" references="RHQ_CALLTIME_DATA_KEY" required="true"/>
+ <column name="BEGIN_TIME" type="LONG" required="true"/>
+ <column name="END_TIME" type="LONG" required="true"/>
+ <column name="MINIMUM" type="DOUBLE" required="true"/>
+ <column name="MAXIMUM" type="DOUBLE" required="true"/>
+ <column name="TOTAL" type="DOUBLE" required="true"/>
+ <column name="COUNT" type="LONG" required="true"/>
+ <index name="RHQ_CT_DA_VA_END_TIM_IDX">
+ <field ref="END_TIME"/>
+ </index>
+ </table>
+
+
+ <table name="RHQ_AVAILABILITY">
+ <column name="ID" type="INTEGER" default="sequence-only" initial="10001" primarykey="true" required="true"/>
+ <column name="RESOURCE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE(ID)"/>
+ <column name="START_TIME" type="LONG" required="true" />
+ <column name="END_TIME" type="LONG" required="false" />
+ <column name="AVAILABILITY_TYPE" type="SMALLINT" required="false" />
+ <index name="RHQ_AVAIL_RESOURCE_START_IDX">
+ <field ref="RESOURCE_ID"/>
+ <field ref="START_TIME"/>
+ </index>
+ <!-- only one null row can exist for any resource -->
+ <index name="RHQ_AVAIL_RESOURCE_END_IDX" condition="END_TIME IS NULL">
+ <field ref="RESOURCE_ID"/>
+ <field ref="END_TIME" />
+ </index>
+ </table>
+
+ <table name="RHQ_RESOURCE_AVAIL">
+ <column name="ID" type="INTEGER" default="sequence-only" initial="10001" primarykey="true" required="true"/>
+ <column name="RESOURCE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE(ID)" ondelete="cascade"/>
+ <column name="AVAILABILITY_TYPE" type="SMALLINT" required="false" />
+ <index name="RHQ_RESOURCE_AVAIL_IDX">
+ <field ref="RESOURCE_ID" />
+ </index>
+ </table>
+
+ <table name="RHQ_MEASUREMENT_OOB">
+ <column name="SCHEDULE_ID" type="INTEGER" references="RHQ_MEASUREMENT_SCHED(ID)" required="true"/>
+ <column name="TIME_STAMP" type="LONG" required="true"/>
+ <column name="OOB_FACTOR" type="INTEGER" required="true" />
+ <constraint name="RHQ_MEAS_OOB_ID_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_MEASUREMENT_OOB_TMP">
+ <column name="SCHEDULE_ID" type="INTEGER" required="true"/>
+ <column name="TIME_STAMP" type="LONG" required="true"/>
+ <column name="OOB_FACTOR" type="INTEGER" required="true" />
+ <constraint name="RHQ_MEAS_OOB_TMP_ID_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_NUMBERS">
+ <column name="i" type="INTEGER" default="sequence-only" initial="10001" primarykey="true" required="true" />
+ </table>
+
+
+ <table name="RHQ_MEAS_DATA_NUM_R00">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R00_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R00_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R01">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R01_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R01_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R02">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R02_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R02_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R03">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R03_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R03_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R04">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R04_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R04_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R05">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R05_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R05_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R06">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R06_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R06_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R07">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R07_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R07_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R08">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R08_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R08_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R09">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R09_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R09_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R10">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R10_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R10_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R11">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R11_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R11_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R12">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R12_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R12_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R13">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R13_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R13_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+ <table name="RHQ_MEAS_DATA_NUM_R14">
+ <column name="TIME_STAMP" type="LONG"/>
+ <column name="SCHEDULE_ID" type="INTEGER"/>
+ <column name="VALUE" type="DOUBLE"/>
+ <index name="RHQ_MEAS_DATA_R14_TS_IDX">
+ <field ref="TIME_STAMP"/>
+ </index>
+ <constraint name="RHQ_MEAS_DATA_NUM_R14_ID_T_PK">
+ <primaryKey>
+ <field ref="SCHEDULE_ID"/>
+ <field ref="TIME_STAMP"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+<!-- END: measurement-schema.xml -->
+<!-- BEGIN: content-schema.xml -->
+
+
+ <table name="RHQ_ARCHITECTURE">
+ <column name="ID" default="sequence-only" initial="100" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" size="50" type="VARCHAR2" required="true"/>
+ <index name="RHQ_ARCHITECTURE_NAME_IDX" unique="true">
+ <field ref="NAME"/>
+ </index>
+ </table>
+
+ <table name="RHQ_REPO_GROUP_TYPE">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" size="200" type="VARCHAR2" required="true"/>
+ <column name="DESCRIPTION" size="500" type="VARCHAR2" required="false"/>
+ </table>
+
+
+ <table name="RHQ_REPO_GROUP">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" size="200" type="VARCHAR2" required="true"/>
+ <column name="DESCRIPTION" size="500" type="VARCHAR2" required="false"/>
+
+ <column name="REPO_GROUP_TYPE_ID" type="INTEGER" references="RHQ_REPO_GROUP_TYPE" required="true"/>
+
+ <index name="RHQ_REPO_GROUP_IDX" unique="true">
+ <field ref="NAME"/>
+ <field ref="REPO_GROUP_TYPE_ID"/>
+ </index>
+ </table>
+
+
+ <table name="RHQ_CONTENT_SOURCE_TYPE">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" size="200" type="VARCHAR2" required="true"/>
+ <column name="DISPLAY_NAME" size="200" type="VARCHAR2" required="false"/>
+ <column name="DESCRIPTION" size="500" type="VARCHAR2" required="false"/>
+ <column name="PLUGIN_NAME" size="100" type="VARCHAR2" required="false"/>
+ <!-- we might want this as part of natural key -->
+ <column name="DEFAULT_LAZY_LOAD" type="BOOLEAN" required="true"/>
+ <column name="DEFAULT_DOWNLOAD_MODE" size="16" type="VARCHAR2" required="true"/>
+ <column name="DEFAULT_SYNC_SCHEDULE" size="64" type="VARCHAR2" required="false"/>
+ <column name="API_CLASS" size="100" type="VARCHAR2" required="true"/>
+
+ <column name="SOURCE_CONFIG_DEF_ID" type="INTEGER" references="RHQ_CONFIG_DEF" required="false"/>
+
+ <index name="RHQ_CONTENT_SOURCE_TYPE_IDX" unique="true">
+ <field ref="NAME"/>
+ <!-- <field ref="PLUGIN_NAME"/> -->
+ </index>
+ </table>
+
+ <table name="RHQ_CONTENT_SOURCE">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" size="200" type="VARCHAR2" required="true"/>
+ <column name="DESCRIPTION" size="500" type="VARCHAR2" required="false"/>
+ <column name="LAZY_LOAD" type="BOOLEAN" required="true"/>
+ <column name="DOWNLOAD_MODE" size="16" type="VARCHAR2" required="true"/>
+ <column name="SYNC_SCHEDULE" size="64" type="VARCHAR2" required="false"/>
+ <column name="LOAD_ERROR_MESSAGE" type="LONGVARCHAR" required="false"/>
+ <column name="CREATION_TIME" type="LONG" required="true"/>
+ <column name="LAST_MODIFIED_TIME" type="LONG" required="true"/>
+
+ <column name="CONTENT_SOURCE_TYPE_ID" type="INTEGER" references="RHQ_CONTENT_SOURCE_TYPE" required="true"/>
+ <column name="CONFIGURATION_ID" type="INTEGER" references="RHQ_CONFIG" required="false"/>
+
+ <index name="RHQ_CONTENT_SOURCE_IDX" unique="true">
+ <field ref="NAME"/>
+ <field ref="CONTENT_SOURCE_TYPE_ID"/>
+ </index>
+ </table>
+
+ <table name="RHQ_REPO">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" size="200" type="VARCHAR2" required="true"/>
+ <column name="DESCRIPTION" size="500" type="VARCHAR2" required="false"/>
+ <column name="CREATION_TIME" type="LONG" required="true"/>
+ <column name="LAST_MODIFIED_TIME" type="LONG" required="true"/>
+ <column name="IS_CANDIDATE" type="BOOLEAN" required="true"/>
+ <column name="SYNC_SCHEDULE" size="64" type="VARCHAR2" required="false"/>
+ <column name="OWNER_ID" type="INTEGER" required="false" references="RHQ_SUBJECT" />
+ <column name="IS_PRIVATE" type="BOOLEAN" required="true" />
+
+ <index name="RHQ_REPO_IDX" unique="true">
+ <field ref="NAME"/>
+ </index>
+ </table>
+
+
+ <table name="RHQ_REPO_RELATION_TYPE">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" size="200" type="VARCHAR2" required="true"/>
+ <column name="DESCRIPTION" size="500" type="VARCHAR2" required="false"/>
+ </table>
+
+
+ <table name="RHQ_REPO_RELATION">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="RELATED_REPO_ID" type="INTEGER" references="RHQ_REPO" required="true"/>
+ <column name="REPO_RELATION_TYPE_ID" type="INTEGER" references="RHQ_REPO_RELATION_TYPE" required="true"/>
+ </table>
+
+
+
+ <table name="RHQ_PACKAGE_TYPE">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" size="200" type="VARCHAR2" required="true"/>
+ <column name="DISPLAY_NAME" size="200" type="VARCHAR2" required="false"/>
+ <column name="DESCRIPTION" size="500" type="VARCHAR2" required="false"/>
+ <column name="CATEGORY" size="50" type="VARCHAR2" required="false"/>
+ <column name="DISCOVERY_INTERVAL" type="INTEGER" required="false"/>
+ <column name="IS_CREATION_DATA" type="BOOLEAN" required="true"/>
+ <column name="SUPPORTS_ARCHITECTURE" type="BOOLEAN" required="true"/>
+
+ <column name="RESOURCE_TYPE_ID" type="INTEGER" references="RHQ_RESOURCE_TYPE" required="false"/>
+ <column name="DEPLOYMENT_CONFIG_DEF_ID" type="INTEGER" references="RHQ_CONFIG_DEF" required="false"/>
+ <column name="PACKAGE_EXTRA_CONFIG_ID" type="INTEGER" references="RHQ_CONFIG_DEF" required="false"/>
+
+ <index name="RHQ_PACKAGE_TYPE_IDX" unique="true">
+ <field ref="NAME"/>
+ <field ref="RESOURCE_TYPE_ID"/>
+ </index>
+
+ </table>
+
+ <table name="RHQ_PACKAGE">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" size="200" type="VARCHAR2" required="true"/>
+ <column name="CLASSIFICATION" size="200" type="VARCHAR2" required="false"/>
+
+ <column name="PACKAGE_TYPE_ID" type="INTEGER" references="RHQ_PACKAGE_TYPE" required="true"/>
+
+ <index name="RHQ_PACKAGE_IDX" unique="true">
+ <field ref="NAME"/>
+ <field ref="PACKAGE_TYPE_ID"/>
+ </index>
+ </table>
+
+ <table name="RHQ_PACKAGE_BITS">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="BITS" type="LARGEOBJECT" required="false"/>
+ </table>
+
+ <table name="RHQ_PACKAGE_VERSION">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="DISPLAY_NAME" size="200" type="VARCHAR2" required="false"/>
+ <column name="SHORT_DESCRIPTION" size="10000" type="CLOB" required="false"/>
+ <column name="LONG_DESCRIPTION" size="50000" type="CLOB" required="false"/>
+ <column name="VERSION" size="500" type="VARCHAR2" required="true"/>
+ <column name="DISPLAY_VERSION" size="500" type="VARCHAR2" required="false"/>
+ <column name="FILE_NAME" size="255" type="VARCHAR2" required="false"/>
+ <column name="FILE_SIZE" type="LONG" required="false"/>
+ <column name="FILE_MD5" size="32" type="VARCHAR2" required="false"/>
+ <column name="FILE_SHA256" size="64" type="VARCHAR2" required="false"/>
+ <column name="FILE_CREATION_TIME" type="LONG" required="false"/>
+ <column name="LICENSE_NAME" size="255" type="VARCHAR2" required="false"/>
+ <column name="LICENSE_VERSION" size="20" type="VARCHAR2" required="false"/>
+ <column name="METADATA" type="BLOB" required="false"/>
+
+ <column name="PACKAGE_ID" type="INTEGER" references="RHQ_PACKAGE" required="true"/>
+ <column name="ARCHITECTURE_ID" type="INTEGER" references="RHQ_ARCHITECTURE" required="true"/>
+ <column name="CONFIG_ID" type="INTEGER" references="RHQ_CONFIG" required="false"/>
+ <column name="PACKAGE_BITS_ID" type="INTEGER" references="RHQ_PACKAGE_BITS" required="false"/>
+
+ <index name="RHQ_PACKAGE_VERSION_IDX" unique="true">
+ <field ref="PACKAGE_ID"/>
+ <field ref="VERSION"/>
+ <field ref="ARCHITECTURE_ID"/>
+ </index>
+
+ </table>
+
+ <table name="RHQ_CONTENT_REQ">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="RESOURCE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE"/>
+ <column name="STATUS" type="VARCHAR2" required="true" size="16"/>
+ <column name="ERROR_MESSAGE" type="LONGVARCHAR" required="false"/>
+ <column name="SUBJECT_NAME" type="VARCHAR2" required="true" size="100"/>
+ <column name="CTIME" type="LONG" required="true"/>
+ <column name="MTIME" type="LONG" required="true"/>
+ <column name="REQUEST_TYPE" type="VARCHAR2" required="true" size="20"/>
+ <column name="NOTES" type="VARCHAR2" required="false" size="512"/>
+ </table>
+
+ <table name="RHQ_INSTALLED_PACKAGE">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="INSTALLATION_TIME" type="LONG" required="false"/>
+
+ <column name="RESOURCE_ID" type="INTEGER" references="RHQ_RESOURCE" required="true"/>
+ <column name="PACKAGE_VERSION_ID" type="INTEGER" references="RHQ_PACKAGE_VERSION" required="true"/>
+ <column name="SUBJECT_ID" type="INTEGER" references="RHQ_SUBJECT" required="false"/>
+ </table>
+
+ <table name="RHQ_INSTALLED_PKG_HIST">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="STATUS" type="VARCHAR2" size="24" required="true"/>
+ <column name="ERROR_MESSAGE" type="LONGVARCHAR" required="false"/>
+ <column name="HISTORY_TIMESTAMP" type="LONG" required="false"/>
+
+ <column name="PACKAGE_VERSION_ID" type="INTEGER" references="RHQ_PACKAGE_VERSION" required="true"/>
+ <column name="RESOURCE_ID" type="INTEGER" references="RHQ_RESOURCE" required="true"/>
+ <column name="DEPLOYMENT_CONFIG_ID" type="INTEGER" references="RHQ_CONFIG" required="false"/>
+ <column name="CONTENT_SERVICE_REQUEST_ID" type="INTEGER" references="RHQ_CONTENT_REQ" required="false"/>
+ </table>
+
+ <table name="RHQ_CONTENT_SRC_SYNC">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="STATUS" type="VARCHAR2" size="16" required="true"/>
+ <column name="START_TIME" type="LONG" required="true"/>
+ <column name="END_TIME" type="LONG" required="false"/>
+ <column name="RESULTS" type="LONGVARCHAR" required="false"/>
+ <column name="CONTENT_SRC_ID" type="INTEGER" required="true" references="RHQ_CONTENT_SOURCE"/>
+ </table>
+
+ <table name="RHQ_REPO_SYNC">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="STATUS" type="VARCHAR2" size="16" required="true"/>
+ <column name="START_TIME" type="LONG" required="true"/>
+ <column name="END_TIME" type="LONG" required="false"/>
+ <column name="RESULTS" type="LONGVARCHAR" required="false"/>
+ <column name="PERCENT_COMPLETE" type="LONG" required="false"/>
+ <column name="REPO_ID" type="INTEGER" required="true" references="RHQ_REPO"/>
+ </table>
+
+
+ <table name="RHQ_PACKAGE_INST_STEP">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="STEP_KEY" type="VARCHAR2" size="500" required="true"/>
+ <column name="STEP_ORDER" type="INTEGER" required="true"/>
+ <column name="DESCRIPTION" type="VARCHAR2" size="4000" required="true"/>
+ <column name="ERROR_MSG" type="LONGVARCHAR" required="false"/>
+ <column name="RESULT" type="VARCHAR2" size="25" required="true"/>
+
+ <column name="INSTALLED_PKG_HIST_ID" type="INTEGER" references="RHQ_INSTALLED_PKG_HIST"/>
+ </table>
+
+ <table name="RHQ_REPO_RESOURCE_MAP">
+ <column name="REPO_ID" type="INTEGER" required="true" references="RHQ_REPO"/>
+ <column name="RESOURCE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE"/>
+ <column name="CTIME" type="LONG" required="true"/>
+
+ <constraint name="RHQ_REPO_RESOURCE_MAP_KEY">
+ <primaryKey>
+ <field ref="REPO_ID"/>
+ <field ref="RESOURCE_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_REPO_CONTENT_SRC_MAP"> 1
+ <column name="REPO_ID" type="INTEGER" required="true" references="RHQ_REPO"/>
+ <column name="CONTENT_SRC_ID" type="INTEGER" required="true" references="RHQ_CONTENT_SOURCE"/>
+ <column name="CTIME" type="LONG" required="true"/>
+
+ <constraint name="RHQ_REPO_CONTENT_SRC_MAP_KEY">
+ <primaryKey>
+ <field ref="REPO_ID"/>
+ <field ref="CONTENT_SRC_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_REPO_REPO_GROUP_MAP">
+ <column name="REPO_ID" type="INTEGER" required="true" references="RHQ_REPO"/>
+ <column name="REPO_GROUP_ID" type="INTEGER" required="true" references="RHQ_REPO_GROUP"/>
+ <column name="CTIME" type="LONG" required="true"/>
+
+ <constraint name="RHQ_REPO_REPO_GROUP_MAP_KEY">
+ <primaryKey>
+ <field ref="REPO_ID"/>
+ <field ref="REPO_GROUP_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_REPO_REPO_RELATION_MAP">
+ <column name="REPO_ID" type="INTEGER" required="true" references="RHQ_REPO"/>
+ <column name="REPO_RELATION_ID" type="INTEGER" required="true" references="RHQ_REPO_RELATION"/>
+ <column name="CTIME" type="LONG" required="true"/>
+
+ <constraint name="RHQ_REPO_REPO_RELATION_MAP_KEY">
+ <primaryKey>
+ <field ref="REPO_ID"/>
+ <field ref="REPO_RELATION_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+
+ <table name="RHQ_REPO_PKG_VERSION_MAP">
+ <column name="REPO_ID" type="INTEGER" required="true" references="RHQ_REPO"/>
+ <column name="PACKAGE_VERSION_ID" type="INTEGER" required="true" references="RHQ_PACKAGE_VERSION"/>
+ <column name="CTIME" type="LONG" required="true"/>
+
+ <constraint name="RHQ_REPO_PKG_VER_MAP_KEY">
+ <primaryKey>
+ <field ref="REPO_ID"/>
+ <field ref="PACKAGE_VERSION_ID"/>
+ </primaryKey>
+ </constraint>
+ <index name="RHQ_REPO_PKG_VER_MAP_IDX" unique="false">
+ <field ref="PACKAGE_VERSION_ID"/>
+ </index>
+ </table>
+
+ <table name="RHQ_PKG_VER_CONTENT_SRC_MAP">
+ <column name="PACKAGE_VERSION_ID" type="INTEGER" required="true" references="RHQ_PACKAGE_VERSION"/>
+ <column name="CONTENT_SRC_ID" type="INTEGER" required="true" references="RHQ_CONTENT_SOURCE"/>
+ <column name="LOCATION" type="VARCHAR2" size="4000" required="true"/>
+
+ <constraint name="RHQ_PKG_VER_CONTENT_SRC_KEY">
+ <primaryKey>
+ <field ref="PACKAGE_VERSION_ID"/>
+ <field ref="CONTENT_SRC_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_PKG_PRD_MAP">
+ <column name="PKG_ID" type="INTEGER" required="true" references="RHQ_PACKAGE_VERSION"/>
+ <column name="PRD_ID" type="INTEGER" required="true" references="RHQ_PRD_VER"/>
+
+ <constraint name="RHQ_PKG_PRD_KEY">
+ <primaryKey>
+ <field ref="PKG_ID"/>
+ <field ref="PRD_ID"/>
+ </primaryKey>
+ </constraint>
+
+ </table>
+
+ <table name="RHQ_DISTRIBUTION_TYPE">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" size="200" type="VARCHAR2" required="true"/>
+ <column name="DESCRIPTION" size="500" type="VARCHAR2" required="false"/>
+
+ </table>
+
+ <table name="RHQ_DISTRIBUTION">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="DISTRIBUTION_TYPE_ID" type="INTEGER" required="true" references="RHQ_DISTRIBUTION_TYPE"/>
+ <column name="LABEL" size="64" type="VARCHAR2" required="true"/>
+ <column name="BASE_PATH" size="256" type="VARCHAR2" required="true"/>
+ <column name="LAST_MODIFIED" type="LONG" required="true"/>
+
+ <index name="RHQ_DISTRIBUTION_IDX" unique="true">
+ <field ref="LABEL"/>
+ <field ref="BASE_PATH"/>
+ </index>
+
+ </table>
+
+ <table name="RHQ_REPO_DISTRIBUTION">
+ <column name="REPO_ID" type="INTEGER" required="true" references="RHQ_REPO"/>
+ <column name="DISTRIBUTION_ID" type="INTEGER" required="true" references="RHQ_DISTRIBUTION"/>
+ <column name="LAST_MODIFIED" type="LONG" required="true"/>
+
+ <constraint name="RHQ_REPO_DIST_MAP_KEY">
+ <primaryKey>
+ <field ref="REPO_ID"/>
+ <field ref="DISTRIBUTION_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+
+
+ <table name="RHQ_DISTRIBUTION_FILE">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="DISTRIBUTION_ID" type="INTEGER" required="true" references="RHQ_DISTRIBUTION"/>
+ <column name="RELATIVE_FILENAME" size="256" type="VARCHAR2" required="true"/>
+ <!--<column name="FILE_SIZE" type="NUMBER" required="true"/>-->
+ <column name="MD5SUM" size="64" type="VARCHAR2" required="true"/>
+ <column name="LAST_MODIFIED" type="LONG" required="true"/>
+ <!--<column name="CTIME" type="LONG" required="true"/>-->
+
+ <index name="RHQ_DISTRIBUTION_FILE_IDX" unique="true">
+ <field ref="DISTRIBUTION_ID"/>
+ <field ref="RELATIVE_FILENAME"/>
+ </index>
+ </table>
+
+
+
+
+ <table name="RHQ_ADVISORY">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="ADVISORY" size="64" type="VARCHAR2" required="true"/>
+ <column name="ADVISORY_TYPE" size="64" type="VARCHAR2" required="true" />
+ <column name="ADVISORY_REL" size="64" type="VARCHAR2" required="false"/>
+ <column name="ADVISORY_NAME" size="64" type="VARCHAR2" required="false"/>
+ <column name="DESCRIPTION" size="4000" type="VARCHAR2" required="false"/>
+ <column name="SYNOPSIS" size="4000" type="VARCHAR2" required="true"/>
+ <column name="TOPIC" size="4000" type="VARCHAR2" required="false"/>
+ <column name="SOLUTION" size="4000" type="VARCHAR2" required="false"/>
+ <column name="SEVERITY" size="64" type="VARCHAR2" required="false"/>
+ <column name="ISSUE_DATE" type="LONG" required="false"/>
+ <column name="UPDATE_DATE" type="LONG" required="false"/>
+ <column name="CTIME" type="LONG" required="true"/>
+ <column name="LAST_MODIFIED" type="LONG" required="true"/>
+
+ <index name="RHQ_ADVISORY_NAME_UQ" unique="true">
+ <field ref="ADVISORY_NAME"/>
+ </index>
+
+ <index name="RHQ_ADVISORY_UQ" unique="true">
+ <field ref="ADVISORY"/>
+ </index>
+
+ <index name="RHQ_ADVISORY_UDATE_IDX" unique="false">
+ <field ref="UPDATE_DATE"/>
+ </index>
+ </table>
+
+ <table name="RHQ_ADVISORY_PACKAGE">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="ADVISORY_ID" type="INTEGER" required="true" references="RHQ_ADVISORY"/>
+ <column name="PACKAGE_VERSION_ID" type="INTEGER" required="true" references="RHQ_PACKAGE_VERSION"/>
+ <column name="LAST_MODIFIED" type="LONG" required="true"/>
+
+ <index name="RHQ_ADVISORY_PKG_IDX" unique="true">
+ <field ref="ADVISORY_ID"/>
+ <field ref="PACKAGE_VERSION_ID"/>
+ </index>
+ </table>
+
+ <table name="RHQ_CVE">
+ <column name="ID" default="sequence-only" initial="101" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" size="64" type="VARCHAR2" required="true"/>
+ </table>
+
+ <table name="RHQ_ADVISORY_CVE">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="ADVISORY_ID" type="INTEGER" required="true" references="RHQ_ADVISORY"/>
+ <column name="CVE_ID" type="INTEGER" required="true" references="RHQ_CVE"/>
+ <column name="LAST_MODIFIED" type="LONG" required="true"/>
+
+ <index name="RHQ_ADVISORY_CVE_IDX" unique="true">
+ <field ref="ADVISORY_ID"/>
+ <field ref="CVE_ID"/>
+ </index>
+
+ </table>
+
+ <table name="RHQ_ADVISORY_BUGLIST">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="ADVISORY_ID" type="INTEGER" required="true" references="RHQ_ADVISORY"/>
+ <column name="BUG_ID" size="256" type="VARCHAR2" required="true"/>
+ <column name="LAST_MODIFIED" type="LONG" required="true"/>
+
+ <index name="RHQ_ADVISORY_BUG_IDX" unique="true">
+ <field ref="ADVISORY_ID"/>
+ <field ref="BUG_ID"/>
+ </index>
+ </table>
+
+
+ <table name="RHQ_REPO_ADVISORY">
+ <column name="REPO_ID" type="INTEGER" required="true" references="RHQ_REPO"/>
+ <column name="ADVISORY_ID" type="INTEGER" required="true" references="RHQ_ADVISORY"/>
+ <column name="LAST_MODIFIED" type="LONG" required="true"/>
+
+ <constraint name="RHQ_REPO_ADV_MAP_KEY">
+ <primaryKey>
+ <field ref="REPO_ID"/>
+ <field ref="ADVISORY_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <!-- BUNDLE_TYPE is things like "Cobbler profile" or "file-based bundle" or "puppet recipe" -->
+ <table name="RHQ_BUNDLE_TYPE">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" size="200" type="VARCHAR2" required="true"/>
+ <column name="RESOURCE_TYPE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE_TYPE"/>
+
+ <!-- This index is for constraint, not performance -->
+ <index name="RHQ_BUNDLE_TYPE_UNIQUE" unique="true">
+ <field ref="NAME"/>
+ </index>
+ </table>
+
+ <!-- BUNDLE is a named piece of content that can be versioned and installed somewhere -->
+ <table name="RHQ_BUNDLE">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" size="200" type="VARCHAR2" required="true"/>
+ <column name="DESCRIPTION" size="500" type="VARCHAR2" required="false"/>
+ <column name="BUNDLE_TYPE_ID" type="INTEGER" required="true" references="RHQ_BUNDLE_TYPE"/>
+ <column name="PACKAGE_TYPE_ID" type="INTEGER" required="true" references="RHQ_PACKAGE_TYPE"/>
+ <column name="REPO_ID" type="INTEGER" required="true" references="RHQ_REPO"/>
+
+ <!-- This index is for constraint, not performance -->
+ <index name="RHQ_BUNDLE_UNIQUE" unique="true">
+ <field ref="BUNDLE_TYPE_ID"/>
+ <field ref="NAME"/>
+ </index>
+ </table>
+
+ <!-- BUNDLE_VERSION represents an actual piece of content that needs to be installed somewhere -->
+ <table name="RHQ_BUNDLE_VERSION">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" size="200" type="VARCHAR2" required="true"/>
+ <column name="DESCRIPTION" size="500" type="VARCHAR2" required="false"/>
+ <column name="VERSION" size="500" type="VARCHAR2" required="true"/>
+ <column name="VERSION_ORDER" type="INTEGER" required="true"/>
+ <column name="ACTION" type="CLOB" required="true"/>
+ <column name="CONFIG_DEF_ID" type="INTEGER" required="false" references="RHQ_CONFIG_DEF" />
+ <column name="BUNDLE_ID" type="INTEGER" required="true" references="RHQ_BUNDLE"/>
+
+ <!-- This index is for constraint, not performance -->
+ <index name="RHQ_BUNDLE_VERSION_UNIQUE" unique="true">
+ <field ref="BUNDLE_ID"/>
+ <field ref="NAME"/>
+ <field ref="VERSION"/>
+ </index>
+ </table>
+
+ <!-- Many-to-many table that links many repos to a particular bundle version. destination platforms -->
+ <!-- would be required to have associations to the specified repos (to access required content -->
+ <table name="RHQ_BUNDLE_VERSION_REPO">
+ <column name="BUNDLE_VERSION_ID" type="INTEGER" required="true" references="RHQ_BUNDLE_VERSION"/>
+ <column name="REPO_ID" type="INTEGER" required="true" references="RHQ_REPO"/>
+
+ <constraint name="RHQ_BUNDLE_VERSION_REPO_KEY">
+ <primaryKey>
+ <field ref="BUNDLE_VERSION_ID"/>
+ <field ref="REPO_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <!-- BUNDLE_FILE represents a file that is associated with (possibly bundled inside) a bundle version -->
+ <table name="RHQ_BUNDLE_FILE">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="BUNDLE_VERSION_ID" type="INTEGER" required="true" references="RHQ_BUNDLE_VERSION"/>
+ <column name="PACKAGE_VERSION_ID" type="INTEGER" required="true" references="RHQ_PACKAGE_VERSION"/>
+ </table>
+
+ <!-- A logical destination for a bundle deployment. Defines the platforms and directory on those targets. -->
+ <table name="RHQ_BUNDLE_DESTINATION">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" size="200" type="VARCHAR2" required="true"/>
+ <column name="DESCRIPTION" size="500" type="VARCHAR2" required="false"/>
+ <column name="CTIME" type="LONG" required="true"/>
+ <column name="MTIME" type="LONG" required="true"/>
+ <column name="BUNDLE_ID" type="INTEGER" required="true" references="RHQ_BUNDLE"/>
+ <column name="GROUP_ID" type="INTEGER" required="true" references="RHQ_RESOURCE_GROUP"/>
+ <column name="DEPLOY_DIR" size="256" type="VARCHAR2" required="true"/>
+ <column name="DEST_BASE_DIR_NAME" size="200" type="VARCHAR2" required="true"/>
+
+ <!-- This index is for constraint, not performance -->
+ <index name="RHQ_BUNDLE_DESTINATION_UNIQUE" unique="true">
+ <field ref="BUNDLE_ID"/>
+ <field ref="GROUP_ID"/>
+ <field ref="DEPLOY_DIR"/>
+ </index>
+ </table>
+
+ <!-- An actual deployment of a bundle version to a destination, with a specific config. Bundle deployments
+ can differ only on ctime, which is assumed to be different -->
+ <table name="RHQ_BUNDLE_DEPLOYMENT">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" size="200" type="VARCHAR2" required="true"/>
+ <column name="DESCRIPTION" size="500" type="VARCHAR2" required="false"/>
+ <column name="CTIME" type="LONG" required="true"/>
+ <column name="MTIME" type="LONG" required="true"/>
+ <column name="BUNDLE_VERSION_ID" type="INTEGER" required="true" references="RHQ_BUNDLE_VERSION"/>
+ <column name="BUNDLE_DESTINATION_ID" type="INTEGER" required="true" references="RHQ_BUNDLE_DESTINATION"/>
+ <column name="CONFIG_ID" type="INTEGER" required="false" references="RHQ_CONFIG" />
+ <column name="SUBJECT_NAME" type="VARCHAR2" required="false" size="255"/>
+ <column name="STATUS" type="VARCHAR2" required="true" size="16"/>
+ <column name="ERROR_MESSAGE" type="LONGVARCHAR" required="false"/>
+ <column name="IS_LIVE" type="BOOLEAN" required="true"/>
+ <column name="REPLACED_BUNDLE_DEPLOYMENT_ID" type="INTEGER" required="false" references="RHQ_BUNDLE_DEPLOYMENT"/>
+ </table>
+
+ <!-- Represents a bundle version that is deployed on a platform resource -->
+ <table name="RHQ_BUNDLE_RES_DEPLOY">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="BUNDLE_DEPLOYMENT_ID" type="INTEGER" required="true" references="RHQ_BUNDLE_DEPLOYMENT" />
+ <column name="RESOURCE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE" />
+ <column name="STATUS" type="VARCHAR2" required="true" size="16"/>
+ <column name="CTIME" type="LONG" required="true"/>
+
+ <index name="RHQ_BUNDLE_RES_DEPLOY_IDX" unique="true">
+ <field ref="BUNDLE_DEPLOYMENT_ID"/>
+ <field ref="RESOURCE_ID"/>
+ </index>
+ </table>
+
+ <table name="RHQ_BUNDLE_RES_DEP_HIST">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="BUNDLE_RES_DEPLOY_ID" type="INTEGER" required="true" references="RHQ_BUNDLE_RES_DEPLOY" />
+ <column name="SUBJECT_NAME" required="false" size="255" type="VARCHAR2"/>
+ <column name="AUDIT_TIME" required="true" type="LONG"/>
+ <column name="ACTION" required="true" size="128" type="VARCHAR2"/>
+ <column name="INFO" required="true" size="512" type="VARCHAR2"/>
+ <column name="CATEGORY" required="false" size="32" type="VARCHAR2"/>
+ <column name="STATUS" required="true" type="VARCHAR2" size="16"/>
+ <column name="MESSAGE" required="false" type="LONGVARCHAR"/>
+ <column name="ATTACHMENT" required="false" type="LONGVARCHAR"/>
+ </table>
+
+ <table name="RHQ_TAGGING_BUNDLE_MAP">
+ <column name="BUNDLE_ID" type="INTEGER" required="true" references="RHQ_BUNDLE"/>
+ <column name="TAG_ID" type="INTEGER" required="true" references="RHQ_TAGGING"/>
+ <constraint name="RHQ_TAGGING_BUNDLE_MAP_KEY">
+ <primaryKey>
+ <field ref="BUNDLE_ID"/>
+ <field ref="TAG_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_TAGGING_BUNDLE_VERSION_MAP">
+ <column name="BUNDLE_VERSION_ID" type="INTEGER" required="true" references="RHQ_BUNDLE_VERSION"/>
+ <column name="TAG_ID" type="INTEGER" required="true" references="RHQ_TAGGING"/>
+ <constraint name="RHQ_TAGGING_BUNDLE_VER_MAP_KEY">
+ <primaryKey>
+ <field ref="BUNDLE_VERSION_ID"/>
+ <field ref="TAG_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_TAGGING_BUNDLE_DEPLOY_MAP">
+ <column name="BUNDLE_DEPLOYMENT_ID" type="INTEGER" required="true" references="RHQ_BUNDLE_DEPLOYMENT"/>
+ <column name="TAG_ID" type="INTEGER" required="true" references="RHQ_TAGGING"/>
+ <constraint name="RHQ_TAGGING_BUNDLE_DEP_MAP_KEY">
+ <primaryKey>
+ <field ref="BUNDLE_DEPLOYMENT_ID"/>
+ <field ref="TAG_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_TAGGING_BUNDLE_DEST_MAP">
+ <column name="BUNDLE_DESTINATION_ID" type="INTEGER" required="true" references="RHQ_BUNDLE_DESTINATION"/>
+ <column name="TAG_ID" type="INTEGER" required="true" references="RHQ_TAGGING"/>
+ <constraint name="RHQ_TAGGING_BUNDLE_DES_MAP_KEY">
+ <primaryKey>
+ <field ref="BUNDLE_DESTINATION_ID"/>
+ <field ref="TAG_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <!-- Drift Management Tables -->
+ <table name="RHQ_DRIFT_DEF_TEMPLATE">
+ <column name="ID" default="sequence-only" initial="1001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="RESOURCE_TYPE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE_TYPE"/>
+ <column name="CONFIG_ID" type="INTEGER" required="true" references="RHQ_CONFIG"/>
+ <column name="NAME" type="VARCHAR2" size="128" required="true"/>
+ <column name="DESCRIPTION" type="VARCHAR2" size="512" required="false"/>
+ <!-- true if defined by user, false if provided by plugin -->
+ <column name="IS_USER_DEFINED" type="BOOLEAN" required="true"/>
+ <!--
+ Change sets are managed by the drift server plugins; therefore, we cannot maintain
+ a FK constraint on the change set id. And the type cannot be integer because
+ other back ends like MongoDB use other types that are basically variants of a
+ UUID
+
+ jsanda
+ -->
+ <column name="DRIFT_CHANGE_SET_ID" type="VARCHAR2" size="64" required="false"/>
+ <column name="CTIME" type="LONG" required="true"/>
+
+ <index name="RHQ_DRIFT_DEF_TEMPLATE_UNIQUE" unique="true">
+ <field ref="RESOURCE_TYPE_ID"/>
+ <field ref="NAME"/>
+ </index>
+ </table>
+
+ <!-- Content of a file being managed for drift. Used for diff and/or remediation -->
+ <table name="RHQ_DRIFT_FILE">
+ <column name="HASH_ID" type="VARCHAR2" size="64" primarykey="true" required="true"/>
+ <column name="CTIME" type="LONG" required="true"/>
+ <column name="DATA" type="LARGEOBJECT" required="false"/>
+ <column name="DATA_SIZE" type="LONG" required="false"/>
+ <column name="STATUS" type="VARCHAR2" size="20" required="true"/>
+ </table>
+
+ <!-- A single drift definition defining file tracking
+ Note: A resource or group (todo: group, other?) can have zero or more drift configurations.
+ Note: The name, interval and is_enabled values are also stored withing the referenced config.
+ This allows us to use the config editor to manipulate all fields.
+ Note: Name is read-only
+ Note: Interval unit is millis
+ -->
+ <table name="RHQ_DRIFT_DEFINITION">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="CONFIG_ID" type="INTEGER" required="true" references="RHQ_CONFIG"/>
+ <column name="RESOURCE_ID" type="INTEGER" required="false" references="RHQ_RESOURCE"/>
+ <column name="DRIFT_DEF_TEMPLATE_ID" type="INTEGER" required="false" references="RHQ_DRIFT_DEF_TEMPLATE"/>
+ <column name="CTIME" type="LONG" required="true"/>
+ <column name="NAME" type="VARCHAR2" size="512" required="true"/>
+ <column name="DESCRIPTION" type="VARCHAR2" size="512" required="false"/>
+ <column name="INTERVAL" type="LONG" required="true"/>
+ <column name="IS_ENABLED" type="BOOLEAN" required="true"/>
+ <column name="DRIFT_HANDLING_MODE" type="VARCHAR2" size="20" required="true"/>
+ <column name="IS_PINNED" type="BOOLEAN" required="true"/>
+ <column name="IS_ATTACHED" type="BOOLEAN" required="true"/>
+ <column name="COMPLIANCE_STATUS" type="INTEGER" required="true"/>
+ </table>
+
+ <!-- A set of drift records (note, this is for the JPA server plugin impl only) -->
+ <table name="RHQ_DRIFT_SET">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ </table>
+
+ <!-- A drift change-set report for a resource (note, this is for the JPA server plugin impl only) -->
+ <table name="RHQ_DRIFT_CHANGE_SET">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="DRIFT_SET_ID" type="INTEGER" required="false" references="RHQ_DRIFT_SET"/>
+ <column name="CTIME" type="LONG" required="true"/>
+ <!-- Version 0 is initial change-set -->
+ <column name="VERSION" type="INTEGER" required="true"/>
+ <column name="CATEGORY" type="VARCHAR2" size="20" required="true"/>
+ <column name="RESOURCE_ID" type="INTEGER" required="false" references="RHQ_RESOURCE"/>
+ <column name="DRIFT_DEFINITION_ID" type="INTEGER" required="false" references="RHQ_DRIFT_DEFINITION"/>
+ <!-- the drift handling mode at changeset creation time -->
+ <column name="DRIFT_HANDLING_MODE" type="VARCHAR2" size="20" required="true"/>
+ </table>
+
+ <!-- A single occurence of drift for a resource (note, this is for the JPA server plugin impl only) -->
+ <table name="RHQ_DRIFT">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="CTIME" type="LONG" required="true"/>
+ <column name="CATEGORY" type="VARCHAR2" size="20" required="true"/>
+ <column name="DRIFT_SET_ID" type="INTEGER" required="false" references="RHQ_DRIFT_SET"/>
+ <column name="DRIFT_CHANGE_SET_ID" type="INTEGER" required="true" references="RHQ_DRIFT_CHANGE_SET"/>
+ <!-- the file path not including the base directory -->
+ <column name="PATH" type="VARCHAR2" size="1024" required="true"/>
+ <!-- the same as PATH less [/]filename.ext. Redundant storage for the purpose of strict directory search.
+ this field can be considered transient for serialization purposes -->
+ <column name="PATH_DIRECTORY" type="VARCHAR2" size="1024" required="true"/>
+ <column name="OLD_DRIFT_FILE" type="VARCHAR2" size="64" required="false" references="RHQ_DRIFT_FILE"/>
+ <column name="NEW_DRIFT_FILE" type="VARCHAR2" size="64" required="false" references="RHQ_DRIFT_FILE"/>
+ </table>
+
+
+<!-- END: content-schema.xml -->
+<!-- BEGIN: resource-request-schema.xml -->
+
+
+ <table name="RHQ_CREATE_RES_HIST">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="PARENT_RESOURCE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE"/>
+ <column name="CREATED_RESOURCE_NAME" type="VARCHAR2" size="500" required="false"/>
+ <column name="NEW_RESOURCE_KEY" type="VARCHAR2" required="false" size="500"/>
+ <column name="STATUS" type="VARCHAR2" required="true" size="16"/>
+ <column name="ERROR_MESSAGE" type="LONGVARCHAR" required="false"/>
+ <column name="SUBJECT_NAME" type="VARCHAR2" required="true" size="100"/>
+ <column name="CTIME" type="LONG" required="true"/>
+ <column name="MTIME" type="LONG" required="true"/>
+ <column name="RESOURCE_TYPE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE_TYPE"/>
+ <column name="CONFIGURATION_ID" type="INTEGER" required="false" references="RHQ_CONFIG"/>
+ <column name="INSTALLED_PACKAGE_ID" type="INTEGER" required="false" references="RHQ_INSTALLED_PACKAGE"/>
+ </table>
+
+ <table name="RHQ_DELETE_RES_HIST">
+ <column name="ID" type="INTEGER" required="true" default="sequence-only" initial="10001" primarykey="true"/>
+ <column name="ERROR_MESSAGE" type="LONGVARCHAR" required="false"/>
+ <column name="SUBJECT_NAME" type="VARCHAR2" required="true" size="100"/>
+ <column name="CTIME" type="LONG" required="true"/>
+ <column name="MTIME" type="LONG" required="true"/>
+ <column name="STATUS" type="VARCHAR2" required="true" size="16"/>
+ <column name="RESOURCE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE"/>
+ </table>
+
+<!-- END: resource-request-schema.xml -->
+<!-- BEGIN: jms-schema.xml -->
+
+<!-- the schema matches that which would be automatically created by the JMS subsystem -->
+<!-- see deploy/jms/rhq-jdbc-state-service.xml and rhq-jdbc2-service.xml -->
+
+
+ <table name="JMS_MESSAGES">
+ <column name="MESSAGEID" required="true" type="INTEGER" />
+ <column name="DESTINATION" required="true" type="VARCHAR2" size="255" />
+ <column name="TXID" required="false" type="INTEGER" />
+ <column name="TXOP" required="false" type="CHAR" size="1" />
+ <column name="MESSAGEBLOB" required="false" type="BLOB" />
+
+ <constraint name="JMS_MESSAGES_PKEY">
+ <primaryKey>
+ <field ref="MESSAGEID"/>
+ <field ref="DESTINATION"/>
+ </primaryKey>
+ </constraint>
+
+ <index name="JMS_MESSAGES_TXOP_TXID">
+ <field ref="TXOP"/>
+ <field ref="TXID"/>
+ </index>
+ <index name="JMS_MESSAGES_DESTINATION">
+ <field ref="DESTINATION"/>
+ </index>
+ </table>
+
+ <table name="JMS_TRANSACTIONS">
+ <column name="TXID" required="true" type="INTEGER" primarykey="true" />
+ </table>
+
+ <table name="JMS_USERS">
+ <column name="USERID" required="true" type="VARCHAR2" size="32" primarykey="true" />
+ <column name="PASSWD" required="true" type="VARCHAR2" size="32" />
+ <column name="CLIENTID" required="false" type="VARCHAR2" size="128" />
+ </table>
+
+ <table name="JMS_ROLES">
+ <column name="ROLEID" required="true" type="VARCHAR2" size="32" />
+ <column name="USERID" required="true" type="VARCHAR2" size="32" />
+
+ <constraint name="JMS_ROLES_PKEY">
+ <primaryKey>
+ <field ref="USERID"/>
+ <field ref="ROLEID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="JMS_SUBSCRIPTIONS">
+ <column name="CLIENTID" required="true" type="VARCHAR2" size="128" />
+ <column name="SUBNAME" required="true" type="VARCHAR2" size="128" />
+ <column name="TOPIC" required="true" type="VARCHAR2" size="255" />
+ <column name="SELECTOR" required="false" type="VARCHAR2" size="255" />
+
+ <constraint name="JMS_SUBSCRIPTIONS_PKEY">
+ <primaryKey>
+ <field ref="CLIENTID"/>
+ <field ref="SUBNAME"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+<!-- END: jms-schema.xml -->
+<!-- BEGIN: obsolete-schema.xml -->
+
+
+ <!-- NOTE: The tables will be dropped in the *** REVERSE ORDER *** as listed in this file! -->
+ <!-- NOTE: So, put the table you want dropped first at the bottom, and so on... -->
+
+
+ <!-- !!! REMOVED FROM CONTENT-SCHEMA !!!! -->
+
+ <table name="RHQ_DRIFT_TEMPLATE_MAP">
+ <column name="RESOURCE_TYPE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE_TYPE"/>
+ <column name="CONFIG_TEMPLATE_ID" type="INTEGER" required="true" references="RHQ_CONFIG_TEMPLATE"/>
+ </table>
+
+ <table name="RHQ_BUNDLE_CONFIG" obsolete="true">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="CONFIG_ID" type="INTEGER" required="false" references="RHQ_CONFIG" />
+ <!-- this probably needs a DTYPE discriminator so we know if its a bundle or a specific bundle version -->
+ <column name="BUNDLE_VERSION_ID" type="INTEGER" required="false" references="RHQ_BUNDLE_VERSION"/>
+ <column name="BUNDLE_ID" type="INTEGER" required="false" references="RHQ_BUNDLE"/>
+ </table>
+
+ <table name="RHQ_CHANNEL" obsolete="true">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" size="200" type="VARCHAR2" required="true"/>
+ <column name="DESCRIPTION" size="500" type="VARCHAR2" required="false"/>
+ <column name="CREATION_TIME" type="LONG" required="true"/>
+ <column name="LAST_MODIFIED_TIME" type="LONG" required="true"/>
+
+ <index name="RHQ_CHANNEL_IDX" unique="true">
+ <field ref="NAME"/>
+ </index>
+ </table>
+
+ <table name="RHQ_CHANNEL_RESOURCE_MAP" obsolete="true">
+ <column name="CHANNEL_ID" type="INTEGER" required="true" references="RHQ_CHANNEL"/>
+ <column name="RESOURCE_ID" type="INTEGER" required="true" references="RHQ_RESOURCE"/>
+ <column name="CTIME" type="LONG" required="true"/>
+
+ <constraint name="RHQ_CHANNEL_RESOURCE_MAP_KEY">
+ <primaryKey>
+ <field ref="CHANNEL_ID"/>
+ <field ref="RESOURCE_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_CHANNEL_CONTENT_SRC_MAP" obsolete="true">
+ <column name="CHANNEL_ID" type="INTEGER" required="true" references="RHQ_CHANNEL"/>
+ <column name="CONTENT_SRC_ID" type="INTEGER" required="true" references="RHQ_CONTENT_SOURCE"/>
+ <column name="CTIME" type="LONG" required="true"/>
+
+ <constraint name="RHQ_CHAN_CONTENT_SRC_MAP_KEY">
+ <primaryKey>
+ <field ref="CHANNEL_ID"/>
+ <field ref="CONTENT_SRC_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <table name="RHQ_CHANNEL_PKG_VERSION_MAP" obsolete="true">
+ <column name="CHANNEL_ID" type="INTEGER" required="true" references="RHQ_CHANNEL"/>
+ <column name="PACKAGE_VERSION_ID" type="INTEGER" required="true" references="RHQ_PACKAGE_VERSION"/>
+ <column name="CTIME" type="LONG" required="true"/>
+
+ <constraint name="RHQ_CHANNEL_PKG_VER_MAP_KEY">
+ <primaryKey>
+ <field ref="CHANNEL_ID"/>
+ <field ref="PACKAGE_VERSION_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+ <!-- !!! REMOVED FROM MEASUREMENT-SCHEMA !!!! -->
+
+ <table name="RHQ_MEASUREMENT_OOB" obsolete="true">
+ <column name="ID" type="INTEGER" default="sequence-only" initial="10001" primarykey="true" required="true"/>
+ <column name="SCHEDULE_ID" type="INTEGER" references="RHQ_MEASUREMENT_SCHED(ID)" required="true"/>
+ <column name="OCCURRED" type="LONG" required="true"/>
+ <column name="DIFF" type="DOUBLE" required="true"/>
+
+ <index name="RHQ_MEASUREMENT_OOB_IDX" unique="true">
+ <field ref="SCHEDULE_ID" />
+ <field ref="OCCURRED" />
+ </index>
+ </table>
+
+
+ <table name="RHQ_TAG" obsolete="true">
+ <column name="ID" default="sequence-only" initial="10001" primarykey="true" required="true" type="INTEGER"/>
+ <column name="NAME" size="200" type="VARCHAR2" required="true"/>
+ <column name="DESCRIPTION" size="500" type="VARCHAR2" required="false"/>
+ </table>
+
+ <table name="RHQ_REPO_TAG_MAP" obsolete="true">
+ <column name="REPO_ID" type="INTEGER" required="true" references="RHQ_REPO"/>
+ <column name="TAG_ID" type="INTEGER" required="true" references="RHQ_TAG"/>
+
+ <constraint name="RHQ_REPO_TAG_MAP_KEY">
+ <primaryKey>
+ <field ref="REPO_ID"/>
+ <field ref="TAG_ID"/>
+ </primaryKey>
+ </constraint>
+ </table>
+
+
+<!-- END: obsolete-schema.xml -->
+</dbsetup>
commit 40218867d9e9cee5202462c1ac87ca3962fcf590
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue Feb 21 14:36:37 2012 -0500
remove erroneous import
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
index 9a41142..f0a4ac8 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
@@ -131,7 +131,6 @@ import org.rhq.enterprise.server.system.ServerVersion;
import org.rhq.enterprise.server.util.CriteriaQueryGenerator;
import org.rhq.enterprise.server.util.CriteriaQueryRunner;
import org.rhq.enterprise.server.util.QuartzUtil;
-import sun.management.resources.agent;
/**
* The manager responsible for working with Resource and plugin configurations.
commit 4ad367088998fcb67b0a058c4fb8bd5ed4133838
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Feb 21 13:46:19 2012 -0500
[BZ 781602] Adding logic to keep order of tabs consistent
The set of visible tabs can vary from one resource to another; however,
the order of tabs relative to one another is fixed. For example, the
Operations tab could appear as the 3rd or 4th tab, and it could be the
last tab. Note that it should always appear after the summary,
inventory, monitoring, and events tabs in that order. So if the
monitoring and events tabs are not visible, then the order should be
summary, inventory, operations, etc.
This commit adds an internal data structure to TwoLevelTabSet, similar
to a singly linked list a tab is a list node. Each node maintains two
pointers - one to the next visible tab and one to the next actual tab.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/TwoLevelTab.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/TwoLevelTab.java
index fa62e45..79afade 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/TwoLevelTab.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/TwoLevelTab.java
@@ -23,11 +23,14 @@ import com.smartgwt.client.widgets.Canvas;
import org.rhq.enterprise.gui.coregui.client.components.view.ViewName;
/**
- * @author Greg Hinkle
+ * @author John Sanda
* @author Jay Shaughnessy
*/
public class TwoLevelTab extends NamedTab {
private SubTabLayout layout;
+
+ private TwoLevelTab actualNext;
+ private TwoLevelTab visibleNext;
public TwoLevelTab(String locatorId, ViewName viewName, String icon) {
super(locatorId, viewName, icon);
@@ -78,6 +81,48 @@ public class TwoLevelTab extends NamedTab {
return layout;
}
+ /**
+ * This is the successor or tab immediately to the right of this tab when all tabs
+ * are visible. The tab to which actualNext refers does not change whereas the tab to
+ * which {@link #getVisibleNext visibleNext} refers can change.
+ *
+ * @return The successor or tab immediately to the right of this tab when all tabs are
+ * visible.
+ */
+ public TwoLevelTab getActualNext() {
+ return actualNext;
+ }
+
+ /**
+ * @param actualNext The successor or tab immediately to the right of this tab when all
+ * tabs are visible. The tab to which actualNext refers does not change whereas the tab
+ * to which {@link #getVisibleNext visibleNext} refers can change.
+ */
+ public void setActualNext(TwoLevelTab actualNext) {
+ this.actualNext = actualNext;
+ }
+
+ /**
+ * The successor or tab immediately to the right of this tab among the set of visible
+ * tabs. The tab to which visibleNext refers can change whereas the tab to which
+ * {@link #getActualNext actualNext} refers will not change.
+ *
+ * @return The successor or tab immediately to the right of this tab among the set of
+ * visible tabs.
+ */
+ public TwoLevelTab getVisibleNext() {
+ return visibleNext;
+ }
+
+ /**
+ * @param visibleNext The successor or tab immediately to the right of this tab among
+ * the set of visible tabs. The tab to which visibleNext refers can change whereas the
+ * tab to which {@link #getActualNext actualNext} refers will not change.
+ */
+ public void setVisibleNext(TwoLevelTab visibleNext) {
+ this.visibleNext = visibleNext;
+ }
+
@Override
public String toString() {
return "TwoLevelTab[title=" + getTitle() + ", locatorId=" + getLocatorId() + "]";
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/TwoLevelTabSet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/TwoLevelTabSet.java
index 572f035..573c543 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/TwoLevelTabSet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/tab/TwoLevelTabSet.java
@@ -39,9 +39,19 @@ public class TwoLevelTabSet extends NamedTabSet implements TabSelectedHandler, T
private Map<String, TwoLevelTab> hiddenTabs = new LinkedHashMap<String, TwoLevelTab>();
private boolean ignoreSelectEvents = false;
+
+ private TwoLevelTab head;
+
+ /**
+ * This is the visible tail. Because the actual order of tabs is fixed we know that the
+ * actual tail will always be the content tab.
+ */
+ private TwoLevelTab tail;
public TwoLevelTabSet(String locatorId) {
super(locatorId);
+ // Need to set destroyPanes property to false so that we do not lose tab
+ // content when hiding a tab.
setDestroyPanes(false);
}
@@ -51,10 +61,29 @@ public class TwoLevelTabSet extends NamedTabSet implements TabSelectedHandler, T
tab.getLayout().addTwoLevelTabSelectedHandler(this);
updateTab(tab, tab.getPane());
}
-
+ buildTabList();
addTabSelectedHandler(this);
}
+ /**
+ * This method initializes the head and tail pointers. Then it initializes the
+ * {@link TwoLevelTab#getActualNext actualNext} and {@link TwoLevelTab#getVisibleNext visibleNext}
+ * properties of each tab. This list is built so that when hiding and showing tabs, the
+ * tab order remains consistent. The order of the list is the same as the order of the
+ * tabs passed to {@link #setTabs(TwoLevelTab...)}
+ */
+ private void buildTabList() {
+ TwoLevelTab[] tabs = getTabs();
+ head = tabs[0];
+ tail = tabs[tabs.length - 1];
+ TwoLevelTab current = head;
+ for (int i = 1; i < tabs.length; ++i) {
+ current.setActualNext(tabs[i]);
+ current.setVisibleNext(tabs[i]);
+ current = tabs[i];
+ }
+ }
+
public TwoLevelTab[] getTabs() {
Tab[] tabs = super.getTabs();
TwoLevelTab[] twoLevelTabs = new TwoLevelTab[tabs.length];
@@ -75,9 +104,29 @@ public class TwoLevelTabSet extends NamedTabSet implements TabSelectedHandler, T
if (hiddenTabs.containsKey(tab.getLocatorId())) {
return;
}
+
+ TwoLevelTab visiblePrevious = findClosestVisiblePredecessor(tab);
+ if (visiblePrevious == null) {
+ // if visiblePrevious is null then that means we are updating
+ // then head. Note that as of now (02/21/2012), the visible head,
+ // the summary tab, is fixed, so we don't really need to worry
+ // about updating the head; however, doing so will make it easier
+ // to support things like hiding arbitrary tabs or reordering tabs.
+ head = tab.getVisibleNext();
+
+ } else {
+ visiblePrevious.setVisibleNext(tab.getVisibleNext());
+ // check to see if the tail needs to be updated. If the
+ // following check is true, then that means visiblePrevious is
+ // now the tail.
+ if (visiblePrevious.getVisibleNext() == null) {
+ tail = visiblePrevious;
+ }
+ }
+ tab.setVisibleNext(null);
// Note that removing the tab does *not* destroy its content pane
// since we set the destroyPanes property to false in the
- removeTab(tab);
+ removeTab(tab);
hiddenTabs.put(tab.getLocatorId(), tab);
} else {
if (!hiddenTabs.containsKey(tab.getLocatorId())) {
@@ -85,10 +134,66 @@ public class TwoLevelTabSet extends NamedTabSet implements TabSelectedHandler, T
}
hiddenTabs.remove(tab.getLocatorId());
- addTab(tab);
+ TwoLevelTab successor = findClosestVisibleSuccessor(tab);
+ if (successor == null) {
+ // if successor is null then that means we are updating the tail
+ tail.setVisibleNext(tab);
+ tail = tab;
+ addTab(tab);
+ } else {
+ TwoLevelTab visiblePrevious = findClosestVisiblePredecessor(successor);
+ tab.setVisibleNext(visiblePrevious.getVisibleNext());
+ visiblePrevious.setVisibleNext(tab);
+ addTab(tab, (getTabNumber(visiblePrevious.getID()) + 1));
+ }
}
}
+ /**
+ * Walks the list of tabs to find the closest, visible predecessor.
+ *
+ * @param tab A {@link TwoLevelTab tab} that is currently visible
+ * @return The closest, visible predecessor or null if have the head
+ */
+ private TwoLevelTab findClosestVisiblePredecessor(TwoLevelTab tab) {
+ if (tab == head) {
+ return null;
+ }
+
+ TwoLevelTab current = head;
+ while (current != tab) {
+ // if we have reached the visible tail or the immediate predecessor
+ // of the tab, then return it.
+ if (current.getVisibleNext() == null || current.getVisibleNext() == tab) {
+ return current;
+ }
+ current = current.getVisibleNext();
+ }
+ // Not sure what we should do if we get here. return null for now
+ return null;
+ }
+
+ /**
+ * Walks the list to find the closest, visible successor.
+ *
+ * @param tab A {@link TwoLevelTab tab} that is currently hidden
+ * @return The closest, visisble successor or null if the insertion point
+ * is the tail.
+ */
+ private TwoLevelTab findClosestVisibleSuccessor(TwoLevelTab tab) {
+ TwoLevelTab current = tab;
+ while (current != null) {
+ // Walk the list of tabs until we reach a visible successor or the tail
+ if (current.getVisibleNext() == null && current != tail) {
+ current = current.getActualNext();
+ } else {
+ return current;
+ }
+ }
+ // if we reach this point then that means we will be inserting at the tail
+ return null;
+ }
+
public void destroyViews() {
for (TwoLevelTab tab : getTabs()) {
tab.getLayout().destroyViews();
commit 223f5fdfd7b7c3fbb5510b457a9892fc329fba1b
Merge: fd854c8 03737b1
Author: Mike Thompson <mithomps(a)redhat.com>
Date: Tue Feb 21 09:40:41 2012 -0800
Merge branch 'BZ691544'
commit 03737b1598b62d8334e1c85391736d9cc66e6d1c
Author: Mike Thompson <mithomps(a)redhat.com>
Date: Tue Feb 21 09:39:30 2012 -0800
[BZ691544 - Entering very large numbers in Dynagroups Recalculate Interval field causes stack trace] Forgot to comment out foreign resource bundle keys for translation.
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
index a42707d..c6e8b99 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
@@ -1133,7 +1133,7 @@ view_dynagroup_permDenied = Sie haben nicht das Recht die Gruppen Definitionen a
##view_dynagroup_recalcSuccessful = You have successfully recalculated this group definition
##view_dynagroup_recalcSuccessfulSelection = You have successfully recalculated [{0}] group definitions
view_dynagroup_recalculate = Neu berechnen
-##view_dynagroup_recalculationInterval = Recalculation Interval
+##view_dynagroup_recalculationInterval = Recalculation Interval (min)
view_dynagroup_recursive = Rekursiv
view_dynagroup_saveAndRecalculate = Speichern & neu berechnen
##view_dynagroup_saveFailure = Failed to save the group definition named [{0}]
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
index 41a33be..40d61a4a 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
@@ -1317,7 +1317,7 @@ view_dynagroup_recalcFailureSelection = 選択されたグループ定義を再
view_dynagroup_recalcSuccessful = このグループ定義の再計算が成功しました
view_dynagroup_recalcSuccessfulSelection = [{0}] グループ定義の再計算が成功しました
view_dynagroup_recalculate = 再計算
-view_dynagroup_recalculationInterval = 再計算間隔 (ms)
+#view_dynagroup_recalculationInterval = 再計算間隔 (min)
view_dynagroup_recursive = 再帰
view_dynagroup_saveAndRecalculate = 保存 & 再計算
view_dynagroup_saveFailure = グループ定義名 [{0}] の保存に失敗しました
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
index 3a60da7..95903f0 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
@@ -1348,7 +1348,7 @@ view_dynagroup_recalcFailureSelection = Falha ao recalcular as defini��es de
view_dynagroup_recalcSuccessful = Recalculo da defini��o grupo realizado com sucesso!
view_dynagroup_recalcSuccessfulSelection = As defini��es dos grupos [{0}] foram recalculadas com com sucesso!
view_dynagroup_recalculate = Recalcular
-view_dynagroup_recalculationInterval = Intervalo para Recalculo
+#view_dynagroup_recalculationInterval = Intervalo para Recalculo
view_dynagroup_recursive = Recursivo
view_dynagroup_saveAndRecalculate = Salvar e Recalcular
view_dynagroup_saveFailure = Falha ao salvar a defini��o do grupo [{0}]
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
index 7e4da98..0bb6308 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
@@ -1328,7 +1328,7 @@ view_dynagroup_recalcFailureSelection = Failed to recalculated the selected grou
view_dynagroup_recalcSuccessful = \u7ec4\u5b9a\u4e49\u5df2\u7ecf\u91cd\u65b0\u8ba1\u7b97
view_dynagroup_recalcSuccessfulSelection = You have successfully recalculated [{0}] group definitions
view_dynagroup_recalculate = \u91cd\u7b97
-view_dynagroup_recalculationInterval = \u91cd\u7b97\u95f4\u9694 (ms)
+#view_dynagroup_recalculationInterval = \u91cd\u7b97\u95f4\u9694 (ms)
view_dynagroup_recursive = \u9012\u5f52
view_dynagroup_saveAndRecalculate = \u4fdd\u5b58&\u91cd\u7b97
view_dynagroup_saveFailure = \u4fdd\u5b58\u540d\u79f0\u4e3a[{0}]\u7684\u7ec4\u5b9a\u4e49\u5931\u8d25
12 years, 2 months
[rhq] modules/core
by Jay Shaughnessy
modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java | 16 +++++++---
1 file changed, 12 insertions(+), 4 deletions(-)
New commits:
commit 30dadb8f106ceb14560767bd83f4add50396c547
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Mon Feb 27 12:59:38 2012 -0500
Add null checks on several finally close() methods
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
index e381593..63d5a6c 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
@@ -253,7 +253,9 @@ public class DriftDetector implements Runnable {
currentFullSnapshotReader = changeSetMgr.getChangeSetReader(currentFullSnapshot);
newVersion = currentFullSnapshotReader.getHeaders().getVersion() + 1;
} finally {
- currentFullSnapshotReader.close();
+ if (null != currentFullSnapshotReader) {
+ currentFullSnapshotReader.close();
+ }
}
} else {
newVersion = snapshotReader.getHeaders().getVersion() + 1;
@@ -264,7 +266,9 @@ public class DriftDetector implements Runnable {
changedEntries, removedEntries, changedPinnedEntries);
} finally {
- snapshotReader.close();
+ if (null != snapshotReader) {
+ snapshotReader.close();
+ }
}
// if necessary, re-write the pinned snapshot file because we've updated timestamp/filesize info, which
@@ -564,7 +568,9 @@ public class DriftDetector implements Runnable {
}
return newSnapshot;
} finally {
- newSnapshotWriter.close();
+ if (null != newSnapshotWriter) {
+ newSnapshotWriter.close();
+ }
}
}
@@ -584,7 +590,9 @@ public class DriftDetector implements Runnable {
return pinnedSnapshot;
} finally {
- newSnapshotWriter.close();
+ if (null != newSnapshotWriter) {
+ newSnapshotWriter.close();
+ }
}
}
12 years, 2 months
[rhq] Branch 'jshaughn/avail' - modules/enterprise
by Jay Shaughnessy
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest.java | 122 +++-------
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/test/UpdateMeasurementSubsystemTest.java | 20 +
2 files changed, 54 insertions(+), 88 deletions(-)
New commits:
commit c9521537543c3787388116af86d8ff9238316c34
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue Feb 28 16:32:46 2012 -0500
Fix some unit tests to expect the built-in _AvaiabilityType_ metric.
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest.java
index 290e66f..0664545 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/MeasurementMetadataManagerBeanTest.java
@@ -1,5 +1,7 @@
package org.rhq.enterprise.server.resource.metadata;
+import static java.util.Arrays.asList;
+
import java.util.List;
import org.testng.annotations.Test;
@@ -12,45 +14,34 @@ import org.rhq.core.domain.measurement.MeasurementUnits;
import org.rhq.core.domain.measurement.NumericType;
import org.rhq.test.AssertUtils;
-import static java.util.Arrays.asList;
-import static java.util.Collections.EMPTY_LIST;
-
public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
- @Test(groups = {"plugin.metadata", "Metrics.NewPlugin"})
+ @Test(groups = { "plugin.metadata", "Metrics.NewPlugin" })
void registerMetricsPlugin() throws Exception {
createPlugin("metric-test-plugin", "1.0", "plugin_v1.xml");
}
- @Test(groups = {"plugin.metadata", "Metrics.NewPlugin"}, dependsOnMethods = {"registerMetricsPlugin"})
+ @Test(groups = { "plugin.metadata", "Metrics.NewPlugin" }, dependsOnMethods = { "registerMetricsPlugin" })
public void persistNewMetrics() throws Exception {
- assertResourceTypeAssociationEquals(
- "MetricServer1",
- "MeasurementMetadataManagerBeanTestPlugin",
- "metricDefinitions",
- asList("metric1", "metric2", "metric3")
- );
+ assertResourceTypeAssociationEquals("MetricServer1", "MeasurementMetadataManagerBeanTestPlugin",
+ "metricDefinitions", asList("metric1", "metric2", "metric3", "_AvailabilityType_"));
}
- @Test(groups = {"plugin.metadata", "Metrics.NewPlugin"}, dependsOnMethods = {"persistNewMetrics"})
+ @Test(groups = { "plugin.metadata", "Metrics.NewPlugin" }, dependsOnMethods = { "persistNewMetrics" })
public void persistNewTraitDefinitionProperties() {
MeasurementDefinition traitDef = loadMeasurementDef("metric1", "MetricServer1");
- MeasurementDefinition expected = new MeasurementDefinition("metric1", MeasurementCategory.AVAILABILITY,
+ MeasurementDefinition expected = new MeasurementDefinition("metric1", MeasurementCategory.AVAILABILITY,
MeasurementUnits.MILLISECONDS, DataType.TRAIT, NumericType.DYNAMIC, true, 30000, DisplayType.SUMMARY);
expected.setDescription("Metric 1");
expected.setDisplayName("metric1");
expected.setDisplayOrder(1);
- AssertUtils.assertPropertiesMatch(
- "Failed to persist properties for a trait metric definition",
- expected,
- traitDef,
- asList("id", "resourceType")
- );
+ AssertUtils.assertPropertiesMatch("Failed to persist properties for a trait metric definition", expected,
+ traitDef, asList("id", "resourceType"));
}
- @Test(groups = {"plugin.metadata", "Metrics.NewPlugin"}, dependsOnMethods = {"persistNewMetrics"})
+ @Test(groups = { "plugin.metadata", "Metrics.NewPlugin" }, dependsOnMethods = { "persistNewMetrics" })
public void persistNewNumericMeasurementDef() {
MeasurementDefinition measurementDef = loadMeasurementDef("metric2", "MetricServer1");
@@ -61,12 +52,8 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
expected.setDisplayName("metric2");
expected.setDisplayOrder(2);
- AssertUtils.assertPropertiesMatch(
- "Failed to persist properties for numeric metric definition",
- expected,
- measurementDef,
- asList("id", "resourceType")
- );
+ AssertUtils.assertPropertiesMatch("Failed to persist properties for numeric metric definition", expected,
+ measurementDef, asList("id", "resourceType"));
MeasurementDefinition perMinuteDef = loadMeasurementDef("metric2", "MetricServer1", "metric2 per Minute");
@@ -78,18 +65,15 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
expected.setRawNumericType(measurementDef.getNumericType());
AssertUtils.assertPropertiesMatch(
- "Failed to create and persist per minute metric definition for numeric metric definition",
- expected,
- perMinuteDef,
- asList("id", "resourceType")
- );
+ "Failed to create and persist per minute metric definition for numeric metric definition", expected,
+ perMinuteDef, asList("id", "resourceType"));
}
- @Test(groups = {"plugin.metadata", "Metrics.NewPlugin"}, dependsOnMethods = {"persistNewMetrics"})
+ @Test(groups = { "plugin.metadata", "Metrics.NewPlugin" }, dependsOnMethods = { "persistNewMetrics" })
public void persistNewCallTimeDef() {
MeasurementDefinition calltimeDef = loadMeasurementDef("metric3", "MetricServer1");
- MeasurementDefinition expected = new MeasurementDefinition("metric3", MeasurementCategory.THROUGHPUT,
+ MeasurementDefinition expected = new MeasurementDefinition("metric3", MeasurementCategory.THROUGHPUT,
MeasurementUnits.MILLISECONDS, DataType.CALLTIME, true, 30000, DisplayType.DETAIL);
expected.setNumericType(NumericType.DYNAMIC);
expected.setDestinationType("myMethod");
@@ -97,34 +81,26 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
expected.setDisplayName("metric3");
expected.setDisplayOrder(4);
- AssertUtils.assertPropertiesMatch(
- "Failed to create calltime metric definition",
- expected,
- calltimeDef,
- asList("id", "resourceType")
- );
+ AssertUtils.assertPropertiesMatch("Failed to create calltime metric definition", expected, calltimeDef,
+ asList("id", "resourceType"));
}
- @Test(groups = {"plugin.metadata", "Metrics.UpgradePlugin"}, dependsOnGroups = {"Metrics.NewPlugin"})
+ @Test(groups = { "plugin.metadata", "Metrics.UpgradePlugin" }, dependsOnGroups = { "Metrics.NewPlugin" })
public void upgradeMetricsPlugin() throws Exception {
createPlugin("metric-test-plugin", "2.0", "plugin_v2.xml");
}
- @Test(groups = {"plugin.metadata", "Metrics.UpradePlugin"}, dependsOnMethods = {"upgradeMetricsPlugin"})
+ @Test(groups = { "plugin.metadata", "Metrics.UpradePlugin" }, dependsOnMethods = { "upgradeMetricsPlugin" })
public void addNewMetricDef() throws Exception {
- assertResourceTypeAssociationEquals(
- "MetricServer2",
- "MeasurementMetadataManagerBeanTestPlugin",
- "metricDefinitions",
- asList("metric1")
- );
+ assertResourceTypeAssociationEquals("MetricServer2", "MeasurementMetadataManagerBeanTestPlugin",
+ "metricDefinitions", asList("metric1", "_AvailabilityType_"));
}
- @Test(groups = {"plugin.metadata", "Metrics.UpradePlugin"}, dependsOnMethods = {"upgradeMetricsPlugin"})
+ @Test(groups = { "plugin.metadata", "Metrics.UpradePlugin" }, dependsOnMethods = { "upgradeMetricsPlugin" })
public void changeTraitDefToMeasurementDef() {
MeasurementDefinition measurementDef = loadMeasurementDef("metric1", "MetricServer3");
- MeasurementDefinition expected = new MeasurementDefinition("metric1", MeasurementCategory.PERFORMANCE,
+ MeasurementDefinition expected = new MeasurementDefinition("metric1", MeasurementCategory.PERFORMANCE,
MeasurementUnits.MILLISECONDS, DataType.MEASUREMENT, NumericType.TRENDSUP, false, 30000, DisplayType.DETAIL);
expected.setRawNumericType(null);
expected.setDefaultInterval(30000);
@@ -132,12 +108,8 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
expected.setDisplayName("metric1");
expected.setDisplayOrder(1);
- AssertUtils.assertPropertiesMatch(
- "Failed to change trait definition to a measurement defintion",
- expected,
- measurementDef,
- asList("id", "resourceType")
- );
+ AssertUtils.assertPropertiesMatch("Failed to change trait definition to a measurement defintion", expected,
+ measurementDef, asList("id", "resourceType"));
MeasurementDefinition perMinuteDef = loadMeasurementDef("metric1", "MetricServer3", "metric1 per Minute");
expected.setDisplayName("metric1 per Minute");
@@ -148,29 +120,21 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
expected.setRawNumericType(measurementDef.getNumericType());
AssertUtils.assertPropertiesMatch(
- "Failed to create and persist per minute metric definition for updated metric definition",
- expected,
- perMinuteDef,
- asList("id", "resourceType")
- );
+ "Failed to create and persist per minute metric definition for updated metric definition", expected,
+ perMinuteDef, asList("id", "resourceType"));
}
- @Test(groups = {"plugin.metadata", "Metrics.UpradePlugin"}, dependsOnMethods = {"upgradeMetricsPlugin"})
+ @Test(groups = { "plugin.metadata", "Metrics.UpradePlugin" }, dependsOnMethods = { "upgradeMetricsPlugin" })
public void deleteMetricDefThatHasBeenRemovedFromResourceType() throws Exception {
- assertResourceTypeAssociationEquals(
- "MetricServer4",
- "MeasurementMetadataManagerBeanTestPlugin",
- "metricDefinitions",
- EMPTY_LIST
- );
+ assertResourceTypeAssociationEquals("MetricServer4", "MeasurementMetadataManagerBeanTestPlugin",
+ "metricDefinitions", asList("_AvailabilityType_"));
}
- @Test(groups = {"plugin.metadata", "Metrics.UpradePlugin"}, dependsOnMethods = {"upgradeMetricsPlugin"})
+ @Test(groups = { "plugin.metadata", "Metrics.UpradePlugin" }, dependsOnMethods = { "upgradeMetricsPlugin" })
public void deleteMetricDefsForResourceTypeThatIsRemoved() {
- List metricDefs = getEntityManager().createQuery(
- "from MeasurementDefinition m where m.name = :metric1Name or name = :metric2Name")
- .setParameter("metric1Name", "MetricServer5.metric1")
- .setParameter("metric2Name", "MetricServer5.metric3")
+ List metricDefs = getEntityManager()
+ .createQuery("from MeasurementDefinition m where m.name = :metric1Name or name = :metric2Name")
+ .setParameter("metric1Name", "MetricServer5.metric1").setParameter("metric2Name", "MetricServer5.metric3")
.getResultList();
assertEquals("Failed to delete metric definitions", 0, metricDefs.size());
@@ -181,15 +145,11 @@ public class MeasurementMetadataManagerBeanTest extends MetadataBeanTest {
}
MeasurementDefinition loadMeasurementDef(String name, String resourceType, String displayName) {
- return (MeasurementDefinition) getEntityManager().createQuery(
- "from MeasurementDefinition m " +
- "where m.name = :name and " +
- "m.displayName = :displayName and " +
- "m.resourceType.name = :resourceType")
- .setParameter("name", name)
- .setParameter("displayName", displayName)
- .setParameter("resourceType", resourceType)
- .getSingleResult();
+ return (MeasurementDefinition) getEntityManager()
+ .createQuery(
+ "from MeasurementDefinition m " + "where m.name = :name and " + "m.displayName = :displayName and "
+ + "m.resourceType.name = :resourceType").setParameter("name", name)
+ .setParameter("displayName", displayName).setParameter("resourceType", resourceType).getSingleResult();
}
}
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/test/UpdateMeasurementSubsystemTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/test/UpdateMeasurementSubsystemTest.java
index 0acd54c..d30fbf6 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/test/UpdateMeasurementSubsystemTest.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/test/UpdateMeasurementSubsystemTest.java
@@ -64,7 +64,8 @@ public class UpdateMeasurementSubsystemTest extends UpdatePluginMetadataTestBase
registerPlugin("update-v1_0.xml");
ResourceType server1 = getResourceType("testServer1");
Set<MeasurementDefinition> definitions1 = server1.getMetricDefinitions();
- assert definitions1.size() == 4 : "There should be 4 metrics for v1";
+ // for metric counts, add one for the built in AvailabilityType metric
+ assert definitions1.size() == 5 : "There should be 5 metrics for v1";
for (MeasurementDefinition def : definitions1) {
if (def.getDisplayName().equals("Three")) {
assert def.getDisplayType() == DisplayType.DETAIL : "DisplayType for Three should be Detail in v1";
@@ -83,7 +84,8 @@ public class UpdateMeasurementSubsystemTest extends UpdatePluginMetadataTestBase
ResourceType server2 = getResourceType("testServer1");
Set<MeasurementDefinition> definitions2 = server2.getMetricDefinitions();
- assert definitions2.size() == 4 : "There should be four metrics in v2";
+ // for metric counts, add one for the built in AvailabilityType metric
+ assert definitions2.size() == 5 : "There should be 5 metrics in v2";
boolean foundFour = false;
for (MeasurementDefinition def : definitions2) {
@@ -110,7 +112,8 @@ public class UpdateMeasurementSubsystemTest extends UpdatePluginMetadataTestBase
registerPlugin("update-v1_0.xml", "3.0");
ResourceType server3 = getResourceType("testServer1");
Set<MeasurementDefinition> definitions3 = server3.getMetricDefinitions();
- assert definitions3.size() == 4 : "There should be 4 metrics for v3";
+ // for metric counts, add one for the built in AvailabilityType metric
+ assert definitions3.size() == 5 : "There should be 5 metrics for v3";
for (MeasurementDefinition def : definitions3) {
if (def.getDisplayName().equals("Three")) {
assert def.getDisplayType() == DisplayType.DETAIL : "DisplayType for Three should be Detail in v3";
@@ -145,12 +148,14 @@ public class UpdateMeasurementSubsystemTest extends UpdatePluginMetadataTestBase
// Note, plugins are registered in new transactions. for tests, this means
// you can't do everything in a trans and roll back at the end. You must clean up
// manually.
+
+ // for metric counts, add one for the built in AvailabilityType metric
try {
{ // extra block for variable scoping purposes
registerPlugin("measurementDeletion-v1_0.xml");
ResourceType server = getResourceType("testServer1");
Set<MeasurementDefinition> def = server.getMetricDefinitions();
- assertEquals(4, def.size());
+ assertEquals(5, def.size());
}
{ // extra block for variable scoping purposes
@@ -158,14 +163,14 @@ public class UpdateMeasurementSubsystemTest extends UpdatePluginMetadataTestBase
ResourceType server = getResourceType("testServer1");
Set<MeasurementDefinition> def = server.getMetricDefinitions();
- assertEquals(0, def.size());
+ assertEquals(1, def.size());
}
{ // extra block for variable scoping purposes
registerPlugin("measurementDeletion-v1_0.xml", "3.0");
ResourceType server = getResourceType("testServer1");
Set<MeasurementDefinition> def = server.getMetricDefinitions();
- assertEquals(4, def.size());
+ assertEquals(5, def.size());
}
} finally {
// clean up
@@ -206,7 +211,8 @@ public class UpdateMeasurementSubsystemTest extends UpdatePluginMetadataTestBase
getPluginId(entityManager);
Set<MeasurementDefinition> definitions1 = server.getMetricDefinitions();
- assert definitions1.size() == 1;
+ // for metric counts, add one for the built in AvailabilityType metric
+ assert definitions1.size() == 2;
/*
* Create a Fake Resource and a MeasurementSchedule
12 years, 2 months
[rhq] Branch 'bug/747925' - 2 commits - modules/enterprise
by mazz
modules/enterprise/server/jar/pom.xml | 66 +++++++++++++++++++++++++++-------
1 file changed, 53 insertions(+), 13 deletions(-)
New commits:
commit fdf959368138670e5135bee7b7f6cb91b12673d1
Merge: ae6302c 49db235
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue Feb 28 15:15:33 2012 -0500
Merge remote-tracking branch 'origin/master' into bug/747925
commit 49db23558976f60ab1b7ed5714a09e0eb58d8ec5
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue Feb 28 15:14:58 2012 -0500
fix the maven test code in server/jar pom.xml so we don't run tests more than once when using -Dtest=
diff --git a/modules/enterprise/server/jar/pom.xml b/modules/enterprise/server/jar/pom.xml
index ac85d7d..018b3b4 100644
--- a/modules/enterprise/server/jar/pom.xml
+++ b/modules/enterprise/server/jar/pom.xml
@@ -709,19 +709,6 @@ Build-OS-Version=${os.version}
</configuration>
</execution>
- <execution>
- <id>dbTestsOnly</id>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <skipTests>${skipTests}</skipTests>
- <includes>
- <include>org/rhq/enterprise/server/db/**</include>
- </includes>
- <failIfNoTests>false</failIfNoTests>
- </configuration>
- </execution>
</executions>
</plugin>
@@ -784,6 +771,59 @@ Build-OS-Version=${os.version}
<profiles>
<profile>
+ <!-- only if we are not running an individual set of tests via -Dtest do we do this -->
+ <id>no-individual-test</id>
+ <activation>
+ <property><name>!test</name></property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <!-- Everything but the web service tests, this is the standard test execution -->
+ <configuration>
+ <skipTests>true</skipTests>
+ <excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
+ <groups>${rhq.testng.includedGroups}</groups>
+ <properties>
+ <property>
+ <name>listener</name>
+ <value>org.rhq.test.testng.StdoutReporter</value>
+ </property>
+ </properties>
+ <systemPropertyVariables>
+ <embeddedDeployment>true</embeddedDeployment>
+ <deploymentDirectory>target/classes</deploymentDirectory>
+ <hibernate.dialect>${rhq.test.ds.hibernate-dialect}</hibernate.dialect>
+ <clean.db>${clean.db}</clean.db>
+ <log4j.configDebug>false</log4j.configDebug>
+ </systemPropertyVariables>
+ <additionalClasspathElements>
+ <!-- The below is required for tests to run against Oracle. -->
+ <additionalClasspathElement>${settings.localRepository}/com/oracle/ojdbc6/${ojdbc6.version}/ojdbc6-${ojdbc6.version}.jar</additionalClasspathElement>
+ </additionalClasspathElements>
+ </configuration>
+ <executions>
+ <execution>
+ <id>dbTestsOnly</id>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skipTests>${skipTests}</skipTests>
+ <includes>
+ <include>org/rhq/enterprise/server/db/**</include>
+ </includes>
+ <failIfNoTests>false</failIfNoTests>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
<id>dev</id>
<properties>
12 years, 2 months
[rhq] modules/enterprise
by mazz
modules/enterprise/server/jar/pom.xml | 66 +++++++++++++++++++++++++++-------
1 file changed, 53 insertions(+), 13 deletions(-)
New commits:
commit 49db23558976f60ab1b7ed5714a09e0eb58d8ec5
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue Feb 28 15:14:58 2012 -0500
fix the maven test code in server/jar pom.xml so we don't run tests more than once when using -Dtest=
diff --git a/modules/enterprise/server/jar/pom.xml b/modules/enterprise/server/jar/pom.xml
index ac85d7d..018b3b4 100644
--- a/modules/enterprise/server/jar/pom.xml
+++ b/modules/enterprise/server/jar/pom.xml
@@ -709,19 +709,6 @@ Build-OS-Version=${os.version}
</configuration>
</execution>
- <execution>
- <id>dbTestsOnly</id>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <skipTests>${skipTests}</skipTests>
- <includes>
- <include>org/rhq/enterprise/server/db/**</include>
- </includes>
- <failIfNoTests>false</failIfNoTests>
- </configuration>
- </execution>
</executions>
</plugin>
@@ -784,6 +771,59 @@ Build-OS-Version=${os.version}
<profiles>
<profile>
+ <!-- only if we are not running an individual set of tests via -Dtest do we do this -->
+ <id>no-individual-test</id>
+ <activation>
+ <property><name>!test</name></property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <!-- Everything but the web service tests, this is the standard test execution -->
+ <configuration>
+ <skipTests>true</skipTests>
+ <excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
+ <groups>${rhq.testng.includedGroups}</groups>
+ <properties>
+ <property>
+ <name>listener</name>
+ <value>org.rhq.test.testng.StdoutReporter</value>
+ </property>
+ </properties>
+ <systemPropertyVariables>
+ <embeddedDeployment>true</embeddedDeployment>
+ <deploymentDirectory>target/classes</deploymentDirectory>
+ <hibernate.dialect>${rhq.test.ds.hibernate-dialect}</hibernate.dialect>
+ <clean.db>${clean.db}</clean.db>
+ <log4j.configDebug>false</log4j.configDebug>
+ </systemPropertyVariables>
+ <additionalClasspathElements>
+ <!-- The below is required for tests to run against Oracle. -->
+ <additionalClasspathElement>${settings.localRepository}/com/oracle/ojdbc6/${ojdbc6.version}/ojdbc6-${ojdbc6.version}.jar</additionalClasspathElement>
+ </additionalClasspathElements>
+ </configuration>
+ <executions>
+ <execution>
+ <id>dbTestsOnly</id>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skipTests>${skipTests}</skipTests>
+ <includes>
+ <include>org/rhq/enterprise/server/db/**</include>
+ </includes>
+ <failIfNoTests>false</failIfNoTests>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
<id>dev</id>
<properties>
12 years, 2 months
[rhq] Branch 'jshaughn/avail' - modules/enterprise
by Jay Shaughnessy
modules/enterprise/gui/coregui/src/main/webapp/images/types/Server_disabled_16.png |binary
modules/enterprise/gui/coregui/src/main/webapp/images/types/Server_disabled_24.png |binary
modules/enterprise/gui/coregui/src/main/webapp/images/types/Service_disabled_16.png |binary
modules/enterprise/gui/coregui/src/main/webapp/images/types/Service_disabled_24.png |binary
modules/enterprise/gui/coregui/src/main/webapp/images/types/Service_unknown_16.png |binary
modules/enterprise/gui/coregui/src/main/webapp/images/types/Service_unknown_24.png |binary
6 files changed
New commits:
commit 3f82afac2116d9f8306d4c0091cb921c4c5cc634
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue Feb 28 13:55:44 2012 -0500
Add new avail (disabled,unknown) badged category icons for resources.
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/types/Server_disabled_16.png b/modules/enterprise/gui/coregui/src/main/webapp/images/types/Server_disabled_16.png
index 73b5f6b..70bd8f0 100644
Binary files a/modules/enterprise/gui/coregui/src/main/webapp/images/types/Server_disabled_16.png and b/modules/enterprise/gui/coregui/src/main/webapp/images/types/Server_disabled_16.png differ
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/types/Server_disabled_24.png b/modules/enterprise/gui/coregui/src/main/webapp/images/types/Server_disabled_24.png
index 3a56b8d..3b3314b 100644
Binary files a/modules/enterprise/gui/coregui/src/main/webapp/images/types/Server_disabled_24.png and b/modules/enterprise/gui/coregui/src/main/webapp/images/types/Server_disabled_24.png differ
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/types/Service_disabled_16.png b/modules/enterprise/gui/coregui/src/main/webapp/images/types/Service_disabled_16.png
index a925aaf..9cf19f3 100644
Binary files a/modules/enterprise/gui/coregui/src/main/webapp/images/types/Service_disabled_16.png and b/modules/enterprise/gui/coregui/src/main/webapp/images/types/Service_disabled_16.png differ
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/types/Service_disabled_24.png b/modules/enterprise/gui/coregui/src/main/webapp/images/types/Service_disabled_24.png
index fc8583f..27cbd0b 100644
Binary files a/modules/enterprise/gui/coregui/src/main/webapp/images/types/Service_disabled_24.png and b/modules/enterprise/gui/coregui/src/main/webapp/images/types/Service_disabled_24.png differ
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/types/Service_unknown_16.png b/modules/enterprise/gui/coregui/src/main/webapp/images/types/Service_unknown_16.png
index a925aaf..ef6a8c2 100644
Binary files a/modules/enterprise/gui/coregui/src/main/webapp/images/types/Service_unknown_16.png and b/modules/enterprise/gui/coregui/src/main/webapp/images/types/Service_unknown_16.png differ
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/types/Service_unknown_24.png b/modules/enterprise/gui/coregui/src/main/webapp/images/types/Service_unknown_24.png
index 6c37504..d27e9f8 100644
Binary files a/modules/enterprise/gui/coregui/src/main/webapp/images/types/Service_unknown_24.png and b/modules/enterprise/gui/coregui/src/main/webapp/images/types/Service_unknown_24.png differ
12 years, 2 months