[rhq] Branch 'as7plugin' - 3 commits - modules/plugins
by Heiko W. Rupp
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASUploadConnection.java | 21 +-
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/Domain2Descriptor.java | 3
modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml | 80 ++++++++++
modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/UploadAndDeployTest.java | 30 +++
4 files changed, 119 insertions(+), 15 deletions(-)
New commits:
commit 33f3c425d2c908379eb4a03f225690e214280287
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Mon May 9 17:02:00 2011 +0200
Fix uploading of deployments
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASUploadConnection.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASUploadConnection.java
index b369a95..80e8ea4 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASUploadConnection.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASUploadConnection.java
@@ -25,6 +25,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.URL;
@@ -42,7 +43,9 @@ import org.codehaus.jackson.map.ObjectMapper;
*/
public class ASUploadConnection {
- private static final String BOUNDARY = "-----------------------------261773107125236";
+ private static final String BOUNDARY_PARAM = "NeAG1QNIHHOyB5joAS7Rox!!";
+
+ private static final String BOUNDARY = "--" + BOUNDARY_PARAM;
private static final String CRLF = "\r\n";
@@ -71,6 +74,7 @@ public class ASUploadConnection {
connection.setDoInput(true);
connection.setDoOutput(true);
connection.setRequestMethod(POST_REQUEST_METHOD);
+ connection.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + BOUNDARY_PARAM);
// Grab the test WAR file and get a stream to its contents to be included in the POST.
os = new BufferedOutputStream(connection.getOutputStream());
@@ -92,6 +96,7 @@ public class ASUploadConnection {
os.flush();
int code = connection.getResponseCode();
+ System.err.println("Response code " + code);
if (code==500)
is = connection.getErrorStream();
else
@@ -128,15 +133,13 @@ public class ASUploadConnection {
}
- private byte[] buildPostRequestHeader(String fileName) {
+ private byte[] buildPostRequestHeader(String fileName) throws UnsupportedEncodingException {
final StringBuilder builder = new StringBuilder();
- builder.append(buildPostRequestHeaderSection("form-data; name=\"test1\"", "", "test1"));
- builder.append(buildPostRequestHeaderSection("form-data; name=\"test2\"", "", "test2"));
builder.append(buildPostRequestHeaderSection("form-data; name=\"file\"; filename=\""+fileName+"\"", "application/octet-stream", ""));
- return builder.toString().getBytes();
+ return builder.toString().getBytes("US-ASCII");
}
- private String buildPostRequestHeaderSection(final String contentDisposition, final String contentType, final String content) {
+ private StringBuilder buildPostRequestHeaderSection(final String contentDisposition, final String contentType, final String content) {
final StringBuilder builder = new StringBuilder();
builder.append(BOUNDARY);
builder.append(CRLF);
@@ -152,16 +155,16 @@ public class ASUploadConnection {
builder.append(content);
}
builder.append(CRLF);
- return builder.toString();
+ return builder;
}
- private byte[] buildPostRequestFooter() {
+ private byte[] buildPostRequestFooter() throws UnsupportedEncodingException{
final StringBuilder builder = new StringBuilder();
builder.append(CRLF);
builder.append(BOUNDARY);
builder.append("--");
builder.append(CRLF);
- return builder.toString().getBytes();
+ return builder.toString().getBytes("US-ASCII");
}
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index 48b0094..50939ae 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -531,9 +531,9 @@
<c:simple-property name="bean-validation-enabled" required="true" type="boolean" readOnly="true"
description="Specify whether bean validation is enabled"/>
<c:simple-property name="archive-validation-enabled" type="boolean" readOnly="true" description="Enabling the validation"/>
- <c:simple-property name="archive-validation-fail-on-error" type="boolean" readOnly="true"
+ <c:simple-property name="archive-validation-fail-on-error" type="boolean" readOnly="true" default="true"
description="Should an archive validation error report fail the deployment. Default: true"/>
- <c:simple-property name="archive-validation-fail-on-warn" type="boolean" readOnly="true"
+ <c:simple-property name="archive-validation-fail-on-warn" type="boolean" readOnly="true" default="false"
description="Should an archive validation warning report fail the deployment. Default: false"/>
<c:simple-property name="cached-connection-manager-debug" type="boolean" readOnly="true"
description="enable/disable debug information logging for cached connection manager"/>
diff --git a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/UploadAndDeployTest.java b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/UploadAndDeployTest.java
index e4e9d70..b1eb277 100644
--- a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/UploadAndDeployTest.java
+++ b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/UploadAndDeployTest.java
@@ -30,6 +30,7 @@ import org.testng.annotations.Test;
import org.rhq.modules.plugins.jbossas7.json.CompositeOperation;
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;
/**
* Test uploading and deploying to the domain
@@ -46,6 +47,17 @@ public class UploadAndDeployTest {
private static final int DC_HTTP_PORT = 9990;
@Test(timeOut = 60*1000L, enabled = true)
+ public void testUploadOnly() throws Exception {
+
+ String bytes_value = prepare();
+
+ assert bytes_value != null;
+
+ System.out.println("sha: " + bytes_value);
+
+ }
+
+ @Test(timeOut = 60*1000L, enabled = true)
public void testUploadIndividualSteps() throws Exception {
String bytes_value = prepare();
@@ -79,7 +91,7 @@ public class UploadAndDeployTest {
System.out.println("Add to server group done: " + ret);
System.out.flush();
- assert ret.has("outcome") : "Ret not valied " + ret.toString();
+ assert ret.has("outcome") : "Ret not valid " + ret.toString();
assert ret.get("outcome").getTextValue().equals("success") : "add to sg was no success " + ret.getTextValue();
@@ -88,7 +100,7 @@ public class UploadAndDeployTest {
Operation undeploy = new Operation("remove",serverGroupAddress);
ret = connection.executeRaw(undeploy);
- assert ret.has("outcome") : "Ret not valied " + ret.toString();
+ assert ret.has("outcome") : "Ret not valid " + ret.toString();
assert ret.get("outcome").getTextValue().equals("success") : "remove from sg was no success " + ret.getTextValue();
@@ -97,7 +109,7 @@ public class UploadAndDeployTest {
Operation remove = new Operation("remove",deploymentsAddress);
ret = connection.executeRaw(remove);
- assert ret.has("outcome") : "Ret not valied " + ret.toString();
+ assert ret.has("outcome") : "Ret not valid " + ret.toString();
assert ret.get("outcome").getTextValue().equals("success") : "remove from domain was no success " + ret.getTextValue();
System.out.flush();
@@ -156,13 +168,19 @@ public class UploadAndDeployTest {
InputStream fis = getClass().getClassLoader().getResourceAsStream(UPLOAD_FILE);
- int b;
- while ((b = fis.read())!=-1) {
- os.write(b);
+ final byte[] buffer = new byte[1024];
+ int numRead = 0;
+
+ while(numRead > -1) {
+ numRead = fis.read(buffer);
+ if(numRead > 0) {
+ os.write(buffer,0,numRead);
+ }
}
fis.close();
JsonNode node = conn.finishUpload();
System.out.println(node);
+ assert node != null : "No result from upload - node was null";
assert node.has("outcome") : "No outcome from upload";
String outcome = node.get("outcome").getTextValue();
assert outcome.equals("success") : "Upload was no success" + outcome;
commit 2f14177fb1381441fafb767076439f1e401d15bc
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Fri May 6 11:24:52 2011 +0200
Add more subsystems
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index 04686c4..48b0094 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -507,6 +507,42 @@
</server>
+ <server name="General JCA connectors"
+ discovery="SubsystemDiscovery"
+ class="BaseComponent"
+ singleton="true"
+ description="General settings of the JCA engine. Not nexessarily for end-users"
+ >
+
+ <runs-inside>
+ <parent-resource-type name="Profile" plugin="jboss-as-7"/>
+ <parent-resource-type name="JBossAS7-Standalone" plugin="jboss-as-7"/>
+ </runs-inside>
+
+ <plugin-configuration>
+ <c:simple-property name="path" readOnly="true" default="subsystem=connector"/>
+ </plugin-configuration>
+
+ <resource-configuration>
+ <c:simple-property name="default-workmanager-short-running-thread-pool" required="true" type="string" readOnly="true"
+ description="Specify the name of short running thread pool"/>
+ <c:simple-property name="default-workmanager-long-running-thread-pool" required="true" type="string" readOnly="true"
+ description="Specify the name of long running thread pool"/>
+ <c:simple-property name="bean-validation-enabled" required="true" type="boolean" readOnly="true"
+ description="Specify whether bean validation is enabled"/>
+ <c:simple-property name="archive-validation-enabled" type="boolean" readOnly="true" description="Enabling the validation"/>
+ <c:simple-property name="archive-validation-fail-on-error" type="boolean" readOnly="true"
+ description="Should an archive validation error report fail the deployment. Default: true"/>
+ <c:simple-property name="archive-validation-fail-on-warn" type="boolean" readOnly="true"
+ description="Should an archive validation warning report fail the deployment. Default: false"/>
+ <c:simple-property name="cached-connection-manager-debug" type="boolean" readOnly="true"
+ description="enable/disable debug information logging for cached connection manager"/>
+ <c:simple-property name="cached-connection-manager-error" type="boolean" readOnly="true"
+ description="enable/disable error information logging for cached connection manager"/>
+ </resource-configuration>
+
+ </server>
+
<server name="Datasources"
discovery="SubsystemDiscovery"
class="BaseComponent"
@@ -629,6 +665,23 @@
</server>
+ <server name="ResourceAdapters"
+ discovery="SubsystemDiscovery"
+ class="BaseComponent"
+ singleton="true"
+ >
+
+ <runs-inside>
+ <parent-resource-type name="Profile" plugin="jboss-as-7"/>
+ <parent-resource-type name="JBossAS7-Standalone" plugin="jboss-as-7"/>
+ </runs-inside>
+
+ <plugin-configuration>
+ <c:simple-property name="path" readOnly="true" default="subsystem=resource-adapters"/>
+ </plugin-configuration>
+ </server>
+
+
<server name="Threads"
discovery="SubsystemDiscovery"
class="BaseComponent"
@@ -689,6 +742,33 @@
</server>
+ <server name="Webservices"
+ discovery="SubsystemDiscovery"
+ class="BaseComponent"
+ singleton="true"
+ >
+
+ <runs-inside>
+ <parent-resource-type name="Profile" plugin="jboss-as-7"/>
+ <parent-resource-type name="JBossAS7-Standalone" plugin="jboss-as-7"/>
+ </runs-inside>
+
+ <plugin-configuration>
+ <c:simple-property name="path" readOnly="true" default="subsystem=webservices"/>
+ </plugin-configuration>
+
+ <resource-configuration>
+ <c:simple-property name="modify-soap-address" required="true" type="boolean" readOnly="true"
+ description="Whether the soap address can be modified."/>
+ <c:simple-property name="webservice-host" required="true" type="string" readOnly="true"
+ description="The WSDL, that is a required deployment artifact for an endpoint, has a &soap:address> element which points to the location of the endpoint. JBoss supports rewriting of that SOAP address. If the content of &soap:address> is a valid URL, JBossWS will not rewrite it unless 'modifySOAPAddress' is true. If the content of &soap:address> is not a valid URL, JBossWS will rewrite it using the attribute values given below. If 'webServiceHost' is set to 'jbossws.undefined.host', JBossWS uses requesters host when rewriting the &soap:address>"/>
+ <c:simple-property name="webservice-port" type="integer" readOnly="true"
+ description="The non-secure port that will be used for rewriting the SOAP address. If absent the port will be identified by querying the list of installed connectors."/>
+ <c:simple-property name="webservice-secure-port" type="integer" readOnly="true"
+ description="The non-secure port that will be used for rewriting the SOAP address. If absent the port will be identified by querying the list of installed connectors."/>
+ </resource-configuration>
+ </server>
+
<service name="NetworkInterface"
discovery="SubsystemDiscovery"
class="BaseComponent"
commit fa33a38abec2ac915f128af5a9e262edc36c2f3f
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu May 5 12:07:00 2011 +0200
Prevent a possible NPE.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/Domain2Descriptor.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/Domain2Descriptor.java
index 8e42fdf..e61ff3c 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/Domain2Descriptor.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/Domain2Descriptor.java
@@ -99,6 +99,9 @@ public class Domain2Descriptor {
}
private void createProperties(boolean doMetrcis, Map<String, Object> attributesMap, int indent) {
+ if (attributesMap==null)
+ return;
+
for (Map.Entry<String,Object> entry : attributesMap.entrySet()) {
Map<String,Object> props = (Map<String, Object>) entry.getValue();
13 years
[rhq] etc/apt etc/samples modules/cli-tests modules/common modules/core modules/enterprise modules/helpers modules/jopr modules/plugins modules/pom.xml modules/test-utils pom.xml
by ips
etc/apt/pom.xml | 2 +-
etc/samples/perspectives/sample-perspective/app/pom.xml | 2 +-
etc/samples/perspectives/sample-perspective/perspective/pom.xml | 2 +-
etc/samples/skeleton-plugin/pom.xml | 2 +-
modules/cli-tests/pom.xml | 2 +-
modules/common/ant-bundle/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/domain/pom.xml | 2 +-
modules/core/gui/pom.xml | 2 +-
modules/core/native-system/pom.xml | 2 +-
modules/core/plugin-api/pom.xml | 2 +-
modules/core/plugin-container/pom.xml | 2 +-
modules/core/plugin-validator/pom.xml | 2 +-
modules/core/plugindoc/pom.xml | 2 +-
modules/core/pom.xml | 2 +-
modules/core/util/pom.xml | 2 +-
modules/enterprise/agent/pom.xml | 2 +-
modules/enterprise/agentupdate/pom.xml | 2 +-
modules/enterprise/binding/pom.xml | 4 ++--
modules/enterprise/comm/pom.xml | 2 +-
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/installer-war/pom.xml | 2 +-
modules/enterprise/gui/pom.xml | 2 +-
modules/enterprise/gui/portal-war/pom.xml | 2 +-
modules/enterprise/gui/webdav-war/pom.xml | 2 +-
modules/enterprise/pom.xml | 2 +-
modules/enterprise/remoting/cli/pom.xml | 2 +-
modules/enterprise/remoting/client-api/pom.xml | 2 +-
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/jar/pom.xml | 2 +-
modules/enterprise/server/plugins/alert-cli/pom.xml | 4 ++--
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-scriptlang/pom.xml | 2 +-
modules/enterprise/server/plugins/alert-sms/pom.xml | 2 +-
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/cloud/pom.xml | 2 +-
modules/enterprise/server/plugins/cobbler/pom.xml | 4 ++--
modules/enterprise/server/plugins/disk/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/perspectives/policy/app/pom.xml | 2 +-
modules/enterprise/server/plugins/perspectives/policy/perspective/pom.xml | 2 +-
modules/enterprise/server/plugins/perspectives/policy/pom.xml | 2 +-
modules/enterprise/server/plugins/pom.xml | 2 +-
modules/enterprise/server/plugins/rhnhosted/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/perftest-support/pom.xml | 4 ++--
modules/helpers/pom.xml | 2 +-
modules/helpers/rtfilter/pom.xml | 2 +-
modules/jopr/pom.xml | 2 +-
modules/jopr/tools/jbas5-plugin-descriptor-gen/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/hardware/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/iptables/pom.xml | 2 +-
modules/plugins/irc/pom.xml | 2 +-
modules/plugins/jboss-as-5/pom.xml | 2 +-
modules/plugins/jboss-as/pom.xml | 2 +-
modules/plugins/jboss-cache-v3/pom.xml | 2 +-
modules/plugins/jboss-cache/pom.xml | 2 +-
modules/plugins/jdbctrace/pom.xml | 2 +-
modules/plugins/jira/pom.xml | 2 +-
modules/plugins/jmx/pom.xml | 2 +-
modules/plugins/kickstart/pom.xml | 2 +-
modules/plugins/lsof/pom.xml | 2 +-
modules/plugins/mysql/pom.xml | 2 +-
modules/plugins/netservices/pom.xml | 2 +-
modules/plugins/onewire/pom.xml | 7 +++++--
modules/plugins/oracle/pom.xml | 2 +-
modules/plugins/pattern-generator/pom.xml | 6 +++---
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/raw-config-test/pom.xml | 2 +-
modules/plugins/rhq-agent/pom.xml | 2 +-
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/services/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 +-
pom.xml | 2 +-
139 files changed, 163 insertions(+), 160 deletions(-)
New commits:
commit de100909221c762ccdbafef47531661379045cf1
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Fri May 6 17:11:45 2011 -0400
upgrade version from 4.0.0-SNAPSHOT to 4.1.0-SNAPSHOT in all poms
diff --git a/etc/apt/pom.xml b/etc/apt/pom.xml
index 0fe6a92..65136e1 100644
--- a/etc/apt/pom.xml
+++ b/etc/apt/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/etc/samples/perspectives/sample-perspective/app/pom.xml b/etc/samples/perspectives/sample-perspective/app/pom.xml
index 67382f9..ced290d 100644
--- a/etc/samples/perspectives/sample-perspective/app/pom.xml
+++ b/etc/samples/perspectives/sample-perspective/app/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/etc/samples/perspectives/sample-perspective/perspective/pom.xml b/etc/samples/perspectives/sample-perspective/perspective/pom.xml
index 1ffe65f..963a8ca 100644
--- a/etc/samples/perspectives/sample-perspective/perspective/pom.xml
+++ b/etc/samples/perspectives/sample-perspective/perspective/pom.xml
@@ -10,7 +10,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/etc/samples/skeleton-plugin/pom.xml b/etc/samples/skeleton-plugin/pom.xml
index 8055bc5..b72c93d 100644
--- a/etc/samples/skeleton-plugin/pom.xml
+++ b/etc/samples/skeleton-plugin/pom.xml
@@ -15,7 +15,7 @@
<description>A template for building a custom RHQ Agent plugin</description>
<properties>
- <rhq.version>4.0.0-SNAPSHOT</rhq.version>
+ <rhq.version>4.1.0-SNAPSHOT</rhq.version>
</properties>
<dependencies>
diff --git a/modules/cli-tests/pom.xml b/modules/cli-tests/pom.xml
index f714d03..b080025 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 71f43e7..1eb86ef 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/common/filetemplate-bundle/pom.xml b/modules/common/filetemplate-bundle/pom.xml
index 1c84528..352de33 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/common/jboss-as/pom.xml b/modules/common/jboss-as/pom.xml
index 110c8a1..184c5ad 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/common/pom.xml b/modules/common/pom.xml
index bb61b03..98d57a7 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 e5ea9a1..40201ad 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 f52e92d..5a8b356 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index 64af8e7..063f2ce 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/domain/pom.xml b/modules/core/domain/pom.xml
index 2b84a8b..2f7c4be 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/gui/pom.xml b/modules/core/gui/pom.xml
index 884e360..bb4dc2c 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 eb11f1a..7d83f3d 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 18846ad..fc78701 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 ad82fe0..367e1fa 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/plugin-validator/pom.xml b/modules/core/plugin-validator/pom.xml
index 5adfabf..f2953a6 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/plugindoc/pom.xml b/modules/core/plugindoc/pom.xml
index 2e5c467..24243e3 100644
--- a/modules/core/plugindoc/pom.xml
+++ b/modules/core/plugindoc/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index 2bafeac..bc41a9b 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/core/util/pom.xml b/modules/core/util/pom.xml
index a080670..4b50b78 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/agent/pom.xml b/modules/enterprise/agent/pom.xml
index 76c9071..08e6c9f 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/agentupdate/pom.xml b/modules/enterprise/agentupdate/pom.xml
index 2d1ea0b..8b7ffe8 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/binding/pom.xml b/modules/enterprise/binding/pom.xml
index 5b4ee27..a0497d0 100644
--- a/modules/enterprise/binding/pom.xml
+++ b/modules/enterprise/binding/pom.xml
@@ -3,11 +3,11 @@
<parent>
<artifactId>rhq-enterprise-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-script-bindings</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.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 c029f62..f424704 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 4d79169..cebd439 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 877f9f5..b66da2c 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 57a30b9..db7d757 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 b93f878..9352745 100644
--- a/modules/enterprise/gui/coregui/pom.xml
+++ b/modules/enterprise/gui/coregui/pom.xml
@@ -6,7 +6,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.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 7ea2401..47c257c 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/gui/pom.xml b/modules/enterprise/gui/pom.xml
index f81b4c2..8e8cf66 100644
--- a/modules/enterprise/gui/pom.xml
+++ b/modules/enterprise/gui/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.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 808b267..4e2ac9f 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/gui/webdav-war/pom.xml b/modules/enterprise/gui/webdav-war/pom.xml
index 2fc4e3f..64e56bf 100644
--- a/modules/enterprise/gui/webdav-war/pom.xml
+++ b/modules/enterprise/gui/webdav-war/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/pom.xml b/modules/enterprise/pom.xml
index b6461ea..01fb7f6 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 370f509..df15270 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 872ac37..1a1c88c 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 1630e51..3fe07b7 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/remoting/pom.xml b/modules/enterprise/remoting/pom.xml
index b7a9a46..f4b1866 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 097e3c2..0792734 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 fc4d0e7..c57eaba 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-server-client-api</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.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 2376311..1aebae1 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 b4116aa..7329bb5 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 220eee6..4d6ee84 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 c6ebed5..307570e 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 96b129a..b380393 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>alert-cli</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.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 54891ae..e1e1890 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq.server</groupId>
<artifactId>alert-email</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.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 d9e695c..1b609e1 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-irc</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.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 a270432..1a27831 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-log4j</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.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 3ebc711..ab68d6b 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-microblog</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.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 21a353d..0adccaf 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-mobicents</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.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 8be5518..2c9bcfa 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-operations</artifactId>
<packaging>jar</packaging>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.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 390b329..06bab65 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-roles</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
<name>RHQ Enterprise Server Roles Alert Plugin</name>
diff --git a/modules/enterprise/server/plugins/alert-scriptlang/pom.xml b/modules/enterprise/server/plugins/alert-scriptlang/pom.xml
index 6bdbfe5..5eb7f65 100644
--- a/modules/enterprise/server/plugins/alert-scriptlang/pom.xml
+++ b/modules/enterprise/server/plugins/alert-scriptlang/pom.xml
@@ -8,7 +8,7 @@
<parent>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/alert-sms/pom.xml b/modules/enterprise/server/plugins/alert-sms/pom.xml
index 0bd8e5e..097de47 100644
--- a/modules/enterprise/server/plugins/alert-sms/pom.xml
+++ b/modules/enterprise/server/plugins/alert-sms/pom.xml
@@ -8,7 +8,7 @@
<parent>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/alert-snmp/pom.xml b/modules/enterprise/server/plugins/alert-snmp/pom.xml
index 7b494d7..3763c54 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-snmp</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.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 635aa9c..bb595b5 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-subject</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.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 13260a0..c4e59b2 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/cloud/pom.xml b/modules/enterprise/server/plugins/cloud/pom.xml
index b66ad28..d7d4b82 100644
--- a/modules/enterprise/server/plugins/cloud/pom.xml
+++ b/modules/enterprise/server/plugins/cloud/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/modules/enterprise/server/plugins/cobbler/pom.xml b/modules/enterprise/server/plugins/cobbler/pom.xml
index b58a7ae..381f64c 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>rhq-serverplugin-cobbler</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.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 34f0e08..403ef41 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 ebf0154..ad1c570 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 e3c202b..0d2bf4b 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>groovy-script-server-plugin</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.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 659622f..dacaec2 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 bb8019d..9a51242 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>packagetype-cli</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.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 f695982..f73ecb8 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 287d62e..c2d5c7e 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
<relativePath>../../../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/plugins/perspectives/policy/app/pom.xml b/modules/enterprise/server/plugins/perspectives/policy/app/pom.xml
index 2ddc3d6..80180de 100644
--- a/modules/enterprise/server/plugins/perspectives/policy/app/pom.xml
+++ b/modules/enterprise/server/plugins/perspectives/policy/app/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
<relativePath>../../../../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/plugins/perspectives/policy/perspective/pom.xml b/modules/enterprise/server/plugins/perspectives/policy/perspective/pom.xml
index f789155..72c885e 100644
--- a/modules/enterprise/server/plugins/perspectives/policy/perspective/pom.xml
+++ b/modules/enterprise/server/plugins/perspectives/policy/perspective/pom.xml
@@ -10,7 +10,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
<relativePath>../../../../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/plugins/perspectives/policy/pom.xml b/modules/enterprise/server/plugins/perspectives/policy/pom.xml
index ef5dc7a..28788d8 100644
--- a/modules/enterprise/server/plugins/perspectives/policy/pom.xml
+++ b/modules/enterprise/server/plugins/perspectives/policy/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.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 2ebb23e..54b6447 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/plugins/rhnhosted/pom.xml b/modules/enterprise/server/plugins/rhnhosted/pom.xml
index 1c8d17c..04df0b8 100644
--- a/modules/enterprise/server/plugins/rhnhosted/pom.xml
+++ b/modules/enterprise/server/plugins/rhnhosted/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/url/pom.xml b/modules/enterprise/server/plugins/url/pom.xml
index 56adc17..79ccf2b 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 3ec9918..6711905 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 f22634e..ce8468c 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/pom.xml b/modules/enterprise/server/pom.xml
index 701ed39..591642d 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 94b88bb..05cb339 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 b1c400f..00344d4 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 4ed8677..2377858 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 5dfa3a0..90c0da6 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/helpers/bundleGen/pom.xml b/modules/helpers/bundleGen/pom.xml
index 49b64f7..9e80f1f 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq.helpers</groupId>
<artifactId>bundleGen</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
<build>
<plugins>
diff --git a/modules/helpers/perftest-support/pom.xml b/modules/helpers/perftest-support/pom.xml
index b3085a3..e488bb0 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq.helpers</groupId>
<artifactId>perftest-support</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.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 15126b3..8b4892a 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/helpers/rtfilter/pom.xml b/modules/helpers/rtfilter/pom.xml
index 612f9cd..417a3df 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/jopr/pom.xml b/modules/jopr/pom.xml
index 4ee8745..10eba8f 100644
--- a/modules/jopr/pom.xml
+++ b/modules/jopr/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/jopr/tools/jbas5-plugin-descriptor-gen/pom.xml b/modules/jopr/tools/jbas5-plugin-descriptor-gen/pom.xml
index daadb99..6a63c06 100644
--- a/modules/jopr/tools/jbas5-plugin-descriptor-gen/pom.xml
+++ b/modules/jopr/tools/jbas5-plugin-descriptor-gen/pom.xml
@@ -9,7 +9,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/plugins/aliases/pom.xml b/modules/plugins/aliases/pom.xml
index 4e89419..9bf41dc 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 887eb25..ff8c753 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/apache/pom.xml b/modules/plugins/apache/pom.xml
index 0cfa72c..0c60643 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/augeas/pom.xml b/modules/plugins/augeas/pom.xml
index 48528ba..66d35d1 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/byteman/pom.xml b/modules/plugins/byteman/pom.xml
index d4111a3..46bcb55 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/cobbler/pom.xml b/modules/plugins/cobbler/pom.xml
index bfd354f..3c7dcb5 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/cron/pom.xml b/modules/plugins/cron/pom.xml
index eaf87a7..07fed71 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/database/pom.xml b/modules/plugins/database/pom.xml
index 4b0ec48..6c1812b 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 32503ea..c1e0a3d 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/grub/pom.xml b/modules/plugins/grub/pom.xml
index 02f0c58..049fa1d 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/hadoop/pom.xml b/modules/plugins/hadoop/pom.xml
index 4179f3d..840e619 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/hardware/pom.xml b/modules/plugins/hardware/pom.xml
index 40133b6..0f54830 100644
--- a/modules/plugins/hardware/pom.xml
+++ b/modules/plugins/hardware/pom.xml
@@ -6,7 +6,7 @@
<parent>
<artifactId>rhq-plugins-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/hibernate/pom.xml b/modules/plugins/hibernate/pom.xml
index 1775ae1..e482d30 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/hosts/pom.xml b/modules/plugins/hosts/pom.xml
index e9f147d..6a2019b 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/hudson/pom.xml b/modules/plugins/hudson/pom.xml
index 71c974a..6a55a7d 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-hudson-plugin</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.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 b58b28c..2cdc32a 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/iptables/pom.xml b/modules/plugins/iptables/pom.xml
index ce6d7b8..0772067 100644
--- a/modules/plugins/iptables/pom.xml
+++ b/modules/plugins/iptables/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/irc/pom.xml b/modules/plugins/irc/pom.xml
index df8ea6b..edf12ea 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 1e9183e..7d0fdcc 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jboss-as/pom.xml b/modules/plugins/jboss-as/pom.xml
index 94e111a..57c8bb3 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 070ed5e..1d1e3aa 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 4d15790..ae06793 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jdbctrace/pom.xml b/modules/plugins/jdbctrace/pom.xml
index 7ef747c..6e2f30f 100644
--- a/modules/plugins/jdbctrace/pom.xml
+++ b/modules/plugins/jdbctrace/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/jira/pom.xml b/modules/plugins/jira/pom.xml
index 0ab721e..2b7494a 100644
--- a/modules/plugins/jira/pom.xml
+++ b/modules/plugins/jira/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/jmx/pom.xml b/modules/plugins/jmx/pom.xml
index 57d44c0..1daf86d 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/kickstart/pom.xml b/modules/plugins/kickstart/pom.xml
index dd0035e..dc87ed7 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/lsof/pom.xml b/modules/plugins/lsof/pom.xml
index 3875676..e5f457e 100644
--- a/modules/plugins/lsof/pom.xml
+++ b/modules/plugins/lsof/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/mysql/pom.xml b/modules/plugins/mysql/pom.xml
index cfbb26e..d8ebb5d 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/netservices/pom.xml b/modules/plugins/netservices/pom.xml
index 1987cfb..f1675e4 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/onewire/pom.xml b/modules/plugins/onewire/pom.xml
index 165ff92..07bec15 100644
--- a/modules/plugins/onewire/pom.xml
+++ b/modules/plugins/onewire/pom.xml
@@ -1,8 +1,11 @@
-<?xml version="1.0"?><project>
+<?xml version="1.0"?>
+
+<project>
+
<parent>
<artifactId>rhq-plugins-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/modules/plugins/oracle/pom.xml b/modules/plugins/oracle/pom.xml
index e6d37b9..8a3b3c0 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 afd78d2..e3799d8 100644
--- a/modules/plugins/pattern-generator/pom.xml
+++ b/modules/plugins/pattern-generator/pom.xml
@@ -9,7 +9,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version><!-- TODO adjust RHQ version -->
+ <version>4.1.0-SNAPSHOT</version><!-- TODO adjust RHQ version -->
</parent>
<groupId>org.rhq</groupId>
@@ -21,7 +21,7 @@
<properties>
<scm.module.path>TODO</scm.module.path>
- <rhq.version>4.0.0-SNAPSHOT</rhq.version> <!-- TODO adjust, see above too -->
+ <rhq.version>4.1.0-SNAPSHOT</rhq.version> <!-- TODO adjust, see above too -->
</properties>
<build>
@@ -176,4 +176,4 @@
<!-- TODO add your dependencies here -->
</dependencies>
-</project>
\ No newline at end of file
+</project>
diff --git a/modules/plugins/perftest/pom.xml b/modules/plugins/perftest/pom.xml
index a84f95d..843fe3d 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/platform/pom.xml b/modules/plugins/platform/pom.xml
index ed3f654..99f36d0 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/pom.xml b/modules/plugins/pom.xml
index b1eec53..f51a2ed 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/plugins/postfix/pom.xml b/modules/plugins/postfix/pom.xml
index b4c9c4c..6fe2470 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/postgres/pom.xml b/modules/plugins/postgres/pom.xml
index 0e5b102..365f6c4 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/raw-config-test/pom.xml b/modules/plugins/raw-config-test/pom.xml
index 7489eff..b3a6078 100644
--- a/modules/plugins/raw-config-test/pom.xml
+++ b/modules/plugins/raw-config-test/pom.xml
@@ -6,7 +6,7 @@
<parent>
<artifactId>rhq-plugins-parent</artifactId>
<groupId>org.rhq</groupId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq.plugins</groupId>
diff --git a/modules/plugins/rhq-agent/pom.xml b/modules/plugins/rhq-agent/pom.xml
index 37dfc09..60471c2 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 60c4245..e88b97f 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/samba/pom.xml b/modules/plugins/samba/pom.xml
index 00be871..3f0af95 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/script/pom.xml b/modules/plugins/script/pom.xml
index 3627ab7..d31afb9 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/script2/pom.xml b/modules/plugins/script2/pom.xml
index d6fa9c4..2cf689c 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/services/pom.xml b/modules/plugins/services/pom.xml
index fc991d7..416d681 100644
--- a/modules/plugins/services/pom.xml
+++ b/modules/plugins/services/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/snmptrapd/pom.xml b/modules/plugins/snmptrapd/pom.xml
index e0750eb..05ed401 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/modules/plugins/sshd/pom.xml b/modules/plugins/sshd/pom.xml
index f00f113..4e6f17a 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/sudoers/pom.xml b/modules/plugins/sudoers/pom.xml
index 8a88bb4..07c38eb 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/tomcat/pom.xml b/modules/plugins/tomcat/pom.xml
index 37d52a1..f6dfebd 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/twitter/pom.xml b/modules/plugins/twitter/pom.xml
index 1993f61..50ff9b6 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.0.0-SNAPSHOT</version>
+ <version>4.1.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 4f1c4c3..6565a7b 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/virt/pom.xml b/modules/plugins/virt/pom.xml
index c16d198..8700a19 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/pom.xml b/modules/pom.xml
index f760f66..ef5b009 100644
--- a/modules/pom.xml
+++ b/modules/pom.xml
@@ -6,7 +6,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/test-utils/pom.xml b/modules/test-utils/pom.xml
index cb02492..89fbc3c 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.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<artifactId>test-utils</artifactId>
diff --git a/pom.xml b/pom.xml
index 98a9c31..6a1b1f5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>RHQ</name>
13 years
[rhq] 2 commits - modules/enterprise pom.xml
by ips
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java | 6
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/menu/MenuBarView.java | 143 ++++++----
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/selenium/LocatableHStack.java | 82 +++++
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml | 2
modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.css | 45 +--
modules/enterprise/server/jar/pom.xml | 9
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertConditionLogManagerBean.java | 16 +
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertConditionManagerBean.java | 16 +
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDampeningManagerBean.java | 16 +
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerBean.java | 16 +
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/CachedConditionManagerBean.java | 18 +
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/CloudManagerBean.java | 14
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StatusManagerBean.java | 14
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/instance/CacheConsistencyManagerBean.java | 14
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/instance/ServerManagerBean.java | 14
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java | 14
pom.xml | 6
17 files changed, 363 insertions(+), 82 deletions(-)
New commits:
commit 1ab97b2da8e9fc950f18feaaa59f7d3c10020127
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Fri May 6 12:17:04 2011 -0400
on the 10 SLSB's containing one or methods that are invoked directly or indirectly by an MDB or EJB timer, use the PoolClass annotation to tell the EJB container to use the strict max pool, rather than the threadlocal pool, for those SLSB's; this avoids SLSB instances from accumulating and eventually filling up the entire heap (https://bugzilla.redhat.com/show_bug.cgi?id=693232)
diff --git a/modules/enterprise/server/jar/pom.xml b/modules/enterprise/server/jar/pom.xml
index 5b9ff73..c6ebed5 100644
--- a/modules/enterprise/server/jar/pom.xml
+++ b/modules/enterprise/server/jar/pom.xml
@@ -233,6 +233,15 @@
<scope>provided</scope> <!-- by JBossAS -->
</dependency>
+ <!-- includes the org.jboss.ejb3.StrictMaxPool class, which is needed by the PoolClass annotation used on some
+ of our SLSB's -->
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-ejb3</artifactId>
+ <!-- NOTE: The version is defined in the root POM's dependencyManagement section. -->
+ <scope>provided</scope> <!-- by JBossAS -->
+ </dependency>
+
<dependency>
<groupId>jboss</groupId>
<artifactId>jboss-j2ee</artifactId>
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertConditionLogManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertConditionLogManagerBean.java
index ba54373..0804736 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertConditionLogManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertConditionLogManagerBean.java
@@ -34,6 +34,8 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.exception.ConstraintViolationException;
+import org.jboss.annotation.ejb.PoolClass;
+import org.jboss.ejb3.StrictMaxPool;
import org.rhq.core.domain.alert.AlertCondition;
import org.rhq.core.domain.alert.AlertConditionLog;
import org.rhq.core.domain.alert.AlertDampeningEvent;
@@ -44,8 +46,20 @@ import org.rhq.enterprise.server.RHQConstants;
/**
* @author Joseph Marques
*/
-
@Stateless
+// NOTE: The AlertConditionLogManagerBean, AlertConditionManagerBean, AlertDampeningManagerBean,
+// AlertDefinitionManagerBean, and CachedConditionManagerBean SLSB's are all invoked, either directly or
+// indirectly, by the AlertConditionConsumerBean MDB. Since MDB invocations are always done in new threads, using
+// the default SLSB pool impl ({@link ThreadlocalPool}) would cause a new instance of this SLSB to be created
+// every time it was invoked by AlertConditionConsumerBean. This would be bad because an existing instance would
+// not be reused, but it is really bad because the instance would also never get destroyed, causing heap space to
+// gradually leak until the Server eventually ran out of memory. Hence, we must use a {@link StrictMaxPool}, which
+// will use a fixed pool of instances of this SLSB, instead of a ThreadlocalPool. Because most of these SLSB's are
+// also invoked by other callers (i.e. Agents, GUI's, or CLI's) besides AlertConditionConsumerBean, we set the max
+// pool size to 60, which is double the default value, to minimize the chances of AlertConditionConsumerBean
+// invocations, which are the most critical, from having to block and potentially getting backed up in the queue.
+// For more details, see https://bugzilla.redhat.com/show_bug.cgi?id=693232 (ips, 05/05/11).
+@PoolClass(value = StrictMaxPool.class, maxSize = 60)
public class AlertConditionLogManagerBean implements AlertConditionLogManagerLocal {
private final Log log = LogFactory.getLog(AlertConditionLogManagerBean.class);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertConditionManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertConditionManagerBean.java
index 5bb5861..3d49479 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertConditionManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertConditionManagerBean.java
@@ -32,6 +32,8 @@ import javax.persistence.Query;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.jboss.annotation.ejb.PoolClass;
+import org.jboss.ejb3.StrictMaxPool;
import org.rhq.core.domain.alert.AlertCondition;
import org.rhq.core.domain.alert.AlertConditionCategory;
import org.rhq.core.domain.alert.AlertDefinition;
@@ -48,8 +50,20 @@ import org.rhq.enterprise.server.authz.PermissionException;
/**
* @author Joseph Marques
*/
-
@Stateless
+// NOTE: The AlertConditionLogManagerBean, AlertConditionManagerBean, AlertDampeningManagerBean,
+// AlertDefinitionManagerBean, and CachedConditionManagerBean SLSB's are all invoked, either directly or
+// indirectly, by the AlertConditionConsumerBean MDB. Since MDB invocations are always done in new threads, using
+// the default SLSB pool impl ({@link ThreadlocalPool}) would cause a new instance of this SLSB to be created
+// every time it was invoked by AlertConditionConsumerBean. This would be bad because an existing instance would
+// not be reused, but it is really bad because the instance would also never get destroyed, causing heap space to
+// gradually leak until the Server eventually ran out of memory. Hence, we must use a {@link StrictMaxPool}, which
+// will use a fixed pool of instances of this SLSB, instead of a ThreadlocalPool. Because most of these SLSB's are
+// also invoked by other callers (i.e. Agents, GUI's, or CLI's) besides AlertConditionConsumerBean, we set the max
+// pool size to 60, which is double the default value, to minimize the chances of AlertConditionConsumerBean
+// invocations, which are the most critical, from having to block and potentially getting backed up in the queue.
+// For more details, see https://bugzilla.redhat.com/show_bug.cgi?id=693232 (ips, 05/05/11).
+@PoolClass(value = StrictMaxPool.class, maxSize = 60)
public class AlertConditionManagerBean implements AlertConditionManagerLocal {
private static final Log LOG = LogFactory.getLog(AlertConditionManagerBean.class);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDampeningManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDampeningManagerBean.java
index 1645efc..5df78c5 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDampeningManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDampeningManagerBean.java
@@ -31,6 +31,8 @@ import javax.persistence.Query;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.jboss.annotation.ejb.PoolClass;
+import org.jboss.ejb3.StrictMaxPool;
import org.rhq.core.domain.alert.AlertDampening;
import org.rhq.core.domain.alert.AlertDampeningEvent;
import org.rhq.core.domain.alert.AlertDefinition;
@@ -40,8 +42,20 @@ import org.rhq.enterprise.server.RHQConstants;
/**
* @author Joseph Marques
*/
-
@Stateless
+// NOTE: The AlertConditionLogManagerBean, AlertConditionManagerBean, AlertDampeningManagerBean,
+// AlertDefinitionManagerBean, and CachedConditionManagerBean SLSB's are all invoked, either directly or
+// indirectly, by the AlertConditionConsumerBean MDB. Since MDB invocations are always done in new threads, using
+// the default SLSB pool impl ({@link ThreadlocalPool}) would cause a new instance of this SLSB to be created
+// every time it was invoked by AlertConditionConsumerBean. This would be bad because an existing instance would
+// not be reused, but it is really bad because the instance would also never get destroyed, causing heap space to
+// gradually leak until the Server eventually ran out of memory. Hence, we must use a {@link StrictMaxPool}, which
+// will use a fixed pool of instances of this SLSB, instead of a ThreadlocalPool. Because most of these SLSB's are
+// also invoked by other callers (i.e. Agents, GUI's, or CLI's) besides AlertConditionConsumerBean, we set the max
+// pool size to 60, which is double the default value, to minimize the chances of AlertConditionConsumerBean
+// invocations, which are the most critical, from having to block and potentially getting backed up in the queue.
+// For more details, see https://bugzilla.redhat.com/show_bug.cgi?id=693232 (ips, 05/05/11).
+@PoolClass(value = StrictMaxPool.class, maxSize = 60)
public class AlertDampeningManagerBean implements AlertDampeningManagerLocal {
private final Log log = LogFactory.getLog(AlertDampeningManagerBean.class);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerBean.java
index 1cd2a71..ba3b045 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertDefinitionManagerBean.java
@@ -34,6 +34,8 @@ import org.apache.commons.logging.LogFactory;
import org.jboss.annotation.IgnoreDependency;
+import org.jboss.annotation.ejb.PoolClass;
+import org.jboss.ejb3.StrictMaxPool;
import org.rhq.core.domain.alert.AlertCondition;
import org.rhq.core.domain.alert.AlertConditionCategory;
import org.rhq.core.domain.alert.AlertConditionLog;
@@ -66,8 +68,20 @@ import org.rhq.enterprise.server.util.CriteriaQueryGenerator.AuthorizationTokenT
/**
* @author Joseph Marques
*/
-
@Stateless
+// NOTE: The AlertConditionLogManagerBean, AlertConditionManagerBean, AlertDampeningManagerBean,
+// AlertDefinitionManagerBean, and CachedConditionManagerBean SLSB's are all invoked, either directly or
+// indirectly, by the AlertConditionConsumerBean MDB. Since MDB invocations are always done in new threads, using
+// the default SLSB pool impl ({@link ThreadlocalPool}) would cause a new instance of this SLSB to be created
+// every time it was invoked by AlertConditionConsumerBean. This would be bad because an existing instance would
+// not be reused, but it is really bad because the instance would also never get destroyed, causing heap space to
+// gradually leak until the Server eventually ran out of memory. Hence, we must use a {@link StrictMaxPool}, which
+// will use a fixed pool of instances of this SLSB, instead of a ThreadlocalPool. Because most of these SLSB's are
+// also invoked by other callers (i.e. Agents, GUI's, or CLI's) besides AlertConditionConsumerBean, we set the max
+// pool size to 60, which is double the default value, to minimize the chances of AlertConditionConsumerBean
+// invocations, which are the most critical, from having to block and potentially getting backed up in the queue.
+// For more details, see https://bugzilla.redhat.com/show_bug.cgi?id=693232 (ips, 05/05/11).
+@PoolClass(value = StrictMaxPool.class, maxSize = 60)
public class AlertDefinitionManagerBean implements AlertDefinitionManagerLocal, AlertDefinitionManagerRemote {
private static final Log LOG = LogFactory.getLog(AlertDefinitionManagerBean.class);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/CachedConditionManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/CachedConditionManagerBean.java
index 9f757e1..55aa2a4 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/CachedConditionManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/CachedConditionManagerBean.java
@@ -28,6 +28,8 @@ import javax.persistence.PersistenceContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.jboss.annotation.ejb.PoolClass;
+import org.jboss.ejb3.StrictMaxPool;
import org.rhq.core.domain.alert.AlertDampeningEvent;
import org.rhq.core.domain.alert.AlertDefinition;
import org.rhq.enterprise.server.RHQConstants;
@@ -36,12 +38,26 @@ import org.rhq.enterprise.server.alert.engine.jms.model.ActiveAlertConditionMess
import org.rhq.enterprise.server.alert.engine.jms.model.InactiveAlertConditionMessage;
/**
- * see {@link CachedConditionManagerLocal#processCachedConditionMessage(AbstractAlertConditionMessage, AlertDefinition)}
+ * see {@link CachedConditionManagerLocal#processCachedConditionMessage(
+ * org.rhq.enterprise.server.alert.engine.jms.model.AbstractAlertConditionMessage, Integer)}
* for more information.
*
* @author Joseph Marques
*/
@Stateless
+// NOTE: The AlertConditionLogManagerBean, AlertConditionManagerBean, AlertDampeningManagerBean,
+// AlertDefinitionManagerBean, and CachedConditionManagerBean SLSB's are all invoked, either directly or
+// indirectly, by the AlertConditionConsumerBean MDB. Since MDB invocations are always done in new threads, using
+// the default SLSB pool impl ({@link ThreadlocalPool}) would cause a new instance of this SLSB to be created
+// every time it was invoked by AlertConditionConsumerBean. This would be bad because an existing instance would
+// not be reused, but it is really bad because the instance would also never get destroyed, causing heap space to
+// gradually leak until the Server eventually ran out of memory. Hence, we must use a {@link StrictMaxPool}, which
+// will use a fixed pool of instances of this SLSB, instead of a ThreadlocalPool. Because most of these SLSB's are
+// also invoked by other callers (i.e. Agents, GUI's, or CLI's) besides AlertConditionConsumerBean, we set the max
+// pool size to 60, which is double the default value, to minimize the chances of AlertConditionConsumerBean
+// invocations, which are the most critical, from having to block and potentially getting backed up in the queue.
+// For more details, see https://bugzilla.redhat.com/show_bug.cgi?id=693232 (ips, 05/05/11).
+@PoolClass(value = StrictMaxPool.class, maxSize = 60)
public class CachedConditionManagerBean implements CachedConditionManagerLocal {
private final Log log = LogFactory.getLog(CachedConditionManagerBean.class);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/CloudManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/CloudManagerBean.java
index 4b98c67..919149d 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/CloudManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/CloudManagerBean.java
@@ -32,6 +32,8 @@ import org.apache.commons.logging.LogFactory;
import org.jboss.annotation.IgnoreDependency;
+import org.jboss.annotation.ejb.PoolClass;
+import org.jboss.ejb3.StrictMaxPool;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.authz.Permission;
import org.rhq.core.domain.cloud.FailoverListDetails;
@@ -56,6 +58,18 @@ import org.rhq.enterprise.server.util.LookupUtil;
* @author Joseph Marques
*/
@Stateless
+// NOTE: The CacheConsistencyManagerBean, CloudManagerBean, ServerManagerBean, StatusManagerBean, and SystemManagerBean
+// SLSB's are all invoked, either directly or indirectly, by EJB timers. Since EJB timer invocations are always
+// done in new threads, using the default SLSB pool impl ({@link ThreadlocalPool}) would cause a new instance of
+// this SLSB to be created every time it was invoked by an EJB timer. This would be bad because an existing
+// instance would not be reused, but it is really bad because the instance would also never get destroyed, causing
+// heap space to gradually leak until the Server eventually ran out of memory. Hence, we must use a
+// {@link StrictMaxPool}, which will use a fixed pool of instances of this SLSB, instead of a ThreadlocalPool.
+// Because most of these SLSB's are also invoked by other callers (i.e. Agents, GUI's, or CLI's) besides EJB
+// timers, we set the max pool size to 60, which is double the default value, to minimize the chances of EJB
+// timer invocations, which are the most critical, from having to block and potentially getting backed up in the
+// queue. For more details, see https://bugzilla.redhat.com/show_bug.cgi?id=693232 (ips, 05/05/11).
+@PoolClass(value = StrictMaxPool.class, maxSize = 60)
public class CloudManagerBean implements CloudManagerLocal {
private final Log log = LogFactory.getLog(CloudManagerBean.class);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StatusManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StatusManagerBean.java
index dfd1990..526f801 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StatusManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StatusManagerBean.java
@@ -33,6 +33,8 @@ import org.apache.commons.logging.LogFactory;
import org.jboss.annotation.IgnoreDependency;
+import org.jboss.annotation.ejb.PoolClass;
+import org.jboss.ejb3.StrictMaxPool;
import org.rhq.core.domain.alert.AlertDefinition;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.cloud.Server;
@@ -65,6 +67,18 @@ import org.rhq.enterprise.server.util.LookupUtil;
* require holding these locks as part of their processing.
*/
@Stateless
+// NOTE: The CacheConsistencyManagerBean, CloudManagerBean, ServerManagerBean, StatusManagerBean, and SystemManagerBean
+// SLSB's are all invoked, either directly or indirectly, by EJB timers. Since EJB timer invocations are always
+// done in new threads, using the default SLSB pool impl ({@link ThreadlocalPool}) would cause a new instance of
+// this SLSB to be created every time it was invoked by an EJB timer. This would be bad because an existing
+// instance would not be reused, but it is really bad because the instance would also never get destroyed, causing
+// heap space to gradually leak until the Server eventually ran out of memory. Hence, we must use a
+// {@link StrictMaxPool}, which will use a fixed pool of instances of this SLSB, instead of a ThreadlocalPool.
+// Because most of these SLSB's are also invoked by other callers (i.e. Agents, GUI's, or CLI's) besides EJB
+// timers, we set the max pool size to 60, which is double the default value, to minimize the chances of EJB
+// timer invocations, which are the most critical, from having to block and potentially getting backed up in the
+// queue. For more details, see https://bugzilla.redhat.com/show_bug.cgi?id=693232 (ips, 05/05/11).
+@PoolClass(value = StrictMaxPool.class, maxSize = 60)
public class StatusManagerBean implements StatusManagerLocal {
private final Log log = LogFactory.getLog(StatusManagerBean.class);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/instance/CacheConsistencyManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/instance/CacheConsistencyManagerBean.java
index 2de7bad..6cbf361 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/instance/CacheConsistencyManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/instance/CacheConsistencyManagerBean.java
@@ -34,6 +34,8 @@ import javax.ejb.TransactionAttributeType;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.jboss.annotation.ejb.PoolClass;
+import org.jboss.ejb3.StrictMaxPool;
import org.rhq.enterprise.server.alert.engine.AlertConditionCacheManagerLocal;
/**
@@ -44,6 +46,18 @@ import org.rhq.enterprise.server.alert.engine.AlertConditionCacheManagerLocal;
* @author Joseph Marques
*/
@Stateless
+// NOTE: The CacheConsistencyManagerBean, CloudManagerBean, ServerManagerBean, StatusManagerBean, and SystemManagerBean
+// SLSB's are all invoked, either directly or indirectly, by EJB timers. Since EJB timer invocations are always
+// done in new threads, using the default SLSB pool impl ({@link ThreadlocalPool}) would cause a new instance of
+// this SLSB to be created every time it was invoked by an EJB timer. This would be bad because an existing
+// instance would not be reused, but it is really bad because the instance would also never get destroyed, causing
+// heap space to gradually leak until the Server eventually ran out of memory. Hence, we must use a
+// {@link StrictMaxPool}, which will use a fixed pool of instances of this SLSB, instead of a ThreadlocalPool.
+// Because most of these SLSB's are also invoked by other callers (i.e. Agents, GUI's, or CLI's) besides EJB
+// timers, we set the max pool size to 60, which is double the default value, to minimize the chances of EJB
+// timer invocations, which are the most critical, from having to block and potentially getting backed up in the
+// queue. For more details, see https://bugzilla.redhat.com/show_bug.cgi?id=693232 (ips, 05/05/11).
+@PoolClass(value = StrictMaxPool.class, maxSize = 60)
public class CacheConsistencyManagerBean implements CacheConsistencyManagerLocal {
private final Log log = LogFactory.getLog(CacheConsistencyManagerBean.class);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/instance/ServerManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/instance/ServerManagerBean.java
index be91c65..588d8e8 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/instance/ServerManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/instance/ServerManagerBean.java
@@ -38,6 +38,8 @@ import javax.persistence.Query;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.jboss.annotation.ejb.PoolClass;
+import org.jboss.ejb3.StrictMaxPool;
import org.rhq.core.domain.cloud.PartitionEventType;
import org.rhq.core.domain.cloud.Server;
import org.rhq.core.domain.resource.Agent;
@@ -64,6 +66,18 @@ import org.rhq.enterprise.server.core.comm.ServerCommunicationsServiceUtil;
* @author Joseph Marques
*/
@Stateless
+// NOTE: The CacheConsistencyManagerBean, CloudManagerBean, ServerManagerBean, StatusManagerBean, and SystemManagerBean
+// SLSB's are all invoked, either directly or indirectly, by EJB timers. Since EJB timer invocations are always
+// done in new threads, using the default SLSB pool impl ({@link ThreadlocalPool}) would cause a new instance of
+// this SLSB to be created every time it was invoked by an EJB timer. This would be bad because an existing
+// instance would not be reused, but it is really bad because the instance would also never get destroyed, causing
+// heap space to gradually leak until the Server eventually ran out of memory. Hence, we must use a
+// {@link StrictMaxPool}, which will use a fixed pool of instances of this SLSB, instead of a ThreadlocalPool.
+// Because most of these SLSB's are also invoked by other callers (i.e. Agents, GUI's, or CLI's) besides EJB
+// timers, we set the max pool size to 60, which is double the default value, to minimize the chances of EJB
+// timer invocations, which are the most critical, from having to block and potentially getting backed up in the
+// queue. For more details, see https://bugzilla.redhat.com/show_bug.cgi?id=693232 (ips, 05/05/11).
+@PoolClass(value = StrictMaxPool.class, maxSize = 60)
public class ServerManagerBean implements ServerManagerLocal {
private final Log log = LogFactory.getLog(ServerManagerBean.class);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java
index 19a454a..a03f525 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/system/SystemManagerBean.java
@@ -51,7 +51,9 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.annotation.IgnoreDependency;
+import org.jboss.annotation.ejb.PoolClass;
import org.jboss.deployment.MainDeployerMBean;
+import org.jboss.ejb3.StrictMaxPool;
import org.jboss.mx.util.MBeanServerLocator;
import org.rhq.core.db.DatabaseType;
@@ -74,6 +76,18 @@ import org.rhq.enterprise.server.util.LookupUtil;
import org.rhq.enterprise.server.util.SystemDatabaseInformation;
@Stateless
+// NOTE: The CacheConsistencyManagerBean, CloudManagerBean, ServerManagerBean, StatusManagerBean, and SystemManagerBean
+// SLSB's are all invoked, either directly or indirectly, by EJB timers. Since EJB timer invocations are always
+// done in new threads, using the default SLSB pool impl ({@link ThreadlocalPool}) would cause a new instance of
+// this SLSB to be created every time it was invoked by an EJB timer. This would be bad because an existing
+// instance would not be reused, but it is really bad because the instance would also never get destroyed, causing
+// heap space to gradually leak until the Server eventually ran out of memory. Hence, we must use a
+// {@link StrictMaxPool}, which will use a fixed pool of instances of this SLSB, instead of a ThreadlocalPool.
+// Because most of these SLSB's are also invoked by other callers (i.e. Agents, GUI's, or CLI's) besides EJB
+// timers, we set the max pool size to 60, which is double the default value, to minimize the chances of EJB
+// timer invocations, which are the most critical, from having to block and potentially getting backed up in the
+// queue. For more details, see https://bugzilla.redhat.com/show_bug.cgi?id=693232 (ips, 05/05/11).
+@PoolClass(value = StrictMaxPool.class, maxSize = 60)
public class SystemManagerBean implements SystemManagerLocal, SystemManagerRemote {
private final String SQL_VACUUM = "VACUUM ANALYZE {0}";
diff --git a/pom.xml b/pom.xml
index 3c49e2d..98a9c31 100644
--- a/pom.xml
+++ b/pom.xml
@@ -219,6 +219,12 @@
<dependency>
<groupId>jboss</groupId>
+ <artifactId>jboss-ejb3</artifactId>
+ <version>${jboss.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>jboss</groupId>
<artifactId>jboss-ejb3-client</artifactId>
<version>${jboss.version}</version>
</dependency>
commit b4c21e2fc5e99d8886fb4431713c4d548f95de50
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Fri May 6 11:52:18 2011 -0400
re-implement top menu bar using SmartGWT widgets, rather than raw HTML (part of fix for https://bugzilla.redhat.com/show_bug.cgi?id=697590)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
index 09ca49b..85f5e92 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java
@@ -146,7 +146,7 @@ public class CoreGUI implements EntryPoint, ValueChangeHandler<String>, Event.Na
UserSessionManager.login();
- // removing loading image, which can be seen if LoginView doesn't completely cover it
+ // Remove loading image, which can be seen if LoginView doesn't completely cover it.
Element loadingPanel = DOM.getElementById("Loading-Panel");
loadingPanel.removeFromParent();
}
@@ -163,8 +163,8 @@ public class CoreGUI implements EntryPoint, ValueChangeHandler<String>, Event.Na
String url = element.getAttribute("href");
String viewPath = getViewPath(url);
if (viewPath != null) {
- GWT.log("Forcing CoreGUI.goToView(\"" + viewPath + "\")...");
- CoreGUI.goToView(viewPath);
+ GWT.log("Forcing History.newItem(\"" + viewPath + "\")...");
+ History.newItem(viewPath);
nativeEvent.preventDefault();
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/menu/MenuBarView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/menu/MenuBarView.java
index 58fd490..557042f 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/menu/MenuBarView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/menu/MenuBarView.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2010 Red Hat, Inc.
+ * Copyright (C) 2005-2011 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -21,14 +21,15 @@ package org.rhq.enterprise.gui.coregui.client.menu;
import com.google.gwt.event.logical.shared.ValueChangeEvent;
import com.google.gwt.event.logical.shared.ValueChangeHandler;
import com.google.gwt.user.client.History;
-import com.google.gwt.user.client.ui.Hyperlink;
import com.smartgwt.client.types.Alignment;
+import com.smartgwt.client.types.VerticalAlignment;
import com.smartgwt.client.widgets.Canvas;
-import com.smartgwt.client.widgets.HTMLFlow;
import com.smartgwt.client.widgets.Img;
+import com.smartgwt.client.widgets.Label;
import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.events.ClickHandler;
import com.smartgwt.client.widgets.layout.HLayout;
+import com.smartgwt.client.widgets.layout.VLayout;
import com.smartgwt.client.widgets.toolbar.ToolStrip;
import org.rhq.enterprise.gui.coregui.client.UserSessionManager;
@@ -40,13 +41,17 @@ import org.rhq.enterprise.gui.coregui.client.dashboard.DashboardsView;
import org.rhq.enterprise.gui.coregui.client.help.HelpView;
import org.rhq.enterprise.gui.coregui.client.inventory.InventoryView;
import org.rhq.enterprise.gui.coregui.client.report.ReportTopView;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableHStack;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableLabel;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
-import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
+
+import java.util.HashMap;
+import java.util.Map;
/**
* @author Greg Hinkle
* @author Joseph Marques
+ * @author Ian Springer
*/
public class MenuBarView extends LocatableVLayout {
@@ -80,7 +85,7 @@ public class MenuBarView extends LocatableVLayout {
markForRedraw();
}
- // When redrawing, ensire the correct session infor is displayed
+ // When redrawing, ensure the correct session info is displayed
@Override
public void markForRedraw() {
String currentDisplayName = userLabel.getContents();
@@ -104,50 +109,7 @@ public class MenuBarView extends LocatableVLayout {
}
private Canvas getLinksSection() {
- final HTMLFlow linksPane = new HTMLFlow();
- linksPane.setContents(setupLinks());
-
- History.addValueChangeHandler(new ValueChangeHandler<String>() {
- public void onValueChange(ValueChangeEvent<String> stringValueChangeEvent) {
- String first = stringValueChangeEvent.getValue().split("/")[0];
-
- if ("Resource".equals(first)) {
- first = "Inventory";
- }
-
- currentlySelectedSection = first;
- linksPane.setContents(setupLinks());
- linksPane.markForRedraw();
- }
- });
- return linksPane;
- }
-
- private String setupLinks() {
- // TODO: Replace the below HTML with SmartGWT widgets.
- StringBuilder headerString = new StringBuilder(
- "<table style=\"height: 34px;\" cellpadding=\"0\" cellspacing=\"0\"><tr>");
-
- headerString.append("<td style=\"width: 1px;\"><img src=\"images/header/header_bg_line.png\"/></td>");
- for (ViewName sectionName : SECTIONS) {
-
- String styleClass = "TopSectionLink";
- if (sectionName.getName().equals(currentlySelectedSection)) {
- styleClass = "TopSectionLinkSelected";
- }
-
- // Set explicit identifiers because the generated scLocator is not getting picked up by Selenium.
- headerString.append("<td style=\"vertical-align:middle\" id=\"").append(sectionName).append("\" class=\"")
- .append(styleClass).append("\" onclick=\"window.location.href='#").append(sectionName).append("'\" >");
- headerString.append(sectionName.getTitle());
- headerString.append("</td>\n");
-
- headerString.append("<td style=\"width: 1px;\"><img src=\"images/header/header_bg_line.png\"/></td>");
- }
-
- headerString.append("</tr></table>");
-
- return headerString.toString();
+ return new LinkBar();
}
private Canvas getActionsSection() {
@@ -158,13 +120,13 @@ public class MenuBarView extends LocatableVLayout {
userLabel = new LocatableLabel(this.extendLocatorId("User"), UserSessionManager.getSessionSubject().getName());
userLabel.setAutoWidth();
- LocatableLabel lineLabel = new LocatableLabel(this.extendLocatorId("Line"), " | ");
- lineLabel.setWidth("10px");
+ Label lineLabel = new Label(" | ");
+ lineLabel.setWidth("12px");
lineLabel.setAlign(Alignment.CENTER);
- Hyperlink logoutLink = SeleniumUtility.setHtmlId(new Hyperlink(LOGOUT_VIEW_ID.getTitle(), LOGOUT_VIEW_ID
- .getName()), LOGOUT_VIEW_ID.getName());
- logoutLink.setWidth("50px");
+ String contents = "<a href='#" + LOGOUT_VIEW_ID.getName() + "'>" + LOGOUT_VIEW_ID.getTitle() + "</a>";
+ LocatableLabel logoutLink = new LocatableLabel(this.extendLocatorId("LogoutLink"), contents);
+ logoutLink.setAutoWidth();
layout.addMember(userLabel);
layout.addMember(lineLabel);
@@ -173,4 +135,77 @@ public class MenuBarView extends LocatableVLayout {
return layout;
}
+ class LinkBar extends LocatableHStack implements ValueChangeHandler<String> {
+ private final Map<String, VLayout> sectionNameToLinkVLayoutMap = new HashMap<String, VLayout>();
+
+ LinkBar() {
+ super(MenuBarView.this.extendLocatorId("LinkBar"));
+
+ setWidth100();
+ setHeight100();
+
+ Img divider = new Img("header/header_bg_line.png");
+ divider.setWidth(1);
+ divider.setHeight100();
+ addMember(divider);
+
+ for (ViewName sectionName : SECTIONS) {
+ VLayout linkVLayout = new VLayout();
+ linkVLayout.setHeight100();
+ linkVLayout.setAlign(VerticalAlignment.CENTER);
+
+ String contents = "<a class='menuBar' href='#" + sectionName.getName() + "'>" + sectionName.getTitle()
+ + "</a>";
+ LocatableLabel link = new LocatableLabel(extendLocatorId(sectionName.getName()), contents);
+ link.setAutoHeight();
+ link.setAlign(Alignment.CENTER);
+ link.setStyleName("inheritColor");
+ linkVLayout.addMember(link);
+
+ this.sectionNameToLinkVLayoutMap.put(sectionName.getName(), linkVLayout);
+ updateLinkStyle(sectionName.getName());
+ addMember(linkVLayout);
+
+ divider = new Img("header/header_bg_line.png");
+ divider.setWidth(1);
+ divider.setHeight100();
+ addMember(divider);
+ }
+
+ History.addValueChangeHandler(this);
+ }
+
+ @Override
+ public void onValueChange(ValueChangeEvent<String> stringValueChangeEvent) {
+ String viewPath = stringValueChangeEvent.getValue();
+ String topViewId = viewPath.split("/")[0];
+ if ("Resource".equals(topViewId)) {
+ topViewId = InventoryView.VIEW_ID.getName();
+ }
+ currentlySelectedSection = topViewId;
+
+ for (String sectionName : this.sectionNameToLinkVLayoutMap.keySet()) {
+ updateLinkStyle(sectionName);
+ }
+ }
+
+ private void updateLinkStyle(String sectionName) {
+ String divStyleClass;
+ String styleClass;
+ if (sectionName.equals(currentlySelectedSection)) {
+ divStyleClass = "TopSectionLinkDivSelected";
+ styleClass = "TopSectionLinkSelected";
+ } else {
+ divStyleClass = "TopSectionLinkDiv";
+ styleClass = "TopSectionLink";
+ }
+ VLayout linkVLayout = this.sectionNameToLinkVLayoutMap.get(sectionName);
+ linkVLayout.setStyleName(divStyleClass);
+ linkVLayout.markForRedraw();
+ Canvas link = linkVLayout.getMember(0);
+ link.setStyleName(styleClass);
+ link.markForRedraw();
+ }
+ }
+
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/selenium/LocatableHStack.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/selenium/LocatableHStack.java
new file mode 100644
index 0000000..4ea7bb1
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/selenium/LocatableHStack.java
@@ -0,0 +1,82 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2011 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.enterprise.gui.coregui.client.util.selenium;
+
+import com.smartgwt.client.widgets.layout.HStack;
+
+/**
+ * Wrapper for a SmartGWT {@link HStack} that sets the ID for use with Selenium scLocators.
+ *
+ * @author Ian Springer
+ */
+public class LocatableHStack extends HStack implements Locatable {
+
+ private String locatorId;
+
+ /**
+ * <pre>
+ * ID Format: "simpleClassname_locatorId"
+ * </pre>
+ * @param locatorId not null or empty.
+ */
+ public LocatableHStack(String locatorId) {
+ super();
+ init(locatorId);
+ }
+
+ /**
+ * <pre>
+ * ID Format: "simpleClassname_locatorId"
+ * </pre>
+ * @param locatorId not null or empty.
+ * @param membersMargin
+ */
+ public LocatableHStack(String locatorId, int membersMargin) {
+ super(membersMargin);
+ init(locatorId);
+ }
+
+ private void init(String locatorId) {
+ this.locatorId = locatorId;
+ SeleniumUtility.setID(this, locatorId);
+ }
+
+ public String getLocatorId() {
+ return locatorId;
+ }
+
+ public String extendLocatorId(String extension) {
+ return this.locatorId + "_" + extension;
+ }
+
+ public void destroyMembers() {
+ SeleniumUtility.destroyMembers(this);
+ }
+
+ @Override
+ public void destroy() {
+ destroyMembers();
+ super.destroy();
+ }
+
+}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
index f63dbd9..c2ba874 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
@@ -10,7 +10,7 @@
<inherits name='com.smartgwt.SmartGwt' />
<inherits name="com.smartgwt.tools.SmartGwtTools"/>
- <inherits name='com.google.gwt.user.theme.standard.Standard'/>
+ <!--<inherits name='com.google.gwt.user.theme.standard.Standard'/>-->
<!--
<inherits name="com.smartclient.theme.graphite.Graphite"/>
-->
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.css b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.css
index f6befb0..7c86907 100644
--- a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.css
+++ b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.css
@@ -1,13 +1,8 @@
-/*body {
- background-color: white;
- color: black;
- font-family: Arial, sans-serif;
- font-size: small;
- margin: 8px;
-}*/
+body {
+ color: #010101;
+}
body, p, td, th, option, input, textarea, select {
- color: #000000;
font-family: tahoma, verdana, sans-serif !important;
font-size: 11px !important;
}
@@ -30,6 +25,9 @@ hr {
a, a:link, a:visited, a:hover {
color: #4A5D75 !important;
font-weight: bold !important;
+}
+
+a, a:link, a:visited {
text-decoration: none !important;
}
@@ -37,6 +35,10 @@ a:hover {
text-decoration: underline !important;
}
+a.menuBar, a.menuBar:link, a.menuBar:visited, a.menuBar:hover {
+ color: inherit !important;
+}
+
.backLink {
color: #4A5D75;
@@ -97,22 +99,27 @@ a:hover {
}
-.TopSectionLink, .topsectionlinkselected {
- vertical-align: bottom;
- padding:5px;
- padding-left: 15px;
- padding-right: 15px;
+.inheritColor {
+ color: inherit !important;
+}
- cursor: pointer;
- font-size: 10pt;
- font-weight: bold;
- text-decoration: none;
- color: #4A5D75;
+.TopSectionLink, .TopSectionLinkSelected {
+ font-size: 12px !important;
+}
+
+.TopSectionLink {
+ color: #4A5D75 !important;
}
.TopSectionLinkSelected {
+ color: white !important;
+}
+
+.TopSectionLinkDiv {
+}
+
+.TopSectionLinkDivSelected {
background-image: url('images/header/header_bg_selected.png');
- color: white;
}
.BreadCrumb {
13 years
[rhq] Branch 'release-3.0.1' - 13 commits - modules/core modules/plugins
by lkrejci
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceContext.java | 22
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java | 39
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerDiscoveryComponent.java | 168 +++
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerOperationsDelegate.java | 72 +
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceComponent.java | 285 -----
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceDiscoveryComponent.java | 148 +-
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/ApacheAugeasNode.java | 69 -
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/AugeasConfigurationApache.java | 6
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/AugeasTreeBuilderApache.java | 25
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheDirective.java | 21
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheDirectiveTree.java | 10
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheParserImpl.java | 2
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/ApacheBinaryInfo.java | 70 +
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/HttpdAddressUtility.java | 197 ++-
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/RuntimeApacheConfiguration.java | 519 ++++++++++
modules/plugins/apache/src/main/resources/META-INF/rhq-plugin.xml | 25
modules/plugins/apache/src/test/java/org/rhq/plugins/apache/RuntimeConfigurationTest.java | 208 ++++
modules/plugins/apache/src/test/java/org/rhq/plugins/apache/SnmpMappingTest.java | 140 ++
modules/plugins/apache/src/test/java/org/rhq/plugins/apache/util/MockApacheBinaryInfo.java | 126 ++
modules/plugins/apache/src/test/java/org/rhq/plugins/apache/util/MockProcessInfo.java | 51
modules/plugins/apache/src/test/resources/runtime-config/conditional/httpd.conf | 2
modules/plugins/apache/src/test/resources/runtime-config/conditional/ifdefine-defined.conf | 5
modules/plugins/apache/src/test/resources/runtime-config/conditional/ifdefine-undefined.conf | 5
modules/plugins/apache/src/test/resources/runtime-config/conditional/ifmodule-loaded.conf | 13
modules/plugins/apache/src/test/resources/runtime-config/conditional/ifmodule-not-loaded.conf | 11
modules/plugins/apache/src/test/resources/runtime-config/conditional/ifversion.conf | 43
modules/plugins/apache/src/test/resources/runtime-config/conditional/nested-mess.conf | 51
modules/plugins/apache/src/test/resources/runtime-config/incl-order/a.conf | 1
modules/plugins/apache/src/test/resources/runtime-config/incl-order/b.conf | 1
modules/plugins/apache/src/test/resources/runtime-config/incl-order/c.conf | 1
modules/plugins/apache/src/test/resources/runtime-config/incl-order/httpd.conf | 1
modules/plugins/apache/src/test/resources/snmp-mapping/httpd.conf | 5
modules/plugins/apache/src/test/resources/snmp-mapping/vhost-with-servername-by-ip.conf | 3
modules/plugins/apache/src/test/resources/snmp-mapping/vhost-with-servername-by-unresolvable-hostname.conf | 3
modules/plugins/apache/src/test/resources/snmp-mapping/vhost-without-servername-resolvable-ip.conf | 3
modules/plugins/apache/src/test/resources/snmp-mapping/vhost-without-servername-unresolvable-hostname.conf | 3
modules/plugins/apache/src/test/resources/snmp-mapping/vhost-without-servername-unresolvable-ip.conf | 3
modules/plugins/augeas/src/main/java/org/rhq/augeas/config/AugeasConfigurationSimple.java | 2
modules/plugins/augeas/src/main/java/org/rhq/augeas/util/Glob.java | 48
modules/plugins/augeas/src/main/java/org/rhq/plugins/augeas/AugeasConfigurationComponent.java | 2
modules/plugins/augeas/src/main/java/org/rhq/plugins/augeas/AugeasConfigurationDiscoveryComponent.java | 18
modules/plugins/augeas/src/main/java/org/rhq/rhqtransform/impl/PluginDescriptorBasedAugeasConfiguration.java | 2
42 files changed, 2019 insertions(+), 410 deletions(-)
New commits:
commit 258be003ddf7bf022611ef183ed60a7e7ee7ef18
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Wed May 4 18:40:08 2011 +0200
BZ 700616 - Augeas tree abstraction now replaces the Include nodes with their contents instead of just appending their contents to their children list.
This seems to be the original intended behavior of the class according to its description but actually was not the case.
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/ApacheAugeasNode.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/ApacheAugeasNode.java
index 6cb168e..99cc8cb 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/ApacheAugeasNode.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/ApacheAugeasNode.java
@@ -24,7 +24,10 @@ package org.rhq.plugins.apache.augeas;
import java.io.File;
import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import org.rhq.augeas.node.AugeasNode;
import org.rhq.augeas.node.AugeasNodeLazy;
@@ -42,13 +45,14 @@ import org.rhq.augeas.tree.AugeasTreeException;
* and modifies the get* methods to handle these as well.
*
* @author Filip Drabek
+ * @author Lukas Krejci
*/
public class ApacheAugeasNode extends AugeasNodeLazy implements AugeasNode {
/**
* List of included nodes.
*/
- private List<AugeasNode> includedNodes;
+ private Map<Integer, List<AugeasNode>> includedNodes;
public ApacheAugeasNode(String fullPath, AugeasTree tree) {
super(fullPath, tree);
@@ -72,8 +76,22 @@ public class ApacheAugeasNode extends AugeasNodeLazy implements AugeasNode {
public List<AugeasNode> getChildNodes() {
List<AugeasNode> nodes = null;
nodes = ag.match(getFullPath() + File.separatorChar + "*");
- if (includedNodes != null)
- nodes.addAll(includedNodes);
+
+ if (includedNodes != null) {
+ //to avoid having to recompute indexes to insert the included nodes into the
+ //list of nodes as seen by augeas, let's include them from the biggest index
+ //to the lowest.
+ List<Integer> includeNodeIndexes = new ArrayList<Integer>(includedNodes.keySet());
+ Collections.sort(includeNodeIndexes, Collections.reverseOrder());
+
+ for(Integer idx : includeNodeIndexes) {
+ //remove the include node itself
+ nodes.remove(idx);
+
+ //add the included nodes instead of it
+ nodes.addAll(idx, includedNodes.get(idx));
+ }
+ }
return nodes;
}
@@ -83,26 +101,36 @@ public class ApacheAugeasNode extends AugeasNodeLazy implements AugeasNode {
*
* @param nodes
*/
- public void addIncludeNodes(List<AugeasNode> nodes) {
+ public void addIncludeNodes(AugeasNode includeNode, List<AugeasNode> nodes) {
if (nodes.isEmpty())
return;
if (includedNodes == null)
- includedNodes = new ArrayList<AugeasNode>();
-
- includedNodes.addAll(nodes);
- }
-
- /**
- * Adds the node to the list of the included child nodes.
- *
- * @param node
- */
- public void addIncludeNode(AugeasNode node) {
- if (includedNodes == null)
- includedNodes = new ArrayList<AugeasNode>();
-
- includedNodes.add(node);
+ includedNodes = new HashMap<Integer, List<AugeasNode>>();
+
+ List<AugeasNode> childNodes = super.getChildNodes();
+ int idx = 0;
+ boolean found = false;
+
+ for(AugeasNode child : childNodes) {
+ if (child.getLabel().equals(includeNode.getLabel()) && child.getSeq() == includeNode.getSeq()) {
+ found = true;
+ break;
+ }
+
+ ++idx;
+ }
+
+ if (found) {
+ List<AugeasNode> alreadyIncluded = includedNodes.get(idx);
+ if (alreadyIncluded == null) {
+ //copy the nodes over to a new list so that we can modify it later without modifying the original collection
+ //which might be unexpected on the caller site.
+ includedNodes.put(idx, new ArrayList<AugeasNode>(nodes));
+ } else {
+ alreadyIncluded.addAll(nodes);
+ }
+ }
}
public AugeasNode getParentNode() {
@@ -132,7 +160,8 @@ public class ApacheAugeasNode extends AugeasNodeLazy implements AugeasNode {
//else if this node is included from another file
//and we would destroy that association here.
}
+
public void setParentNode(AugeasNode node){
this.parentNode = node;
- }
+ }
}
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/AugeasConfigurationApache.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/AugeasConfigurationApache.java
index d4f7dd2..a3a715c 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/AugeasConfigurationApache.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/AugeasConfigurationApache.java
@@ -109,7 +109,7 @@ public class AugeasConfigurationApache extends PluginDescriptorBasedAugeasConfig
File check = new File(expression);
File root = new File(check.isAbsolute() ? Glob.rootPortion(expression) : serverRootPath);
- files.addAll(Glob.match(root, expression));
+ files.addAll(Glob.match(root, expression, Glob.ALPHABETICAL_COMPARATOR));
for (File fl : files){
if (fl.exists() && fl.isFile()) {
@@ -155,7 +155,7 @@ public class AugeasConfigurationApache extends PluginDescriptorBasedAugeasConfig
File check = new File(incl);
File root = new File(check.isAbsolute() ? Glob.rootPortion(incl) : serverRootPath);
- files.addAll(Glob.match(root, incl));
+ files.addAll(Glob.match(root, incl, Glob.ALPHABETICAL_COMPARATOR));
}
if (module.getExcludedGlobs() != null) {
@@ -191,7 +191,7 @@ public class AugeasConfigurationApache extends PluginDescriptorBasedAugeasConfig
for (String path : foundIncludes) {
File check = new File(path);
File root = new File(check.isAbsolute() ? Glob.rootPortion(path) : serverRoot);
- for (File f :Glob.match(root, path)){
+ for (File f :Glob.match(root, path, Glob.ALPHABETICAL_COMPARATOR)){
ret.add(f);
}
}
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/AugeasTreeBuilderApache.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/AugeasTreeBuilderApache.java
index e6454b7..fbde74f 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/AugeasTreeBuilderApache.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/AugeasTreeBuilderApache.java
@@ -43,7 +43,6 @@ public class AugeasTreeBuilderApache implements AugeasTreeBuilder {
private Map<String, List<File>> includes;
private Map<AugeasNode, List<String>> incl;
- private static final String[] NESTED_INCLUDE_DIRECTIVES = { "<VirtualHost", "<Directory" };
private Augeas ag;
public AugeasTreeBuilderApache() {
@@ -78,7 +77,7 @@ public class AugeasTreeBuilderApache implements AugeasTreeBuilder {
File check = new File(inclName);
File root = new File(check.isAbsolute() ? Glob.rootPortion(inclName) : apacheConfig.getServerRootPath());
- files.addAll(Glob.match(root, inclName));
+ files.addAll(Glob.match(root, inclName, Glob.ALPHABETICAL_COMPARATOR));
if (module.getExcludedGlobs() != null)
Glob.excludeAll(files, module.getExcludedGlobs());
@@ -87,7 +86,7 @@ public class AugeasTreeBuilderApache implements AugeasTreeBuilder {
includes.put(inclName, files);
}
- updateIncludes((ApacheAugeasNode) rootNode, tree, rootPath, false);
+ updateIncludes((ApacheAugeasNode) rootNode, tree, rootPath, null);
//List<String> rootconf = new ArrayList<String>();
// rootconf.add(ApacheAugeasTree.AUGEAS_DATA_PATH + rootPath);
@@ -97,7 +96,7 @@ public class AugeasTreeBuilderApache implements AugeasTreeBuilder {
return tree;
}
- public void updateIncludes(ApacheAugeasNode parentNode, AugeasTree tree, String fileName, boolean update)
+ public void updateIncludes(ApacheAugeasNode parentNode, AugeasTree tree, String fileName, AugeasNode includeNode)
throws AugeasRhqException {
List<String> nestedNodes = ag.match(ApacheAugeasTree.AUGEAS_DATA_PATH + fileName + File.separator + "*");
@@ -111,14 +110,14 @@ public class AugeasTreeBuilderApache implements AugeasTreeBuilder {
createdNodes.add(newNode);
}
- if (update)
- parentNode.addIncludeNodes(createdNodes);
+ if (includeNode != null)
+ parentNode.addIncludeNodes(includeNode, createdNodes);
for (AugeasNode node : createdNodes) {
- if (canContainIncludes(node.getLabel())) {
+ if (canContainNestedNodes(node.getLabel())) {
String labelName = node.getLabel()
+ ((node.getSeq() != 0) ? "[" + String.valueOf(node.getSeq()) + "]" : "");
- updateIncludes((ApacheAugeasNode) node, tree, fileName + File.separator + labelName, false);
+ updateIncludes((ApacheAugeasNode) node, tree, fileName + File.separator + labelName, null);
}
if (node.getLabel().equals("Include")) {
String val = ag.get(node.getFullPath() + File.separator + "param");
@@ -128,7 +127,7 @@ public class AugeasTreeBuilderApache implements AugeasTreeBuilder {
List<String> names = new ArrayList<String>();
for (File file : files) {
names.add(ApacheAugeasTree.AUGEAS_DATA_PATH + file.getAbsolutePath());
- updateIncludes((ApacheAugeasNode) node.getParentNode(), tree, file.getAbsolutePath(), true);
+ updateIncludes((ApacheAugeasNode) node.getParentNode(), tree, file.getAbsolutePath(), node);
}
if (incl.containsKey(node.getParentNode())) {
List<String> list = incl.get(node.getParentNode());
@@ -140,11 +139,7 @@ public class AugeasTreeBuilderApache implements AugeasTreeBuilder {
}
}
- private boolean canContainIncludes(String name) {
- for (String directive : NESTED_INCLUDE_DIRECTIVES) {
- if (directive.equals(name))
- return true;
- }
- return false;
+ private boolean canContainNestedNodes(String name) {
+ return name.startsWith("<");
}
}
commit 7fa1e7d9ad55391e989e9c4ea4276e5c8a13049e
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue May 3 16:21:25 2011 +0200
Adding tests for the ability to produce the same server and port identifications as advertised by SNMP module in various scenarios.
diff --git a/modules/plugins/apache/src/test/java/org/rhq/plugins/apache/SnmpMappingTest.java b/modules/plugins/apache/src/test/java/org/rhq/plugins/apache/SnmpMappingTest.java
new file mode 100644
index 0000000..0716ade
--- /dev/null
+++ b/modules/plugins/apache/src/test/java/org/rhq/plugins/apache/SnmpMappingTest.java
@@ -0,0 +1,140 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 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.plugins.apache;
+
+import static org.testng.Assert.assertEquals;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.InetAddress;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.rhq.core.pluginapi.util.FileUtils;
+import org.rhq.core.util.file.FileUtil;
+import org.rhq.core.util.stream.StreamUtil;
+import org.rhq.plugins.apache.parser.ApacheConfigReader;
+import org.rhq.plugins.apache.parser.ApacheDirective;
+import org.rhq.plugins.apache.parser.ApacheDirectiveTree;
+import org.rhq.plugins.apache.parser.ApacheParser;
+import org.rhq.plugins.apache.parser.ApacheParserImpl;
+import org.rhq.plugins.apache.util.HttpdAddressUtility;
+import org.rhq.plugins.apache.util.MockApacheBinaryInfo;
+import org.rhq.plugins.apache.util.MockProcessInfo;
+
+/**
+ *
+ *
+ * @author Lukas Krejci
+ */
+@Test
+public class SnmpMappingTest {
+
+ private File tmpDir;
+
+ private static final String[] VHOST_NAMES_CONFIGURATION_TEST_FILES = {
+ "snmp-mapping/httpd.conf",
+ "snmp-mapping/vhost-with-servername-by-ip.conf",
+ "snmp-mapping/vhost-with-servername-by-unresolvable-hostname.conf",
+ "snmp-mapping/vhost-without-servername-resolvable-ip.conf",
+ "snmp-mapping/vhost-without-servername-unresolvable-hostname.conf",
+ "snmp-mapping/vhost-without-servername-unresolvable-ip.conf"
+ };
+
+ private static final String[] EXPECTED_SNMP_NAMES = {
+ "the-main-server-name:42", //httpd.conf
+ "12.34.56.78:0", //vhost-with-servername-by-ip.conf
+ "this-will-never-resolve.weird-server.net:90", //vhost-with-servername-by-unresolvable-hostname.conf
+ "<<<LOCALHOST>>>:1002", //vhost-without-servernama-resolvable-ip.conf
+ "bogus_host_without_forward_dns:42", //vhost-without-servername-unresolvable-hostname.conf
+ "bogus_host_without_reverse_dns:1003" //vhost-without-servername-unresolvable-ip.conf
+ };
+
+ @BeforeClass
+ public void copyConfigurationFiles() throws Exception {
+ tmpDir = FileUtil.createTempDirectory("apache-runtime-config-tests", null, null);
+
+ for(String path : VHOST_NAMES_CONFIGURATION_TEST_FILES) {
+ copyResourceToFile(path, new File(tmpDir, path));
+ }
+ }
+
+ @BeforeClass
+ public void initExpectedResults() throws Exception {
+ String localhost = InetAddress.getLocalHost().getHostName();
+ for(int i = 0; i < EXPECTED_SNMP_NAMES.length; ++i) {
+ EXPECTED_SNMP_NAMES[i] = EXPECTED_SNMP_NAMES[i].replaceAll("<<<LOCALHOST>>>", localhost);
+ }
+ }
+
+ @AfterClass
+ public void deleteConfigurationFiles() throws IOException {
+ FileUtils.purge(tmpDir, true);
+ }
+
+
+ public void testVhostNames() {
+ MockApacheBinaryInfo binfo = new MockApacheBinaryInfo();
+ binfo.setVersion("2.2.17");
+ MockProcessInfo pinfo = new MockProcessInfo();
+ pinfo.setCommandLine(new String[] {"blahblah"});
+
+ ApacheDirectiveTree tree = new ApacheDirectiveTree();
+ ApacheParser parser = new ApacheParserImpl(tree, new File(tmpDir, "snmp-mapping").getAbsolutePath());
+ ApacheConfigReader.buildTree(new File(tmpDir, "snmp-mapping/httpd.conf").getAbsolutePath(), parser);
+
+ HttpdAddressUtility addrUtil = HttpdAddressUtility.get("2.2.17");
+ List<ApacheDirective> vhosts = tree.search("/<VirtualHost");
+ List<String> snmpNames = new ArrayList<String>(vhosts.size() + 1);
+ snmpNames.add(addrUtil.getHttpdInternalMainServerAddressRepresentation(tree).toString(false, false));
+ for(ApacheDirective vhost : vhosts) {
+ String vhostDef = vhost.getValues().get(0);
+ String serverName = null;
+ List<ApacheDirective> serverNames = vhost.getChildByName("ServerName");
+ if (serverNames.size() > 0) {
+ serverName = serverNames.get(serverNames.size() - 1).getValuesAsString();
+ }
+
+ snmpNames.add(addrUtil.getHttpdInternalVirtualHostAddressRepresentation(tree, vhostDef, serverName).toString(false, false));
+ }
+
+ assertEquals(snmpNames, Arrays.asList(EXPECTED_SNMP_NAMES));
+ }
+
+
+ private void copyResourceToFile(String resourcePath, File destination) throws IOException {
+ InputStream input = getClass().getClassLoader().getResourceAsStream(resourcePath);
+
+ if (input != null) {
+ destination.getParentFile().mkdirs();
+ destination.createNewFile();
+
+ StreamUtil.copy(input, new BufferedOutputStream(new FileOutputStream(destination)), true);
+ }
+ }
+}
diff --git a/modules/plugins/apache/src/test/resources/snmp-mapping/httpd.conf b/modules/plugins/apache/src/test/resources/snmp-mapping/httpd.conf
new file mode 100644
index 0000000..29a43eb
--- /dev/null
+++ b/modules/plugins/apache/src/test/resources/snmp-mapping/httpd.conf
@@ -0,0 +1,5 @@
+Listen 80
+Listen 127.0.0.1:90
+ServerName the-main-server-name:42
+
+Include vhost-*.conf
diff --git a/modules/plugins/apache/src/test/resources/snmp-mapping/vhost-with-servername-by-ip.conf b/modules/plugins/apache/src/test/resources/snmp-mapping/vhost-with-servername-by-ip.conf
new file mode 100644
index 0000000..978892c
--- /dev/null
+++ b/modules/plugins/apache/src/test/resources/snmp-mapping/vhost-with-servername-by-ip.conf
@@ -0,0 +1,3 @@
+<VirtualHost 127.0.0.1:1000>
+ ServerName 12.34.56.78
+</VirtualHost>
diff --git a/modules/plugins/apache/src/test/resources/snmp-mapping/vhost-with-servername-by-unresolvable-hostname.conf b/modules/plugins/apache/src/test/resources/snmp-mapping/vhost-with-servername-by-unresolvable-hostname.conf
new file mode 100644
index 0000000..d38cfc3
--- /dev/null
+++ b/modules/plugins/apache/src/test/resources/snmp-mapping/vhost-with-servername-by-unresolvable-hostname.conf
@@ -0,0 +1,3 @@
+<VirtualHost 127.0.0.1:1001>
+ ServerName this-will-never-resolve.weird-server.net:90
+</VirtualHost>
diff --git a/modules/plugins/apache/src/test/resources/snmp-mapping/vhost-without-servername-resolvable-ip.conf b/modules/plugins/apache/src/test/resources/snmp-mapping/vhost-without-servername-resolvable-ip.conf
new file mode 100644
index 0000000..16586d1
--- /dev/null
+++ b/modules/plugins/apache/src/test/resources/snmp-mapping/vhost-without-servername-resolvable-ip.conf
@@ -0,0 +1,3 @@
+<VirtualHost 127.0.0.1:1002>
+
+</VirtualHost>
diff --git a/modules/plugins/apache/src/test/resources/snmp-mapping/vhost-without-servername-unresolvable-hostname.conf b/modules/plugins/apache/src/test/resources/snmp-mapping/vhost-without-servername-unresolvable-hostname.conf
new file mode 100644
index 0000000..3ec4c24
--- /dev/null
+++ b/modules/plugins/apache/src/test/resources/snmp-mapping/vhost-without-servername-unresolvable-hostname.conf
@@ -0,0 +1,3 @@
+<VirtualHost unresolvable-hostname.weird-domain.net:1004>
+
+</VirtualHost>
diff --git a/modules/plugins/apache/src/test/resources/snmp-mapping/vhost-without-servername-unresolvable-ip.conf b/modules/plugins/apache/src/test/resources/snmp-mapping/vhost-without-servername-unresolvable-ip.conf
new file mode 100644
index 0000000..1637446
--- /dev/null
+++ b/modules/plugins/apache/src/test/resources/snmp-mapping/vhost-without-servername-unresolvable-ip.conf
@@ -0,0 +1,3 @@
+<VirtualHost 12.34.56.78:1003>
+
+</VirtualHost>
commit 08fff40554c621710e947990b80b06734ebced6e
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue May 3 16:18:18 2011 +0200
Adding IfVersion detection tests, removed the vhost-names test that will come in as standalone test because their not part of the runtime configuration extraction
diff --git a/modules/plugins/apache/src/test/java/org/rhq/plugins/apache/RuntimeConfigurationTest.java b/modules/plugins/apache/src/test/java/org/rhq/plugins/apache/RuntimeConfigurationTest.java
index 260c4c6..0b7e52e 100644
--- a/modules/plugins/apache/src/test/java/org/rhq/plugins/apache/RuntimeConfigurationTest.java
+++ b/modules/plugins/apache/src/test/java/org/rhq/plugins/apache/RuntimeConfigurationTest.java
@@ -36,6 +36,7 @@ import org.testng.annotations.Test;
import org.rhq.core.pluginapi.util.FileUtils;
import org.rhq.core.util.file.FileUtil;
+import org.rhq.core.util.stream.StreamUtil;
import org.rhq.plugins.apache.parser.ApacheConfigReader;
import org.rhq.plugins.apache.parser.ApacheDirective;
import org.rhq.plugins.apache.parser.ApacheDirectiveTree;
@@ -61,6 +62,7 @@ public class RuntimeConfigurationTest {
"runtime-config/conditional/ifdefine-undefined.conf",
"runtime-config/conditional/ifmodule-loaded.conf",
"runtime-config/conditional/ifmodule-not-loaded.conf",
+ "runtime-config/conditional/ifversion.conf",
"runtime-config/conditional/nested-mess.conf"
};
@@ -71,29 +73,17 @@ public class RuntimeConfigurationTest {
"runtime-config/incl-order/httpd.conf"
};
- private static final String[] VHOST_NAMES_CONFIGURATION_TEST_FILES = {
- "runtime-config/vhost-names/httpd.conf",
- "runtime-config/vhost-names/vhost-with-servername-by-ip.conf",
- "runtime-config/vhost-names/vhost-with-servername-by-unresolvable-hostname.conf",
- "runtime-config/vhost-names/vhost-without-servername-resolvable-ip.conf",
- "runtime-config/vhost-names/vhost-without-servername-unresolvable-ip.conf"
- };
-
@BeforeClass
public void copyConfigurationFiles() throws Exception {
tmpDir = FileUtil.createTempDirectory("apache-runtime-config-tests", null, null);
- for(String path : CONDITIONAL_CONFIGURATION_TEST_FILES) {
+ for(String path : CONDITIONAL_CONFIGURATION_TEST_FILES) {
copyResourceToFile(path, new File(tmpDir, path));
}
for(String path : INCLUSION_ORDER_CONFIGURATION_TEST_FILES) {
copyResourceToFile(path, new File(tmpDir, path));
}
-
- for(String path : VHOST_NAMES_CONFIGURATION_TEST_FILES) {
- copyResourceToFile(path, new File(tmpDir, path));
- }
}
@AfterClass
@@ -102,12 +92,10 @@ public class RuntimeConfigurationTest {
}
public void testConditionalInclusion() {
- //TODO add tests for IfVersion!!!
-
MockApacheBinaryInfo binfo = new MockApacheBinaryInfo();
binfo.setVersion("2.2.17");
MockProcessInfo pinfo = new MockProcessInfo();
- pinfo.setCommandLine(new String[] {"/usr/sbin/httpd", "-D", "DEFINED"});
+ pinfo.setCommandLine(new String[] {"blahblah", "-D", "DEFINED"});
ApacheDirectiveTree tree = new ApacheDirectiveTree();
ApacheParser parser = new ApacheParserImpl(tree, new File(tmpDir, "runtime-config/conditional").getAbsolutePath());
@@ -119,11 +107,16 @@ public class RuntimeConfigurationTest {
List<VhostSpec> expectedVhosts = new ArrayList<VhostSpec>();
- expectedVhosts.add(new VhostSpec(Collections.singleton("127.0.0.1:80"), "ifdefine.defined"));
- expectedVhosts.add(new VhostSpec(Collections.singleton("127.0.0.1:82"), "ifmodule.loaded.source-file"));
- expectedVhosts.add(new VhostSpec(Collections.singleton("127.0.0.1:83"), "ifmodule.loaded.module-name"));
- expectedVhosts.add(new VhostSpec(Collections.singleton("127.0.0.1:88"), "ifdefine.ifmodule.loaded.source-file"));
- expectedVhosts.add(new VhostSpec(Collections.singleton("127.0.0.1:89"), "ifdefine.ifmodule.loaded.module-name"));
+ expectedVhosts.add(new VhostSpec(Collections.singleton("127.0.0.1:100"), "ifdefine.defined"));
+ expectedVhosts.add(new VhostSpec(Collections.singleton("127.0.0.1:300"), "ifmodule.loaded.source-file"));
+ expectedVhosts.add(new VhostSpec(Collections.singleton("127.0.0.1:301"), "ifmodule.loaded.module-name"));
+ expectedVhosts.add(new VhostSpec(Collections.singleton("127.0.0.1:501"), "ifversion.module-loaded.implied-equals"));
+ expectedVhosts.add(new VhostSpec(Collections.singleton("127.0.0.1:502"), "ifversion.module-loaded.equals"));
+ expectedVhosts.add(new VhostSpec(Collections.singleton("127.0.0.1:503"), "ifversion.module-loaded.not-equals"));
+ expectedVhosts.add(new VhostSpec(Collections.singleton("127.0.0.1:504"), "ifversion.module-loaded.regex"));
+ expectedVhosts.add(new VhostSpec(Collections.singleton("127.0.0.1:505"), "ifversion.module-loaded.implied-regex"));
+ expectedVhosts.add(new VhostSpec(Collections.singleton("127.0.0.1:602"), "ifdefine.ifmodule.loaded.source-file"));
+ expectedVhosts.add(new VhostSpec(Collections.singleton("127.0.0.1:603"), "ifdefine.ifmodule.loaded.module-name"));
assertEquals(vhosts, expectedVhosts);
}
@@ -132,7 +125,7 @@ public class RuntimeConfigurationTest {
MockApacheBinaryInfo binfo = new MockApacheBinaryInfo();
binfo.setVersion("2.2.17");
MockProcessInfo pinfo = new MockProcessInfo();
- pinfo.setCommandLine(new String[] {"/usr/sbin/httpd"});
+ pinfo.setCommandLine(new String[] {"blahblah"});
ApacheDirectiveTree tree = new ApacheDirectiveTree();
ApacheParser parser = new ApacheParserImpl(tree, new File(tmpDir, "runtime-config/incl-order").getAbsolutePath());
@@ -149,39 +142,14 @@ public class RuntimeConfigurationTest {
assertEquals(listens.get(2).getValuesAsString(), "82");
}
- public void testVhostNames() {
- MockApacheBinaryInfo binfo = new MockApacheBinaryInfo();
- binfo.setVersion("2.2.17");
- MockProcessInfo pinfo = new MockProcessInfo();
- pinfo.setCommandLine(new String[] {"/usr/sbin/httpd"});
-
- ApacheDirectiveTree tree = new ApacheDirectiveTree();
- ApacheParser parser = new ApacheParserImpl(tree, new File(tmpDir, "runtime-config/vhost-names").getAbsolutePath());
- ApacheConfigReader.buildTree(new File(tmpDir, "runtime-config/vhost-names/httpd.conf").getAbsolutePath(), parser);
-
- tree = RuntimeApacheConfiguration.extract(tree, pinfo, binfo, ApacheServerDiscoveryComponent.MODULE_SOURCE_FILE_TO_MODULE_NAME_20);
-
- //TODO implement this
- }
-
- private void copyResourceToFile(String resourcePath, File destination) throws IOException {
+ private void copyResourceToFile(String resourcePath, File destination) throws IOException {
InputStream input = getClass().getClassLoader().getResourceAsStream(resourcePath);
if (input != null) {
destination.getParentFile().mkdirs();
destination.createNewFile();
- BufferedOutputStream output = new BufferedOutputStream(new FileOutputStream(destination));
-
- try {
- int data;
- while((data = input.read()) != -1) {
- output.write(data);
- }
- } finally {
- input.close();
- output.close();
- }
+ StreamUtil.copy(input, new BufferedOutputStream(new FileOutputStream(destination)), true);
}
}
diff --git a/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifdefine-defined.conf b/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifdefine-defined.conf
index 7631a5c..c098499 100644
--- a/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifdefine-defined.conf
+++ b/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifdefine-defined.conf
@@ -1,5 +1,5 @@
<IfDefine DEFINED>
- <VirtualHost 127.0.0.1:80>
+ <VirtualHost 127.0.0.1:100>
ServerName ifdefine.defined
</VirtualHost>
</IfDefine>
diff --git a/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifdefine-undefined.conf b/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifdefine-undefined.conf
index 6acd1a5..03d0c07 100644
--- a/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifdefine-undefined.conf
+++ b/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifdefine-undefined.conf
@@ -1,5 +1,5 @@
<IfDefine UNDEFINED>
- <VirtualHost 127.0.0.1:81>
+ <VirtualHost 127.0.0.1:200>
ServerName ifdefine.undefined
</VirtualHost>
</IfDefine>
diff --git a/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifmodule-loaded.conf b/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifmodule-loaded.conf
index f9aba0a..a977465 100644
--- a/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifmodule-loaded.conf
+++ b/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifmodule-loaded.conf
@@ -1,13 +1,13 @@
LoadModule alias_module
<IfModule mod_alias.c>
- <VirtualHost 127.0.0.1:82>
+ <VirtualHost 127.0.0.1:300>
ServerName ifmodule.loaded.source-file
</VirtualHost>
</IfModule>
<IfModule alias_module>
- <VirtualHost 127.0.0.1:83>
+ <VirtualHost 127.0.0.1:301>
ServerName ifmodule.loaded.module-name
</VirtualHost>
</IfModule>
diff --git a/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifmodule-not-loaded.conf b/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifmodule-not-loaded.conf
index 611ba1a..fffb61d 100644
--- a/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifmodule-not-loaded.conf
+++ b/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifmodule-not-loaded.conf
@@ -1,11 +1,11 @@
<IfModule mod_not_loaded.c>
- <VirtualHost 127.0.0.1:84>
+ <VirtualHost 127.0.0.1:400>
ServerName ifmodule.not-loaded.source-file
</VirtualHost>
</IfModule>
<IfModule not_loaded_module>
- <VirtualHost 127.0.0.1:85>
+ <VirtualHost 127.0.0.1:401>
ServerName ifmodule.not-loaded.module-name
</VirtualHost>
</IfModule>
diff --git a/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifversion.conf b/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifversion.conf
new file mode 100644
index 0000000..46413de
--- /dev/null
+++ b/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifversion.conf
@@ -0,0 +1,43 @@
+<IfVersion 2.2.17>
+ <VirtualHost 127.0.0.1:500>
+ ServerName ifversion.module-not-loaded
+ </VirtualHost>
+</IfVersion>
+
+LoadModule version_module
+
+<IfVersion 2.2.17>
+ <VirtualHost 127.0.0.1:501>
+ ServerName ifversion.module-loaded.implied-equals
+ </VirtualHost>
+</IfVersion>
+
+<IfVersion = 2.2.17>
+ <VirtualHost 127.0.0.1:502>
+ ServerName ifversion.module-loaded.equals
+ </VirtualHost>
+</IfVersion>
+
+<IfVersion != 2.2.18>
+ <VirtualHost 127.0.0.1:503>
+ ServerName ifversion.module-loaded.not-equals
+ </VirtualHost>
+</IfVersion>
+
+<IfVersion ~ 2\.2\.1[7-9]>
+ <VirtualHost 127.0.0.1:504>
+ ServerName ifversion.module-loaded.regex
+ </VirtualHost>
+</IfVersion>
+
+<IfVersion /2\.2\.1[7-9]/>
+ <VirtualHost 127.0.0.1:505>
+ ServerName ifversion.module-loaded.implied-regex
+ </VirtualHost>
+</IfVersion>
+
+<IfVersion /2\.2\.1[8-9]/>
+ <VirtualHost 127.0.0.1:506>
+ ServerName ifversion.module-loaded.implied-regex.unmatched
+ </VirtualHost>
+</IfVersion>
\ No newline at end of file
diff --git a/modules/plugins/apache/src/test/resources/runtime-config/conditional/nested-mess.conf b/modules/plugins/apache/src/test/resources/runtime-config/conditional/nested-mess.conf
index 5a2ab62..edde513 100644
--- a/modules/plugins/apache/src/test/resources/runtime-config/conditional/nested-mess.conf
+++ b/modules/plugins/apache/src/test/resources/runtime-config/conditional/nested-mess.conf
@@ -1,24 +1,24 @@
<IfDefine DEFINED>
<IfModule mod_not_loaded.c>
- <VirtualHost 127.0.0.1:86>
+ <VirtualHost 127.0.0.1:600>
ServerName ifdefine.ifmodule.not-loaded.source-file
</VirtualHost>
</IfModule>
<IfModule not_loaded_module>
- <VirtualHost 127.0.0.1:87>
+ <VirtualHost 127.0.0.1:601>
ServerName ifdefine.ifmodule.not-loaded.module-name
</VirtualHost>
</IfModule>
<IfModule mod_alias.c>
- <VirtualHost 127.0.0.1:88>
+ <VirtualHost 127.0.0.1:602>
ServerName ifdefine.ifmodule.loaded.source-file
</VirtualHost>
</IfModule>
<IfModule alias_module>
- <VirtualHost 127.0.0.1:89>
+ <VirtualHost 127.0.0.1:603>
ServerName ifdefine.ifmodule.loaded.module-name
</VirtualHost>
</IfModule>
@@ -26,28 +26,26 @@
<IfDefine UNDEFINED>
<IfModule mod_not_loaded.c>
- <VirtualHost 127.0.0.1:90>
+ <VirtualHost 127.0.0.1:604>
ServerName not-ifdefine.ifmodule.not-loaded.source-file
</VirtualHost>
</IfModule>
<IfModule not_loaded_module>
- <VirtualHost 127.0.0.1:91>
+ <VirtualHost 127.0.0.1:605>
ServerName not-ifdefine.ifmodule.not-loaded.module-name
</VirtualHost>
</IfModule>
<IfModule mod_alias.c>
- <VirtualHost 127.0.0.1:92>
+ <VirtualHost 127.0.0.1:606>
ServerName not-ifdefine.ifmodule.loaded.source-file
</VirtualHost>
</IfModule>
<IfModule alias_module>
- <VirtualHost 127.0.0.1:93>
+ <VirtualHost 127.0.0.1:607>
ServerName not-ifdefine.ifmodule.loaded.module-name
</VirtualHost>
</IfModule>
</IfDefine>
-
-
diff --git a/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/httpd.conf b/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/httpd.conf
deleted file mode 100644
index 29a43eb..0000000
--- a/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/httpd.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-Listen 80
-Listen 127.0.0.1:90
-ServerName the-main-server-name:42
-
-Include vhost-*.conf
diff --git a/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/vhost-with-servername-by-ip.conf b/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/vhost-with-servername-by-ip.conf
deleted file mode 100644
index 978892c..0000000
--- a/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/vhost-with-servername-by-ip.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-<VirtualHost 127.0.0.1:1000>
- ServerName 12.34.56.78
-</VirtualHost>
diff --git a/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/vhost-with-servername-by-unresolvable-hostname.conf b/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/vhost-with-servername-by-unresolvable-hostname.conf
deleted file mode 100644
index d38cfc3..0000000
--- a/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/vhost-with-servername-by-unresolvable-hostname.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-<VirtualHost 127.0.0.1:1001>
- ServerName this-will-never-resolve.weird-server.net:90
-</VirtualHost>
diff --git a/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/vhost-without-servername-resolvable-ip.conf b/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/vhost-without-servername-resolvable-ip.conf
deleted file mode 100644
index 16586d1..0000000
--- a/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/vhost-without-servername-resolvable-ip.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-<VirtualHost 127.0.0.1:1002>
-
-</VirtualHost>
diff --git a/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/vhost-without-servername-unresolvable-ip.conf b/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/vhost-without-servername-unresolvable-ip.conf
deleted file mode 100644
index 1637446..0000000
--- a/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/vhost-without-servername-unresolvable-ip.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-<VirtualHost 12.34.56.78:1003>
-
-</VirtualHost>
commit 7d71991e8df59f75bdfe5c9c2929f8d27956b05c
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue May 3 16:16:22 2011 +0200
BZ 700616 - behave the same as apache when handling the corner case of unresolvable hostnames in virtual host address definition.
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/HttpdAddressUtility.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/HttpdAddressUtility.java
index 61fc5b9..ebb315b 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/HttpdAddressUtility.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/HttpdAddressUtility.java
@@ -410,6 +410,12 @@ public enum HttpdAddressUtility {
}
} catch (UnknownHostException e) {
ret.host = BOGUS_HOST_WITHOUT_FORWARD_DNS;
+
+ //weird, as it seems, apache uses the port of the main server
+ //with the unknown host even if the port was specified in the vhost
+ //definition
+ Address mainAddress = getHttpdInternalMainServerAddressRepresentation(runtimeConfig);
+ ret.port = mainAddress.port;
}
}
commit 8c7ba989644f307a4a783a31e83f76639ed92a71
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon May 2 17:54:09 2011 +0200
Tests for the inclusion order and IfModule and IfDefine detection.
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/ApacheBinaryInfo.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/ApacheBinaryInfo.java
index aedb144..724fc19 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/ApacheBinaryInfo.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/ApacheBinaryInfo.java
@@ -65,7 +65,7 @@ public class ApacheBinaryInfo {
private Set<String> compiledInModules = new HashSet<String>();
private Set<String> compiledInDefines = new HashSet<String>();
- private ApacheBinaryInfo(@NotNull
+ protected ApacheBinaryInfo(@NotNull
String binaryPath) {
this.binaryPath = binaryPath;
}
diff --git a/modules/plugins/apache/src/test/java/org/rhq/plugins/apache/RuntimeConfigurationTest.java b/modules/plugins/apache/src/test/java/org/rhq/plugins/apache/RuntimeConfigurationTest.java
new file mode 100644
index 0000000..260c4c6
--- /dev/null
+++ b/modules/plugins/apache/src/test/java/org/rhq/plugins/apache/RuntimeConfigurationTest.java
@@ -0,0 +1,240 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 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.plugins.apache;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+import static org.testng.Assert.*;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.rhq.core.pluginapi.util.FileUtils;
+import org.rhq.core.util.file.FileUtil;
+import org.rhq.plugins.apache.parser.ApacheConfigReader;
+import org.rhq.plugins.apache.parser.ApacheDirective;
+import org.rhq.plugins.apache.parser.ApacheDirectiveTree;
+import org.rhq.plugins.apache.parser.ApacheParser;
+import org.rhq.plugins.apache.parser.ApacheParserImpl;
+import org.rhq.plugins.apache.util.MockApacheBinaryInfo;
+import org.rhq.plugins.apache.util.MockProcessInfo;
+import org.rhq.plugins.apache.util.RuntimeApacheConfiguration;
+
+/**
+ *
+ *
+ * @author Lukas Krejci
+ */
+@Test
+public class RuntimeConfigurationTest {
+
+ private File tmpDir;
+
+ private static final String[] CONDITIONAL_CONFIGURATION_TEST_FILES = {
+ "runtime-config/conditional/httpd.conf",
+ "runtime-config/conditional/ifdefine-defined.conf",
+ "runtime-config/conditional/ifdefine-undefined.conf",
+ "runtime-config/conditional/ifmodule-loaded.conf",
+ "runtime-config/conditional/ifmodule-not-loaded.conf",
+ "runtime-config/conditional/nested-mess.conf"
+ };
+
+ private static final String[] INCLUSION_ORDER_CONFIGURATION_TEST_FILES = {
+ "runtime-config/incl-order/a.conf",
+ "runtime-config/incl-order/b.conf",
+ "runtime-config/incl-order/c.conf",
+ "runtime-config/incl-order/httpd.conf"
+ };
+
+ private static final String[] VHOST_NAMES_CONFIGURATION_TEST_FILES = {
+ "runtime-config/vhost-names/httpd.conf",
+ "runtime-config/vhost-names/vhost-with-servername-by-ip.conf",
+ "runtime-config/vhost-names/vhost-with-servername-by-unresolvable-hostname.conf",
+ "runtime-config/vhost-names/vhost-without-servername-resolvable-ip.conf",
+ "runtime-config/vhost-names/vhost-without-servername-unresolvable-ip.conf"
+ };
+
+ @BeforeClass
+ public void copyConfigurationFiles() throws Exception {
+ tmpDir = FileUtil.createTempDirectory("apache-runtime-config-tests", null, null);
+
+ for(String path : CONDITIONAL_CONFIGURATION_TEST_FILES) {
+ copyResourceToFile(path, new File(tmpDir, path));
+ }
+
+ for(String path : INCLUSION_ORDER_CONFIGURATION_TEST_FILES) {
+ copyResourceToFile(path, new File(tmpDir, path));
+ }
+
+ for(String path : VHOST_NAMES_CONFIGURATION_TEST_FILES) {
+ copyResourceToFile(path, new File(tmpDir, path));
+ }
+ }
+
+ @AfterClass
+ public void deleteConfigurationFiles() throws IOException {
+ FileUtils.purge(tmpDir, true);
+ }
+
+ public void testConditionalInclusion() {
+ //TODO add tests for IfVersion!!!
+
+ MockApacheBinaryInfo binfo = new MockApacheBinaryInfo();
+ binfo.setVersion("2.2.17");
+ MockProcessInfo pinfo = new MockProcessInfo();
+ pinfo.setCommandLine(new String[] {"/usr/sbin/httpd", "-D", "DEFINED"});
+
+ ApacheDirectiveTree tree = new ApacheDirectiveTree();
+ ApacheParser parser = new ApacheParserImpl(tree, new File(tmpDir, "runtime-config/conditional").getAbsolutePath());
+ ApacheConfigReader.buildTree(new File(tmpDir, "runtime-config/conditional/httpd.conf").getAbsolutePath(), parser);
+
+ tree = RuntimeApacheConfiguration.extract(tree, pinfo, binfo, ApacheServerDiscoveryComponent.MODULE_SOURCE_FILE_TO_MODULE_NAME_20);
+
+ List<VhostSpec> vhosts = VhostSpec.detect(tree);
+
+ List<VhostSpec> expectedVhosts = new ArrayList<VhostSpec>();
+
+ expectedVhosts.add(new VhostSpec(Collections.singleton("127.0.0.1:80"), "ifdefine.defined"));
+ expectedVhosts.add(new VhostSpec(Collections.singleton("127.0.0.1:82"), "ifmodule.loaded.source-file"));
+ expectedVhosts.add(new VhostSpec(Collections.singleton("127.0.0.1:83"), "ifmodule.loaded.module-name"));
+ expectedVhosts.add(new VhostSpec(Collections.singleton("127.0.0.1:88"), "ifdefine.ifmodule.loaded.source-file"));
+ expectedVhosts.add(new VhostSpec(Collections.singleton("127.0.0.1:89"), "ifdefine.ifmodule.loaded.module-name"));
+
+ assertEquals(vhosts, expectedVhosts);
+ }
+
+ public void testInclusionOrder() {
+ MockApacheBinaryInfo binfo = new MockApacheBinaryInfo();
+ binfo.setVersion("2.2.17");
+ MockProcessInfo pinfo = new MockProcessInfo();
+ pinfo.setCommandLine(new String[] {"/usr/sbin/httpd"});
+
+ ApacheDirectiveTree tree = new ApacheDirectiveTree();
+ ApacheParser parser = new ApacheParserImpl(tree, new File(tmpDir, "runtime-config/incl-order").getAbsolutePath());
+ ApacheConfigReader.buildTree(new File(tmpDir, "runtime-config/incl-order/httpd.conf").getAbsolutePath(), parser);
+
+ tree = RuntimeApacheConfiguration.extract(tree, pinfo, binfo, ApacheServerDiscoveryComponent.MODULE_SOURCE_FILE_TO_MODULE_NAME_20);
+
+ List<ApacheDirective> listens = tree.search("/Listen");
+
+ assertEquals(listens.size(), 3, "There should be 3 listen directives");
+
+ assertEquals(listens.get(0).getValuesAsString(), "80");
+ assertEquals(listens.get(1).getValuesAsString(), "81");
+ assertEquals(listens.get(2).getValuesAsString(), "82");
+ }
+
+ public void testVhostNames() {
+ MockApacheBinaryInfo binfo = new MockApacheBinaryInfo();
+ binfo.setVersion("2.2.17");
+ MockProcessInfo pinfo = new MockProcessInfo();
+ pinfo.setCommandLine(new String[] {"/usr/sbin/httpd"});
+
+ ApacheDirectiveTree tree = new ApacheDirectiveTree();
+ ApacheParser parser = new ApacheParserImpl(tree, new File(tmpDir, "runtime-config/vhost-names").getAbsolutePath());
+ ApacheConfigReader.buildTree(new File(tmpDir, "runtime-config/vhost-names/httpd.conf").getAbsolutePath(), parser);
+
+ tree = RuntimeApacheConfiguration.extract(tree, pinfo, binfo, ApacheServerDiscoveryComponent.MODULE_SOURCE_FILE_TO_MODULE_NAME_20);
+
+ //TODO implement this
+ }
+
+ private void copyResourceToFile(String resourcePath, File destination) throws IOException {
+ InputStream input = getClass().getClassLoader().getResourceAsStream(resourcePath);
+
+ if (input != null) {
+ destination.getParentFile().mkdirs();
+ destination.createNewFile();
+
+ BufferedOutputStream output = new BufferedOutputStream(new FileOutputStream(destination));
+
+ try {
+ int data;
+ while((data = input.read()) != -1) {
+ output.write(data);
+ }
+ } finally {
+ input.close();
+ output.close();
+ }
+ }
+ }
+
+ private static class VhostSpec {
+ public List<String> definition;
+ public String serverName;
+
+ public static List<VhostSpec> detect(ApacheDirectiveTree tree) {
+ List<VhostSpec> ret = new ArrayList<VhostSpec>();
+
+ for(ApacheDirective vhost : tree.search("/<VirtualHost")) {
+ ret.add(new VhostSpec(vhost));
+ }
+
+ return ret;
+ }
+
+ public VhostSpec(ApacheDirective vhost) {
+ definition = vhost.getValues();
+ List<ApacheDirective> serverNames = vhost.getChildByName("ServerName");
+ if (serverNames.size() > 0) {
+ serverName = serverNames.get(0).getValuesAsString();
+ }
+ }
+
+ public VhostSpec(Collection<String> definition, String serverName) {
+ this.definition = new ArrayList<String>(definition);
+ this.serverName = serverName;
+ }
+
+ @Override
+ public String toString() {
+ return "VhostSpec[serverName='" + serverName + "', definition=" + definition + "]";
+ }
+
+ @Override
+ public int hashCode() {
+ return serverName.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ if (other == this) {
+ return true;
+ }
+
+ if (!(other instanceof VhostSpec)) {
+ return false;
+ }
+
+ VhostSpec o = (VhostSpec) other;
+
+ return serverName.equals(o.serverName) && definition.equals(o.definition);
+ }
+ }
+}
diff --git a/modules/plugins/apache/src/test/java/org/rhq/plugins/apache/util/MockApacheBinaryInfo.java b/modules/plugins/apache/src/test/java/org/rhq/plugins/apache/util/MockApacheBinaryInfo.java
new file mode 100644
index 0000000..adb5ac8
--- /dev/null
+++ b/modules/plugins/apache/src/test/java/org/rhq/plugins/apache/util/MockApacheBinaryInfo.java
@@ -0,0 +1,126 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 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.plugins.apache.util;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Class used to represent the apache binary in the runtime configuration tests.
+ *
+ * @author Lukas Krejci
+ */
+public class MockApacheBinaryInfo extends ApacheBinaryInfo {
+
+ private Set<String> defines = new HashSet<String>();
+ private Set<String> modules = new HashSet<String>();
+ private String configFile;
+ private String binaryPath;
+ private String built;
+ private long lastModified;
+ private String mpm;
+ private String root;
+ private String version;
+
+ public MockApacheBinaryInfo() {
+ super(null);
+ }
+
+ @Override
+ public String getBinaryPath() {
+ return binaryPath;
+ }
+
+ public void setBinaryPath(String path) {
+ this.binaryPath = path;
+ }
+
+ @Override
+ public String getBuilt() {
+ return built;
+ }
+
+ public void setBuilt(String built) {
+ this.built = built;
+ }
+
+ @Override
+ public Set<String> getCompiledInDefines() {
+ return defines;
+ }
+
+ public void setCompiledInDefines(Set<String> defines) {
+ this.defines = defines;
+ }
+
+ @Override
+ public Set<String> getCompiledInModules() {
+ return modules;
+ }
+
+ public void setCompiledInModules(Set<String> modules) {
+ this.modules = modules;
+ }
+
+ @Override
+ public String getCtl() {
+ return configFile;
+ }
+
+ public void setCtl(String ctl) {
+ this.configFile = ctl;
+ }
+
+ @Override
+ public long getLastModified() {
+ return lastModified;
+ }
+
+ public void setLastModified(long lastModified) {
+ this.lastModified = lastModified;
+ }
+
+ @Override
+ public String getMpm() {
+ return mpm;
+ }
+
+ public void setMpm(String mpm) {
+ this.mpm = mpm;
+ }
+
+ @Override
+ public String getRoot() {
+ return root;
+ }
+
+ public void setRoot(String root) {
+ this.root = root;
+ }
+
+ @Override
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+}
diff --git a/modules/plugins/apache/src/test/java/org/rhq/plugins/apache/util/MockProcessInfo.java b/modules/plugins/apache/src/test/java/org/rhq/plugins/apache/util/MockProcessInfo.java
new file mode 100644
index 0000000..2832ce2
--- /dev/null
+++ b/modules/plugins/apache/src/test/java/org/rhq/plugins/apache/util/MockProcessInfo.java
@@ -0,0 +1,51 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 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.plugins.apache.util;
+
+import org.rhq.core.system.ProcessInfo;
+
+/**
+ * Class used to pretend the apache process info in the runtime configuration tests.
+ *
+ * @author Lukas Krejci
+ */
+public class MockProcessInfo extends ProcessInfo {
+
+ private long pid;
+ private String[] commandLine;
+
+ @Override
+ public long getPid() {
+ return pid;
+ }
+
+ public void setPid(long pid) {
+ this.pid = pid;
+ }
+
+ @Override
+ public String[] getCommandLine() {
+ return commandLine;
+ }
+
+ public void setCommandLine(String[] commandLine) {
+ this.commandLine = commandLine;
+ }
+}
diff --git a/modules/plugins/apache/src/test/resources/runtime-config/conditional/httpd.conf b/modules/plugins/apache/src/test/resources/runtime-config/conditional/httpd.conf
new file mode 100644
index 0000000..7325704
--- /dev/null
+++ b/modules/plugins/apache/src/test/resources/runtime-config/conditional/httpd.conf
@@ -0,0 +1,2 @@
+Include if*.conf
+Include nested-mess.conf
diff --git a/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifdefine-defined.conf b/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifdefine-defined.conf
new file mode 100644
index 0000000..7631a5c
--- /dev/null
+++ b/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifdefine-defined.conf
@@ -0,0 +1,5 @@
+<IfDefine DEFINED>
+ <VirtualHost 127.0.0.1:80>
+ ServerName ifdefine.defined
+ </VirtualHost>
+</IfDefine>
diff --git a/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifdefine-undefined.conf b/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifdefine-undefined.conf
new file mode 100644
index 0000000..6acd1a5
--- /dev/null
+++ b/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifdefine-undefined.conf
@@ -0,0 +1,5 @@
+<IfDefine UNDEFINED>
+ <VirtualHost 127.0.0.1:81>
+ ServerName ifdefine.undefined
+ </VirtualHost>
+</IfDefine>
diff --git a/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifmodule-loaded.conf b/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifmodule-loaded.conf
new file mode 100644
index 0000000..f9aba0a
--- /dev/null
+++ b/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifmodule-loaded.conf
@@ -0,0 +1,13 @@
+LoadModule alias_module
+
+<IfModule mod_alias.c>
+ <VirtualHost 127.0.0.1:82>
+ ServerName ifmodule.loaded.source-file
+ </VirtualHost>
+</IfModule>
+
+<IfModule alias_module>
+ <VirtualHost 127.0.0.1:83>
+ ServerName ifmodule.loaded.module-name
+ </VirtualHost>
+</IfModule>
diff --git a/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifmodule-not-loaded.conf b/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifmodule-not-loaded.conf
new file mode 100644
index 0000000..611ba1a
--- /dev/null
+++ b/modules/plugins/apache/src/test/resources/runtime-config/conditional/ifmodule-not-loaded.conf
@@ -0,0 +1,11 @@
+<IfModule mod_not_loaded.c>
+ <VirtualHost 127.0.0.1:84>
+ ServerName ifmodule.not-loaded.source-file
+ </VirtualHost>
+</IfModule>
+
+<IfModule not_loaded_module>
+ <VirtualHost 127.0.0.1:85>
+ ServerName ifmodule.not-loaded.module-name
+ </VirtualHost>
+</IfModule>
diff --git a/modules/plugins/apache/src/test/resources/runtime-config/conditional/nested-mess.conf b/modules/plugins/apache/src/test/resources/runtime-config/conditional/nested-mess.conf
new file mode 100644
index 0000000..5a2ab62
--- /dev/null
+++ b/modules/plugins/apache/src/test/resources/runtime-config/conditional/nested-mess.conf
@@ -0,0 +1,53 @@
+<IfDefine DEFINED>
+ <IfModule mod_not_loaded.c>
+ <VirtualHost 127.0.0.1:86>
+ ServerName ifdefine.ifmodule.not-loaded.source-file
+ </VirtualHost>
+ </IfModule>
+
+ <IfModule not_loaded_module>
+ <VirtualHost 127.0.0.1:87>
+ ServerName ifdefine.ifmodule.not-loaded.module-name
+ </VirtualHost>
+ </IfModule>
+
+ <IfModule mod_alias.c>
+ <VirtualHost 127.0.0.1:88>
+ ServerName ifdefine.ifmodule.loaded.source-file
+ </VirtualHost>
+ </IfModule>
+
+ <IfModule alias_module>
+ <VirtualHost 127.0.0.1:89>
+ ServerName ifdefine.ifmodule.loaded.module-name
+ </VirtualHost>
+ </IfModule>
+</IfDefine>
+
+<IfDefine UNDEFINED>
+ <IfModule mod_not_loaded.c>
+ <VirtualHost 127.0.0.1:90>
+ ServerName not-ifdefine.ifmodule.not-loaded.source-file
+ </VirtualHost>
+ </IfModule>
+
+ <IfModule not_loaded_module>
+ <VirtualHost 127.0.0.1:91>
+ ServerName not-ifdefine.ifmodule.not-loaded.module-name
+ </VirtualHost>
+ </IfModule>
+
+ <IfModule mod_alias.c>
+ <VirtualHost 127.0.0.1:92>
+ ServerName not-ifdefine.ifmodule.loaded.source-file
+ </VirtualHost>
+ </IfModule>
+
+ <IfModule alias_module>
+ <VirtualHost 127.0.0.1:93>
+ ServerName not-ifdefine.ifmodule.loaded.module-name
+ </VirtualHost>
+ </IfModule>
+</IfDefine>
+
+
diff --git a/modules/plugins/apache/src/test/resources/runtime-config/incl-order/a.conf b/modules/plugins/apache/src/test/resources/runtime-config/incl-order/a.conf
new file mode 100644
index 0000000..5c1d82b
--- /dev/null
+++ b/modules/plugins/apache/src/test/resources/runtime-config/incl-order/a.conf
@@ -0,0 +1 @@
+Listen 80
diff --git a/modules/plugins/apache/src/test/resources/runtime-config/incl-order/b.conf b/modules/plugins/apache/src/test/resources/runtime-config/incl-order/b.conf
new file mode 100644
index 0000000..15adf3c
--- /dev/null
+++ b/modules/plugins/apache/src/test/resources/runtime-config/incl-order/b.conf
@@ -0,0 +1 @@
+Listen 81
diff --git a/modules/plugins/apache/src/test/resources/runtime-config/incl-order/c.conf b/modules/plugins/apache/src/test/resources/runtime-config/incl-order/c.conf
new file mode 100644
index 0000000..dd36fbd
--- /dev/null
+++ b/modules/plugins/apache/src/test/resources/runtime-config/incl-order/c.conf
@@ -0,0 +1 @@
+Listen 82
diff --git a/modules/plugins/apache/src/test/resources/runtime-config/incl-order/httpd.conf b/modules/plugins/apache/src/test/resources/runtime-config/incl-order/httpd.conf
new file mode 100644
index 0000000..ee1ee60
--- /dev/null
+++ b/modules/plugins/apache/src/test/resources/runtime-config/incl-order/httpd.conf
@@ -0,0 +1 @@
+Include ?.conf
diff --git a/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/httpd.conf b/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/httpd.conf
new file mode 100644
index 0000000..29a43eb
--- /dev/null
+++ b/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/httpd.conf
@@ -0,0 +1,5 @@
+Listen 80
+Listen 127.0.0.1:90
+ServerName the-main-server-name:42
+
+Include vhost-*.conf
diff --git a/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/vhost-with-servername-by-ip.conf b/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/vhost-with-servername-by-ip.conf
new file mode 100644
index 0000000..978892c
--- /dev/null
+++ b/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/vhost-with-servername-by-ip.conf
@@ -0,0 +1,3 @@
+<VirtualHost 127.0.0.1:1000>
+ ServerName 12.34.56.78
+</VirtualHost>
diff --git a/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/vhost-with-servername-by-unresolvable-hostname.conf b/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/vhost-with-servername-by-unresolvable-hostname.conf
new file mode 100644
index 0000000..d38cfc3
--- /dev/null
+++ b/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/vhost-with-servername-by-unresolvable-hostname.conf
@@ -0,0 +1,3 @@
+<VirtualHost 127.0.0.1:1001>
+ ServerName this-will-never-resolve.weird-server.net:90
+</VirtualHost>
diff --git a/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/vhost-without-servername-resolvable-ip.conf b/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/vhost-without-servername-resolvable-ip.conf
new file mode 100644
index 0000000..16586d1
--- /dev/null
+++ b/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/vhost-without-servername-resolvable-ip.conf
@@ -0,0 +1,3 @@
+<VirtualHost 127.0.0.1:1002>
+
+</VirtualHost>
diff --git a/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/vhost-without-servername-unresolvable-ip.conf b/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/vhost-without-servername-unresolvable-ip.conf
new file mode 100644
index 0000000..1637446
--- /dev/null
+++ b/modules/plugins/apache/src/test/resources/runtime-config/vhost-names/vhost-without-servername-unresolvable-ip.conf
@@ -0,0 +1,3 @@
+<VirtualHost 12.34.56.78:1003>
+
+</VirtualHost>
commit 2632a30b0bc37eaabbac4e82afc8388411cb34dd
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon May 2 17:51:42 2011 +0200
BZ 700616 - porting over the alphabetic order awareness in glob patterns from master
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheParserImpl.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheParserImpl.java
index 686625e..f0e966f 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheParserImpl.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheParserImpl.java
@@ -47,6 +47,6 @@ public class ApacheParserImpl implements ApacheParser{
File check = new File(foundInclude);
File root = new File(check.isAbsolute() ? Glob.rootPortion(foundInclude) : serverRootPath);
- return Glob.match(root, foundInclude);
+ return Glob.match(root, foundInclude, Glob.ALPHABETICAL_COMPARATOR);
}
}
diff --git a/modules/plugins/augeas/src/main/java/org/rhq/augeas/config/AugeasConfigurationSimple.java b/modules/plugins/augeas/src/main/java/org/rhq/augeas/config/AugeasConfigurationSimple.java
index 3ab8e26..0fa093c 100644
--- a/modules/plugins/augeas/src/main/java/org/rhq/augeas/config/AugeasConfigurationSimple.java
+++ b/modules/plugins/augeas/src/main/java/org/rhq/augeas/config/AugeasConfigurationSimple.java
@@ -132,7 +132,7 @@ public class AugeasConfigurationSimple implements AugeasConfiguration {
throw new IllegalStateException("Expecting at least once inclusion pattern for configuration files.");
}
- List<File> files = Glob.matchAll(root, includeGlobs);
+ List<File> files = Glob.matchAll(root, includeGlobs, Glob.ALPHABETICAL_COMPARATOR);
if (module.getExcludedGlobs() != null) {
List<String> excludeGlobs = module.getExcludedGlobs();
diff --git a/modules/plugins/augeas/src/main/java/org/rhq/augeas/util/Glob.java b/modules/plugins/augeas/src/main/java/org/rhq/augeas/util/Glob.java
index d41d2a2..c61f932 100644
--- a/modules/plugins/augeas/src/main/java/org/rhq/augeas/util/Glob.java
+++ b/modules/plugins/augeas/src/main/java/org/rhq/augeas/util/Glob.java
@@ -27,6 +27,7 @@ import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
+import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
import org.apache.commons.logging.Log;
@@ -41,6 +42,16 @@ public class Glob {
private static final Log log = LogFactory.getLog(Glob.class);
+ public static final Comparator<File> ALPHABETICAL_COMPARATOR = new Comparator<File>() {
+
+ public int compare(File o1, File o2) {
+ String path1 = o1.getAbsolutePath();
+ String path2 = o2.getAbsolutePath();
+
+ return path1.compareTo(path2);
+ }
+ };
+
private Glob() {
}
@@ -79,6 +90,16 @@ public class Glob {
}
/**
+ * This is an overloaded version of the {@link #match(File, String, Comparator)} method
+ * that passes <code>null</code> as the comparator to use.
+ *
+ * @see #match(File, String, Comparator)
+ */
+ public static List<File> match(File parentPath, String globPattern) {
+ return match(parentPath, globPattern, null);
+ }
+
+ /**
* Returns a fixed size list of matches.
*
* The parent path specifies the "root" from which the glob pattern applies.
@@ -90,9 +111,10 @@ public class Glob {
*
* @param parentPath the parent path to start the pattern search
* @param globPattern the glob pattern to match against
+ * @param resultComparator the comparator using which to sort the results or null if no sorting is necessary
* @return the list of matches
*/
- public static List<File> match(File parentPath, String globPattern) {
+ public static List<File> match(File parentPath, String globPattern, Comparator<? super File> resultComparator) {
if (!parentPath.exists()) {
throw new IllegalArgumentException("Path '" + parentPath + "' does not exist.");
}
@@ -133,6 +155,11 @@ public class Glob {
log.debug("Could list files in " + parentPath);
return Collections.emptyList();
}
+
+ if (resultComparator != null) {
+ Arrays.sort(files, resultComparator);
+ }
+
return Arrays.asList(files);
}
@@ -141,14 +168,25 @@ public class Glob {
parent = parent + File.separatorChar;
return parent+pattern;
}
- public static List<File> matchAll(File parentPath, String... globPattern) {
- return matchAll(parentPath, Arrays.asList(globPattern));
- }
+ /**
+ * This is an overloaded version of the {@link #matchAll(File, List, Comparator)} method
+ * that passes <code>null</code> as the comparator to use.
+ *
+ * @see #matchAll(File, List, Comparator)
+ */
public static List<File> matchAll(File parentPath, List<String> globPatterns) {
+ return matchAll(parentPath, globPatterns, null);
+ }
+
+ public static List<File> matchAll(File parentPath, List<String> globPatterns, Comparator<? super File> resultComparator) {
ArrayList<File> matches = new ArrayList<File>();
for(String p : globPatterns) {
- matches.addAll(match(parentPath, p));
+ matches.addAll(match(parentPath, p, null));
+ }
+
+ if (resultComparator != null) {
+ Collections.sort(matches, resultComparator);
}
return matches;
diff --git a/modules/plugins/augeas/src/main/java/org/rhq/plugins/augeas/AugeasConfigurationComponent.java b/modules/plugins/augeas/src/main/java/org/rhq/plugins/augeas/AugeasConfigurationComponent.java
index 2f500b6..1a37613 100644
--- a/modules/plugins/augeas/src/main/java/org/rhq/plugins/augeas/AugeasConfigurationComponent.java
+++ b/modules/plugins/augeas/src/main/java/org/rhq/plugins/augeas/AugeasConfigurationComponent.java
@@ -312,7 +312,7 @@ public class AugeasConfigurationComponent<T extends ResourceComponent> implement
}
public List<File> getConfigurationFiles() {
- List<File> files = Glob.matchAll(new File(this.augeasRootPath), includeGlobs);
+ List<File> files = Glob.matchAll(new File(this.augeasRootPath), includeGlobs, Glob.ALPHABETICAL_COMPARATOR);
Glob.excludeAll(files, excludeGlobs);
return files;
}
diff --git a/modules/plugins/augeas/src/main/java/org/rhq/plugins/augeas/AugeasConfigurationDiscoveryComponent.java b/modules/plugins/augeas/src/main/java/org/rhq/plugins/augeas/AugeasConfigurationDiscoveryComponent.java
index 04d4faf..292e6df 100644
--- a/modules/plugins/augeas/src/main/java/org/rhq/plugins/augeas/AugeasConfigurationDiscoveryComponent.java
+++ b/modules/plugins/augeas/src/main/java/org/rhq/plugins/augeas/AugeasConfigurationDiscoveryComponent.java
@@ -60,12 +60,16 @@ public class AugeasConfigurationDiscoveryComponent<T extends ResourceComponent>
pluginConfig.put(includeProps);
pluginConfig.put(excludeProps);
- checkFiles(pluginConfig);
-
- DiscoveredResourceDetails resource = createResourceDetails(discoveryContext, pluginConfig);
- discoveredResources.add(resource);
- log.debug("Discovered " + discoveryContext.getResourceType().getName() + " Resource with key ["
- + resource.getResourceKey() + "].");
+ try {
+ checkFiles(pluginConfig);
+
+ DiscoveredResourceDetails resource = createResourceDetails(discoveryContext, pluginConfig);
+ discoveredResources.add(resource);
+ log.debug("Discovered " + discoveryContext.getResourceType().getName() + " Resource with key ["
+ + resource.getResourceKey() + "].");
+ } catch (IllegalStateException e) { // Thrown by augeas if it can not read a file
+ log.warn("Discovery failed: " + e.getMessage());
+ }
return discoveredResources;
}
@@ -127,7 +131,7 @@ public class AugeasConfigurationDiscoveryComponent<T extends ResourceComponent>
throw new IllegalStateException("Expecting at least one inclusion pattern for configuration files.");
}
- List<File> files = Glob.matchAll(root, includeGlobs);
+ List<File> files = Glob.matchAll(root, includeGlobs, Glob.ALPHABETICAL_COMPARATOR);
if (excludeGlobsProp != null) {
List<String> excludeGlobs = getGlobList(excludeGlobsProp);
diff --git a/modules/plugins/augeas/src/main/java/org/rhq/rhqtransform/impl/PluginDescriptorBasedAugeasConfiguration.java b/modules/plugins/augeas/src/main/java/org/rhq/rhqtransform/impl/PluginDescriptorBasedAugeasConfiguration.java
index cd15ef2..dd3f497 100644
--- a/modules/plugins/augeas/src/main/java/org/rhq/rhqtransform/impl/PluginDescriptorBasedAugeasConfiguration.java
+++ b/modules/plugins/augeas/src/main/java/org/rhq/rhqtransform/impl/PluginDescriptorBasedAugeasConfiguration.java
@@ -183,7 +183,7 @@ public class PluginDescriptorBasedAugeasConfiguration implements AugeasConfigura
throw new IllegalStateException("Expecting at least once inclusion pattern for configuration files.");
}
- List<File> files = Glob.matchAll(root, includeGlobs);
+ List<File> files = Glob.matchAll(root, includeGlobs, Glob.ALPHABETICAL_COMPARATOR);
if (module.getExcludedGlobs() != null) {
List<String> excludeGlobs = module.getExcludedGlobs();
commit a2c00c6f1da359c6fbd51e391fb4422ada03ac9d
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon May 2 11:04:43 2011 +0200
BZ 700616 - runtime config extracted even in the case server root was redefined in the config files.
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerDiscoveryComponent.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerDiscoveryComponent.java
index 9d73da0..56ac57a 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerDiscoveryComponent.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerDiscoveryComponent.java
@@ -322,6 +322,7 @@ public class ApacheServerDiscoveryComponent implements ResourceDiscoveryComponen
serverRootProp.setValue(serverRoot);
//reparse the configuration with the new ServerRoot
serverConfig = loadParser(serverConfigFile.getAbsolutePath(), serverRoot);
+ serverConfig = RuntimeApacheConfiguration.extract(serverConfig, process.getProcessInfo(), binaryInfo, getDefaultModuleNames(binaryInfo.getVersion()));
}
serverUrl = getUrl(serverConfig, binaryInfo.getVersion());
commit e59a0a42b5447a44b0a89f2a836d5750a39f3b6b
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Apr 29 19:12:27 2011 +0200
BZ 700461 - ResourceContext.getNativeProcess() now always reports the current process info or null if no process exists for given resource.
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 ca4c6bb..d875f48 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
@@ -202,14 +202,28 @@ public class ResourceContext<T extends ResourceComponent> {
* @return information on the resource's process
*/
public ProcessInfo getNativeProcess() {
- if ((this.processInfo == null) || !this.processInfo.isRunning()) {
- // TODO: should we null out processInfo? if it isn't running, the old processInfo is no longer valid
+ boolean rediscover = this.processInfo == null;
+
+ if (!rediscover) {
+ //if the process info thinks the process is running,
+ //refresh it to check its facts again
+ if (this.processInfo.isRunning()) {
+ this.processInfo.refresh();
+ }
+ rediscover = !this.processInfo.isRunning();
+ }
+
+ if (rediscover) {
+ //This method is documented to return null if the process can no longer be found.
+ //Let's make sure that's the case and null it out now. The discovery might or might not
+ //reassign it.
+ this.processInfo = null;
if (this.resourceDiscoveryComponent != null) {
try {
Set<DiscoveredResourceDetails> details;
- ResourceDiscoveryContext context;
+ ResourceDiscoveryContext<ResourceComponent<?>> context;
- context = new ResourceDiscoveryContext(this.resourceType, this.parentResourceComponent, this,
+ context = new ResourceDiscoveryContext<ResourceComponent<?>>(this.resourceType, this.parentResourceComponent, this,
this.systemInformation, getNativeProcessesForType(), Collections.EMPTY_LIST,
getPluginContainerName(), getPluginContainerDeployment());
commit bd816f6c926b932a2b02349f46b7a00a79c57766
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Apr 29 19:11:08 2011 +0200
BZ 700616 - adding a new operation to apache server resource to detect the SNMP WWW Service Index values for individual virtual hosts. This is to a) support users when upgrading from RHQ 3.0.1 vanilla and b) to aid the users with reconfiguring the monitoring of vhosts after they changed order in the configuration files.
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
index f44485e..5822f38 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
@@ -778,6 +778,10 @@ public class ApacheServerComponent implements AugeasRHQComponent<PlatformCompone
return binaryInfo;
}
+ public String getResourceKey() {
+ return resourceContext.getResourceKey();
+ }
+
// TODO: Move this method to a helper class.
static void addSnmpMetricValueToReport(MeasurementReport report, MeasurementScheduleRequest schedule,
SNMPValue snmpValue, boolean valueIsTimestamp) throws SNMPException {
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerDiscoveryComponent.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerDiscoveryComponent.java
index 4cd0184..9d73da0 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerDiscoveryComponent.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerDiscoveryComponent.java
@@ -58,6 +58,7 @@ import org.rhq.plugins.apache.util.AugeasNodeValueUtil;
import org.rhq.plugins.apache.util.HttpdAddressUtility;
import org.rhq.plugins.apache.util.OsProcessUtility;
import org.rhq.plugins.apache.util.HttpdAddressUtility.Address;
+import org.rhq.plugins.apache.util.RuntimeApacheConfiguration;
import org.rhq.plugins.platform.PlatformComponent;
import org.rhq.rhqtransform.impl.PluginDescriptorBasedAugeasConfiguration;
@@ -432,7 +433,7 @@ public class ApacheServerDiscoveryComponent implements ResourceDiscoveryComponen
@Nullable
- private String getServerRoot(@NotNull ApacheBinaryInfo binaryInfo, @NotNull ProcessInfo processInfo) {
+ public static String getServerRoot(@NotNull ApacheBinaryInfo binaryInfo, @NotNull ProcessInfo processInfo) {
// First see if -d was specified on the httpd command line.
String[] cmdLine = processInfo.getCommandLine();
String root = getCommandLineOption(cmdLine, "-d");
@@ -475,7 +476,7 @@ public class ApacheServerDiscoveryComponent implements ResourceDiscoveryComponen
}
@Nullable
- private File getServerConfigFile(ApacheBinaryInfo binaryInfo, ProcessInfo processInfo, String serverRoot) {
+ public static File getServerConfigFile(ApacheBinaryInfo binaryInfo, ProcessInfo processInfo, String serverRoot) {
// First see if -f was specified on the httpd command line.
String[] cmdLine = processInfo.getCommandLine();
String serverConfigFile = getCommandLineOption(cmdLine, "-f");
@@ -503,7 +504,7 @@ public class ApacheServerDiscoveryComponent implements ResourceDiscoveryComponen
return new File(serverConfigFile);
}
- private String getCommandLineOption(String[] cmdLine, String option) {
+ private static String getCommandLineOption(String[] cmdLine, String option) {
String root = null;
for (int i = 1; i < cmdLine.length; i++) {
String arg = cmdLine[i];
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerOperationsDelegate.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerOperationsDelegate.java
index 8b729ad..f1a1a4b 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerOperationsDelegate.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerOperationsDelegate.java
@@ -19,9 +19,13 @@
package org.rhq.plugins.apache;
import java.io.File;
+import java.util.LinkedHashMap;
import java.util.List;
+import java.util.Map;
import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertyList;
+import org.rhq.core.domain.configuration.PropertyMap;
import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.pluginapi.operation.OperationContext;
import org.rhq.core.pluginapi.operation.OperationFacet;
@@ -30,7 +34,18 @@ import org.rhq.core.pluginapi.util.ProcessExecutionUtility;
import org.rhq.core.system.OperatingSystemType;
import org.rhq.core.system.ProcessExecution;
import org.rhq.core.system.ProcessExecutionResults;
+import org.rhq.core.system.ProcessInfo;
import org.rhq.core.system.SystemInfo;
+import org.rhq.core.system.SystemInfoFactory;
+import org.rhq.plugins.apache.parser.ApacheConfigReader;
+import org.rhq.plugins.apache.parser.ApacheDirective;
+import org.rhq.plugins.apache.parser.ApacheDirectiveTree;
+import org.rhq.plugins.apache.parser.ApacheParser;
+import org.rhq.plugins.apache.parser.ApacheParserImpl;
+import org.rhq.plugins.apache.util.ApacheBinaryInfo;
+import org.rhq.plugins.apache.util.HttpdAddressUtility;
+import org.rhq.plugins.apache.util.OsProcessUtility;
+import org.rhq.plugins.apache.util.RuntimeApacheConfiguration;
/**
* Executes operations on an Apache server ({@link ApacheServerComponent} delegates to this class).
@@ -123,6 +138,10 @@ public class ApacheServerOperationsDelegate implements OperationFacet {
processExecution.getArguments().add("-t");
break;
}
+
+ case DETECT_SNMP_INDEXES: {
+ return detectSnmpIndexes();
+ }
}
ProcessExecutionResults processExecutionResults = this.systemInfo.executeProcess(processExecution);
@@ -199,10 +218,61 @@ public class ApacheServerOperationsDelegate implements OperationFacet {
}
}
+ private OperationResult detectSnmpIndexes() throws Exception {
+ PropertyList vhostList = new PropertyList("snmpIndexesPerResourceKey");
+
+ ApacheDirectiveTree tree = serverComponent.loadParser();
+ tree = RuntimeApacheConfiguration.extract(tree, serverComponent.getCurrentProcessInfo(), serverComponent.getCurrentBinaryInfo(), serverComponent.getModuleNames());
+ ApacheVirtualHostServiceDiscoveryComponent.SnmpWwwServiceIndexes snmpDiscoveries = ApacheVirtualHostServiceDiscoveryComponent.getSnmpDiscoveries(serverComponent);
+
+ String mainVhostRK = ApacheVirtualHostServiceDiscoveryComponent.createMainServerResourceKey(serverComponent, tree, snmpDiscoveries);
+
+ List<ApacheDirective> virtualHosts = tree.search("/<VirtualHost");
+
+ //the vhosts detected can actually have conflicting resource keys. So before we build the resulting configuration object
+ //let's pass the results through this map where we can check for those conflicts more easily.
+ LinkedHashMap<String, Integer> mapping = new LinkedHashMap<String, Integer>();
+ mapping.put(mainVhostRK, 1);
+
+ int idx = 0;
+ for(ApacheDirective vhost : virtualHosts) {
+ List<String> hosts = vhost.getValues();
+
+ List<ApacheDirective> serverNames = vhost.getChildByName("ServerName");
+ String serverName = null;
+ if (serverNames.size() > 0) {
+ serverName = serverNames.get(0).getValuesAsString();
+ }
+
+ String resourceKey = ApacheVirtualHostServiceDiscoveryComponent.createResourceKey(serverName, hosts, tree, serverComponent, snmpDiscoveries);
+
+ int snmpIdx = virtualHosts.size() - idx + 1;
+
+ if (!mapping.containsKey(resourceKey)) {
+ mapping.put(resourceKey, snmpIdx);
+ }
+
+ ++idx;
+ }
+
+ for (Map.Entry<String, Integer> entry : mapping.entrySet()) {
+ PropertyMap vhostRow = new PropertyMap("snmpIndexForResourceKey");
+ vhostList.add(vhostRow);
+
+ vhostRow.put(new PropertySimple("resourceKey", entry.getKey()));
+ vhostRow.put(new PropertySimple("snmpWwwServiceIndex", entry.getValue()));
+ }
+
+ OperationResult ret = new OperationResult();
+ ret.getComplexResults().put(vhostList);
+
+ return ret;
+ }
+
/**
* Enumeration of supported operations for an Apache server.
*/
private enum Operation {
- START, STOP, RESTART, START_SSL, GRACEFUL_RESTART, CONFIG_TEST
+ START, STOP, RESTART, START_SSL, GRACEFUL_RESTART, CONFIG_TEST, DETECT_SNMP_INDEXES
}
}
\ No newline at end of file
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceDiscoveryComponent.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceDiscoveryComponent.java
index 9da9c31..9abbabe 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceDiscoveryComponent.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceDiscoveryComponent.java
@@ -24,8 +24,10 @@ import java.net.URI;
import java.net.URISyntaxException;
import java.net.UnknownHostException;
import java.util.Iterator;
+import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import org.apache.commons.logging.Log;
@@ -38,10 +40,17 @@ import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+import org.rhq.core.system.ProcessInfo;
+import org.rhq.core.system.SystemInfoFactory;
+import org.rhq.plugins.apache.parser.ApacheConfigReader;
import org.rhq.plugins.apache.parser.ApacheDirective;
import org.rhq.plugins.apache.parser.ApacheDirectiveTree;
+import org.rhq.plugins.apache.parser.ApacheParser;
+import org.rhq.plugins.apache.parser.ApacheParserImpl;
import org.rhq.plugins.apache.util.HttpdAddressUtility;
import org.rhq.plugins.apache.util.HttpdAddressUtility.Address;
+import org.rhq.plugins.apache.util.ApacheBinaryInfo;
+import org.rhq.plugins.apache.util.OsProcessUtility;
import org.rhq.plugins.apache.util.RuntimeApacheConfiguration;
import org.rhq.plugins.www.snmp.SNMPException;
import org.rhq.plugins.www.snmp.SNMPSession;
@@ -72,7 +81,7 @@ public class ApacheVirtualHostServiceDiscoveryComponent implements ResourceDisco
//BZ 612189 - prepare for the legacy overrides. We need to revert to the old-style resource keys until
//resource upgrade functionality is ready.
- SnmpWwwServiceIndexes snmpDiscoveries = getSnmpDiscoveries(context);
+ SnmpWwwServiceIndexes snmpDiscoveries = getSnmpDiscoveries(context.getParentResourceComponent());
ApacheServerComponent serverComponent = context.getParentResourceComponent();
ApacheDirectiveTree tree = serverComponent.loadParser();
@@ -101,7 +110,7 @@ public class ApacheVirtualHostServiceDiscoveryComponent implements ResourceDisco
serverName = serverNames.get(0).getValuesAsString();
}
- String resourceKey = createResourceKey(serverName, hosts);
+ String resourceKey = createResourceKey(serverName, hosts, tree, serverComponent, snmpDiscoveries);
String resourceName = resourceKey; //this'll get overridden below if we find a better value using the address variable
Configuration pluginConfiguration = context.getDefaultPluginConfiguration();
@@ -146,19 +155,9 @@ public class ApacheVirtualHostServiceDiscoveryComponent implements ResourceDisco
pluginConfiguration.put(rtLogProp);
//redefine the resourcename using the virtual host sample address
- resourceName = address.toString(false);
+ resourceName = address.toString(false, true);
}
- //BZ 612189 - remove this once we have resource upgrade
- //ok, this is hacky, but...
- //in order not to change the semantics of the resource key creation
- //we use the legacy resource key (i.e. the one based on SNMP) only
- //if SNMP is available, even though we now have algorithm that can
- //determine the SNMP resource key without it being available.
- if (snmpDiscoveries != null) {
- resourceKey = serverComponent.getAddressUtility().getHttpdInternalVirtualHostAddressRepresentation(tree, firstAddress, serverName).toString(false);
- }
-
//as the last thing, let's determine the SNMP WWW Service Index of this vhost
int snmpWwwServiceIndex = virtualHosts.size() - currentVhostIndex + 1;
pluginConfiguration.put(new PropertySimple(ApacheVirtualHostServiceComponent.SNMP_WWW_SERVICE_INDEX_CONFIG_PROP, snmpWwwServiceIndex));
@@ -185,7 +184,7 @@ public class ApacheVirtualHostServiceDiscoveryComponent implements ResourceDisco
String mainServerUrl = context.getParentResourceContext().getPluginConfiguration().getSimple(
ApacheServerComponent.PLUGIN_CONFIG_PROP_URL).getStringValue();
- String key = null;
+ String key = createMainServerResourceKey(context.getParentResourceComponent(), runtimeConfig, snmpDiscoveries);
if (mainServerUrl != null && !"null".equals(mainServerUrl)) {
PropertySimple mainServerUrlProp = new PropertySimple(ApacheVirtualHostServiceComponent.URL_CONFIG_PROP,
@@ -205,30 +204,12 @@ public class ApacheVirtualHostServiceDiscoveryComponent implements ResourceDisco
PropertySimple rtLogProp = new PropertySimple(
ApacheVirtualHostServiceComponent.RESPONSE_TIME_LOG_FILE_CONFIG_PROP, rtLogFile.toString());
mainServerPluginConfig.put(rtLogProp);
-
- //BZ 612189 - remove this once we have resource upgrade
- key = host + ":" + port;
}
//the SNMP WWW service index of the main server is always 1
mainServerPluginConfig.put(new PropertySimple(
ApacheVirtualHostServiceComponent.SNMP_WWW_SERVICE_INDEX_CONFIG_PROP, 1));
- //BZ 612189 - this can simply the MAIN_SERVER_RESOURCE_KEY only once we have resource upgrade
- if (key == null) {
- key = ApacheVirtualHostServiceComponent.MAIN_SERVER_RESOURCE_KEY;
- }
-
- //BZ 612189 - remove this once we have resource upgrade
- //ok, this is hacky, but...
- //in order not to change the semantics of the resource key creation
- //we use the legacy resource key (i.e. the one based on SNMP) only
- //if SNMP is available, even though we now have algorithm that can
- //determine the SNMP resource key without it being available.
- if (snmpDiscoveries != null) {
- key = context.getParentResourceComponent().getAddressUtility().getHttpdInternalMainServerAddressRepresentation(runtimeConfig).toString(false);
- }
-
DiscoveredResourceDetails mainServer = new DiscoveredResourceDetails(resourceType,
key, "Main", null, null,
mainServerPluginConfig, null);
@@ -260,7 +241,38 @@ public class ApacheVirtualHostServiceDiscoveryComponent implements ResourceDisco
// }
// }
- public static String createResourceKey(String serverName, List<String> hosts) {
+ public static String createMainServerResourceKey(ApacheServerComponent serverComponent, ApacheDirectiveTree runtimeConfig, SnmpWwwServiceIndexes snmpDiscoveries) throws Exception {
+ String mainServerUrl = serverComponent.getServerUrl();
+
+ String key = null;
+
+ if (mainServerUrl != null && !"null".equals(mainServerUrl)) {
+ URI mainServerUri = new URI(mainServerUrl);
+ String host = mainServerUri.getHost();
+ int port = mainServerUri.getPort();
+ if (port == -1) {
+ port = 80;
+ }
+
+ key = host + ":" + port;
+ } else {
+ key = ApacheVirtualHostServiceComponent.MAIN_SERVER_RESOURCE_KEY;
+ }
+
+ //BZ 612189 - remove this once we have resource upgrade
+ //ok, this is hacky, but...
+ //in order not to change the semantics of the resource key creation
+ //we use the legacy resource key (i.e. the one based on SNMP) only
+ //if SNMP is available, even though we now have algorithm that can
+ //determine the SNMP resource key without it being available.
+ if (snmpDiscoveries != null) {
+ key = serverComponent.getAddressUtility().getHttpdInternalMainServerAddressRepresentation(runtimeConfig).toString(false, false);
+ }
+
+ return key;
+ }
+
+ public static String createResourceKey(String serverName, List<String> hosts, ApacheDirectiveTree runtimeConfig, ApacheServerComponent serverComponent, SnmpWwwServiceIndexes snmpDiscoveries) {
//BZ 612189 - swap the impls once resource upgrade is in place
// StringBuilder keyBuilder = new StringBuilder();
// if (serverName != null) {
@@ -275,6 +287,16 @@ public class ApacheVirtualHostServiceDiscoveryComponent implements ResourceDisco
//
// return keyBuilder.toString();
+ //BZ 612189 - remove this once we have resource upgrade
+ //ok, this is hacky, but...
+ //in order not to change the semantics of the resource key creation
+ //we use the legacy resource key (i.e. the one based on SNMP) only
+ //if SNMP is available, even though we now have algorithm that can
+ //determine the SNMP resource key without it being available.
+ if (snmpDiscoveries != null) {
+ return serverComponent.getAddressUtility().getHttpdInternalVirtualHostAddressRepresentation(runtimeConfig, hosts.get(0), serverName).toString(false, false);
+ }
+
//try to derive the same resource key as the SNMP would have... this is to prevent the duplication of
//vhost resources after the SNMP was configured - how I wish resource upgrade made it to 3.0 to prevent this
//kind of guessing being necessary.
@@ -302,9 +324,9 @@ public class ApacheVirtualHostServiceDiscoveryComponent implements ResourceDisco
* @return
*/
@Deprecated
- private SnmpWwwServiceIndexes getSnmpDiscoveries(ResourceDiscoveryContext<ApacheServerComponent> discoveryContext) {
+ public static SnmpWwwServiceIndexes getSnmpDiscoveries(ApacheServerComponent serverComponent) {
try {
- SNMPSession snmpSession = discoveryContext.getParentResourceComponent().getSNMPSession();
+ SNMPSession snmpSession = serverComponent.getSNMPSession();
List<SNMPValue> nameValues;
List<SNMPValue> portValues;
SNMPValue descValue;
@@ -338,7 +360,7 @@ public class ApacheVirtualHostServiceDiscoveryComponent implements ResourceDisco
return ret;
} catch (Exception e) {
- log.debug("Error while trying to contact SNMP of the apache server " + discoveryContext.getParentResourceContext().getResourceKey(), e);
+ log.debug("Error while trying to contact SNMP of the apache server " + serverComponent.getResourceKey(), e);
return null;
}
}
@@ -349,9 +371,9 @@ public class ApacheVirtualHostServiceDiscoveryComponent implements ResourceDisco
* @author Lukas Krejci
*/
@Deprecated
- private static class SnmpWwwServiceIndexes {
+ public static class SnmpWwwServiceIndexes {
public List<SNMPValue> names;
public List<SNMPValue> ports;
public SNMPValue desc;
}
-}
\ No newline at end of file
+}
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/HttpdAddressUtility.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/HttpdAddressUtility.java
index 7c55fb4..61fc5b9 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/HttpdAddressUtility.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/HttpdAddressUtility.java
@@ -251,10 +251,10 @@ public enum HttpdAddressUtility {
@Override
public String toString() {
- return toString(true);
+ return toString(true, true);
}
- public String toString(boolean includeScheme) {
+ public String toString(boolean includeScheme, boolean interpretWildcardPort) {
StringBuilder bld = new StringBuilder();
if (includeScheme) {
@@ -266,7 +266,7 @@ public enum HttpdAddressUtility {
if (port != NO_PORT_SPECIFIED_VALUE) {
bld.append(":");
- if (port == PORT_WILDCARD_VALUE) {
+ if (port == PORT_WILDCARD_VALUE && interpretWildcardPort) {
bld.append(WILDCARD);
} else {
bld.append(port);
diff --git a/modules/plugins/apache/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/apache/src/main/resources/META-INF/rhq-plugin.xml
index 870eaff..aa97738 100644
--- a/modules/plugins/apache/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/apache/src/main/resources/META-INF/rhq-plugin.xml
@@ -441,6 +441,18 @@
</operation>
+ <operation name="detect_snmp_indexes" displayName="Detect SNMP WWW Service Index values for Virtual Hosts"
+ description="If the order of the virtual hosts changed in your apache configuration file, you will need to reconfigure each of the virtual host resources of this server with the new SNMP WWW Service Index. This value is needed for correct reading of the configuration as well as monitoring. You will need to manually update each of the inventoried virtual host resources to correspond to the results of this operation.">
+ <results>
+ <c:list-property name="snmpIndexesPerResourceKey">
+ <c:map-property name="snmpIndexForResourceKey">
+ <c:simple-property name="resourceKey" displayName="Virtual Host Resource Key" />
+ <c:simple-property name="snmpWwwServiceIndex" displayName="SNMP WWW Service Index" type="integer"/>
+ </c:map-property>
+ </c:list-property>
+ </results>
+ </operation>
+
<metric displayName="Number of Concurrent Connections" property="applInboundAssociations"
destinationType="The number of current connections to this application"
defaultOn="true" defaultInterval="300000" displayType="summary" units="none"/>
commit 3e93c6fb5d7dc6b2ab1522d97b845872afbfe1df
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Apr 29 19:08:51 2011 +0200
BZ 700616 - apache vhost resource configuration loading/update converted to take advantage of the SNMP WWW Service Index property, no imperfect RK matching anymore.
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceComponent.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceComponent.java
index b37361c..f122cec 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceComponent.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceComponent.java
@@ -58,11 +58,13 @@ import org.rhq.core.pluginapi.measurement.MeasurementFacet;
import org.rhq.core.pluginapi.util.ResponseTimeConfiguration;
import org.rhq.core.pluginapi.util.ResponseTimeLogParser;
import org.rhq.plugins.apache.mapping.ApacheAugeasMapping;
+import org.rhq.plugins.apache.parser.ApacheDirective;
import org.rhq.plugins.apache.parser.ApacheDirectiveTree;
import org.rhq.plugins.apache.util.AugeasNodeSearch;
import org.rhq.plugins.apache.util.AugeasNodeValueUtil;
import org.rhq.plugins.apache.util.ConfigurationTimestamp;
import org.rhq.plugins.apache.util.HttpdAddressUtility;
+import org.rhq.plugins.apache.util.RuntimeApacheConfiguration;
import org.rhq.plugins.www.snmp.SNMPException;
import org.rhq.plugins.www.snmp.SNMPSession;
import org.rhq.plugins.www.snmp.SNMPValue;
@@ -333,99 +335,51 @@ public class ApacheVirtualHostServiceComponent implements ResourceComponent<Apac
*/
public AugeasNode getNode(AugeasTree tree) {
String resourceKey = resourceContext.getResourceKey();
-
- if (ApacheVirtualHostServiceComponent.MAIN_SERVER_RESOURCE_KEY.equals(resourceKey)) {
- return tree.getRootNode();
+ String idxString = resourceContext.getPluginConfiguration().getSimpleValue(SNMP_WWW_SERVICE_INDEX_CONFIG_PROP, null);
+
+ ApacheServerComponent server = resourceContext.getParentResourceComponent();
+
+ if (idxString == null || idxString.trim().length() == 0) {
+ throw new IllegalStateException("The SNMP WWW Service Index property has to be a positive integer. Without it, it is impossible to locate the configuration of the virtual host with resource key [" + resourceKey + "]");
}
-
- String serverName = null;
- int pipeIdx = resourceKey.indexOf('|');
- if (pipeIdx >= 0) {
- serverName = resourceKey.substring(0, pipeIdx);
+
+ int snmpIdx = Integer.parseInt(idxString);
+
+ if (snmpIdx < 1) {
+ throw new IllegalStateException("The SNMP WWW Service Index property has to be a positive integer. Without it, it is impossible to locate the configuration of the virtual host with resource key [" + resourceKey + "]");
+ }
+
+ if (snmpIdx == 1) {
+ return tree.getRootNode();
}
- String[] addrs = resourceKey.substring(pipeIdx + 1).split(" ");
- List<AugeasNode> nodes = tree.matchRelative(tree.getRootNode(), "<VirtualHost");
- List<AugeasNode> virtualHosts = new ArrayList<AugeasNode>();
- boolean updated = false;
-
-//BZ 612189 - uncomment this algo once the resource upgrade is in place
-// for (AugeasNode node : nodes) {
-// updated = false;
-// List<AugeasNode> serverNameNodes = tree.matchRelative(node, "ServerName/param");
-// String tempServerName = null;
-//
-// if (!(serverNameNodes.isEmpty())) {
-// tempServerName = serverNameNodes.get(0).getValue();
-// }
-// if (tempServerName == null & serverName == null)
-// updated = true;
-// if (tempServerName != null & serverName != null)
-// if (tempServerName.equals(serverName)){
-// updated = true;
-// }
-//
-//
-// if (updated){
-// updated = false;
-// List<AugeasNode> params = node.getChildByLabel("param");
-// for (AugeasNode nd : params) {
-// updated = false;
-// for (String adr : addrs) {
-// if (adr.equals(nd.getValue()))
-// updated = true;
-// }
-// if (!updated)
-// break;
-// }
-//
-// if (updated)
-// virtualHosts.add(node);
-// }
-// }
-
- //BZ 612189 - remove this once resource upgrade is in place
- HttpdAddressUtility.Address resourceKeyAddress = HttpdAddressUtility.Address.parse(resourceKey);
+ final List<AugeasNode> allVhosts = new ArrayList<AugeasNode>();
- AugeasNode bestNode = null;
- int bestMatch = 0;
- for(AugeasNode node : nodes) {
- List<AugeasNode> vhostAddressNodes = node.getChildByLabel("param");
-
- List<HttpdAddressUtility.Address> vhostAddresses = new ArrayList<HttpdAddressUtility.Address>();
- for (AugeasNode vhostAddressNode : vhostAddressNodes) {
- vhostAddresses.add(HttpdAddressUtility.Address.parse(vhostAddressNode.getValue()));
+ RuntimeApacheConfiguration.walkRuntimeConfig(new RuntimeApacheConfiguration.NodeVisitor<AugeasNode>() {
+ public void visitOrdinaryNode(AugeasNode node) {
+ if ("<VirtualHost".equalsIgnoreCase(node.getLabel())) {
+ allVhosts.add(node);
+ }
}
- int matchRate = matchRate(vhostAddresses, resourceKeyAddress);
- if (bestMatch < matchRate) {
- bestNode = node;
+ public void visitConditionalNode(AugeasNode node, boolean isSatisfied) {
}
- }
-
- if (bestNode != null) {
- return bestNode;
- }
+ }, tree, server.getCurrentProcessInfo(), server.getCurrentBinaryInfo(), server.getModuleNames());
- //BZ 612189 - remove this once we have resource upgrade
- //ok, one final attempt... the legacy resource key format for the MainServer is just a host:port as with the rest of the vhosts, let's try that
- try {
- String serverUrl = resourceContext.getParentResourceComponent().getServerUrl();
- URI serverUri = new URI(serverUrl);
- String expectedResourceKey = serverUri.getHost() + ":" + serverUri.getPort();
-
- HttpdAddressUtility.Address expectedAddress = HttpdAddressUtility.Address.parse(expectedResourceKey);
- HttpdAddressUtility.Address actualAddress = HttpdAddressUtility.Address.parse(resourceKey);
+ //transform the SNMP index into the index of the vhost
+ int idx = allVhosts.size() - snmpIdx + 1;
+
+ AugeasNode vhost = allVhosts.get(idx);
+
+ //now check if there are any If* directives underneath this vhost.
+ //we don't support configuring such beasts.
+ if (vhost.getChildByLabel("<IfDefine").isEmpty() && vhost.getChildByLabel("<IfModule").isEmpty()
+ && vhost.getChildByLabel("<IfVersion").isEmpty()) {
- if (matchRate(Collections.singletonList(expectedAddress), actualAddress) > 0) {
- return tree.getRootNode();
- }
- } catch (URISyntaxException e) {
- log.warn("Failed to parse the server URL when trying to match the vhost with the main server.", e);
+ return vhost;
+ } else {
+ throw new IllegalStateException("Configuration of the virtual host [" + resourceKey + "] contains conditional blocks. This is not supported by this plugin.");
}
-
- throw new IllegalStateException("Could not find virtual host configuration for virtual host resource : "
- + resourceKey + ". Reading and updating configuration of virtual hosts nested inside If* directives is not supported by this plugin.");
}
/**
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/RuntimeApacheConfiguration.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/RuntimeApacheConfiguration.java
index 25f5ad9..a9b411c 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/RuntimeApacheConfiguration.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/RuntimeApacheConfiguration.java
@@ -19,7 +19,10 @@
package org.rhq.plugins.apache.util;
+import java.util.ArrayDeque;
import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -30,8 +33,11 @@ import java.util.regex.Pattern;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.rhq.augeas.node.AugeasNode;
+import org.rhq.augeas.tree.AugeasTree;
import org.rhq.core.system.ProcessInfo;
import org.rhq.core.util.OSGiVersionComparator;
+import org.rhq.plugins.apache.augeas.ApacheAugeasTree;
import org.rhq.plugins.apache.parser.ApacheDirective;
import org.rhq.plugins.apache.parser.ApacheDirectiveTree;
@@ -51,6 +57,187 @@ public class RuntimeApacheConfiguration {
}
/**
+ * This is a node visitor interface to be implemented by the users of the
+ * {@link RuntimeApacheConfiguration#walkRuntimeConfig(ApacheAugeasTree, ProcessInfo, ApacheBinaryInfo, Map)}
+ * or {@link RuntimeApacheConfiguration#walkRuntimeConfig(ApacheDirectiveTree, ProcessInfo, ApacheBinaryInfo, Map)}
+ * methods.
+ */
+ public interface NodeVisitor<T> {
+
+ /**
+ * This method is called whenever the apache config tree walker encounters one of the If* directives (IfModule, IfDefine, IfVersion).
+ *
+ * @param node the If* directive
+ * @param isSatisfied true if the directive's condition is satisfied, false otherwise
+ */
+ void visitConditionalNode(T node, boolean isSatisfied);
+
+ /**
+ * This method is called for all "ordinary" directives that the apache config tree walker encounters (i.e. all but the ones handled by the {@link #visitConditionalNode(Object)}
+ * method.
+ *
+ * @param node the directive
+ */
+ void visitOrdinaryNode(T node);
+ }
+
+ /**
+ * Extension of the {@link NodeVisitor} that is used internally to abstract out the
+ * algorithm from the underlying data model.
+ * There's just one transform method that walks any kind of apache config tree representation
+ * and produces the runtime config. Different impls of this interface can
+ * produce different "side-effects" of that walk.
+ *
+ * @author Lukas Krejci
+ */
+ private interface TreeWalker<T> extends NodeVisitor<T> {
+
+ void onBeforeChildrenScan(T node);
+
+ void onAfterChildrenScan(T node);
+
+ Collection<T> getChildren(T node);
+
+ String getValue(T node);
+
+ List<String> getValues(T node);
+
+ String getName(T node);
+ }
+
+ /**
+ * Impl of {@link TreeWalker} interface that transforms the tree by replacing
+ * the conditional directives that are satisfied with their "contents".
+ *
+ * @author Lukas Krejci
+ */
+ private static class TransformingWalker implements TreeWalker<ApacheDirective> {
+
+ private static class NodesToModify {
+ ArrayList<ApacheDirective> nodesToRemove = new ArrayList<ApacheDirective>();
+ ArrayList<ApacheDirective> nodesToPromote = new ArrayList<ApacheDirective>();
+ }
+
+ private Deque<NodesToModify> currentNodeStack = new ArrayDeque<NodesToModify>();
+
+ public void visitConditionalNode(ApacheDirective node, boolean isSatisfied) {
+ NodesToModify nodes = currentNodeStack.peek();
+ if (isSatisfied) {
+ nodes.nodesToPromote.add(node);
+ } else {
+ nodes.nodesToRemove.add(node);
+ }
+ }
+
+ public void visitOrdinaryNode(ApacheDirective node) {
+ }
+
+ public void onBeforeChildrenScan(ApacheDirective node) {
+ currentNodeStack.push(new NodesToModify());
+ }
+
+ public void onAfterChildrenScan(ApacheDirective parentNode) {
+ NodesToModify nodes = currentNodeStack.pop();
+
+ for(ApacheDirective node : nodes.nodesToRemove) {
+ parentNode.getChildDirectives().remove(node);
+ }
+
+ //add the children of node as children of parent node at the place node
+ //was declared and remove node ... i.e. make it so as if the child nodes
+ //of node were directly in the parentNode in the place of node
+ for(ApacheDirective node : nodes.nodesToPromote) {
+ int nodeIdx = parentNode.getChildDirectives().indexOf(node);
+
+ List<ApacheDirective> childNodes = node.getChildDirectives();
+ for(int i = childNodes.size() - 1; i >= 0; --i) {
+ ApacheDirective childNode = childNodes.get(i);
+ parentNode.getChildDirectives().add(nodeIdx, childNode);
+ childNode.setParentNode(parentNode);
+ }
+
+ parentNode.getChildDirectives().remove(nodeIdx + childNodes.size());
+ }
+ }
+
+ public Collection<ApacheDirective> getChildren(ApacheDirective node) {
+ return node.getChildDirectives();
+ }
+
+ public String getValue(ApacheDirective node) {
+ return node.getValuesAsString();
+ }
+
+ public List<String> getValues(ApacheDirective node) {
+ return node.getValues();
+ }
+ public String getName(ApacheDirective node) {
+ return node.getName();
+ }
+ }
+
+ /**
+ * This is a "wrapping" class for the number of parameters that are needed
+ * in the transform method.
+ *
+ * @author Lukas Krejci
+ */
+ private static class TransformState {
+ public Set<String> loadedModules;
+ public Set<String> defines;
+ public Map<String, String> moduleNames;
+ public Map<String, String> moduleFiles;
+ public String httpdVersion;
+
+ public TransformState(ProcessInfo httpdProcessInfo, ApacheBinaryInfo httpdBinaryInfo, Map<String, String> moduleNames) {
+ defines = new HashSet<String>(httpdBinaryInfo.getCompiledInDefines());
+
+ if (httpdProcessInfo != null) {
+ String[] args = httpdProcessInfo.getCommandLine();
+ for(int i = 1; i < args.length; ++i) {
+ String define = null;
+ if (args[i] != null && args[i].startsWith("-D")) {
+ define = args[i].substring(2).trim();
+ }
+
+ if (define != null && define.isEmpty()) {
+ //this means we saw an empty -D arg. This can happen if there is a space between -D and the value.
+ //That is legal though, so we have to accomodate for that.
+ if (i < args.length - 1) {
+ define = args[i + 1].trim();
+ if (define.startsWith("-")) {
+ //this would be another option
+ define = null;
+ } else {
+ ++i; //we can skip the next arg
+ }
+ } else {
+ define = null; //well -D is the last argument
+ }
+ }
+
+ if (define != null) {
+ defines.add(define);
+ }
+ }
+ }
+
+ loadedModules = new HashSet<String>();
+ loadedModules.addAll(httpdBinaryInfo.getCompiledInModules());
+
+ this.moduleNames = moduleNames;
+
+ //build a map for reverse lookup we might need in the transform method
+ moduleFiles = new HashMap<String, String>(moduleNames.size());
+ for(Map.Entry<String, String> e : moduleNames.entrySet()) {
+ moduleFiles.put(e.getValue(), e.getKey());
+ }
+
+ httpdVersion = httpdBinaryInfo.getVersion();
+ }
+ }
+
+ /**
* Given the apache configuration and information about the parameters httpd was executed
* with this method provides the directive tree that corresponds to the actual
* runtime configuration as used by httpd.
@@ -67,66 +254,114 @@ public class RuntimeApacheConfiguration {
*/
public static ApacheDirectiveTree extract(ApacheDirectiveTree tree, ProcessInfo httpdProcessInfo, ApacheBinaryInfo httpdBinaryInfo, Map<String, String> moduleNames) {
ApacheDirectiveTree ret = tree.clone();
+
+ transform(new TransformingWalker(), ret.getRootNode(), new TransformState(httpdProcessInfo, httpdBinaryInfo, moduleNames));
+
+ return ret;
+ }
+
+ public static void walkRuntimeConfig(final NodeVisitor<ApacheDirective> visitor, ApacheDirectiveTree tree, ProcessInfo httpdProcessInfo, ApacheBinaryInfo httpdBinaryInfo, Map<String, String> moduleNames) {
+ TreeWalker<ApacheDirective> walker = new TreeWalker<ApacheDirective>() {
+
+ public void visitConditionalNode(ApacheDirective node, boolean isSatisfied) {
+ visitor.visitConditionalNode(node, isSatisfied);
+ }
+
+ public void visitOrdinaryNode(ApacheDirective node) {
+ visitor.visitOrdinaryNode(node);
+ }
+
+ public void onBeforeChildrenScan(ApacheDirective node) {
+ }
+
+ public void onAfterChildrenScan(ApacheDirective node) {
+ }
+
+ public Collection<ApacheDirective> getChildren(ApacheDirective node) {
+ return node.getChildDirectives();
+ }
+
+ public String getValue(ApacheDirective node) {
+ return node.getValuesAsString();
+ }
+
+ public List<String> getValues(ApacheDirective node) {
+ return node.getValues();
+ }
+
+ public String getName(ApacheDirective node) {
+ return node.getName();
+ }
- List<String> defines = new ArrayList<String>(httpdBinaryInfo.getCompiledInDefines());
+ };
- if (httpdProcessInfo != null) {
- String[] args = httpdProcessInfo.getCommandLine();
- for(int i = 1; i < args.length; ++i) {
- String define = null;
- if (args[i] != null && args[i].startsWith("-D")) {
- define = args[i].substring(2).trim();
+ transform(walker, tree.getRootNode(), new TransformState(httpdProcessInfo, httpdBinaryInfo, moduleNames));
+ }
+
+ public static void walkRuntimeConfig(final NodeVisitor<AugeasNode> visitor, AugeasTree tree, ProcessInfo httpdProcessInfo, ApacheBinaryInfo httpdBinaryInfo, Map<String, String> moduleNames) {
+ TreeWalker<AugeasNode> walker = new TreeWalker<AugeasNode>() {
+
+ public void visitConditionalNode(AugeasNode node, boolean isSatisfied) {
+ visitor.visitConditionalNode(node, isSatisfied);
+ }
+
+ public void visitOrdinaryNode(AugeasNode node) {
+ visitor.visitOrdinaryNode(node);
+ }
+
+ public void onBeforeChildrenScan(AugeasNode node) {
+ }
+
+ public void onAfterChildrenScan(AugeasNode node) {
+ }
+
+ public Collection<AugeasNode> getChildren(AugeasNode node) {
+ return node.getChildNodes();
+ }
+
+ public String getValue(AugeasNode node) {
+ StringBuilder bld = new StringBuilder();
+ for(String val : getValues(node)) {
+ bld.append(val);
}
+ return bld.toString();
+ }
+
+ public List<String> getValues(AugeasNode node) {
+ ArrayList<String> ret = new ArrayList<String>();
- if (define != null && define.isEmpty()) {
- //this means we saw an empty -D arg. This can happen if there is a space between -D and the value.
- //That is legal though, so we have to accomodate for that.
- if (i < args.length - 1) {
- define = args[i + 1].trim();
- if (define.startsWith("-")) {
- //this would be another option
- define = null;
- } else {
- ++i; //we can skip the next arg
- }
- } else {
- define = null; //well -D is the last argument
- }
- }
+ List<AugeasNode> params = node.getChildByLabel("param");
- if (define != null) {
- defines.add(define);
+ for(AugeasNode n : params) {
+ ret.add(n.getValue());
}
+
+ return ret;
}
- }
-
- HashSet<String> loadedModules = new HashSet<String>();
- loadedModules.addAll(httpdBinaryInfo.getCompiledInModules());
-
- //build a map for reverse lookup we might need in the transform method
- HashMap<String, String> moduleFiles = new HashMap<String, String>(moduleNames.size());
- for(Map.Entry<String, String> e : moduleNames.entrySet()) {
- moduleFiles.put(e.getValue(), e.getKey());
- }
-
- transform(ret.getRootNode(), loadedModules, defines, moduleNames, moduleFiles, httpdBinaryInfo.getVersion());
- return ret;
+ public String getName(AugeasNode node) {
+ return node.getLabel();
+ }
+ };
+
+ transform(walker, tree.getRootNode(), new TransformState(httpdProcessInfo, httpdBinaryInfo, moduleNames));
}
- private static void transform(ApacheDirective parentNode, Set<String> currentlyLoadedModules, List<String> defines, Map<String, String> moduleNames, Map<String, String> moduleFiles, String httpdVersion) {
- if (parentNode.getChildDirectives().isEmpty()) {
+ private static <T> void transform(TreeWalker<T> walker, T parentNode, TransformState state) {
+ if (walker.getChildren(parentNode).isEmpty()) {
return;
}
- ArrayList<ApacheDirective> nodesToRemove = new ArrayList<ApacheDirective>();
- ArrayList<ApacheDirective> nodesToPromote = new ArrayList<ApacheDirective>();
+ walker.onBeforeChildrenScan(parentNode);
- for (ApacheDirective node : parentNode.getChildDirectives()) {
- if (node.getName().equalsIgnoreCase("LoadModule")) {
- currentlyLoadedModules.add(node.getValues().get(0));
- } else if (node.getName().equalsIgnoreCase("<IfModule")) {
- String moduleFile = node.getValuesAsString();
+ for (T node : walker.getChildren(parentNode)) {
+ boolean recurseFurther = true;
+
+ if (walker.getName(node).equalsIgnoreCase("LoadModule")) {
+ state.loadedModules.add(walker.getValue(node));
+ walker.visitOrdinaryNode(node);
+ } else if (walker.getName(node).equalsIgnoreCase("<IfModule")) {
+ String moduleFile = walker.getValue(node);
boolean negate = false;
if (moduleFile.startsWith("!")) {
negate = true;
@@ -135,7 +370,7 @@ public class RuntimeApacheConfiguration {
boolean result = false;
- switch(isModuleLoaded(moduleFile, currentlyLoadedModules, moduleNames, moduleFiles)) {
+ switch(isModuleLoaded(moduleFile, state.loadedModules, state.moduleNames, state.moduleFiles)) {
case LOADED : result = true; break;
case NOT_LOADED : result = false; break;
case UNKNOWN :
@@ -143,39 +378,35 @@ public class RuntimeApacheConfiguration {
continue;
}
- if (result != negate) {
- nodesToPromote.add(node);
- } else {
- nodesToRemove.add(node);
- }
- } else if (node.getName().equalsIgnoreCase("<IfDefine")) {
- String define = node.getValuesAsString();
+ recurseFurther = result != negate;
+
+ walker.visitConditionalNode(node, recurseFurther);
+ } else if (walker.getName(node).equalsIgnoreCase("<IfDefine")) {
+ String define = walker.getValue(node);
boolean negate = false;
if (define.startsWith("!")) {
negate = true;
define = define.substring(1);
}
- boolean result = defines.contains(define);
+ boolean result = state.defines.contains(define);
- if (negate != result) {
- nodesToPromote.add(node);
- } else {
- nodesToRemove.add(node);
- }
- } else if (node.getName().equalsIgnoreCase("<IfVersion")) {
+ recurseFurther = result != negate;
+
+ walker.visitConditionalNode(node, recurseFurther);
+ } else if (walker.getName(node).equalsIgnoreCase("<IfVersion")) {
//<IfVersion [[!]operator] version> ... </IfVersion>
//operator: =, ==, >, >=, <, <=, ~
//version major[.minor[.patch]] or /regex/
//if operator is ~, the version is assumed regex
//if operator is omitted, = is assumed
- if (isModuleLoaded("mod_version.c", currentlyLoadedModules, moduleNames, moduleFiles) != ModuleLoadedState.LOADED) {
+ if (isModuleLoaded("mod_version.c", state.loadedModules, state.moduleNames, state.moduleFiles) != ModuleLoadedState.LOADED) {
LOG.debug("mod_version not loaded and IfVersion directive encountered. Skipping it.");
continue;
}
- List<String> values = node.getValues();
+ List<String> values = walker.getValues(node);
String operator = null;
String version = null;
boolean negate = false;
@@ -226,54 +457,38 @@ public class RuntimeApacheConfiguration {
boolean result = false;
if ("=".equals(operator)) {
if (regex) {
- result = Pattern.matches(version, httpdVersion);
+ result = Pattern.matches(version, state.httpdVersion);
} else {
- result = comp.compare(version, httpdVersion) == 0;
+ result = comp.compare(version, state.httpdVersion) == 0;
}
} else if ("~".equals(operator)) {
- result = Pattern.matches(version, httpdVersion);
+ result = Pattern.matches(version, state.httpdVersion);
} else if (">".equals(operator)) {
- result = comp.compare(httpdVersion, version) > 0;
+ result = comp.compare(state.httpdVersion, version) > 0;
} else if (">=".equals(operator)) {
- result = comp.compare(httpdVersion, version) >= 0;
+ result = comp.compare(state.httpdVersion, version) >= 0;
} else if ("<".equals(operator)) {
- result = comp.compare(httpdVersion, version) < 0;
+ result = comp.compare(state.httpdVersion, version) < 0;
} else if ("<=".equals(operator)) {
- result = comp.compare(httpdVersion, version) <= 0;
+ result = comp.compare(state.httpdVersion, version) <= 0;
} else {
LOG.warn("Unknown operator " + operator + " in an IfVersion directive.");
continue;
}
- if (negate != result) {
- nodesToPromote.add(node);
- } else {
- nodesToRemove.add(node);
- }
+ recurseFurther = result != negate;
+
+ walker.visitConditionalNode(node, recurseFurther);
+ } else {
+ walker.visitOrdinaryNode(node);
+ }
+
+ if (recurseFurther) {
+ transform(walker, node, state);
}
-
- transform(node, currentlyLoadedModules, defines, moduleNames, moduleFiles, httpdVersion);
- }
-
- for(ApacheDirective node : nodesToRemove) {
- parentNode.getChildDirectives().remove(node);
}
- //add the children of node as children of parent node at the place node
- //was declared and remove node ... i.e. make it so as if the child nodes
- //of node were directly in the parentNode in the place of node
- for(ApacheDirective node : nodesToPromote) {
- int nodeIdx = parentNode.getChildDirectives().indexOf(node);
-
- List<ApacheDirective> childNodes = node.getChildDirectives();
- for(int i = childNodes.size() - 1; i >= 0; --i) {
- ApacheDirective childNode = childNodes.get(i);
- parentNode.getChildDirectives().add(nodeIdx, childNode);
- childNode.setParentNode(parentNode);
- }
-
- parentNode.getChildDirectives().remove(nodeIdx + childNodes.size());
- }
+ walker.onAfterChildrenScan(parentNode);
}
private static ModuleLoadedState isModuleLoaded(String moduleIdentifier, Set<String> currentlyLoadedModules, Map<String, String> moduleNames, Map<String, String> moduleFiles) {
commit 116411a3e10a5a2e5840d620a14326f5ca9974ce
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Apr 29 19:06:15 2011 +0200
BZ 700616 - apache server discovery component uses runtime discovery as well now
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerDiscoveryComponent.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerDiscoveryComponent.java
index 17829eb..4cd0184 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerDiscoveryComponent.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerDiscoveryComponent.java
@@ -309,7 +309,8 @@ public class ApacheServerDiscoveryComponent implements ResourceDiscoveryComponen
pluginConfig.put(inclusionGlobs);
ApacheDirectiveTree serverConfig = loadParser(serverConfigFile.getAbsolutePath(), serverRoot);
-
+ serverConfig = RuntimeApacheConfiguration.extract(serverConfig, process.getProcessInfo(), binaryInfo, getDefaultModuleNames(binaryInfo.getVersion()));
+
String serverUrl = null;
String vhostsGlobInclude = null;
commit 069d5fc2d0e10278277223dd2c04639caa25e3a4
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Apr 29 19:05:26 2011 +0200
BZ 700616 - First pass at converting the discovery to using the runtime configuration.
Note that THIS DOES NOT COMPILE, but I'm commiting it anyway to logically split the commits.
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
index c4ceb0b..f44485e 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
@@ -416,7 +416,7 @@ public class ApacheServerComponent implements AugeasRHQComponent<PlatformCompone
if (!matcher.matches())
throw new Exception("Wrong format of virtual host resource name. The right format is Address:Port.");
- addr = getAddressUtility().getVirtualHostSampleAddress(parserTree, vhostDefs[0], serverName, false);
+ addr = getAddressUtility().getVirtualHostSampleAddress(parserTree, vhostDefs[0], serverName);
} catch (Exception e) {
report.setStatus(CreateResourceStatus.FAILURE);
report.setErrorMessage("Wrong format of virtual host resource name.");
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceDiscoveryComponent.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceDiscoveryComponent.java
index fc61097..9da9c31 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceDiscoveryComponent.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceDiscoveryComponent.java
@@ -76,9 +76,11 @@ public class ApacheVirtualHostServiceDiscoveryComponent implements ResourceDisco
ApacheServerComponent serverComponent = context.getParentResourceComponent();
ApacheDirectiveTree tree = serverComponent.loadParser();
-
+
+ tree = RuntimeApacheConfiguration.extract(tree, serverComponent.getCurrentProcessInfo(), serverComponent.getCurrentBinaryInfo(), serverComponent.getModuleNames());
+
//first define the root server as one virtual host
- discoverMainServer(context, discoveredResources, snmpDiscoveries);
+ discoverMainServer(context, discoveredResources, snmpDiscoveries, tree);
ResourceType resourceType = context.getResourceType();
@@ -87,6 +89,8 @@ public class ApacheVirtualHostServiceDiscoveryComponent implements ResourceDisco
List<ApacheDirective> virtualHosts = tree.search("/<VirtualHost");
+ int currentVhostIndex = 0;
+
for (ApacheDirective node : virtualHosts) {
List<String> hosts = node.getValues();
String firstAddress = hosts.get(0);
@@ -102,7 +106,7 @@ public class ApacheVirtualHostServiceDiscoveryComponent implements ResourceDisco
Configuration pluginConfiguration = context.getDefaultPluginConfiguration();
- Address address = serverComponent.getAddressUtility().getVirtualHostSampleAddress(tree, firstAddress, serverName, false);
+ Address address = serverComponent.getAddressUtility().getVirtualHostSampleAddress(tree, firstAddress, serverName);
if (address != null) {
String scheme = address.scheme;
String hostToPing = address.host;
@@ -146,13 +150,23 @@ public class ApacheVirtualHostServiceDiscoveryComponent implements ResourceDisco
}
//BZ 612189 - remove this once we have resource upgrade
+ //ok, this is hacky, but...
+ //in order not to change the semantics of the resource key creation
+ //we use the legacy resource key (i.e. the one based on SNMP) only
+ //if SNMP is available, even though we now have algorithm that can
+ //determine the SNMP resource key without it being available.
if (snmpDiscoveries != null) {
- String legacyResourceKey = getLegacyResourceKey(context, resourceKey, snmpDiscoveries);
- resourceKey = legacyResourceKey != null ? legacyResourceKey : resourceKey;
+ resourceKey = serverComponent.getAddressUtility().getHttpdInternalVirtualHostAddressRepresentation(tree, firstAddress, serverName).toString(false);
}
+ //as the last thing, let's determine the SNMP WWW Service Index of this vhost
+ int snmpWwwServiceIndex = virtualHosts.size() - currentVhostIndex + 1;
+ pluginConfiguration.put(new PropertySimple(ApacheVirtualHostServiceComponent.SNMP_WWW_SERVICE_INDEX_CONFIG_PROP, snmpWwwServiceIndex));
+
discoveredResources.add(new DiscoveredResourceDetails(resourceType, resourceKey, resourceName, null, null,
pluginConfiguration, null));
+
+ currentVhostIndex++;
}
return discoveredResources;
@@ -160,7 +174,7 @@ public class ApacheVirtualHostServiceDiscoveryComponent implements ResourceDisco
private void discoverMainServer(ResourceDiscoveryContext<ApacheServerComponent> context,
- Set<DiscoveredResourceDetails> discoveredResources, SnmpWwwServiceIndexes snmpDiscoveries) throws Exception {
+ Set<DiscoveredResourceDetails> discoveredResources, SnmpWwwServiceIndexes snmpDiscoveries, ApacheDirectiveTree runtimeConfig) throws Exception {
ResourceType resourceType = context.getResourceType();
Configuration mainServerPluginConfig = context.getDefaultPluginConfiguration();
@@ -206,9 +220,13 @@ public class ApacheVirtualHostServiceDiscoveryComponent implements ResourceDisco
}
//BZ 612189 - remove this once we have resource upgrade
+ //ok, this is hacky, but...
+ //in order not to change the semantics of the resource key creation
+ //we use the legacy resource key (i.e. the one based on SNMP) only
+ //if SNMP is available, even though we now have algorithm that can
+ //determine the SNMP resource key without it being available.
if (snmpDiscoveries != null) {
- String legacyKey = getLegacyResourceKey(context, key, snmpDiscoveries);
- key = legacyKey != null ? legacyKey : key;
+ key = context.getParentResourceComponent().getAddressUtility().getHttpdInternalMainServerAddressRepresentation(runtimeConfig).toString(false);
}
DiscoveredResourceDetails mainServer = new DiscoveredResourceDetails(resourceType,
@@ -217,30 +235,30 @@ public class ApacheVirtualHostServiceDiscoveryComponent implements ResourceDisco
discoveredResources.add(mainServer);
}
- /**
- * @deprecated remove this once we have resource upgrade
- * @param discoveryContext
- * @param newStyleResourceKey
- * @param snmpDiscoveries
- * @return
- */
- @Deprecated
- private String getLegacyResourceKey(ResourceDiscoveryContext<ApacheServerComponent> discoveryContext, String newStyleResourceKey, SnmpWwwServiceIndexes snmpDiscoveries) {
- int snmpWwwServiceIndex = ApacheVirtualHostServiceComponent.getMatchingWwwServiceIndex(discoveryContext.getParentResourceComponent(), newStyleResourceKey, snmpDiscoveries.names, snmpDiscoveries.ports);
-
- if (snmpWwwServiceIndex < 1) {
- return null;
- } else {
- String host = snmpDiscoveries.names.get(snmpWwwServiceIndex - 1).toString();
- String fullPort = snmpDiscoveries.ports.get(snmpWwwServiceIndex - 1).toString();
-
- // The port value will be in the form "1.3.6.1.2.1.6.XXXXX",
- // where "1.3.6.1.2.1.6" represents the TCP protocol ID,
- // and XXXXX is the actual port number
- String port = fullPort.substring(fullPort.lastIndexOf(".") + 1);
- return host + ":" + port;
- }
- }
+// /**
+// * @deprecated remove this once we have resource upgrade
+// * @param discoveryContext
+// * @param newStyleResourceKey
+// * @param snmpDiscoveries
+// * @return
+// */
+// @Deprecated
+// private String getLegacyResourceKey(ResourceDiscoveryContext<ApacheServerComponent> discoveryContext, String newStyleResourceKey, SnmpWwwServiceIndexes snmpDiscoveries) {
+// int snmpWwwServiceIndex = ApacheVirtualHostServiceComponent.getMatchingWwwServiceIndex(discoveryContext.getParentResourceComponent(), newStyleResourceKey, snmpDiscoveries.names, snmpDiscoveries.ports);
+//
+// if (snmpWwwServiceIndex < 1) {
+// return null;
+// } else {
+// String host = snmpDiscoveries.names.get(snmpWwwServiceIndex - 1).toString();
+// String fullPort = snmpDiscoveries.ports.get(snmpWwwServiceIndex - 1).toString();
+//
+// // The port value will be in the form "1.3.6.1.2.1.6.XXXXX",
+// // where "1.3.6.1.2.1.6" represents the TCP protocol ID,
+// // and XXXXX is the actual port number
+// String port = fullPort.substring(fullPort.lastIndexOf(".") + 1);
+// return host + ":" + port;
+// }
+// }
public static String createResourceKey(String serverName, List<String> hosts) {
//BZ 612189 - swap the impls once resource upgrade is in place
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/HttpdAddressUtility.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/HttpdAddressUtility.java
index 0710178..7c55fb4 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/HttpdAddressUtility.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/HttpdAddressUtility.java
@@ -41,7 +41,8 @@ import org.rhq.plugins.apache.parser.ApacheDirectiveTree;
public enum HttpdAddressUtility {
APACHE_1_3 {
- public Address getMainServerSampleAddress(ApacheDirectiveTree ag, String limitToHost, int limitToPort) {
+
+ public List<Address> getAllMainServerAddresses(ApacheDirectiveTree ag, boolean substituteWildcards) {
try {
List<ApacheDirective> ports = ag.search("/Port");
List<ApacheDirective> bindAddresses = ag.search("/BindAddress");
@@ -50,7 +51,7 @@ public enum HttpdAddressUtility {
String port = "80"; //this is the default in apache 1.3
String bindAddress = null;
- List<Address> addressesToMatch = new ArrayList<Address>();
+ List<Address> addresses = new ArrayList<Address>();
if (ports.size() > 0) {
List<String>values = ports.get(0).getValues();
@@ -67,28 +68,24 @@ public enum HttpdAddressUtility {
//listen directives take precedence over port/bindaddress combo
if (listens.size() > 0) {
for(ApacheDirective l : listens) {
- addressesToMatch.add(parseListen(l.getValues().get(0)));
+ addresses.add(parseListen(l.getValues().get(0)));
}
} else {
- addressesToMatch.add(new Address(bindAddress, Integer.parseInt(port)));
+ addresses.add(new Address(bindAddress, Integer.parseInt(port)));
}
- for (Address address : addressesToMatch) {
- if (isAddressConforming(address, limitToHost, limitToPort, false)) {
- if (!address.isPortDefined() || address.isPortWildcard()) {
- address.port = 80;
- }
- if (address.host == null || address.isHostDefault() || address.isHostWildcard()) {
- address = getLocalhost(address.port);
- }
-
- updateWithServerName(address, ag);
-
- return address;
+ for (Address address : addresses) {
+
+ if (!address.isPortDefined()) {
+ address.port = 80;
+ }
+
+ if (substituteWildcards) {
+ substituteWildcards(ag, address);
}
}
- return null;
+ return addresses;
} catch (Exception e) {
log.warn("Failed to obtain main server address.", e);
@@ -97,23 +94,22 @@ public enum HttpdAddressUtility {
}
},
APACHE_2_x {
- public Address getMainServerSampleAddress(ApacheDirectiveTree ag, String limitToHost, int limitToPort) {
+
+ public List<Address> getAllMainServerAddresses(ApacheDirectiveTree ag, boolean substituteWildcards) {
try {
+ List<Address> ret = new ArrayList<Address>();
+
for(ApacheDirective n : ag.search("/Listen")) {
Address addr = parseListen(n.getValues().get(0));
- if (isAddressConforming(addr, limitToHost, limitToPort, false)) {
- if (addr.host == null || addr.isHostDefault() || addr.isHostWildcard()) {
- addr = getLocalhost(addr.port);
- }
-
- updateWithServerName(addr, ag);
-
- return addr;
+
+ if (substituteWildcards) {
+ substituteWildcards(ag, addr);
}
+
+ ret.add(addr);
}
- //there has to be at least one Listen directive
- throw new IllegalStateException("Could find a listen address on port " + limitToPort);
+ return ret;
} catch (Exception e) {
log.warn("Failed to obtain main server address.", e);
@@ -124,6 +120,9 @@ public enum HttpdAddressUtility {
private static final Log log = LogFactory.getLog(HttpdAddressUtility.class);
+ public static final String BOGUS_HOST_WITHOUT_FORWARD_DNS = "bogus_host_without_forward_dns";
+ public static final String BOGUS_HOST_WITHOUT_REVERSE_DNS = "bogus_host_without_reverse_dns";
+
public static HttpdAddressUtility get(String version) {
return version.startsWith("1.") ? APACHE_1_3 : APACHE_2_x;
}
@@ -163,8 +162,8 @@ public enum HttpdAddressUtility {
}
int lastColonIdx = address.lastIndexOf(':');
- if (lastColonIdx == NO_PORT_SPECIFIED_VALUE) {
- return new Address(address, -1);
+ if (lastColonIdx == -1) {
+ return new Address(address, NO_PORT_SPECIFIED_VALUE);
} else {
int lastRightBracketPos = address.lastIndexOf(']');
if (lastColonIdx > lastRightBracketPos) {
@@ -283,6 +282,15 @@ public enum HttpdAddressUtility {
}
/**
+ * This returns all the addresses the server listens on.
+ *
+ * @param ag the tree of the httpd configuration
+ * @param substituteWildcards true if wildcard substitution should be made on host and port specs
+ * @return the addresses or null on failure
+ */
+ public abstract List<Address> getAllMainServerAddresses(ApacheDirectiveTree ag, boolean substituteWildcards);
+
+ /**
* This just constructs a first available address under which the server or one of its virtual hosts can be reached.
*
* @param ag the tree of the httpd configuration
@@ -291,7 +299,22 @@ public enum HttpdAddressUtility {
* @param limitToPort if > 0, the sample address is looked for only for the given port
* @return the address or null on failure
*/
- public abstract Address getMainServerSampleAddress(ApacheDirectiveTree ag, String limitToHost, int limitToPort);
+ public Address getMainServerSampleAddress(ApacheDirectiveTree ag, String limitToHost, int limitToPort) {
+ List<Address> addressesToMatch = getAllMainServerAddresses(ag, false);
+
+ if (addressesToMatch == null) {
+ return null;
+ }
+
+ for (Address address : addressesToMatch) {
+ if (isAddressConforming(address, limitToHost, limitToPort, false)) {
+ substituteWildcards(ag, address);
+ return address;
+ }
+ }
+
+ return null;
+ }
/**
* This constructs an address on which given virtual host can be accessed.
@@ -299,20 +322,14 @@ public enum HttpdAddressUtility {
* @param ag the augeas tree of the httpd configuration
* @param virtualHost the port or address:port of the virtual host
* @param serverName the server name for the namebased virtual hosts (or null if the virtual host is ip based)
- * @param snmpModuleCompatibleMode if true, generates a sample address in the same way as snmp module. Namely
- * deals with the host name wildcard the same way as snmp module (i.e. by assuming it means "localhost", even though it doesn't have to).
* @return the address on which the virtual host can be accessed or null on error
*/
- public Address getVirtualHostSampleAddress(ApacheDirectiveTree ag, String virtualHost, String serverName, boolean snmpModuleCompatibleMode) {
+ public Address getVirtualHostSampleAddress(ApacheDirectiveTree ag, String virtualHost, String serverName) {
try {
Address addr = Address.parse(virtualHost);
if (addr.isHostDefault() || addr.isHostWildcard()) {
Address serverAddr = null;
- if (snmpModuleCompatibleMode) {
- serverAddr = getLocalhost(addr.port);
- } else {
- serverAddr = getMainServerSampleAddress(ag, null, addr.port);
- }
+ serverAddr = getMainServerSampleAddress(ag, null, addr.port);
if (serverAddr == null)
return null;
addr.host = serverAddr.host;
@@ -329,6 +346,76 @@ public enum HttpdAddressUtility {
}
}
+ public Address getHttpdInternalMainServerAddressRepresentation(ApacheDirectiveTree runtimeConfig) {
+ Address ret = null;
+
+ List<ApacheDirective> serverNames = runtimeConfig.search("/ServerName");
+ if (serverNames.size() == 0) {
+ //no servername directive in the apache config
+ ret = new Address(Address.WILDCARD, Address.NO_PORT_SPECIFIED_VALUE);
+ try {
+ ret.host = InetAddress.getLocalHost().getCanonicalHostName();
+ } catch (UnknownHostException e) {
+ ret.host = "127.0.0.1";
+ }
+
+ ret.port = 0;
+ } else {
+ String serverName = serverNames.get(serverNames.size() - 1).getValuesAsString();
+ ret = HttpdAddressUtility.Address.parse(serverName);
+ if (!ret.isPortDefined()) {
+ ret.port = 0;
+ }
+ }
+
+ return ret;
+ }
+
+ public Address getHttpdInternalVirtualHostAddressRepresentation(ApacheDirectiveTree runtimeConfig, String virtualHost, String serverName) {
+ Address ret = null;
+
+ if (serverName != null) {
+ ret = Address.parse(serverName);
+ if (!ret.isPortDefined()) {
+ ret.port = 0;
+ }
+
+ //servername is taken literally and no reverse dns lookup is made
+ //if the servername host is an IP address. We're done here...
+ } else {
+ ret = Address.parse(virtualHost);
+ if (!ret.isPortDefined() || ret.isPortWildcard() || ret.isHostDefault() || ret.isHostWildcard()) {
+ Address mainAddress = getHttpdInternalMainServerAddressRepresentation(runtimeConfig);
+
+ if (!ret.isPortDefined() || ret.isPortWildcard()) {
+ ret.port = mainAddress.port;
+ }
+
+ if (ret.isHostDefault() || ret.isHostWildcard()) {
+ ret.host = mainAddress.host;
+ }
+ }
+
+ //if the vhost hostname is an IP address, a reverse dns lookup is attempted
+ //to get the actual hostname.
+ //the BOGUS* constants are what the apache actually uses to identify such
+ //"error" conditions.
+ try {
+ InetAddress iAddr = InetAddress.getByName(ret.host);
+ String reverseLookup = iAddr.getHostName();
+ if (iAddr.getHostAddress().equals(reverseLookup)) {
+ ret.host = BOGUS_HOST_WITHOUT_REVERSE_DNS;
+ } else {
+ ret.host = reverseLookup;
+ }
+ } catch (UnknownHostException e) {
+ ret.host = BOGUS_HOST_WITHOUT_FORWARD_DNS;
+ }
+ }
+
+ return ret;
+ }
+
private static Address parseListen(String listenValue) {
Address ret = Address.parse(listenValue);
if (!ret.isPortDefined()) {
@@ -343,6 +430,20 @@ public enum HttpdAddressUtility {
return ret;
}
+ private static void substituteWildcards(ApacheDirectiveTree ag, Address address) {
+ if (address.isPortWildcard()) {
+ address.port = 80;
+ }
+
+ if (address.host == null || address.isHostDefault() || address.isHostWildcard()) {
+ Address localhost = getLocalhost(address.port);
+ address.host = localhost.host;
+ }
+
+ updateWithServerName(address, ag);
+
+ }
+
/**
* Checks that given address represents a possibly wildcarded limitingHost and limitingPort values.
*
@@ -354,7 +455,7 @@ public enum HttpdAddressUtility {
* If this flag is set to true, this method takes that into account.
* @return
*/
- public static boolean isAddressConforming(Address listen, String limitingHost, int limitingPort, boolean snmpModuleCompatibleMode) {
+ private static boolean isAddressConforming(Address listen, String limitingHost, int limitingPort, boolean snmpModuleCompatibleMode) {
if (Address.DEFAULT_HOST.equals(limitingHost) || Address.WILDCARD.equals(limitingHost)) {
limitingHost = null;
}
@@ -398,7 +499,7 @@ public enum HttpdAddressUtility {
}
}
- private static void updateWithServerName(Address address, ApacheDirectiveTree config) throws UnknownHostException {
+ private static void updateWithServerName(Address address, ApacheDirectiveTree config) {
//check if there is a ServerName directive
List<ApacheDirective> serverNameNodes = config.search("/ServerName");
@@ -411,7 +512,7 @@ public enum HttpdAddressUtility {
}
}
- private static void updateWithServerName(Address address, String serverName) throws UnknownHostException {
+ private static void updateWithServerName(Address address, String serverName) {
//the configuration may be invalid and/or the hostname can be unresolvable.
//we try to match the address with the servername first by IP address
//but if that fails (i.e. the hostname couldn't be resolved to an IP)
commit a48c68385ba2fbd226fa62e52b944c2fbcf43515
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon Apr 25 17:02:12 2011 +0200
need to update vhost::getNode() to not use the matching. basically I need
to detect, that I'm dealing with only a simple vhost, not nested inside
any if* and not containing and If* that would contain configurable directives.
If that's the case, fail, otherwise we can proceed with the read/update.
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
index ee7520f..c4ceb0b 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java
@@ -23,7 +23,9 @@ import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Date;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -67,6 +69,7 @@ import org.rhq.core.pluginapi.measurement.MeasurementFacet;
import org.rhq.core.pluginapi.operation.OperationFacet;
import org.rhq.core.pluginapi.operation.OperationResult;
import org.rhq.core.system.OperatingSystemType;
+import org.rhq.core.system.ProcessInfo;
import org.rhq.core.system.SystemInfo;
import org.rhq.plugins.apache.augeas.ApacheAugeasNode;
import org.rhq.plugins.apache.augeas.AugeasConfigurationApache;
@@ -145,6 +148,7 @@ public class ApacheServerComponent implements AugeasRHQComponent<PlatformCompone
private URL url;
private ApacheBinaryInfo binaryInfo;
private long availPingTime = -1;
+ private Map<String, String> moduleNames;
/**
* Delegate instance for handling all calls to invoke operations on this component.
@@ -211,6 +215,9 @@ public class ApacheServerComponent implements AugeasRHQComponent<PlatformCompone
this.operationsDelegate = new ApacheServerOperationsDelegate(this, pluginConfig, this.resourceContext
.getSystemInformation());
+ //init the module names with the defaults
+ moduleNames = new HashMap<String, String>(ApacheServerDiscoveryComponent.getDefaultModuleNames(binaryInfo.getVersion()));
+
startEventPollers();
} catch (Exception e) {
if (this.snmpClient != null) {
@@ -759,6 +766,18 @@ public class ApacheServerComponent implements AugeasRHQComponent<PlatformCompone
}
}
+ public Map<String, String> getModuleNames() {
+ return moduleNames;
+ }
+
+ public ProcessInfo getCurrentProcessInfo() {
+ return resourceContext.getNativeProcess();
+ }
+
+ public ApacheBinaryInfo getCurrentBinaryInfo() {
+ return binaryInfo;
+ }
+
// TODO: Move this method to a helper class.
static void addSnmpMetricValueToReport(MeasurementReport report, MeasurementScheduleRequest schedule,
SNMPValue snmpValue, boolean valueIsTimestamp) throws SNMPException {
@@ -924,4 +943,18 @@ public class ApacheServerComponent implements AugeasRHQComponent<PlatformCompone
return false;
}
}
+
+ private String getVersion() {
+ String ret = resourceContext.getVersion();
+ if (ret == null) {
+ //strange, but this happens sometimes when
+ //the resource is synced with the server for the first
+ //time after data purge on the agent side
+
+ //let's determine the version from the binary info
+ ret = binaryInfo.getVersion();
+ }
+
+ return ret;
+ }
}
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerDiscoveryComponent.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerDiscoveryComponent.java
index 6ea64f4..17829eb 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerDiscoveryComponent.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerDiscoveryComponent.java
@@ -24,7 +24,9 @@ import java.net.URI;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.HashSet;
+import java.util.LinkedHashMap;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import org.apache.commons.logging.Log;
@@ -70,6 +72,151 @@ public class ApacheServerDiscoveryComponent implements ResourceDiscoveryComponen
private static final Log log = LogFactory.getLog(ApacheServerDiscoveryComponent.class);
+ public static final Map<String, String> MODULE_SOURCE_FILE_TO_MODULE_NAME_20;
+ public static final Map<String, String> MODULE_SOURCE_FILE_TO_MODULE_NAME_13;
+
+ static {
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20 = new LinkedHashMap<String, String>();
+
+ //these are extracted from http://httpd.apache.org/docs/current/mod/
+ //and linked pages
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("beos.c", "mpm_beos_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("event.c", "mpm_event_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mpm_netware.c", "mpm_netware_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mpmt_os2.c", "mpm_mpmt_os2_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("prefork.c", "mpm_prefork_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mpm_winnt.c", "mpm_winnt_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("worker.c", "mpm_worker_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_actions.c", "actions_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_alias.c", "alias_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_asis.c", "asis_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_auth_basic.c", "auth_basic_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_auth_digest.c", "auth_digest_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_authn_alias.c", "authn_alias_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_authn_anon.c", "authn_anon_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_authn_dbd.c", "authn_dbd_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_authn_dbm.c", "authn_dbm_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_authn_default.c", "authn_default_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_authn_file.c", "authn_file_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_authnz_ldap.c", "authnz_ldap_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_authz_dbm.c", "authz_dbm_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_authz_default.c", "authz_default_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_authz_groupfile.c", "authz_groupfile_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_authz_host.c", "authz_host_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_authz_owner.c", "authz_owner_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_authz_user.c", "authz_user_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_autoindex.c", "autoindex_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_cache.c", "cache_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_cern_meta.c", "cern_meta_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_cgi.c", "cgi_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_cgid.c", "cgid_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_charset_lite.c", "charset_lite_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_dav.c", "dav_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_dav_fs.c", "dav_fs_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_dav_lock.c", "dav_lock_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_dbd.c", "dbd_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_deflate.c", "deflate_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_dir.c", "dir_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_disk_cache.c", "disk_cache_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_dumpio.c", "dumpio_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_echo.c", "echo_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_env.c", "env_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_example.c", "example_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_expires.c", "expires_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_ext_filter.c", "ext_filter_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_file_cache.c", "file_cache_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_filter.c", "filter_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_headers.c", "headers_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_ident.c", "ident_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_imagemap.c", "imagemap_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_include.c", "include_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_info.c", "info_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_isapi.c", "isapi_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("util_ldap.c", "ldap_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_log_config.c", "log_config_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_log_forensic.c", "log_forensic_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_logio.c", "logio_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_mem_cache.c", "mem_cache_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_mime.c", "mime_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_mime_magic.c", "mime_magic_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_negotiation.c", "negotiation_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_nw_ssl.c", "nwssl_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_proxy.c", "proxy_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_proxy_ajp.c", "proxy_ajp_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_proxy_balancer.c", "proxy_balancer_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_proxy_connect.c", "proxy_connect_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_proxy_ftp.c", "proxy_ftp_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_proxy_http.c", "proxy_http_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_proxy_scgi.c", "proxy_scgi_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_reqtimeout.c", "reqtimeout_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_rewrite.c", "rewrite_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_setenvif.c", "setenvif_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_so.c", "so_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_speling.c", "speling_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_ssl.c", "ssl_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_status.c", "status_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_substitute.c", "substitute_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_suexec.c", "suexec_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_unique_id.c", "unique_id_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_userdir.c", "userdir_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_usertrack.c", "usertrack_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_version.c", "version_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_vhost_alias.c", "vhost_alias_module");
+
+ //some hand picked modules
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod_jk.c", "jk_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod-snmpcommon.c", "snmpcommon_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("mod-snmpagt.c", "snmpagt_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_20.put("covalent-snmp-v20.c", "snmp_agt_module");
+
+ //this list is for apache 1.3
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13 = new LinkedHashMap<String, String>();
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_access.c", "access_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_actions.c", "action_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_alias.c", "alias_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_asis.c", "asis_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_auth.c", "auth_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_auth_anon.c", "anon_auth_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_auth_db.c", "db_auth_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_auth_dbm.c", "dbm_auth_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_auth_digest.c", "digest_auth_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_autoindex.c", "autoindex_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_cern_meta.c", "cern_meta_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_cgi.c", "cgi_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_digest.c", "digest_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_dir.c", "dir_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_env.c", "env_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_example.c", "example_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_expires.c", "expires_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_headers.c", "headers_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_imap.c", "imap_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_include.c", "includes_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_info.c", "info_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_isapi.c", "isapi_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_log_agent.c", "agent_log_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_log_config.c", "config_log_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_log_forensic.c", "log_forensic_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_log_referer.c", "referer_log_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_mime.c", "mime_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_mime_magic.c", "mime_magic_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_mmap_static.c", "mmap_static_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_negotiation.c", "negotiation_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_proxy.c", "proxy_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_rewrite.c", "rewrite_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_setenvif.c", "setenvif_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_so.c", "so_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_speling.c", "speling_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_status.c", "status_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_unique_id.c", "unique_id_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_userdir.c", "userdir_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_usertrack.c", "usertrack_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_vhost_alias.c", "vhost_alias_module");
+
+ //and some hand-picks
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("mod_jk.c", "jk_module");
+ MODULE_SOURCE_FILE_TO_MODULE_NAME_13.put("covalent-snmp-v13.c", "snmp_agt_module");
+ }
+
private static class DiscoveryFailureException extends Exception {
private static final long serialVersionUID = 1L;
@@ -454,4 +601,14 @@ public class ApacheServerDiscoveryComponent implements ResourceDiscoveryComponen
}
return null;
}
+
+ public static Map<String, String> getDefaultModuleNames(String version) {
+ switch (HttpdAddressUtility.get(version)) {
+ case APACHE_1_3 :
+ return MODULE_SOURCE_FILE_TO_MODULE_NAME_13;
+ case APACHE_2_x:
+ return MODULE_SOURCE_FILE_TO_MODULE_NAME_20;
+ default: throw new IllegalStateException("Unknown HttpdAddressUtility instance.");
+ }
+ }
}
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceComponent.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceComponent.java
index c894fa9..b37361c 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceComponent.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceComponent.java
@@ -85,6 +85,8 @@ public class ApacheVirtualHostServiceComponent implements ResourceComponent<Apac
public static final String SERVER_NAME_CONFIG_PROP = "ServerName";
+ public static final String SNMP_WWW_SERVICE_INDEX_CONFIG_PROP = "snmpWwwServiceIndex";
+
private static final String RESPONSE_TIME_METRIC = "ResponseTime";
/** Multiply by 1/1000 to convert logged response times, which are in microseconds, to milliseconds. */
private static final double RESPONSE_TIME_LOG_TIME_MULTIPLIER = 0.001;
@@ -94,7 +96,6 @@ public class ApacheVirtualHostServiceComponent implements ResourceComponent<Apac
private ResponseTimeLogParser logParser;
private ConfigurationTimestamp lastConfigurationTimeStamp = new ConfigurationTimestamp();
- private int snmpWwwServiceIndex = -1;
public static final String RESOURCE_TYPE_NAME = "Apache Virtual Host";
@@ -423,8 +424,8 @@ public class ApacheVirtualHostServiceComponent implements ResourceComponent<Apac
log.warn("Failed to parse the server URL when trying to match the vhost with the main server.", e);
}
- throw new IllegalStateException("Could not find virtual host configuration in augeas for virtual host: "
- + resourceKey);
+ throw new IllegalStateException("Could not find virtual host configuration for virtual host resource : "
+ + resourceKey + ". Reading and updating configuration of virtual hosts nested inside If* directives is not supported by this plugin.");
}
/**
@@ -508,174 +509,14 @@ public class ApacheVirtualHostServiceComponent implements ResourceComponent<Apac
return oid;
}
- public static int getMatchingWwwServiceIndex(ApacheServerComponent parent, String resourceKey, List<SNMPValue> names, List<SNMPValue> ports) {
- int ret = -1;
- Iterator<SNMPValue> namesIterator = names.iterator();
- Iterator<SNMPValue> portsIterator = ports.iterator();
-
- //figure out the servername and addresses of this virtual host
- //from the resource key.
- String vhostServerName = null;
- String[] vhostAddressStrings = null;
- int pipeIdx = resourceKey.indexOf('|');
- if (pipeIdx >= 0) {
- vhostServerName = resourceKey.substring(0, pipeIdx);
- }
- vhostAddressStrings = resourceKey.substring(pipeIdx + 1).split(" ");
-
- ApacheDirectiveTree tree = parent.loadParser();
-
- //convert the vhost addresses into fully qualified ip/port addresses
- List<HttpdAddressUtility.Address> vhostAddresses = new ArrayList<HttpdAddressUtility.Address>(
- vhostAddressStrings.length);
-
- if (vhostAddressStrings.length == 1 && MAIN_SERVER_RESOURCE_KEY.equals(vhostAddressStrings[0])) {
- HttpdAddressUtility.Address serverAddr = parent.getAddressUtility().getMainServerSampleAddress(tree, null, 0);
- if (serverAddr != null) {
- vhostAddresses.add(serverAddr);
- }
- } else {
- for (int i = 0; i < vhostAddressStrings.length; ++i) {
- HttpdAddressUtility.Address vhostAddr = parent.getAddressUtility().getVirtualHostSampleAddress(tree, vhostAddressStrings[i],
- vhostServerName, true);
- if (vhostAddr != null) {
- vhostAddresses.add(vhostAddr);
- } else {
- //this is not to choke on the old style resource keys for the main server. without this, we'd never be able
- //to match the main server with its snmp index below.
- HttpdAddressUtility.Address addr = HttpdAddressUtility.Address.parse(vhostAddressStrings[i]);
- vhostAddr = parent.getAddressUtility().getMainServerSampleAddress(tree, addr.host, addr.port);
- if (vhostAddr != null) {
- vhostAddresses.add(vhostAddr);
- }
- }
- }
- }
-
- //finding the snmp index that corresponds to the address(es) of the vhost isn't that simple
- //because the snmp module in apache always resolves the IPs to hostnames.
- //on the other hand, the resource key tries to be more accurate about what a
- //vhost can actually be represented as. A vhost is represented by at most 1 hostname (i.e. ServerName)
- //and possibly multiple IP addresses.
- SNMPValue bestMatch = null;
- int bestMatchRate = 0;
-
- while (namesIterator.hasNext()) {
- SNMPValue nameValue = namesIterator.next();
- SNMPValue portValue = portsIterator.next();
-
- String snmpHost = nameValue.toString();
- String fullPort = portValue.toString();
-
- int snmpPort = Integer.parseInt(fullPort.substring(fullPort.lastIndexOf(".") + 1));
-
- HttpdAddressUtility.Address snmpAddress = new HttpdAddressUtility.Address(snmpHost, snmpPort);
-
- int matchRate = matchRate(vhostAddresses, snmpAddress);
- if (matchRate > bestMatchRate) {
- bestMatch = nameValue;
- bestMatchRate = matchRate;
- }
- }
-
- if (bestMatch != null) {
- String nameOID = bestMatch.getOID();
- ret = Integer.parseInt(nameOID.substring(nameOID.lastIndexOf(".") + 1));
- } else {
- log.warn("Unable to match the Virtual Host [" + resourceKey + "] with any of the SNMP advertised vhosts: " + names + ". It won't be possible to monitor the Virtual Host.");
- }
- return ret;
- }
-
/**
* @return the index of the virtual host that identifies it in SNMP
* @throws Exception on SNMP error
*/
private int getWwwServiceIndex() throws Exception {
- ConfigurationTimestamp currentTimestamp = resourceContext.getParentResourceComponent().getConfigurationTimestamp();
- if (!lastConfigurationTimeStamp.equals(currentTimestamp)) {
- snmpWwwServiceIndex = -1;
- //don't go through this configuration again even if we fail further below.. we'd fail again.
- lastConfigurationTimeStamp = currentTimestamp;
-
- //configuration has changed. re-read the service index of this virtual host
-
- //we have to scan the SNMP to find the entry corresponding to this vhost.
- SNMPSession snmpSession = resourceContext.getParentResourceComponent().getSNMPSession();
-
- List<SNMPValue> names;
- List<SNMPValue> ports;
-
- names = snmpSession.getColumn(SNMPConstants.COLUMN_VHOST_NAME);
- ports = snmpSession.getColumn(SNMPConstants.COLUMN_VHOST_PORT);
-
- snmpWwwServiceIndex = getMatchingWwwServiceIndex(resourceContext.getParentResourceComponent(), resourceContext.getResourceKey(), names, ports);
- }
- return snmpWwwServiceIndex;
+ return Integer.parseInt(resourceContext.getPluginConfiguration().getSimpleValue(SNMP_WWW_SERVICE_INDEX_CONFIG_PROP, "-1"));
}
- private static int matchRate(List<HttpdAddressUtility.Address> addresses, HttpdAddressUtility.Address addressToCheck) {
- for(HttpdAddressUtility.Address a : addresses) {
- if (HttpdAddressUtility.isAddressConforming(addressToCheck, a.host, a.port, true)) {
- return 3;
- }
- }
-
- //try to get the IP of the address to check
- InetAddress[] ipAddresses;
- try {
- ipAddresses = InetAddress.getAllByName(addressToCheck.host);
- for(InetAddress ip : ipAddresses) {
- HttpdAddressUtility.Address newCheck = new HttpdAddressUtility.Address(ip.getHostAddress(), addressToCheck.port);
-
- for(HttpdAddressUtility.Address a : addresses) {
- if (HttpdAddressUtility.isAddressConforming(newCheck, a.host, a.port, true)) {
- return 2;
- }
- }
- }
- } catch (UnknownHostException e) {
- log.debug("Unknown host encountered in the httpd configuration: " + addressToCheck.host);
- return 0;
- }
-
- //this stupid 80 = 0 rule is to conform with snmp module
- //the problem is that snmp module represents both 80 and * port defs as 0,
- //so whatever we do, we might mismatch the vhost. But there's no working around that
- //but to modify the snmp module itself.
-
- int addressPort = addressToCheck.port;
- if (addressPort == 80) {
- addressPort = 0;
- }
-
- //ok, try the hardest...
- for(HttpdAddressUtility.Address listAddress: addresses) {
- int listPort = listAddress.port;
- if (listPort == 80) {
- listPort = 0;
- }
-
- InetAddress[] listAddresses;
- try {
- listAddresses = InetAddress.getAllByName(listAddress.host);
- } catch (UnknownHostException e) {
- log.debug("Unknown host encountered in the httpd configuration: " + listAddress.host);
- return 0;
- }
-
- for (InetAddress listInetAddr : listAddresses) {
- for (InetAddress ip : ipAddresses) {
- if (ip.equals(listInetAddr) && addressPort == listPort) {
- return 1;
- }
- }
- }
- }
-
- return 0;
- }
-
private ResourceType getDirectoryResourceType() {
return resourceContext.getResourceType().getChildResourceTypes().iterator().next();
}
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceDiscoveryComponent.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceDiscoveryComponent.java
index 95edbcf..fc61097 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceDiscoveryComponent.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceDiscoveryComponent.java
@@ -42,6 +42,7 @@ import org.rhq.plugins.apache.parser.ApacheDirective;
import org.rhq.plugins.apache.parser.ApacheDirectiveTree;
import org.rhq.plugins.apache.util.HttpdAddressUtility;
import org.rhq.plugins.apache.util.HttpdAddressUtility.Address;
+import org.rhq.plugins.apache.util.RuntimeApacheConfiguration;
import org.rhq.plugins.www.snmp.SNMPException;
import org.rhq.plugins.www.snmp.SNMPSession;
import org.rhq.plugins.www.snmp.SNMPValue;
@@ -75,6 +76,7 @@ public class ApacheVirtualHostServiceDiscoveryComponent implements ResourceDisco
ApacheServerComponent serverComponent = context.getParentResourceComponent();
ApacheDirectiveTree tree = serverComponent.loadParser();
+
//first define the root server as one virtual host
discoverMainServer(context, discoveredResources, snmpDiscoveries);
@@ -193,7 +195,11 @@ public class ApacheVirtualHostServiceDiscoveryComponent implements ResourceDisco
//BZ 612189 - remove this once we have resource upgrade
key = host + ":" + port;
}
-
+
+ //the SNMP WWW service index of the main server is always 1
+ mainServerPluginConfig.put(new PropertySimple(
+ ApacheVirtualHostServiceComponent.SNMP_WWW_SERVICE_INDEX_CONFIG_PROP, 1));
+
//BZ 612189 - this can simply the MAIN_SERVER_RESOURCE_KEY only once we have resource upgrade
if (key == null) {
key = ApacheVirtualHostServiceComponent.MAIN_SERVER_RESOURCE_KEY;
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheDirective.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheDirective.java
index 53cee70..ae8e23e 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheDirective.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheDirective.java
@@ -5,7 +5,7 @@ import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-public class ApacheDirective {
+public class ApacheDirective implements Cloneable {
private String name;
private List<String> values;
@@ -195,4 +195,23 @@ public class ApacheDirective {
public void addValue(String val){
values.add(val);
}
+
+ @Override
+ public ApacheDirective clone() {
+ try {
+ ApacheDirective copy = (ApacheDirective) super.clone();
+
+ List<ApacheDirective> newChildNodes = new ArrayList<ApacheDirective>(childNodes.size());
+ for(ApacheDirective child : childNodes) {
+ ApacheDirective childCopy = child.clone();
+ childCopy.parentNode = copy;
+ newChildNodes.add(childCopy);
+ }
+ copy.childNodes = newChildNodes;
+
+ return copy;
+ } catch (CloneNotSupportedException e) {
+ throw new IllegalStateException("ApacheDirective not cloneable even though it is declared as such.", e);
+ }
+ }
}
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheDirectiveTree.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheDirectiveTree.java
index 4822732..9e0ad8b 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheDirectiveTree.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheDirectiveTree.java
@@ -3,7 +3,7 @@ package org.rhq.plugins.apache.parser;
import java.util.ArrayList;
import java.util.List;
-public class ApacheDirectiveTree {
+public class ApacheDirectiveTree implements Cloneable {
private ApacheDirective rootNode;
@@ -61,4 +61,12 @@ public class ApacheDirectiveTree {
parentNode.addChildDirective(dir);
return dir;
}
+
+ @Override
+ public ApacheDirectiveTree clone() {
+ ApacheDirectiveTree copy = new ApacheDirectiveTree();
+ copy.rootNode = rootNode.clone();
+
+ return copy;
+ }
}
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/ApacheBinaryInfo.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/ApacheBinaryInfo.java
index 0c41d5c..aedb144 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/ApacheBinaryInfo.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/ApacheBinaryInfo.java
@@ -23,8 +23,10 @@ import java.io.File;
import java.io.IOException;
import java.io.StringReader;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Map;
import java.util.Properties;
+import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -60,7 +62,9 @@ public class ApacheBinaryInfo {
private String built;
private String mpm;
private long lastModified = 0;
-
+ private Set<String> compiledInModules = new HashSet<String>();
+ private Set<String> compiledInDefines = new HashSet<String>();
+
private ApacheBinaryInfo(@NotNull
String binaryPath) {
this.binaryPath = binaryPath;
@@ -133,6 +137,8 @@ public class ApacheBinaryInfo {
BufferedReader is = null;
try {
+ compiledInDefines.clear();
+
ProcessExecution processExecution = new ProcessExecution(binaryPath);
processExecution.setArguments(new String[] { "-V" });
processExecution.setWaitForCompletion(10000L);
@@ -164,7 +170,56 @@ public class ApacheBinaryInfo {
}
this.mpm = line;
+ } else if (line.startsWith("-D")) {
+ String define = line.substring(3);
+ int equalsIdx = define.indexOf('=');
+ if (equalsIdx >= 0) {
+ define = define.substring(0, equalsIdx);
+ }
+
+ compiledInDefines.add(define);
+ }
+ }
+ } catch (Throwable t) {
+ String msg = "Error running binary '" + binaryPath + "': " + t.getMessage();
+ LOG.error(msg, t);
+ } finally {
+ if (is != null) {
+ try {
+ is.close();
+ } catch (IOException e) {
+ }
+ }
+ }
+ }
+
+ private void getCompiledInModules(String binaryPath, SystemInfo systemInfo) {
+ BufferedReader is = null;
+
+ try {
+
+ compiledInModules.clear();
+
+ ProcessExecution processExecution = new ProcessExecution(binaryPath);
+ processExecution.setArguments(new String[] { "-l" });
+ processExecution.setWaitForCompletion(10000L);
+ processExecution.setCaptureOutput(true);
+ ProcessExecutionResults results = systemInfo.executeProcess(processExecution);
+
+ if (results.getError() != null) {
+ throw results.getError();
+ }
+
+ String line;
+ is = new BufferedReader(new StringReader(results.getCapturedOutput()));
+ boolean firstLine = true;
+ while ((line = is.readLine()) != null) {
+ if (firstLine) {
+ firstLine = false;
+ continue;
}
+
+ compiledInModules.add(line.trim());
}
} catch (Throwable t) {
String msg = "Error running binary '" + binaryPath + "': " + t.getMessage();
@@ -192,7 +247,8 @@ public class ApacheBinaryInfo {
this.lastModified = binaryFile.lastModified();
getVersionCommandInfo(binaryPath, systemInfo);
-
+ getCompiledInModules(binaryPath, systemInfo);
+
File libHttpd = getHttpdSharedLibrary(binaryFile);
this.version = findVersion((libHttpd != null) ? libHttpd.getPath() : this.binaryPath);
@@ -317,4 +373,12 @@ public class ApacheBinaryInfo {
private static boolean isUnix() {
return File.separatorChar == '/';
}
+
+ public Set<String> getCompiledInModules() {
+ return compiledInModules;
+ }
+
+ public Set<String> getCompiledInDefines() {
+ return compiledInDefines;
+ }
}
\ No newline at end of file
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/RuntimeApacheConfiguration.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/RuntimeApacheConfiguration.java
new file mode 100644
index 0000000..25f5ad9
--- /dev/null
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/RuntimeApacheConfiguration.java
@@ -0,0 +1,304 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2011 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.plugins.apache.util;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Pattern;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.rhq.core.system.ProcessInfo;
+import org.rhq.core.util.OSGiVersionComparator;
+import org.rhq.plugins.apache.parser.ApacheDirective;
+import org.rhq.plugins.apache.parser.ApacheDirectiveTree;
+
+/**
+ * @author Lukas Krejci
+ */
+public class RuntimeApacheConfiguration {
+
+ private static final Log LOG = LogFactory.getLog(RuntimeApacheConfiguration.class);
+
+ private enum ModuleLoadedState {
+ LOADED, NOT_LOADED, UNKNOWN
+ }
+
+ private RuntimeApacheConfiguration() {
+
+ }
+
+ /**
+ * Given the apache configuration and information about the parameters httpd was executed
+ * with this method provides the directive tree that corresponds to the actual
+ * runtime configuration as used by httpd.
+ * <p>
+ * This enables us to see which directives are actually in effect as opposed to just
+ * declared.
+ *
+ * @param tree
+ * @param httpdProcessInfo
+ * @param httpdBinaryInfo
+ * @param moduleNames the mapping from the module filename to the module name
+ * (i.e. mapping from the name used in IfModule to the name used in LoadModule)
+ * @return a new directive tree that represents the runtime configuration
+ */
+ public static ApacheDirectiveTree extract(ApacheDirectiveTree tree, ProcessInfo httpdProcessInfo, ApacheBinaryInfo httpdBinaryInfo, Map<String, String> moduleNames) {
+ ApacheDirectiveTree ret = tree.clone();
+
+ List<String> defines = new ArrayList<String>(httpdBinaryInfo.getCompiledInDefines());
+
+ if (httpdProcessInfo != null) {
+ String[] args = httpdProcessInfo.getCommandLine();
+ for(int i = 1; i < args.length; ++i) {
+ String define = null;
+ if (args[i] != null && args[i].startsWith("-D")) {
+ define = args[i].substring(2).trim();
+ }
+
+ if (define != null && define.isEmpty()) {
+ //this means we saw an empty -D arg. This can happen if there is a space between -D and the value.
+ //That is legal though, so we have to accomodate for that.
+ if (i < args.length - 1) {
+ define = args[i + 1].trim();
+ if (define.startsWith("-")) {
+ //this would be another option
+ define = null;
+ } else {
+ ++i; //we can skip the next arg
+ }
+ } else {
+ define = null; //well -D is the last argument
+ }
+ }
+
+ if (define != null) {
+ defines.add(define);
+ }
+ }
+ }
+
+ HashSet<String> loadedModules = new HashSet<String>();
+ loadedModules.addAll(httpdBinaryInfo.getCompiledInModules());
+
+ //build a map for reverse lookup we might need in the transform method
+ HashMap<String, String> moduleFiles = new HashMap<String, String>(moduleNames.size());
+ for(Map.Entry<String, String> e : moduleNames.entrySet()) {
+ moduleFiles.put(e.getValue(), e.getKey());
+ }
+
+ transform(ret.getRootNode(), loadedModules, defines, moduleNames, moduleFiles, httpdBinaryInfo.getVersion());
+
+ return ret;
+ }
+
+ private static void transform(ApacheDirective parentNode, Set<String> currentlyLoadedModules, List<String> defines, Map<String, String> moduleNames, Map<String, String> moduleFiles, String httpdVersion) {
+ if (parentNode.getChildDirectives().isEmpty()) {
+ return;
+ }
+
+ ArrayList<ApacheDirective> nodesToRemove = new ArrayList<ApacheDirective>();
+ ArrayList<ApacheDirective> nodesToPromote = new ArrayList<ApacheDirective>();
+
+ for (ApacheDirective node : parentNode.getChildDirectives()) {
+ if (node.getName().equalsIgnoreCase("LoadModule")) {
+ currentlyLoadedModules.add(node.getValues().get(0));
+ } else if (node.getName().equalsIgnoreCase("<IfModule")) {
+ String moduleFile = node.getValuesAsString();
+ boolean negate = false;
+ if (moduleFile.startsWith("!")) {
+ negate = true;
+ moduleFile = moduleFile.substring(1);
+ }
+
+ boolean result = false;
+
+ switch(isModuleLoaded(moduleFile, currentlyLoadedModules, moduleNames, moduleFiles)) {
+ case LOADED : result = true; break;
+ case NOT_LOADED : result = false; break;
+ case UNKNOWN :
+ LOG.warn("Encountered unknown module name in an IfModule directive: " + moduleFile);
+ continue;
+ }
+
+ if (result != negate) {
+ nodesToPromote.add(node);
+ } else {
+ nodesToRemove.add(node);
+ }
+ } else if (node.getName().equalsIgnoreCase("<IfDefine")) {
+ String define = node.getValuesAsString();
+ boolean negate = false;
+ if (define.startsWith("!")) {
+ negate = true;
+ define = define.substring(1);
+ }
+
+ boolean result = defines.contains(define);
+
+ if (negate != result) {
+ nodesToPromote.add(node);
+ } else {
+ nodesToRemove.add(node);
+ }
+ } else if (node.getName().equalsIgnoreCase("<IfVersion")) {
+ //<IfVersion [[!]operator] version> ... </IfVersion>
+ //operator: =, ==, >, >=, <, <=, ~
+ //version major[.minor[.patch]] or /regex/
+ //if operator is ~, the version is assumed regex
+ //if operator is omitted, = is assumed
+
+ if (isModuleLoaded("mod_version.c", currentlyLoadedModules, moduleNames, moduleFiles) != ModuleLoadedState.LOADED) {
+ LOG.debug("mod_version not loaded and IfVersion directive encountered. Skipping it.");
+ continue;
+ }
+
+ List<String> values = node.getValues();
+ String operator = null;
+ String version = null;
+ boolean negate = false;
+ boolean regex = false;
+
+ if (values.size() == 0) {
+ LOG.warn("Invalid IfVersion directive.");
+ continue;
+ }
+
+ if (values.size() == 1) {
+ operator = "=";
+ version = values.get(0);
+ } else if (values.size() == 2) {
+ operator = values.get(0);
+ version = values.get(1);
+ } else {
+ LOG.warn("Too many arguments to a IfVersion directive: " + values);
+ continue;
+ }
+
+ if (operator == null || version == null) {
+ LOG.warn("Invalid IfVersion with parameters: " + values);
+ continue;
+ }
+
+ if (operator.charAt(0) == '!') {
+ negate = true;
+ operator = operator.substring(1);
+ }
+
+ if ("==".equals(operator)) {
+ operator = "=";
+ }
+
+ if (version.charAt(0) == '/') {
+ if ("=".equals(operator) || "~".equals(operator)) {
+ regex = true;
+ version = version.substring(1, version.length() - 1);
+ } else {
+ LOG.warn("Unsupported operator " + operator + " with regex version comparison in IfVersion directive.");
+ continue;
+ }
+ }
+
+ OSGiVersionComparator comp = new OSGiVersionComparator();
+
+ boolean result = false;
+ if ("=".equals(operator)) {
+ if (regex) {
+ result = Pattern.matches(version, httpdVersion);
+ } else {
+ result = comp.compare(version, httpdVersion) == 0;
+ }
+ } else if ("~".equals(operator)) {
+ result = Pattern.matches(version, httpdVersion);
+ } else if (">".equals(operator)) {
+ result = comp.compare(httpdVersion, version) > 0;
+ } else if (">=".equals(operator)) {
+ result = comp.compare(httpdVersion, version) >= 0;
+ } else if ("<".equals(operator)) {
+ result = comp.compare(httpdVersion, version) < 0;
+ } else if ("<=".equals(operator)) {
+ result = comp.compare(httpdVersion, version) <= 0;
+ } else {
+ LOG.warn("Unknown operator " + operator + " in an IfVersion directive.");
+ continue;
+ }
+
+ if (negate != result) {
+ nodesToPromote.add(node);
+ } else {
+ nodesToRemove.add(node);
+ }
+ }
+
+ transform(node, currentlyLoadedModules, defines, moduleNames, moduleFiles, httpdVersion);
+ }
+
+ for(ApacheDirective node : nodesToRemove) {
+ parentNode.getChildDirectives().remove(node);
+ }
+
+ //add the children of node as children of parent node at the place node
+ //was declared and remove node ... i.e. make it so as if the child nodes
+ //of node were directly in the parentNode in the place of node
+ for(ApacheDirective node : nodesToPromote) {
+ int nodeIdx = parentNode.getChildDirectives().indexOf(node);
+
+ List<ApacheDirective> childNodes = node.getChildDirectives();
+ for(int i = childNodes.size() - 1; i >= 0; --i) {
+ ApacheDirective childNode = childNodes.get(i);
+ parentNode.getChildDirectives().add(nodeIdx, childNode);
+ childNode.setParentNode(parentNode);
+ }
+
+ parentNode.getChildDirectives().remove(nodeIdx + childNodes.size());
+ }
+ }
+
+ private static ModuleLoadedState isModuleLoaded(String moduleIdentifier, Set<String> currentlyLoadedModules, Map<String, String> moduleNames, Map<String, String> moduleFiles) {
+ String moduleName = moduleNames.get(moduleIdentifier);
+ if (moduleName == null) {
+ //as of apache 2.1 module files and module names can both be used in IfModule
+ moduleName = moduleIdentifier;
+ moduleIdentifier = moduleFiles.get(moduleName);
+
+ if (moduleIdentifier == null) {
+ //reverse lookup failed - there is no such module in the mappings
+ //the last attempt is to see if the modulename wasn't used one of the previous
+ //load module directives
+ if (!currentlyLoadedModules.contains(moduleName)) {
+ return ModuleLoadedState.UNKNOWN;
+ }
+ }
+ }
+
+ //the compiled in modules are being reported by apache using their source file
+ //and the on-demand loaded modules are identified by their
+ //module name - consistent, huh?
+ boolean result = currentlyLoadedModules.contains(moduleIdentifier)
+ || currentlyLoadedModules.contains(moduleName);
+
+ return result ? ModuleLoadedState.LOADED : ModuleLoadedState.NOT_LOADED;
+ }
+}
diff --git a/modules/plugins/apache/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/apache/src/main/resources/META-INF/rhq-plugin.xml
index dc5bb67..870eaff 100644
--- a/modules/plugins/apache/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/apache/src/main/resources/META-INF/rhq-plugin.xml
@@ -497,6 +497,19 @@
description="The http or https URL that will be used to check availability for this
virtual host. Note that SSL certificate validation is disabled during availability
checks if this is an HTTPS URL."/>
+ <c:simple-property name="snmpWwwServiceIndex" displayName="SNMP WWW Service Index" type="integer" readOnly="false">
+ <c:description>
+ The row index for this virtual host in the MIB table of WWW services (i.e. virtual hosts).
+ This value can either be read out of the SNMP (using utilities like snmpwalk) or can be determined
+ by examining the order of the virtual host directives in the Apache configuration files.
+ The main server always has index 1.
+ If you join all the apache configuration files (i.e. replace all the Include directives with the contents
+ of the files being included (files determined by a glob pattern in alphabetical order)), the SNMP WWW Service
+ Index is the reverse order of the corresponding VirtualHost directive in such joined configuration. I.e.
+ the last virtual host directive has index 2, the second last has 3, etc.
+ </c:description>
+ <c:constraint><c:integer-constraint minimum="1" /></c:constraint>
+ </c:simple-property>
<c:group name="ResponseTime">
<c:simple-property name="responseTimeLogFile" required="false"
description="the full path to the log file containing response-time stats for this virtual host"/>
13 years
[rhq] modules/enterprise
by Heiko W. Rupp
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/MessageConstants_ja.properties | 52
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties | 2168 ++++++++++
2 files changed, 2220 insertions(+)
New commits:
commit b6c0b095b369c87b726f5aefddc54c7ac577cf7e
Author: Fusayuki Minamoto <fminamot(a)redhat.com>
Date: Fri May 6 11:37:49 2011 +0200
Initial batch of Japanese translations.
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/MessageConstants_ja.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/MessageConstants_ja.properties
new file mode 100644
index 0000000..8118d46
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/MessageConstants_ja.properties
@@ -0,0 +1,52 @@
+#
+# RHQ GUI i18n Message Constants - Japanese
+# This is used specifically for properties needing lookup by name, at runtime. These
+# constant properties can be localized but can not have arguments.
+###################################
+
+#=================== Help URLs =====================
+# The Help sections and entries are table driven via property lookups. The following property
+# names are expected:
+#
+# The number of help sections:
+#
+# view_help_section_count = numSectionsInteger
+#
+# For each section:
+# N = 1..numSections
+#
+# view_help_section_N_title = localized title for section in the sectionStack
+# view_help_section_N_item_count = numSectionItemsInteger
+#
+# For each url entry in the section N:
+# M = 1..numSectionItems
+#
+# view_help_section_N_propTitle_M = localized title for the help (required)
+# view_help_section_N_propIcon_M = icon path (optional, defaults to document icon)
+# view_help_section_N_propUrl_M = url for the help (required)
+#
+view_help_section_count = 2
+
+view_help_section_1_title = ドキュメンテーション
+view_help_section_1_item_count = 3
+
+view_help_section_1_propTitle_1 = よくある質問 (FAQ)
+view_help_section_1_propUrl_1 = http://www.rhq-project.org/display/JOPR2/FAQ
+view_help_section_1_propTitle_2 = ドキュメンテーションセット
+view_help_section_1_propUrl_2 = http://www.rhq-project.org/display/JOPR2/Home
+view_help_section_1_propTitle_3 = API Javadoc
+view_help_section_1_propUrl_3 = http://www.rhq-project.org/display/JOPR2/API+Documentation
+
+view_help_section_2_title = チュートリアル
+view_help_section_2_item_count = 4
+
+view_help_section_2_propTitle_1 = デモ: すべてのデモ
+view_help_section_2_propUrl_1 = http://www.rhq-project.org/display/JOPR2/Demos
+view_help_section_2_propTitle_2 = デモ: バンドルプロビジョニング
+view_help_section_2_propUrl_2 = http://management-platform.blogspot.com/2011/01/bundle-provisioning-via-r...
+view_help_section_2_propTitle_3 = グループ定義の構築方法
+view_help_section_2_propIcon_3 = [SKIN]/../actions/help.png
+view_help_section_2_propUrl_3 = http://docs.redhat.com/docs/en-US/JBoss_Operations_Network/2.4/html/Basic...
+view_help_section_2_propTitle_4 = 検索バーの使用方法
+view_help_section_2_propIcon_4 = [SKIN]/../actions/help.png
+view_help_section_2_propUrl_4 = http://www.rhq-project.org/display/JOPR2/Search
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
new file mode 100644
index 0000000..ae21269
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
@@ -0,0 +1,2168 @@
+#
+# RHQ GUI i18n Messages - Japanese
+###################################
+
+#************************************** SHARED ****************************************
+
+#=================== Common =====================
+
+#
+# Build Info
+#
+common_buildInfo_gwtVersion = ${gwt.version}
+
+# Button Labels
+#--------------
+common_button_ack = 確認
+common_button_ack_all = すべてを確認
+common_button_add = 追加
+common_button_advanced = Advanced...
+common_button_apply = 適用
+common_button_cancel = キャンセル
+common_button_close = 閉じる
+common_button_compare = 比較
+common_button_create_child = 子を作成
+common_button_delete = 削除
+common_button_delete_all = すべてを削除
+common_button_disable = 無効
+common_button_edit = 編集
+common_button_enable = 有効
+common_button_finish = 完了
+common_button_import = インポート
+common_button_new = 新規
+common_button_next = 次へ
+common_button_ok = OK
+common_button_previous = 前へ
+common_button_purgeAll = すべてをパージ
+common_button_refresh = リフレッシュ
+common_button_reset = リセット
+common_button_save = 保存
+common_button_schedule = スケジュール
+common_button_search = 検索
+common_button_set = 設定
+common_button_showDetails = 詳細表示...
+common_button_uninventory = アンインベントリ
+
+# Common Labels
+#------------------------
+common_label_ago=ago
+common_label_all = すべての
+common_label_all_resources = all resources
+common_label_day = day
+common_label_days = days
+common_label_hour = hour
+common_label_hours = hours
+common_label_item = item
+common_label_items = items
+common_label_milliseconds = milliseconds
+common_label_minutes = minutes
+common_label_month = month
+common_label_none = none
+common_label_role = role
+common_label_roles = roles
+common_label_scheduled_operations = scheduled operations
+common_label_seconds = seconds
+common_label_selected_resources = selected resources
+common_label_unlimited = unlimited
+common_label_user = user
+common_label_users = users
+common_label_week = week
+common_label_weeks = weeks
+common_label_yesterday=Yesterday
+
+# Common Units
+#-------------
+common_unit_times = times
+common_unit_milliseconds = milliseconds
+common_unit_seconds = seconds
+common_unit_minutes = minutes
+common_unit_hours = hours
+common_unit_days = days
+common_unit_weeks = weeks
+common_unit_months = months
+common_unit_years = years
+
+# Common Severities
+#------------------
+common_severity_debug = Debug
+common_severity_info = Info
+common_severity_warn = Warn
+common_severity_error = Error
+common_severity_fatal = Fatal
+
+# Common Titles
+#--------------
+common_title_address = アドレス
+common_title_add_column = カラム追加
+common_title_add_portlet = ポートレット追加
+common_title_alert_range = アラートの範囲
+common_title_ancestry = 祖先
+common_title_availability = アベイラビリティ
+common_title_average_metrics = 毎分の平均メトリックス
+common_title_available_resources = 利用可能リソース
+common_title_background = バックグラウンド
+common_title_bundle = バンドル
+common_title_bundles = バンドル
+common_title_category = カテゴリ
+common_title_change_refresh_time=インターバルのリフレッシュ
+common_title_columns = カラム
+common_title_configuration = 構成
+common_title_compare_metrics = メトリックスの比較
+common_title_compatibleGroups = 互換グループ
+common_title_compatibleGroups_total = 互換グループの合計
+common_title_component_errors = コンポーネントエラー
+common_title_config_update_status = 更新状態
+common_title_count = 数
+common_title_custom = カスタム
+common_title_dashboard_name = ダッシュボード名
+common_title_dateCreated = 生成日
+common_title_dateRange = 日付の範囲
+common_title_default = デフォルト
+common_title_description = 説明
+common_title_details = 詳細
+common_title_display = 表示
+common_title_display_name = 表示名
+common_title_duration = 期間
+common_title_edit_mode = 編集モード
+common_title_enabled = 有効?
+common_title_end = 終了
+common_title_error = エラー
+common_title_generalProp = 一般プロパティ
+common_title_group = グループ
+common_title_groups = グループ
+common_title_group_def_total = グループ定義の合計
+common_title_group_member_health = グループメンバーの状態
+common_title_icon =
+common_title_id = ID
+common_title_id_parent = 親のID
+common_title_info = 情報
+common_title_help = ヘルプ
+common_title_host = ホスト
+common_title_inventory = インベントリ
+common_title_inventorySummary = インベントリサマリ
+common_title_lastUpdated = 最終更新
+common_title_lastUpdatedBy = 最終更新(による)
+common_title_ldapGroups = LDAPグループ
+common_title_mashup = マッシュアップ
+common_title_members_reporting = メンバーのリポート
+common_title_message = メッセージ
+common_title_metric = メトリック
+common_title_metric_chart = メトリック図
+common_title_mixedGroups = 混合グループ
+common_title_mixedGroups_total = 混合グループの合計
+common_title_name = 名前
+common_title_new_dashboard = 新規ダッシュボード
+common_title_numeric_metrics = 数値メトリックス
+common_title_numeric_type = 数値型
+common_title_operation_status = オペレーションの状態
+common_title_operations = オペレーション
+common_title_operations_range = オペレーションの範囲
+common_title_over = Over
+common_title_password = パスワード
+common_title_path = パス
+common_title_permissions = パーミッション
+common_title_platform = プラットフォーム
+common_title_platform_total = プラットフォームの合計
+common_title_plugin = プラグイン
+common_title_port = ポート
+common_title_providers = プロバイダ
+common_title_recent_alerts = 最近のアラート
+common_title_recent_bundle_deployments = 最近のバンドルのデプロイ
+common_title_recent_configuration_updates = 最近の構成の更新
+common_title_recent_event_counts = 最近のイベント数
+common_title_recent_measurements = 最近の測定
+common_title_recent_oob_metrics = 最近の境界外のメトリックス
+common_title_recent_operations = 最近のオペレーション
+common_title_recent_pkg_history = 最近のパッケージ履歴
+common_title_recently_added = 最近追加された
+common_title_remove_column = カラムの削除
+common_title_repositories = リポジトリ
+common_title_resource = リソース
+common_title_resources = リソース
+common_title_resource_group = リソースグループ
+common_title_resourceGroups = リソースグループ
+common_title_resource_inventory = リソースインベントリ
+common_title_resource_id = リソースID
+common_title_resource_name = リソース名
+common_title_resource_key = リソースキー
+common_title_resource_type = リソースタイプ
+common_title_results_count = 結果の数
+common_title_results_count_tooltip = 結果の数の表示
+common_title_role = ロール
+common_title_roles = ロール
+common_title_search = 検索
+common_title_scheduled_operations = スケジュールされたオペレーション
+common_title_selected_resources = 選択されたリソース
+common_title_server = サーバー
+common_title_server_total = サーバーの合計
+common_title_service = サービス
+common_title_service_total = サービスの合計
+common_title_settings = 設定
+common_title_show = 表示
+common_title_show_more = 詳細表示...
+common_title_sort_order = ソート順
+common_title_sort_order_tooltip = 結果のソート順を設定
+common_title_start = 開始
+common_title_status = ステータス
+common_title_stop= 停止
+common_title_summary = サマリ
+common_title_tag_cloud = Tag Cloud
+common_title_the = The
+common_title_timestamp = 日付/時間
+common_title_total = 合計
+common_title_type = タイプ
+common_title_units = 単位
+common_title_user = ユーザー
+common_title_users = ユーザー(複数)
+common_title_value = 値
+common_title_version = バージョン
+common_title_view_mode = ビューモード
+common_title_web_address = Webアドレス
+common_title_welcome = ようこそ
+
+# Common Messages
+#--------------
+common_msg_areYouSure = Are You Sure?
+common_msg_changeAutoDetected = Change auto-detected
+common_msg_deleteConfirm = Are you sure you want to delete the # selected {0}?
+common_msg_emphasizedNotePrefix = NOTE:
+common_msg_loading = Loading...
+common_msg_noItemsToShow = No items to show
+common_msg_notYetImplemented = Not Yet Implemented
+common_msg_see_more = see more...
+common_msg_step_x_of_y = Step {0} of {1}
+
+# Common Values
+#--------------
+common_val_for = for
+common_val_no = No
+common_val_no_lower = no
+common_val_yes = Yes
+common_val_yes_lower = yes
+common_val_never = Never
+common_val_na = N/A
+common_val_none = None
+
+# Common Statuses
+common_status_canceled = Canceled
+common_status_deferred = Deferred
+common_status_failed = Failed
+common_status_inprogress = In Progress
+common_status_nochange = No Change
+common_status_success = Success
+common_status_unknown = Unknown
+common_status_timedOut = Timed Out
+common_status_partial = Partial
+
+# 1st, 2nd, 3rd, 4th, etc.
+common_val_n1st = {0}st
+common_val_n2nd = {0}nd
+common_val_n3rd = {0}rd
+common_val_nth = {0}th
+
+# Common Alert Priorities
+#------------------------
+common_alert_high = High
+common_alert_medium = Medium
+common_alert_low = Low
+
+# Common Calendar
+#--------------
+common_calendar_january_short = jan
+common_calendar_february_short = feb
+common_calendar_march_short = mar
+common_calendar_april_short = apr
+common_calendar_may_short = may
+common_calendar_june_short = jun
+common_calendar_july_short = jul
+common_calendar_august_short = aug
+common_calendar_september_short = sept
+common_calendar_october_short = oct
+common_calendar_november_short = nov
+common_calendar_december_short = dec
+
+
+#=================== Widgets =====================
+
+# Favorites
+#--------------
+favorites = お気に入り
+favorites_resources = お気に入りリソース
+favorites_groups = お気に入りグループ
+favorites_recentlyViewed = 最近閲覧した
+
+# Record Editor
+#--------------
+widget_recordEditor_title_view = View {0} [{1}]
+widget_recordEditor_title_edit = Edit {0} [{1}]
+widget_recordEditor_title_new = Create New {0}
+# // dup in common
+widget_recordEditor_label_loading = ロード中...
+widget_recordEditor_error_invalidViewPath = Invalid view path: [{0}]
+widget_recordEditor_error_noRecords = No records were returned - expected exactly one.
+widget_recordEditor_error_multipleRecords = Multiple records were returned - expected exactly one.
+widget_recordEditor_info_recordCreatedConcise = {0} created.
+widget_recordEditor_info_recordCreatedDetailed = {0} [{1}] created.
+widget_recordEditor_info_recordUpdatedConcise = {0} updated.
+widget_recordEditor_info_recordUpdatedDetailed = {0} [{1}] updated.
+widget_recordEditor_info_recordsDeletedConcise = {0} {1} deleted.
+widget_recordEditor_info_recordsDeletedDetailed = {0} {1} deleted: {2}.
+widget_recordEditor_error_operation = Operation failed. An error occurred
+widget_recordEditor_error_operationInvalidValues = Operation failed - one or more fields have invalid values
+widget_recordEditor_error_unsupportedOperationType = Unsupported operation type: [{0}]
+widget_recordEditor_error_permissionCreate = You do not have the permissions required to create a new [{0}]
+widget_recordEditor_warn_validation = One or more fields have invalid values. This [{0}] cannot be saved until these values are corrected
+
+# Resource Selector/Picker
+#--------------------------------
+widget_resourceSelector_selectResource = Select a Resource
+widget_resourceSelector_pleaseSelectResource = Please select a resource
+widget_resourceSelector_selectMultipleResources = Select Resources
+widget_resourceSelector_pleaseSelectMultipleResource = Please select one or more resources
+widget_resourceSelector_groupCategory = Group Category
+
+# Resource Factory Wizard
+#--------------------------------
+widget_resourceFactoryWizard_uploadInProgress = The upload is in progress... This can take several minutes to complete for large distribution files.
+widget_resourceFactoryWizard_uploadFileStepName = Upload Resource Content File
+widget_resourceFactoryWizard_uploadFailure = Failed to upload file
+widget_resourceFactoryWizard_editConfigStepName = Edit Configuration
+widget_resourceFactoryWizard_editConfigStep_nothingToDo = There is no configuration that you need to define for this resource.
+widget_resourceFactoryWizard_infoStepName = Resource Information
+widget_resourceFactoryWizard_infoStep_loadFail = Failed to get available Architectures
+widget_resourceFactoryWizard_namePrompt = New Resource Name
+widget_resourceFactoryWizard_templatePrompt = Connection Settings Template
+widget_resourceFactoryWizard_contentTemplatePrompt = Deployment Time Configuration Templates
+widget_resourceFactoryWizard_configTemplatePrompt = Resource Configuration Templates
+widget_resourceFactoryWizard_archPrompt = Package Architecture
+widget_resourceFactoryWizard_versionPrompt = Package Version
+widget_resourceFactoryWizard_importWizardWindowTitle = Resource Import Wizard
+widget_resourceFactoryWizard_importWizardTitle = Import Resource of Type [{0}]
+widget_resourceFactoryWizard_importFailure = Failed to manually import resource
+widget_resourceFactoryWizard_importSubmitted = A request to import a new resource of type [{0}] has been submitted
+widget_resourceFactoryWizard_createWizardWindowTitle = Resource Create Wizard
+widget_resourceFactoryWizard_createWizardTitle = Create New Resource of Type [{0}]
+widget_resourceFactoryWizard_execute1 = Failed to create a new resource - there is no package version
+widget_resourceFactoryWizard_execute2 = Failed to create a new resource
+widget_resourceFactoryWizard_createSubmitType = A request to create a resource of type [{0}] has been submitted successfully.
+widget_resourceFactoryWizard_createSubmit = A request to create a resource with the name of [{0}] has been submitted successfully.
+widget_resourceFactoryWizard_failedToGetType = Failed to get backing package type for new resource
+widget_resourceFactoryWizard_failedToDeleteVersion = Failed to delete package version while canceling a resource create
+
+widget_typeCache_loadFail = Failed to load resource type metadata
+
+widget_typeTree_badTemplateType = Invalid URL. Unknown template type [{0}]
+widget_typeTree_badTypeId = Invalid URL. Bad resource type ID [{0}]
+widget_typeTree_loadFail = Failed to load resource types
+
+# Color Picker
+#--------------
+widget_colorPicker_tooltip = Click to select a new color
+
+# Job Trigger Editor
+#--------------------
+widget_jobTriggerEditor_field_mode = Schedule using
+widget_jobTriggerEditor_value_calendar = Calendar
+widget_jobTriggerEditor_value_cronExpression = Cron Expression
+widget_jobTriggerEditor_value_now = Now
+widget_jobTriggerEditor_value_nowAndRepeat = Now & Repeat
+widget_jobTriggerEditor_value_later = Later
+widget_jobTriggerEditor_value_laterAndRepeat = Later & Repeat
+widget_jobTriggerEditor_field_cronExpression = Cron Expression
+widget_jobTriggerEditor_tab_format = Format
+widget_jobTriggerEditor_tab_examples = Examples
+widget_jobTriggerEditor_field_repeatInterval_now = Run now and every
+widget_jobTriggerEditor_field_repeatInterval_later = Repeat every
+widget_jobTriggerEditor_fieldHelp_repeatInterval = how often the operation should be executed
+widget_jobTriggerEditor_value_for = For
+widget_jobTriggerEditor_value_until = Until
+widget_jobTriggerEditor_value_indefinitely = Indefinitely
+widget_jobTriggerEditor_fieldHelp_repeatDuration = keep running this operation this many times or until this amount of time has elapsed
+widget_jobTriggerEditor_field_startType = Run
+widget_jobTriggerEditor_value_on = on
+widget_jobTriggerEditor_value_in = in
+widget_jobTriggerEditor_fieldHelp_startDelay = start executing the operation after this amount of time has elapsed
+widget_jobTriggerEditor_message_startTimeMustBeInFuture = Start time must be in the future.
+widget_jobTriggerEditor_message_endTimeMustBeAfterStartTime = End time must be after start time.
+widget_jobTriggerEditor_message_endTimeMustBeInFuture = End time must be in the future.
+
+# Duration Item
+#---------------
+widget_durationItem_inputUnitLessThanTargetUnit = Input unit is less than target unit.
+widget_durationItem_unitTypeNotSupported = Unit type [{0}] is not supported by this DurationItem.
+
+
+#===================== Utils ======================
+
+# Ancestry
+#-------------------------------------------------
+util_ancestry_parentAncestry = Parent Ancestry for:
+
+# Disambiguation Report Decorator
+#-------------------------------------------------
+util_disambiguationReportDecorator_pluginSuffix = ({0} plugin)
+
+# Monitoring Request Callback
+#------------------------------------------
+util_monitoringRequestCallback_error_checkServerStatusFailure = Unable to determine login status - check Server status.
+
+# RPC Manager
+#----------------------
+util_rpcManager_activeRequests = {0} Active Requests
+
+# User Permissions Manager
+#--------------------------
+util_userPerm_loadFailGlobal = Failed to load your global permissions - none granted.
+util_userPerm_loadFailGroup = Failed to load your permissions for Resource Group with id [{0}] - none granted.
+util_userPerm_loadFailResource = Failed to load your permissions for Resource with id [{0}] - none granted.
+
+# User Session Manager
+#--------------------------
+util_userSession_loadFailSubject = UserSessionManager: Failed to load user Subject
+util_userSession_logoutFail = Failed to logout.
+
+# Error Handler
+#--------------------
+util_errorHandler_nullException = exception was null
+
+# Widgets Field
+#---------------------
+util_widgetsField_unlimited = Unlimited
+
+
+#================== DataSources ====================
+
+# RPC (abstract)
+#-----------------------
+dataSource_bundle_loadFailed = Failed to load Bundle data
+
+
+# RPC (abstract)
+#-----------------------
+dataSource_rpc_error_transformRequestFailure = Failure in datasource while processing {0} request.
+dataSource_rpc_error_unsupportedArrayFilterType = No support for passing array filters of type {0}.
+dataSource_rpc_error_unsupportedEnumType = Please add an appropriate code block for enum {0} to RPCDataSource.getEnumArray(Class)
+dataSource_rpc_yes = yes
+dataSource_rpc_no = no
+
+# ContentRepositoryTree
+#------
+dataSource_ContentRepoTree_error_load = Error loading repositories
+dataSource_ContentRepoTree_field_parentId = Parent ID
+
+
+# Users
+#------
+###### dup in common
+dataSource_users_field_id = ID
+dataSource_users_field_name = ユーザー名
+dataSource_users_field_ldap = LDAPログイン?
+dataSource_users_field_password = パスワード
+dataSource_users_field_passwordVerify = パスワードの確認
+dataSource_users_field_firstName = 名前
+dataSource_users_field_lastName = 名字
+dataSource_users_field_emailAddress = Eメールアドレス
+dataSource_users_field_phoneNumber = 電話番号
+dataSource_users_field_department = 部門
+dataSource_users_field_factive = ログインは有効?
+dataSource_users_delete = 削除済みユーザー [{0}]
+dataSource_users_deleteFailed = ユーザー [{0}] の削除に失敗しました
+dataSource_users_passwordsDoNotMatch = パスワードが一致していません
+dataSource_users_invalidEmailAddress = 無効なEメールアドレス
+
+# Roles
+#------
+datasource_roles_field_resourceGroups = リソースグループ
+datasource_roles_field_permissions = パーミッション
+datasource_roles_field_subjects = サブジェクト
+datasource_roles_field_ldapGroups = LDAPグループ
+
+# Platforms
+#-----------
+dataSource_platforms_field_cpu = CPU
+dataSource_platforms_field_memory = メモリ
+dataSource_platforms_field_swap = スワップ
+
+# Traits
+#------
+dataSource_traits_failFetch = Failed to fetch traits for criteria [{0}].
+dataSource_traits_field_primaryKey = Primary Key
+dataSource_traits_field_definitionID = Definition ID
+dataSource_traits_field_lastChanged = Last Changed
+dataSource_traits_field_trait = Trait
+dataSource_traits_group_field_groupId = Group ID
+
+# Measurement OOBs
+#---------------------------------
+dataSource_measurementOob_field_scheduleName = メトリック
+dataSource_measurementOob_field_resourceName = リソース
+dataSource_measurementOob_field_parentName = 親
+dataSource_measurementOob_field_formattedBaseband = バンド
+dataSource_measurementOob_field_formattedOutlier = アウトライナ
+dataSource_measurementOob_field_factor = 範囲外係数 (%)
+dataSource_measurementOob_error_fetchFailure = Failed to load measurement OOB information
+
+# Measurements
+#----------------------
+dataSource_definitions_loadFailed = Failed to load metric definitions
+dataSource_schedules_loadFailed = Failed to load metric schedules
+dataSource_schedules_loadFailedCriteria = Failed to load metric schedules for criteria [{0}]
+dataSource_schedules_loadFailedContext = Failed to load metric schedules for context [{0}]
+dataSource_schedules_field_resourceGroupId = Group ID
+
+dataSource_schedules_enableFailure_resource = Failed to enable the collection of [{0}] metrics for resource with ID [{1}]. The metrics were: [{2}]
+dataSource_schedules_enableFailure_group = Failed to enable the collection of [{0}] metrics for group with ID [{1}]. The metrics were: [{2}]
+
+dataSource_schedules_enableSuccessful_concise = You have enabled the collection of [{0}] measurements
+dataSource_schedules_enableSuccessful_full_resource = You have enabled the collection of [{0}] measurements for the resource with ID [{1}]. The enabled measurements are: [{2}]
+dataSource_schedules_enableSuccessful_full_group = You have enabled the collection of [{0}] measurements for the resource group with ID [{1}]. The enabled measurements are: [{2}]
+
+dataSource_schedules_disableFailure_resource = Failed to disable the collection of [{0}] metrics for resource with ID [{1}]. The metrics were: [{2}]
+dataSource_schedules_disableFailure_group = Failed to disable the collection of [{0}] metrics for resource group with ID [{1}]. The metrics were: [{2}]
+
+dataSource_schedules_disableSuccessful_concise = You have disabled the collection of [{0}] measurements
+dataSource_schedules_disableSuccessful_full_resource = You have disabled the collection of [{0}] measurements for the resource with ID [{1}]. The disabled measurements are: [{2}]
+dataSource_schedules_disableSuccessful_full_group = You have disabled the collection of [{0}] measurements for the resource group with ID [{1}]. The disabled measurements are: [{2}]
+
+dataSource_schedules_updateFailure_resource = Failed to set the collection interval of [{0}] metrics for resource with ID [{1}]. The metrics were: [{2}]. The collection interval was to be [{3}] seconds.
+dataSource_schedules_updateFailure_group = Failed to set the collection interval of [{0}] metrics for resource group with ID [{1}]. The metrics were: [{2}]. The collection interval was to be [{3}] seconds.
+
+dataSource_schedules_updateSuccessful_concise = A new collection interval of [{0}] seconds has been set on [{1}] measurements
+dataSource_schedules_updateSuccessful_full_resource = A new collection interval of [{0}] seconds has been set on [{1}] measurements for resource with ID [{2}]. The updated measurements are: [{3}]
+dataSource_schedules_updateSuccessful_full_group = A new collection interval of [{0}] seconds has been set on [{1}] measurements for resource group with ID [{2}]. The updated measurements are: [{3}]
+
+# Resources
+#-----------------------
+dataSource_resources_field_location = 場所
+dataSource_resources_field_key = キー
+dataSource_resources_field_discoveryTime = 発見時刻
+dataSource_resources_field_importTime = インポート時刻
+dataSource_resources_field_lastModifiedTime = 最終更新時刻
+dataSource_resources_field_lastModifier = 最終更新者
+
+# Resource Groups
+#-----------------------
+dataSource_resourceGroups_loadFailed = Failed to load Resource Groups
+
+# Problem Resources
+#------------------------------
+dataSource_problemResources_field_alerts = アラート
+dataSource_problemResources_field_available = 現在のアベイラビリティ
+dataSource_problemResources_error_fetchFailure = Failed to load Resources with alerts/unavailability.
+
+# Recent Operations
+#----------------------------
+dataSource_recentOperations_field_resource = リソース
+dataSource_recentOperations_field_location = ロケーション
+dataSource_recentOperations_field_operation = オペレーション
+dataSource_recentOperations_field_time = 日付/時刻
+dataSource_recentOperations_field_status = ステータス
+dataSource_recentOperations_error_fetchFailure = Failed to load recently completed operations.
+
+# Scheduled Operations (ResourceOperationScheduleComposites)
+#------------------------------------------------------------
+dataSource_scheduledOperations_field_resource = リソース
+dataSource_scheduledOperations_field_location = 場所
+dataSource_scheduledOperations_field_operation = オペレーション
+dataSource_scheduledOperations_field_time = 日付/時刻
+dataSource_scheduledOperations_error_fetchFailure = Failed to load scheduled operations.
+
+# Operation Schedules
+#--------------------
+dataSource_operationSchedule_field_id = スケジュールID
+dataSource_operationSchedule_field_operationName = オペレーション
+dataSource_operationSchedule_field_operationDisplayName = オペレーション
+dataSource_operationSchedule_field_subject = オーナー
+dataSource_operationSchedule_field_description = ノート
+dataSource_operationSchedule_field_nextFireTime = 次回の実行
+dataSource_operationSchedule_field_timeout = タイムアウト (秒)
+
+# Operation Histories
+#--------------------
+dataSource_operationHistory_field_operationName = オペレーション名
+dataSource_operationHistory_field_createdTime = 生成時刻
+dataSource_operationHistory_field_startedTime = 開始時刻
+dataSource_operationHistory_field_subject = 要求者
+dataSource_operationHistory_error_fetchFailure = Failure loading operation histories.
+
+# Configuration History
+#-------------------------------
+dataSource_configurationHistory_dateSubmitted = 発行日
+dataSource_configurationHistory_dateCompleted = 完了日
+dataSource_configurationHistory_updateType = 更新タイプ
+dataSource_configurationHistory_updateType_individual = 個人
+dataSource_configurationHistory_updateType_group = グループ
+dataSource_configurationHistory_currentConfig = This is the current configuration
+dataSource_configurationHistory_clickToSeeError = Double click to see error message...
+dataSource_configurationHistory_error_fetchFailure = Unable to load configuration history.
+
+# Resource Errors
+#-------------------------
+dataSource_resourceErrors_field_summary = サマリ
+dataSource_resourceErrors_field_errorType = エラータイプ
+dataSource_resourceErrors_field_timeOccured = 時刻
+dataSource_resourceErrors_error_fetchFailure = Failed to find Resource errors for Resource with id [{0}].
+dataSource_resourceErrors_clickStatusIcon = Click the icon for more details
+dataSource_resourceErrors_deleteSuccess = You have successfully deleted [{0}] resource error messages.
+dataSource_resourceErrors_deleteFailure = Failed to delete resource errors
+
+# Template Schedules
+#-------------------------
+datasource_templateSchedules_disabled = Disabled collection of selected metric [{0}].
+datasource_templateSchedules_disabled_detailed = Disabled collection of metric [{0}] [{1}] by default for ResourceType with id [{2}].
+datasource_templateSchedules_disabled_failed = Failed to disable collection of metric [{0}] [{1}] by default for ResourceType with id [{2}].
+datasource_templateSchedules_enabled = Enabled collection of selected metric [{0}].
+datasource_templateSchedules_enabled_detailed = Enabled collection of metric [{0}] [{1}] by default for ResourceType with id [{2}].
+datasource_templateSchedules_enabled_failed = Failed to enable collection of metric [{0}] [{1}] by default for ResourceType with id [{2}].
+datasource_templateSchedules_updated = Updated collection intervals of selected metric [{0}].
+datasource_templateSchedules_updated_detail = Collection interval for metric [{0}] [{1}] by default for ResourceType with id [{2}] set to [{3}] seconds.
+datasource_templateSchedules_updated_failed = Failed to set collection interval to [{0}] seconds for metric [{1}] [{2}] by default for ResourceType with id [{3}].
+
+
+#********************************** VIEW-SPECIFIC *************************************
+
+#================= Administration ==================
+
+view_admin_administration = 管理
+view_admin_landing = このセクションにおいて、RHQグローバル設定が管理されます。これはセキュリティ構成、プラグイン設定、RHQサーバーとエージェントの管理を含みます。
+view_admin_configuration = 構成
+view_admin_security = セキュリティ
+view_admin_topology = トポロジー
+view_admin_content = コンテント
+
+view_adminSecurity_users = ユーザー
+view_adminSecurity_roles = ロール
+
+view_adminTopology_affinityGroups = アフィニティグループ
+view_adminTopology_agents = エージェント
+view_adminTopology_partitionEvents = イベントの分類
+view_adminTopology_remoteAgentInstall = リモートエージェントのインストール
+view_adminTopology_servers = サーバー
+
+view_adminConfig_downloads = ダウンロード
+view_adminConfig_plugins = プラグイン
+view_adminConfig_systemSettings = システム設定
+view_adminConfig_templates = テンプレート
+
+view_adminContent_contentSources = コンテントソース
+view_adminContent_repositories = リポジトリ
+
+# Administration/Templates
+#--------------------------------
+
+view_adminTemplates_platforms = プラットフォーム
+view_adminTemplates_platformServices = プラットフォームサービス
+view_adminTemplates_servers = サービス
+view_adminTemplates_enabledAlertTemplates = 有効なアラートテンプレート
+view_adminTemplates_disabledAlertTemplates = 無効なアラートテンプレート
+view_adminTemplates_enabledMetricTemplates = 有効なメトリックテンプレート
+view_adminTemplates_disabledMetricTemplates = 無効なメトリックテンプレート
+view_adminTemplates_editAlertTemplate = アラートテンプレートの編集
+view_adminTemplates_editMetricTemplate = メトリックテンプレートの編集
+view_adminTemplates_prompt_enabledAlertTemplates = Number of alert templates that are enabled on this resource type
+view_adminTemplates_prompt_disabledAlertTemplates = Number of alert templates that are created but disabled on this resource type
+view_adminTemplates_prompt_enabledMetricTemplates = Number of metric schedules that are enabled by default on this resource type
+view_adminTemplates_prompt_disabledMetricTemplates = Number of metric schedules that are disabled by default on this resource type
+
+# Administration/Security/Users
+#--------------------------------
+view_adminUsersList_dataTypeName = ユーザー
+view_adminUsersList_dataTypeNamePlural = ユーザー
+
+# Administration/Security/Users/#
+#--------------------------------
+view_adminUsersDetails_dataTypeName = ユーザー
+
+# Administration/Security/Roles/#
+#--------------------------------
+view_adminRoles_assignedGroups = Assigned Resource Groups
+view_adminRoles_assignedSubjects = Assigned Subjects
+view_adminRoles_failLdap = Failed to determine if LDAP configured - assuming no LDAP.
+view_adminRoles_failLdapGroups = Failed to retrieve available LDAP groups - assuming no LDAP groups.
+view_adminRoles_failLdapGroupsRole = Failed to load LDAP groups available for role.
+view_adminRoles_failRoles = Failed to fetch roles.
+view_adminRoles_globalPerms = Global Permissions
+view_adminRoles_ldapGroups = LDAP Groups
+view_adminRoles_ldapGroupsReadOnly = LDAP group data is read only
+view_adminRoles_noItems = No items to show
+view_adminRoles_noLdap = The LDAP security integration is not configured. To configure LDAP, go to <a {0}>{1}</a>.
+view_adminRoles_perms = Permissions
+view_adminRoles_resourcePerms = Resource Permissions
+view_adminRoles_roleAdded = Role [{0}] added.
+view_adminRoles_roleDeleteFailed = Failed to delete role [{0}].
+view_adminRoles_roleDeleted = Role [{0}] deleted.
+view_adminRoles_roleUpdateFailed = Failed to update role [{0}].
+view_adminRoles_roleUpdated = Role [{0}] updated.
+view_adminRoles_permissions_globalPermissions = Global Permissions
+view_adminRoles_permissions_resourcePermissions = Resource Permissions
+view_adminRoles_permissions_readAccessImplied = Read access for the {0} permission is implied and cannot be disabled.
+view_adminRoles_permissions_isAuthorized = Authorized?
+view_adminRoles_permissions_isRead = Read?
+view_adminRoles_permissions_isWrite = Write?
+view_adminRoles_permissions_read = Read:
+view_adminRoles_permissions_write = Write:
+view_adminRoles_permissions_perm_manageSecurity = Manage Security
+view_adminRoles_permissions_permDesc_manageSecurity = can create, update, or delete users and roles (viewing is implied for everyone)
+view_adminRoles_permissions_perm_manageInventory = Manage Inventory
+view_adminRoles_permissions_permDesc_manageInventory = has all Resource permissions, as described below, for all Resources; can create, update, and delete groups; and can import auto-discovered or manually discovered Resources
+view_adminRoles_permissions_perm_manageSettings = Manage Settings
+view_adminRoles_permissions_permDesc_manageSettings = can modify the RHQ Server configuration and perform any Server-related functionality
+view_adminRoles_permissions_perm_manageBundles = Manage Bundles
+view_adminRoles_permissions_permDesc_manageBundles = can create, update, or delete provisioning bundles (viewing is implied for everyone)
+view_adminRoles_permissions_perm_manageRepositories = Manage Repositories
+view_adminRoles_permissions_permDesc_manageRepositories = can create, update, or delete repositories of any user (everyone can create their own repositories), can associate content sources to repositories.
+view_adminRoles_permissions_perm_inventory = Inventory
+view_adminRoles_permissions_permReadDesc_inventory = (IMPLIED) view Resource properties (name, description, version, etc.), connection settings, and connection settings history
+view_adminRoles_permissions_permWriteDesc_inventory = update Resource name, version, description, and connection settings; delete connection settings history items
+view_adminRoles_permissions_perm_manageMeasurements = Manage Measurements
+view_adminRoles_permissions_permReadDesc_manageMeasurements = (IMPLIED) view metric data and collection schedules
+view_adminRoles_permissions_permWriteDesc_manageMeasurements = update metric collection schedules
+view_adminRoles_permissions_perm_manageAlerts = Manage Alerts
+view_adminRoles_permissions_permReadDesc_manageAlerts = (IMPLIED) view alert definitions and alert history
+view_adminRoles_permissions_permWriteDesc_manageAlerts = create, update, and delete alert definitions; acknowledge and delete alert history items
+view_adminRoles_permissions_perm_configure = Configure
+view_adminRoles_permissions_permReadDesc_configure = view Resource configuration and Resource configuration revision history
+view_adminRoles_permissions_permWriteDesc_configure = update Resource configuration; delete Resource configuration revision history items
+view_adminRoles_permissions_perm_control = Control
+view_adminRoles_permissions_permReadDesc_control = (IMPLIED) view available operations and operation execution history
+view_adminRoles_permissions_permWriteDesc_control = execute operations; delete operation execution history items
+view_adminRoles_permissions_perm_manageEvents = Manage Events
+view_adminRoles_permissions_permReadDesc_manageEvents = (IMPLIED) view events
+view_adminRoles_permissions_permWriteDesc_manageEvents = delete events
+view_adminRoles_permissions_perm_manageContent = Manage Content
+view_adminRoles_permissions_permReadDesc_manageContent = (IMPLIED) view installed and available packages; view package installation history
+view_adminRoles_permissions_permWriteDesc_manageContent = subscribe to content sources; install and uninstall packages
+view_adminRoles_permissions_perm_createChildResources = Create Child Resources
+view_adminRoles_permissions_permReadDesc_createChildResources = (IMPLIED) view child Resource creation history
+view_adminRoles_permissions_permWriteDesc_createChildResources = create new child Resources (for child Resources of types that are creatable)
+view_adminRoles_permissions_perm_deleteChildResources = Delete Child Resources
+view_adminRoles_permissions_permReadDesc_deleteChildResources = (IMPLIED) view child Resource deletion history
+view_adminRoles_permissions_permWriteDesc_deleteChildResources = uninventory resources; delete Resources (for Resources of types that are deletable)
+view_adminRoles_permissions_autoselecting_manageSecurity_implied = Autoselected unselected permissions, since MANAGE_SECURITY implies all other permissions...
+view_adminRoles_permissions_autoselecting_manageInventory_implied = Autoselected unselected Resource permissions, since MANAGE_INVENTORY implies all Resource permissions...
+view_adminRoles_permissions_autoselecting_configureWrite_implied = Autoselected CONFIGURE_READ permission, since CONFIGURE_WRITE implies it...
+view_adminRoles_permissions_autoselecting_configureRead_implied = Autodeselected CONFIGURE_WRITE permission, since lack of CONFIGURE_READ implies lack of it...
+view_adminRoles_permissions_illegalDeselectionDueToManageSecuritySelection = {0} permission cannot be deselected, unless the Manage Security permission, which implies all other permissions, is deselected first.
+view_adminRoles_permissions_illegalDeselectionDueToManageInventorySelection = {0} permission cannot be deselected, unless Manage Inventory, which implies all Resource permissions, is deselected first.
+view_adminRoles_permissions_illegalDeselectionDueToCorrespondingWritePermSelection = {0} read permission cannot be deselected, unless the {0} write permission, which implies the read permission, is deselected first.
+
+# Administration/Topology/RemoteAgentInstall/#
+#--------------------------------
+view_remoteAgentInstall_agentStatus = エージェントのステータス
+view_remoteAgentInstall_agentStatusDefault = -ステータスの更新ボタンをクリックしてください-
+view_remoteAgentInstall_connInfo = 接続情報
+view_remoteAgentInstall_buttonFindAgent = エージェントの発見
+view_remoteAgentInstall_error_1 = Error occurred while trying to find agent install path
+view_remoteAgentInstall_error_2 = Could not find an agent installed when looking in common locations
+view_remoteAgentInstall_error_3 = Could not find an agent installed at or under [{0}]
+view_remoteAgentInstall_error_4 = Failed to install agent
+view_remoteAgentInstall_error_5 = Failed to start agent
+view_remoteAgentInstall_error_6 = Failed to stop agent
+
+view_remoteAgentInstall_installAgent = エージェントのインストール
+view_remoteAgentInstall_installInfo = エージェントのインストール情報
+view_remoteAgentInstall_installPath = エージェントのインストールパス
+view_remoteAgentInstall_owner = オーナー
+view_remoteAgentInstall_promptInstallPath = Where the agent is or will be installed. If you aren''t sure where an agent is installed, enter a parent directory and click the ''Find Agent'' button to scan that directory and below. If you enter an empty path, common locations are searched on the host for an agent install.
+view_remoteAgentInstall_promptHost = The host where the agent is or will be installed
+view_remoteAgentInstall_promptPassword =The credentials that are used to authenticate the user on the host via SSH
+view_remoteAgentInstall_promptPort = The port the SSH server is listening to. If not specified, the default is 22
+view_remoteAgentInstall_promptUser = The name of the user whose credentials are passed to the host via SSH
+view_remoteAgentInstall_result = Result
+view_remoteAgentInstall_resultCode = ResultCode
+view_remoteAgentInstall_startAgent = エージェントの起動
+view_remoteAgentInstall_startAgentResults = Agent start results: [{0}]
+view_remoteAgentInstall_step = ステップ
+view_remoteAgentInstall_stopAgent = エージェントの停止
+view_remoteAgentInstall_stopAgentResults = Agent stop results: [{0}]
+view_remoteAgentInstall_success = Agent installation complete
+view_remoteAgentInstall_updateStatus = スタータスの更新
+
+# Administration/SystemSettings
+#------------------------------
+view_admin_systemSettings_cannotLoadSettings = Cannot obtain the current system settings
+view_admin_systemSettings_savedSettings = You successfully saved the system properties
+view_admin_systemSettings_saveFailure = Failed to save the system settings
+view_admin_systemSettings_fixBeforeSaving = Please fix the invalid values before saving
+view_admin_systemSettings_group_general = 全体構成プロパティ
+view_admin_systemSettings_group_dataMgr = データマネージャー構成プロパティ
+view_admin_systemSettings_group_baseline = 自動ベースライン構成プロパティ
+view_admin_systemSettings_group_ldap = LDAP 構成プロパティ
+view_admin_systemSettings_cannotLoadServerDetails = Cannot load server details
+view_admin_systemSettings_serverDetails = Server Details
+view_admin_systemSettings_serverDetails_buildNumber = Build Number
+view_admin_systemSettings_serverDetails_tz = Server Time Zone
+view_admin_systemSettings_serverDetails_time = Server Local Time
+view_admin_systemSettings_serverDetails_installDir = Server Installation Directory
+view_admin_systemSettings_serverDetails_dbUrl = Database Connection URL
+view_admin_systemSettings_serverDetails_dbName = Database Product Name
+view_admin_systemSettings_serverDetails_dbVersion = Database Product Version
+view_admin_systemSettings_serverDetails_dbDriverName = Database Driver Name
+view_admin_systemSettings_serverDetails_dbDriverVersion = Database Driver Version
+view_admin_systemSettings_serverDetails_currentTable = Current Measurement Raw Table
+view_admin_systemSettings_serverDetails_nextRotation = Next Measurement Table Rotation
+view_admin_systemSettings_BaseURL_name = GUI Console URL
+view_admin_systemSettings_BaseURL_desc = A URL to the server GUI, used mainly within alert email notifications.
+view_admin_systemSettings_AgentMaxQuietTimeAllowed_name = Agent Max Quiet Time Allowed
+view_admin_systemSettings_AgentMaxQuietTimeAllowed_desc = If this amount of time passes without hearing from an agent, that quiet agent will be considered down. This value is specified in minutes.
+view_admin_systemSettings_EnableAgentAutoUpdate_name = Enable Agent Auto-Updates
+view_admin_systemSettings_EnableAgentAutoUpdate_desc = Determines if the server will allow agents to auto-update themselves. You will not be able to download agent distributions from the server if this is disabled.
+view_admin_systemSettings_EnableDebugMode_name = Enable Debug Mode
+view_admin_systemSettings_EnableDebugMode_desc = If enabled, the server will enter debug mode.
+view_admin_systemSettings_EnableExperimentalFeatures_name = Enable Experimental Features
+view_admin_systemSettings_EnableExperimentalFeatures_desc = If enabled, any experimental features that exist in the current product will be available.
+view_admin_systemSettings_DataMaintenance_name = Database Maintenance Period
+view_admin_systemSettings_DataMaintenance_desc = How often database maintenance is performed (for example, vacuuming if using Postgres). This is specified in hours.
+view_admin_systemSettings_AvailabilityPurge_name = Delete Availability Data Older Than
+view_admin_systemSettings_AvailabilityPurge_desc = How old availability data must be before being purged from the database. This is specified in days.
+view_admin_systemSettings_AlertPurge_name = Delete Alerts Older Than
+view_admin_systemSettings_AlertPurge_desc = How old alert history items must be before being purged from the database. This is specified in days.
+view_admin_systemSettings_TraitPurge_name = Delete Measurement Traits Older Than
+view_admin_systemSettings_TraitPurge_desc = How old measurement trait data must be before being purged from the database. This is specified in days.
+view_admin_systemSettings_RtDataPurge_name = Delete Response Time Data Older Than
+view_admin_systemSettings_RtDataPurge_desc = How old response time data must be before being purged from the database. This is specified in days.
+view_admin_systemSettings_EventPurge_name = Delete Events Older Than
+view_admin_systemSettings_EventPurge_desc = How old event data must be before being purged from the database. This is specified in days.
+view_admin_systemSettings_DataReindex_name = Reindex Data Tables Nightly
+view_admin_systemSettings_DataReindex_desc = If enabled, certain database tables will be re-indexed periodically.
+view_admin_systemSettings_BaselineFrequency_name = Baseline Calculation Frequency
+view_admin_systemSettings_BaselineFrequency_desc = The frequency which the auto-calculation of baselines will be performed. If 0, baseline auto-calculation is disabled. This is specified in days.
+view_admin_systemSettings_BaselineDataSet_name = Baseline Dataset
+view_admin_systemSettings_BaselineDataSet_desc = The amount of past measurement data that is used to determine a baseline. This is specified in days.
+view_admin_systemSettings_JAASProvider_name = Enable LDAP
+view_admin_systemSettings_JAASProvider_desc = Should LDAP be used to determine user identity?
+view_admin_systemSettings_LDAPUrl_name = LDAP URL
+view_admin_systemSettings_LDAPUrl_desc = URL to the LDAP Server
+view_admin_systemSettings_LDAPProtocol_name = SSL
+view_admin_systemSettings_LDAPProtocol_desc = Should communication with the LDAP server be done over SSL?
+view_admin_systemSettings_LDAPLoginProperty_name = Login Property
+view_admin_systemSettings_LDAPLoginProperty_desc = The LDAP property that contains the user name. Defaults to "cn". If multiple matches are found, the first entry found is used.
+view_admin_systemSettings_LDAPFilter_name = Search Filter
+view_admin_systemSettings_LDAPFilter_desc = Any additional filters to apply when doing the LDAP search. This is useful if the population to authenticate can be identified via a given LDAP property, e.g. RHQUser=true
+view_admin_systemSettings_LDAPGroupFilter_name = Group Search Filter
+view_admin_systemSettings_LDAPGroupFilter_desc = LDAP search filter that must return all LDAP groups available for authorization. This is used for LDAP group authorization.
+view_admin_systemSettings_LDAPGroupMember_name = Group Member Filter
+view_admin_systemSettings_LDAPGroupMember_desc = LDAP search filter that is used in conjunction with the group search filter to determine user authorization. This is used for LDAP group authorization.
+view_admin_systemSettings_LDAPBaseDN_name = Search Base
+view_admin_systemSettings_LDAPBaseDN_desc = The base of the directory tree to search for usernames and passwords while authenticating users, e.g. ou=People,dc=redhat,dc=com
+view_admin_systemSettings_LDAPBindDN_name = Username
+view_admin_systemSettings_LDAPBindDN_desc = The username to connect to the LDAP server when querying the LDAP user database. This is typically the full LDAP distinguished name (DN) of a manager user, e.g. cn=Manager,dc=redhat,dc=com
+view_admin_systemSettings_LDAPBindPW_name = Password
+view_admin_systemSettings_LDAPBindPW_desc = The credentials of the user used to connect to the LDAP server when querying the LDAP user database.
+
+# Administration/Downloads
+#------------------------------
+view_admin_downloads_agentDownload = エージェントのダウンロード
+view_admin_downloads_cliDownload = コマンドラインクライアントのダウンロード
+view_admin_downloads_bundleDownload = バンドルデプロイヤのダウンロード
+view_admin_downloads_connectorsDownload = コネクタのダウンロード
+
+view_admin_downloads_agent_loadError = Cannot get agent version info
+view_admin_downloads_agent_version = エージェントバージョン
+view_admin_downloads_agent_buildNumber = エージェントビルド
+view_admin_downloads_agent_md5 = エージェント MD5
+view_admin_downloads_agent_link_label = リンク
+view_admin_downloads_agent_link_value = エージェント {0} ({1}) のダウンロード
+view_admin_downloads_agent_help = <p> \
+ This is the RHQ Agent Update Binary jar file. The purpose of this \
+ jar file is to allow you to install a fresh agent on a machine \
+ where an agent does not yet exist and to allow you to update \
+ an agent that is already installed on a machine. \
+ For more details, run this agent download jar with the --help command line option:<br/> \
+ <b>java -jar <agent-download.jar> --help</b> \
+ </p> \
+ <h3>Agent Install</h3> \
+ <p> \
+ <b>java -jar <agent-download.jar> --install[=<new agent directory>]</b><br/> \
+ This command will install a new agent. If you do not specify the new agent directory, the default will be "." \
+ </p> \
+ <h3>Agent Update</h3> \
+ <p> \
+ <b>java -jar <agent-download.jar> --update[=<old agent home>]</b><br/> \
+ This will update an existing agent that was already installed. \
+ If you do not specify the directory where the old, existing agent was installed, it will assumed to be "rhq-agent". \
+ </p>
+
+view_admin_downloads_cli_loadError = Cannot get CLI version info
+view_admin_downloads_cli_version = CLI Version
+view_admin_downloads_cli_buildNumber = CLI Build
+view_admin_downloads_cli_md5 = CLI MD5
+view_admin_downloads_cli_link_label = Link
+view_admin_downloads_cli_link_value = Download CLI {0} ({1})
+view_admin_downloads_cli_help = <p> \
+ This is the Command Line Client tool, otherwise known as the CLI. \
+ It is a standalone tool that runs from within a console and provides a \
+ command line interface to the RHQ Server. You can invoke commands via the CLI \
+ as well as run scripts to perform automated tasks. See the documentation for \
+ more information on how to install and use the CLI. \
+ </p>
+
+view_admin_downloads_bundle_loadError = Cannot get bundle deployer info
+view_admin_downloads_bundle_link_label = Link
+view_admin_downloads_bundle_link_value = Download Bundle Deployer {0}
+view_admin_downloads_bundle_help = <p> \
+ This is the Bundle Deployer tool. It is for use by developers and packagers of RHQ bundles. \
+ This standalone tool allows you to test your bundles and their recipes from a console. \
+ </p>
+
+view_admin_downloads_connectors_loadError = Cannot get connectors info
+view_admin_downloads_connectors_none = No connectors are available for download
+view_admin_downloads_connectors_help = Connectors are software that is needed in order for some products to be manageable by RHQ. You install connectors into some managed products so RHQ agents can talk to them. See the documentation for more information.
+
+# Measurement Templates view
+view_admin_measTemplates_title = Template Metric Collection Schedules
+view_admin_measTemplates_updateExisting_title = Update Existing Schedules
+view_admin_measTemplates_updateExisting_tooltip = Check this box to update the collection schedules for the selected metrics on all existing resources of this type. If this is not checked, the template schedules will only be applied to new resources of this type that are added to inventory in the future.
+
+#==================== Alerts ======================
+view_alerts_table_title_group = グループアラート履歴
+view_alerts_table_title_resource = リソースアラート履歴
+view_alerts_table_filter_priority = 優先度フィルター
+view_alerts_field_created_time = 生成時刻
+view_alerts_field_modified_time = 修正時刻
+view_alerts_field_enabled = 有効
+view_alerts_field_ack_time = 確認時刻
+view_alerts_field_ack_subject = 確認サブジェクト
+view_alerts_field_ack_status = ステータス
+view_alerts_field_ack_status_noAck = 未確認
+view_alerts_field_ack_status_noAckHover = Not yet Acknowledged
+view_alerts_field_ack_status_ack = 確認 ({0})
+view_alerts_field_ack_status_ackHover = Acknowledged by {0} at {1}
+view_alerts_field_name = 名前
+view_alerts_field_condition_text = 条件テキスト
+view_alerts_field_condition_text_none = No Conditions
+view_alerts_field_condition_text_many = Multiple Conditions
+view_alerts_field_condition_value = Condition Value
+view_alerts_field_priority = 優先度
+view_alerts_field_parent = 親
+view_alerts_field_protected = Protected
+view_alerts_field_protected_tooltip = If true, this definition is protected from being changed by the parent definition. In other words, the parent definition settings will not override this definition.
+view_alerts_loadFailed = Failed to fetch alerts data
+view_alerts_delete_confirm = Delete the selected alert(s)?
+view_alerts_delete_confirm_all = Delete all alerts from this source?
+view_alerts_delete_success = Successfully deleted {0} alerts
+view_alerts_delete_failure = Failed to delete alerts with id''s: {0}
+view_alerts_delete_failure_all = Failed to delete all alerts from this source
+view_alerts_ack_confirm = Acknowledge the selected alert(s)?
+view_alerts_ack_confirm_all = Acknowledge all alerts from this source?
+view_alerts_ack_success = Successfully acknowledged {0} alerts
+view_alerts_ack_failure = Failed to acknowledge alerts with id''s: {0}
+view_alerts_ack_failure_all = Failed to acknowledge all alerts from this source
+view_alert_details_loadFailed = Failed to fetch alert details
+view_alert_details_field_ack_by = Acknowledged by
+view_alert_details_field_ack_at = Acknowledged at
+view_alert_details_field_recovery_info = Recovery Info
+view_alert_definition_for_type = View Template
+view_alert_definition_for_group = View Group Definition
+view_alert_definitions_table_title_group = グループアラート定義
+view_alert_definitions_table_title_resource = リソースアラート定義
+view_alert_definitions_loadFailed = Failed to fetch alert definition data
+view_alert_definitions_loadFailed_single = Failed to fetch data for alert definition with id {0}
+view_alert_definitions_enable_confirm = Enable the selected alert definition(s)?
+view_alert_definitions_enable_success = Successfully enabled {0} alert definitions
+view_alert_definitions_enable_failure = Failed to enable the selected alert definitions
+view_alert_definitions_disable_confirm = Disable the selected alert definition(s)?
+view_alert_definitions_disable_success = Successfully disabled {0} alert definitions
+view_alert_definitions_disable_failure = Failed to disable the selected alert definitions
+view_alert_definitions_delete_confirm = Delete the selected alert definition(s)?
+view_alert_definitions_delete_success = Successfully deleted {0} alert definitions
+view_alert_definitions_delete_failure = Failed to deleted the selected alert definitions
+view_alert_definitions_create_success = Alert definition successfully created
+view_alert_definitions_create_failure = Alert definition creation failed
+view_alert_definitions_update_success = Alert definition successfully updated
+view_alert_definitions_update_failure = Alert definition update failed
+view_alert_definition_condition_editor_option_label = Condition Type
+view_alert_definition_condition_editor_option_availability = Availability Change
+view_alert_definition_condition_editor_option_metric_threshold = Measurement Absolute Value Threshold
+view_alert_definition_condition_editor_option_metric_baseline = Measurement Baseline Threshold
+view_alert_definition_condition_editor_option_metric_change = Measurement Value Change
+view_alert_definition_condition_editor_option_metric_calltime_threshold = Call Time Value Threshold
+view_alert_definition_condition_editor_option_metric_calltime_change = Call Time Value Change
+view_alert_definition_condition_editor_option_metric_trait_change = Trait Value Change
+view_alert_definition_condition_editor_option_operation = Operation Execution
+view_alert_definition_condition_editor_option_resource_configuration = Resource Configuration Change
+view_alert_definition_condition_editor_option_event = Event Detection
+view_alert_definition_condition_editor_avilability_tooltip = Specify the availability state change that will trigger the condition.
+view_alert_definition_condition_editor_avilability_value = Availability
+view_alert_definition_condition_editor_avilability_option_up = Comes up
+view_alert_definition_condition_editor_avilability_option_down = Goes down
+view_alert_definition_condition_editor_metric_common_definition_not_found = Should have found metric definition - something is wrong
+view_alert_definition_condition_editor_metric_threshold_tooltip = Specify the threshold value that, when violated, triggers the condition. The value you specify is an absolute value with an optional units specifier.
+view_alert_definition_condition_editor_metric_threshold_name = Metric
+view_alert_definition_condition_editor_metric_threshold_value = Metric Value
+view_alert_definition_condition_editor_metric_threshold_value_tooltip = The threshold value of the metric that will trigger the condition when compared using the selected comparator.
+view_alert_definition_condition_editor_metric_threshold_comparator = Comparator
+view_alert_definition_condition_editor_metric_threshold_comparator_less = Less than
+view_alert_definition_condition_editor_metric_threshold_comparator_equal = Equal to
+view_alert_definition_condition_editor_metric_threshold_comparator_greater = Greater Than
+view_alert_definition_condition_editor_metric_threshold_comparator_tooltip = How a collected metric value should be compared to the given threshold value
+view_alert_definition_condition_editor_metric_baseline_tooltip = Specify the baseline value that must be violated to trigger the condition. The value you specify is a percentage of the given baseline value.
+view_alert_definition_condition_editor_metric_baseline_percentage = Baseline Percentage
+view_alert_definition_condition_editor_metric_baseline_percentage_tooltip = A collected metric value will trigger this condition when compared to this percentage of the selected baseline value using the selected comparator
+view_alert_definition_condition_editor_metric_baseline_value = Baseline
+view_alert_definition_condition_editor_metric_change_tooltip = Specify the metric whose value must change to trigger the condition.
+view_alert_definition_condition_editor_metric_calltime_threshold_tooltip = Specify the calltime threshold value that, when violated, triggers the condition. The value you specify is an absolute value with an optional units specifier. You also must specify which calltime limit to compare the value with (minimum, maximum or average calltime value).
+view_alert_definition_condition_editor_metric_calltime_common_name = Call Time Metric
+view_alert_definition_condition_editor_metric_calltime_common_limit = Call Time Limit
+view_alert_definition_condition_editor_metric_calltime_common_limit_tooltip = The calltime limit value that is to be compared with the given value
+view_alert_definition_condition_editor_metric_calltime_common_regex = Regular Expression
+view_alert_definition_condition_editor_metric_calltime_common_regex_tooltip = If specified, this is a regular expression that must match a call destination in order to trigger the condition.
+view_alert_definition_condition_editor_metric_calltime_common_comparator = Comparator
+view_alert_definition_condition_editor_metric_calltime_common_comparator_shrinks = Shrinks
+view_alert_definition_condition_editor_metric_calltime_common_comparator_grows = Grows
+view_alert_definition_condition_editor_metric_calltime_common_comparator_changes = Changes
+view_alert_definition_condition_editor_metric_calltime_common_comparator_tooltip = How a collected calltime value should be compared to the given calltime limit
+view_alert_definition_condition_editor_metric_calltime_threshold_value = Call Time Value
+view_alert_definition_condition_editor_metric_calltime_threshold_value_tooltip = The threshold value of the metric that will trigger the condition when compared using the selected comparator.
+view_alert_definition_condition_editor_metric_calltime_change_tooltip = Specify the calltime value that, when changed at least a specified amount, triggers the condition. You must specify which calltime limit to check (minimum, maximum or average calltime value) and the percentage of change that must occur.
+view_alert_definition_condition_editor_metric_calltime_change_percentage = Percentage Change
+view_alert_definition_condition_editor_metric_calltime_change_percentage_tooltip = A collected calltime value will trigger this condition when it differs by at least this percentage of the selected calltime limit value
+view_alert_definition_condition_editor_metric_trait_change_tooltip = Specify the trait whose value must change to trigger the condition.
+view_alert_definition_condition_editor_metric_trait_change_value = Trait
+view_alert_definition_condition_editor_operation_tooltip = Specify the result that must occur when the selected operation is executed in order to trigger the condition.
+view_alert_definition_condition_editor_operation_value = オペレーション
+view_alert_definition_condition_editor_operation_status = オペレーションステータス
+view_alert_definition_condition_editor_operation_status_inprogress = 処理中
+view_alert_definition_condition_editor_operation_status_success = 成功
+view_alert_definition_condition_editor_operation_status_failure = 失敗
+view_alert_definition_condition_editor_operation_status_canceled = キャンセル済
+view_alert_definition_condition_editor_resource_configuration_tooltip = This condition is triggered when the resource configuration changes.
+view_alert_definition_condition_editor_event_tooltip = Specify the event severity that an event message must be reported with in order to trigger this condition. If you specify an optional regular expression, the event message must also match that regular expression in order for the condition to trigger.
+view_alert_definition_condition_editor_event_severity = Event Severity
+view_alert_definition_condition_editor_event_severity_debug = Debug
+view_alert_definition_condition_editor_event_severity_info = Info
+view_alert_definition_condition_editor_event_severity_warn = Warn
+view_alert_definition_condition_editor_event_severity_error = Error
+view_alert_definition_condition_editor_event_severity_fatal = Fatal
+view_alert_definition_condition_editor_event_regex = Regular Expression
+view_alert_definition_condition_editor_event_regex_tooltip = If specified, this is a regular expression that must match a collected event message in order to trigger the condition.
+view_alert_definition_condition_editor_common_min = Minimum
+view_alert_definition_condition_editor_common_avg = Average
+view_alert_definition_condition_editor_common_max = Maximum
+view_alert_definition_condition_editor_delete_confirm = Delete the selected alert condition(s)?
+view_alert_definition_notification_editor_title_add = 通知の追加
+view_alert_definition_notification_editor_title_edit = 通知の編集
+view_alert_definition_notification_editor_sender = Notification Sender
+view_alert_definition_notification_editor_none_available = No alert senders available
+view_alert_definition_notification_editor_loadFailed = Cannot get alert senders
+view_alert_definition_notification_editor_loadFailed_single = Cannot get alert sender configuration definition
+view_alert_definition_notification_editor_saveFailed = Cannot save the notification configuration
+view_alert_definition_notification_editor_field_sender = Sender
+view_alert_definition_notification_editor_field_configuration = Configuration
+view_alert_definition_notification_editor_field_configuration_not_loaded = Unknown
+view_alert_definition_notification_editor_field_configuration_loadFailed = Failed to get notification configuration preview
+view_alert_definition_notification_editor_delete_confirm = Are you sure you want to delete the selected alert notifications?
+view_alert_definition_notification_operation_editor_mode_title = リソース選択モード
+view_alert_definition_notification_operation_editor_mode_this = This Resource
+view_alert_definition_notification_operation_editor_mode_specific = Specific Resource
+view_alert_definition_notification_operation_editor_mode_relative = Relative Resource
+view_alert_definition_notification_operation_editor_mode_unknown = UNKNOWN OPTION - THIS IS A BUG
+view_alert_definition_notification_operation_editor_common_operation = Operation
+view_alert_definition_notification_operation_editor_specific_resource = Resource
+view_alert_definition_notification_operation_editor_specific_pick_button = Pick
+view_alert_definition_notification_operation_editor_specific_pick_text = Pick a resource...
+view_alert_definition_notification_operation_editor_specific_pick_error_invalid = Please pick a resource
+view_alert_definition_notification_operation_editor_specific_pick_error_no_operation = Please pick a resource that has one or more operations
+view_alert_definition_notification_operation_editor_relative_ancestor = Start Search From
+view_alert_definition_notification_operation_editor_relative_ancestor_tooltip = Select the top of the type hierarchy from which to search its descendant tree for the Filter By type
+view_alert_definition_notification_operation_editor_relative_ancestor_loadFailed = Cannot get type ancestry
+view_alert_definition_notification_operation_editor_relative_ancestor_root = Root Ancestor Type
+view_alert_definition_notification_operation_editor_relative_descendant = Then Filter By
+view_alert_definition_notification_operation_editor_relative_descendant_tooltip = The resource type to search for under the root type defined in the Start Search From selection.
+view_alert_definition_notification_operation_editor_relative_descendant_filter_tooltip = A specific name to uniquely identify a resource when more than one resource of the selected type might exist. This is optional if there will only ever be one resource of the resource type in the selected type hierarchy.
+view_alert_definition_notification_operation_editor_relative_descendant_loadFailed = Cannot get type descendants
+view_alert_definition_notification_operation_editor_operations_loadFailed = Failed to load the list of available operations
+view_alert_definition_notification_operation_editor_operations_no_parameters = This operation does not take any parameters
+view_alert_definition_notification_role_editor_loadFailed = Cannot determine current roles - starting empty
+view_alert_definition_notification_role_editor_restoreFailed = Cannot use current roles - starting empty
+view_alert_definition_notification_role_editor_saveFailed = Cannot save the selected roles
+view_alert_definition_notification_user_editor_loadFailed = Cannot determine current users - starting empty
+view_alert_definition_notification_user_editor_restoreFailed = Cannot use current users - starting empty
+view_alert_definition_notification_user_editor_saveFailed = Cannot save the selected users
+view_alert_definition_notification_cliScript_editor_repository = Repository
+view_alert_definition_notification_cliScript_editor_script = Script
+view_alert_definition_notification_cliScript_editor_whichUser = User To Run The Script As
+view_alert_definition_notification_cliScript_editor_thisUser = Myself
+view_alert_definition_notification_cliScript_editor_anotherUser = Another User
+view_alert_definition_notification_cliScript_editor_verifyAuthentication = Verify
+view_alert_definition_notification_cliScript_editor_loadFailed = Loading the CLI Notification Editor Failed.
+view_alert_definition_notification_cliScript_editor_selectRepoFirst = Select a repository first.
+view_alert_definition_notification_cliScript_editor_existingScript = Existing Script
+view_alert_definition_notification_cliScript_editor_uploadNewScript = Upload New Script
+view_alert_definition_notification_cliScript_editor_newScriptVersion = Version
+view_alert_definition_notification_cliScript_editor_selectRepo = Select the repository where the script should reside
+view_alert_definition_recovery_editor_disable_when_fired = Disable When Fired
+view_alert_definition_recovery_editor_disable_when_fired_tooltip = Indicates if this alert will be disabled after it fires. Once disabled, the alert can be manually re-enabled or a recovery alert can be set up to automatically re-enable it. If this alert is a recovery alert itself, this setting cannot be turned on.
+view_alert_definition_recovery_editor_recovery_alert = Recover Alert
+view_alert_definition_recovery_editor_recovery_alert_tooltip = The target alert that will be recovered (i.e. re-enabled) after this alert triggers. Do not select an alert here if you are not defining a recovery alert.
+view_alert_definition_recovery_editor_loadFailed = Cannot build recovery menu
+view_alert_definition_recovery_editor_none_available = None
+view_alert_common_tab_general = General Properties
+view_alert_common_tab_conditions = Conditions
+view_alert_common_tab_conditions_modal_title = 条件追加
+view_alert_common_tab_conditions_expression = Fire alert when
+view_alert_common_tab_conditions_expression_tooltip = Determines if ANY or ALL of the conditions must evaluate to true in order for the entire condition set to be considered true.
+view_alert_common_tab_conditions_text = Condition
+view_alert_common_tab_conditions_value = Value
+view_alert_common_tab_conditions_type_availability = Availability Change
+view_alert_common_tab_conditions_type_availability_down = Went down
+view_alert_common_tab_conditions_type_availability_up = Came up
+view_alert_common_tab_conditions_type_metric_threshold = Metric Value Threshold
+view_alert_common_tab_conditions_type_metric_calltime_threshold = Call Time Value Threshold
+view_alert_common_tab_conditions_type_metric_calltime_destination = with call destination matching
+view_alert_common_tab_conditions_type_metric_calltime_change = Call Time Value Changes
+view_alert_common_tab_conditions_type_metric_calltime_change_verb = by at least
+view_alert_common_tab_conditions_type_metric_calltime_delta_grows = Grows
+view_alert_common_tab_conditions_type_metric_calltime_delta_shrinks = Shrinks
+view_alert_common_tab_conditions_type_metric_calltime_delta_other = Changes
+view_alert_common_tab_conditions_type_metric_baseline = Metric Value Baseline
+view_alert_common_tab_conditions_type_metric_baseline_verb = of
+view_alert_common_tab_conditions_type_metric_change = Metric Value Change
+view_alert_common_tab_conditions_type_metric_trait_change = Trait Change
+view_alert_common_tab_conditions_type_operation = Operation Execution
+view_alert_common_tab_conditions_type_operation_status = with result status
+view_alert_common_tab_conditions_type_resource_configuration = Resource Configuration Change
+view_alert_common_tab_conditions_type_event = Event Detection
+view_alert_common_tab_conditions_type_event_matching = with event source matching
+view_alert_common_tab_conditions_recovery_enabled = Triggered ''{0}'' to be re-enabled
+view_alert_common_tab_conditions_recovery_disabled = This alert caused its alert definition to be disabled
+view_alert_common_tab_notifications = Notifications
+view_alert_common_tab_notifications_sender = Sender
+view_alert_common_tab_notifications_status = Status
+view_alert_common_tab_notifications_message = Message
+view_alert_common_tab_dampening = Dampening
+view_alert_common_tab_dampening_category_none = None
+view_alert_common_tab_dampening_category_none_tooltip = Dampening is disabled. Every time the condition set is true, an alert will be triggered.
+view_alert_common_tab_dampening_category_consecutive_count = Consecutive
+view_alert_common_tab_dampening_category_consecutive_count_tooltip = An alert is triggered once every X occurrences the condition set is true consecutively.
+view_alert_common_tab_dampening_category_partial_count = Last N Evaluations
+view_alert_common_tab_dampening_category_partial_count_tooltip = An alert is triggered once every X occurrences the condition set is true during the last N evaluations of the condition set.
+view_alert_common_tab_dampening_category_duration_count = Time Period
+view_alert_common_tab_dampening_category_duration_count_tooltip = An alert is triggered once every X occurrences the condition set is true within a given time period.
+view_alert_common_tab_dampening_consecutive_occurrences_label = Occurrences
+view_alert_common_tab_dampening_consecutive_occurrences_label_tooltip = The number of times the condition set must be consecutively true before the alert is triggered
+view_alert_common_tab_dampening_partial_occurrences_label = Occurrences
+view_alert_common_tab_dampening_partial_occurrences_label_tooltip = The number of times the condition set must be true during the last N evaluations before the alert is triggered.
+view_alert_common_tab_dampening_partial_evalatuions_label = Evaluations
+view_alert_common_tab_dampening_partial_evalatuions_label_tooltip = The total number of times the condition set will be tested to see if the given number of occurrences are true.
+view_alert_common_tab_dampening_duration_occurrences_label = Occurrences
+view_alert_common_tab_dampening_duration_occurrences_label_tooltip = The number of times the condition set must be true during the given time period before the alert is triggered.
+view_alert_common_tab_dampening_duration_period_label = Time Period
+view_alert_common_tab_dampening_duration_period_label_tooltip = The time span in which the condition set will be tested to see if the given number of occurrences are true.
+view_alert_common_tab_recovery = Recovery
+view_alert_common_tab_invalid_condition_category = Invalid condition category - please report this as a bug: {0}
+view_alert_common_tab_invalid_dampening_category = Invalid dampening category - please report this as a bug: {0}
+view_alert_common_tab_invalid_time_units = Invalid time units - please report this as a bug: {0}
+
+# Auto Discovery Queue
+#----------------------------
+view_autoDiscoveryQ_title = 自動リカバリキュー
+view_autoDiscoveryQ_import = インポート
+view_autoDiscoveryQ_ignore = 無視
+view_autoDiscoveryQ_ignored = 無視済み
+view_autoDiscoveryQ_unignore = 無視をしない
+view_autoDiscoveryQ_committed = コミット済み
+view_autoDiscoveryQ_deleted = 削除済み
+view_autoDiscoveryQ_uninventoried = インベントリ登録をしない
+view_autoDiscoveryQ_new = 新規
+view_autoDiscoveryQ_newAndIgnored = 新規かつ無視済み
+view_autoDiscoveryQ_importFailure = Failed to import resources
+view_autoDiscoveryQ_importSuccessful = You have successfully imported the selected resources.
+view_autoDiscoveryQ_ignoreFailure = Failed to ignore resources
+view_autoDiscoveryQ_ignoreSuccessful = You have successfully ignored the selected resources.
+view_autoDiscoveryQ_unignoreFailure = Failed to unignore resources
+view_autoDiscoveryQ_unignoreSuccessful = You have successfully unignored the selected resources.
+view_autoDiscoveryQ_noperm = (You are not authorized to view the auto-discovery queue)
+view_autoDiscoveryQ_noItems = No items to show
+view_autoDiscoveryQ_field_parentId = Parent ID
+view_autoDiscoveryQ_field_name = Resource Name
+view_autoDiscoveryQ_field_key = Resource Key
+view_autoDiscoveryQ_field_discoveryTime = Discovery Time
+view_autoDiscoveryQ_field_inventoryStatus = Inventory Status
+view_autoDiscoveryQ_loadFailure = Failed to load the inventory discovery queue
+view_autoDiscoveryQ_showStatus = Show
+view_autoDiscoveryQ_confirmSelect = Also select the platform children?
+
+#==================== Bundles ======================
+
+# some common bundle terms
+view_bundle_bundle = バンドル
+view_bundle_bundles = バンドル
+view_bundle_bundleDestinations = Bundle Destinations
+view_bundle_bundleDeployment = Bundle Deployment
+view_bundle_bundleDeployments = Bundle Deployments
+view_bundle_bundleFiles = Bundle Files
+view_bundle_bundleType = Bundle Type
+view_bundle_bundleVersion = Bundle Version
+view_bundle_bundleVersions = Bundle Versions
+view_bundle_deploy = Deploy
+view_bundle_deployed = Deployed
+view_bundle_deployDir = Deploy Directory
+view_bundle_deployments = Deployments
+view_bundle_destinations = Destinations
+view_bundle_files = Files
+view_bundle_latestVersion = 最新バージョン
+view_bundle_recipe = Recipe
+view_bundle_revert = Revert
+view_bundle_purge = Purge
+view_bundle_versions = バージョン
+view_bundle_deleteConfirm = Are you sure you want to delete this bundle? All versions, destinations and deployments for this bundle will also be deleted.
+
+# individual bundle views/wizards
+view_bundle_fileListView_fileSize = File Size
+view_bundle_fileListView_md5 = MD5
+view_bundle_fileListView_sha256 = SHA256
+view_bundle_fileListView_loadFailure = Failed to load bundle file data
+view_bundle_version_backToBundle = Back to Bundle
+view_bundle_version_bundleVersionTagUpdateFailure = Failed to update bundle version tags
+view_bundle_version_bundleVersionTagUpdateSuccessful = You have successfully updated the bundle version tags
+view_bundle_version_deleteConfirm = Are you sure you want to delete this bundle version?
+view_bundle_version_deleteFailure = Failed to delete the bundle version [{0}]
+view_bundle_version_deleteSuccessful = You successfully deleted the bundle version [{0}]
+view_bundle_version_loadFailure = Failed to load bundle version
+view_bundle_tree_loadFailure = Failed to load bundle data
+view_bundle_revertWizard_title = バンドル取り消し
+view_bundle_revertWizard_windowTitle = バンドル取り消しウィザード
+view_bundle_revertWizard_getInfoStep_name = Provide Revert Information
+view_bundle_revertWizard_getInfoStep_revertDeployName = Revert Deploy Name
+view_bundle_revertWizard_getInfoStep_revertDeployDesc = Revert Deploy Description
+view_bundle_revertWizard_getInfoStep_revertDeployDescFull = [REVERT From]\\n{0}\\n\\n[REVERT To]\\n{1}
+view_bundle_revertWizard_getInfoStep_cleanDeploy = Clean Deployment? (this will delete an old, existing deploy directory prior to starting the revert deployment)
+view_bundle_revertWizard_getInfoStep_getNameFailure = Failed to get revert deployment name
+view_bundle_revertWizard_confirmStep_name = Revert Deployment Confirmation
+view_bundle_revertWizard_confirmStep_noLiveDeployment_concise = No live deployment was found for the destination
+view_bundle_revertWizard_confirmStep_noLiveDeployment = No live deployment was found for the destination [{0}]
+view_bundle_revertWizard_confirmStep_noPriorDeployment_concise = The live deployment cannot be reverted because there is no prior deployment
+view_bundle_revertWizard_confirmStep_noPriorDeployment = The live deployment [{0}] cannot be reverted because there is no prior deployment for the destination [{1}]
+view_bundle_revertWizard_confirmStep_failedToFindLiveDeployment = Failed to find live deployment; cannot revert
+view_bundle_revertWizard_confirmStep_liveDeployment = Live Deployment
+view_bundle_revertWizard_confirmStep_prevDeployment = Previous Deployment
+view_bundle_revertWizard_confirmStep_confirmation = Reverting Live Deployment to Previous Deployment. Click "Next" to continue...
+view_bundle_revertWizard_revertStep_name = Deploy Bundle to Destination Platforms
+view_bundle_revertWizard_revertStep_reverting = Reverting...
+view_bundle_revertWizard_revertStep_scheduled = You have successfully scheduled the revert deployment!
+view_bundle_revertWizard_revertStep_scheduledDetails = You have successfully scheduled to revert the bundle deployment [{0}] from resource group [{1}]
+view_bundle_revertWizard_revertStep_scheduledFailure = Failed to schedule revert deployment!
+view_bundle_list_loadFailure = Failed to load the bundle to be deployed [{0}]
+view_bundle_list_singleLoadFailure = Failed to get a single bundle to be deployed [{0}]
+view_bundle_list_versionsCount = Versions Count
+view_bundle_list_destinationsCount = Destinations Count
+view_bundle_list_loadWithLatestFailure = Failed to load bundle with the latest version data
+view_bundleVersion_loadFailure = Failed to load bundle version data
+view_bundle_list_backToAll = Back to All Bundles
+view_bundle_list_tagUpdateFailure = Failed to update bundle tags
+view_bundle_list_tagUpdateSuccessful = You have successfully updated the bundle tags
+view_bundle_list_deleteConfirm = Are you sure you want to delete the selected bundles?
+view_bundle_list_deletesFailure = Failed to delete the bundles
+view_bundle_list_deletesSuccessful = You successfully deleted the bundles
+view_bundle_list_deleteFailure = Failed to delete the bundle [{0}]
+view_bundle_list_deleteSuccessful = You successfully deleted the bundle [{0}]
+view_bundle_list_error1 = Failed to load bundle to deploy [{0}]
+view_bundle_list_error2 = Failed to get a single bundle to deploy [{0}]
+view_bundle_list_error3 = Failed to load bundle
+view_bundle_dest_group = Group
+view_bundle_dest_created = Created
+view_bundle_dest_deployDir = Deploy Directory
+view_bundle_dest_lastDeployedVersion = Last Deployed Version
+view_bundle_dest_lastDeploymentDate = Last Deployment Date
+view_bundle_dest_lastDeploymentStatus = Last Deployment Status
+view_bundle_dest_loadFailure = Failed to load bundle destinations
+view_bundle_dest_loadFailureVersionInfo = Failed to load bundle destination deployed version information
+view_bundle_dest_backToBundle = Back to Bundle
+view_bundle_dest_tagUpdateFailure = Failed to update bundle destination tags
+view_bundle_dest_tagUpdateSuccessful = You have successfully updated the bundle destination tags
+view_bundle_dest_purgeConfirm = This will purge the bundle content from all remote machines. Are you sure you want to do this?
+view_bundle_dest_purgeFailure = Failed to purge the bundle destination [{0}] from some or all of the remote machines.
+view_bundle_dest_purgeSuccessful = You successfully purged the bundle destination [{0}] from all of the remote machines.
+view_bundle_dest_revertConfirm = This will revert all remote machines back to the previous bundle deployment. Are you sure you want to do this?
+view_bundle_dest_deleteConfirm = Are you sure you want to delete this bundle destination? This only deletes it from the database; all bundle content that was deployed to this destination on remote machines will remain.
+view_bundle_dest_deleteFailure = Failed to delete the bundle destination [{0}]
+view_bundle_dest_deleteSuccessful = You successfully deleted the bundle destination [{0}]
+view_bundle_resDeployDS_loadFailure = Failed to load bundle resource deployments
+view_bundle_deploy_name = Deployment Name
+view_bundle_deploy_time = Deployment Time
+view_bundle_deploy_loadDeployFailure = Failed to load bundle deployments
+view_bundle_deploy_action = Action
+view_bundle_deploy_installDetails = Install Details
+view_bundle_deploy_backButton = Back to Destination
+view_bundle_deploy_tagUpdateFailure = Failed to update bundle deployment tags
+view_bundle_deploy_tagUpdateSuccessful = You have successfully updated the bundle deployment tags
+view_bundle_deploy_deploymentPlatforms = Deployment Platforms
+view_bundle_deploy_selectARow = Select a row to show installation details
+view_bundle_deploy_operatingSystem = Operating System
+view_bundle_deploy_loadFailure = Failed to load bundle deployment
+view_bundle_deploy_loadBundleFailure = Failed to find bundle
+view_bundle_deploy_deployedBy = Deployed By
+view_bundle_deploy_clickForError = Click the icon for the error message
+view_bundle_deploy_deleteConfirm = Are you sure you want to delete this bundle deployment?
+view_bundle_deploy_deleteFailure = Failed to delete the bundle deployment [{0}]
+view_bundle_deploy_deleteSuccessful = You successfully deleted the bundle deployment [{0}]
+view_bundle_createWizard_title = バンドル生成
+view_bundle_createWizard_windowTitle = Bundle Creation Wizard
+view_bundle_createWizard_cancelSuccessful = Canceled the creation of bundle [{0}], version = [{1}]
+view_bundle_createWizard_cancelFailure = Failed to fully cancel the creation of bundle [{0}], version = [{1}] - the bundle may still exist in the database
+view_bundle_createWizard_noBundleTypesSupported = No bundle types are supported - you must deploy a valid plugin that supports bundle deployments
+view_bundle_createWizard_noBundleTypesAvail = No bundle types are available
+view_bundle_createWizard_loadBundleFileFailure = Cannot obtain bundle file information from server
+view_bundle_createWizard_enterUrl = Please enter a valid URL where the bundle distribution file can be downloaded from
+view_bundle_createWizard_enterRecipe = Please supply a valid recipe
+view_bundle_createWizard_uploadInProgress = Upload is in progress... This can take several minutes for large files
+view_bundle_createWizard_uploadStepName = Upload Bundle Files
+view_bundle_createWizard_noAdditionalFilesNeeded = No additional files need to be uploaded for this bundle
+view_bundle_createWizard_failedToUploadFile = Failed to upload bundle file
+view_bundle_createWizard_failedToUploadDistroFile = Failed to upload bundle distribution file
+view_bundle_createWizard_bundleDistro = Bundle Distribution
+view_bundle_createWizard_youMustChooseOne = You must choose one option in order to create a bundle!
+view_bundle_createWizard_urlOption = URL
+view_bundle_createWizard_uploadOption = Upload
+view_bundle_createWizard_recipeOption = Recipe
+view_bundle_createWizard_provideBundleDistro = Provide a Bundle Distribution
+view_bundle_createWizard_clickToUploadRecipe = Click to load a recipe file
+view_bundle_createWizard_createFailure = Failed to create the bundle
+view_bundle_createWizard_createSuccessful = You have successfully created a bundle named [{0}] with a version of [{1}]
+
+view_bundle_deployWizard_deploying = Deploying...
+view_bundle_deployWizard_deployStep = Deploy Bundle to Destination Platforms
+view_bundle_deployWizard_deploymentCreated = Created Deployment...
+view_bundle_deployWizard_deploymentCreatedDetail = You have created the deployment [{0}] with the description [{1}]
+view_bundle_deployWizard_deploymentCreatedDetail_concise = You have created the deployment [{0}]
+view_bundle_deployWizard_destinationCreatedDetail = You have created the destination [{0}] with the description [{1}]
+view_bundle_deployWizard_destinationCreatedDetail_concise = You have created the destination [{0}]
+view_bundle_deployWizard_deploymentScheduled = Bundle Deployment Scheduled!
+view_bundle_deployWizard_deploymentScheduledDetail = You have scheduled the bundle deployment [{0}] to the destination group [{1}]
+view_bundle_deployWizard_deploymentScheduledDetail_concise = You have scheduled the bundle deployment
+view_bundle_deployWizard_error_1 = Failed to delete new deployment on Cancel
+view_bundle_deployWizard_error_2 = Failed to delete new destination on Cancel
+view_bundle_deployWizard_error_3 = Failed to Schedule Deployment!
+view_bundle_deployWizard_error_4 = Failed to schedule deployment: {0}
+view_bundle_deployWizard_error_5 = Failed to Create Deployment!
+view_bundle_deployWizard_error_6 = Failed to create deployment: {0}
+view_bundle_deployWizard_error_7 = Failed to get deployment name.
+view_bundle_deployWizard_error_8 = You must select a valid resource group from the drop down
+view_bundle_deployWizard_error_9 = Failed to delete new destination in nextPage
+view_bundle_deployWizard_error_10 = Failed to create destination, it may already exist. (Note, for an existing destination deploy from the Destination view)
+view_bundle_deployWizard_error_11 = Failed to find defined deployments.
+view_bundle_deployWizard_error_12 = Failed to find defined bundles.
+view_bundle_deployWizard_getConfigStep = Set Deployment Configuration
+view_bundle_deployWizard_getConfigSkip = No configuration needed for this bundle version.
+view_bundle_deployWizard_getDestStep = New Destination
+view_bundle_deployWizard_getDest_name = Destination Name
+view_bundle_deployWizard_getDest_desc = Destination Description
+view_bundle_deployWizard_getDest_deployDir = Root Deployment Directory (on destination platforms)
+view_bundle_deployWizard_getInfoStep = Provide Deployment Information
+view_bundle_deployWizard_getInfo_clean = Clean Deployment? (wipe deploy directory on destination platform)
+view_bundle_deployWizard_getInfo_deploymentDesc = Deployment Description
+view_bundle_deployWizard_getInfo_deploymentName = Deployment Name
+view_bundle_deployWizard_getOptionsStep = Deploy Options
+view_bundle_deployWizard_getOptions_deployLater = Deploy Later
+view_bundle_deployWizard_getOptions_deployNow = Deploy Now
+view_bundle_deployWizard_getOptions_deployTime = Deployment Time
+view_bundle_deployWizard_selectBundleStep = Select Deployment Bundle
+view_bundle_deployWizard_selectBundle_single = Select only a single bundle for deployment.
+view_bundle_deployWizard_selectVersionStep = Select Deployment Bundle Version
+view_bundle_deployWizard_selectVersion_latest = Latest Version [{0}]
+view_bundle_deployWizard_selectVersion_live = Live Version [{0}]
+view_bundle_deployWizard_selectVersion_select = Select Version from List:
+view_bundle_deployWizard_title = バンドルデプロイウィザード
+
+# =================== Measurement Views =====================
+
+view_measureTable_chartMetricValues = Chart Selected Metrics
+view_measureTable_getLive = Get Live Value
+view_measureTable_getLive_failure = Cannot get live values for those metrics. Make sure the agent is running and the managed resource is up.
+view_measureTable_live_title = ライブデータ
+
+# =================== Components =====================
+
+view_configCompare_comparingConfigs = Comparing Configurations
+view_configCompare_configCompare = Configuration Comparison
+
+view_configEdit_addItem = Add Item to List
+view_configEdit_confirm_1 = Are you sure you want to delete the selected properties from the set?
+view_configEdit_confirm_2 = Are you sure you want to delete this row?
+view_configEdit_confirm_3 = Are you sure you want to delete the [{0}] selected [{1}]?
+view_configEdit_viewRow = View Row
+view_configEdit_editRow = Edit Row
+view_configEdit_enterPropName = Enter the name of the property to be added.
+view_configEdit_error_1 = Configuration is not supported by this Resource.
+view_configEdit_error_2 = Connection settings are not supported by this Resource.
+view_configEdit_error_3 = Cannot add property named [{0}]. The property name is already used in the set.
+view_configEdit_files = Files
+view_configEdit_hideAll= Hide All
+view_configEdit_jumpToSection = セクションへのジャンプ
+view_configEdit_msg_1 = Added property [{0}] to the set.
+view_configEdit_msg_2 = Removed properties from the set.
+view_configEdit_msg_3 = [{0} {1}] deleted from list.
+view_configEdit_msg_4 = Item added to list.
+view_configEdit_properties = Properties
+view_configEdit_tooltip_1 = Delete the selected items from the list.
+view_configEdit_tooltip_2 = Add an item to the list.
+
+view_groupConfigEdit_member = Member
+view_groupConfigEdit_noListProps = List properties are not currently supported for group configurations.
+view_groupConfigEdit_tooltip_1 = Member values differ - click icon to edit them.
+view_groupConfigEdit_setAll = Set all values to:
+view_groupConfigEdit_unset = Unset
+view_groupConfigEdit_valsDiff = member values differ
+view_groupConfigEdit_valsDiffForProp = Member Values for Property [{0}]
+
+view_leftNav_unknownPage = Unknown page name [{0}] for section [{1}] - URL is invalid.
+
+view_measure_nan = --no data available--
+
+# Measurement Range Selector
+view_measureRange_last = Time Range - Previous
+view_measureRange_start = Time Range - Start
+view_measureRange_simple = Simple...
+
+view_selector_assigned = Assigned {0}
+view_selector_available = Available {0}
+
+view_subTab_error_disabled = Cannot select disabled subTab [{0}].
+
+view_table_drawFail = Failed to draw Table [{0}].
+view_table_matchingRows = 一致した行: {0} (選択済み: {1})
+view_table_totalRows = 合計行: {0} (選択済み: {1})
+view_tableSection_backButton = Back to List
+view_tableSection_error_noId = Table [{0}] record is missing 'id' attribute - please report this bug.
+view_tableSection_error_badId = Can not show detail for [{0}]. Illegal 'id': [{1}]. Please report this bug
+
+view_tags_tags = タグ
+view_tags_error_1 = Failed to load Tags
+view_tags_tooltip_1 = Click to remove this Tag
+view_tags_tooltip_2 = Click to edit Tags
+view_tags_tooltip_3 = Enter a Tag in the format: (namespace:)(semantic=)tagname (e.g. it:env=QA, or owner=John)
+
+# File Upload (various)
+view_upload_alreadyUploaded = File has already been uploaded
+view_upload_bundleDistFile = Distribution File
+view_upload_error_bundleDistFile = Error uploading Bundle Distribution File
+view_upload_error_file = Error uploading file
+view_upload_error_fileName = Error uploading file [{0}]
+view_upload_error_fileName_2 = Error uploading file [{0}], check for invalid file path.
+view_upload_error_packageVersionFile = Error uploading Package Version File
+view_upload_error_results = Error uploading file, unexpected results: [{0}]
+view_upload_inProgress = Can not submit, upload is currently in progress
+view_upload_prompt_1 = Please select a file to upload [{0}]
+view_upload_prompt_2 = File to Upload
+view_upload_tooltip_1a = Select a file to upload, then click Upload or Next
+view_upload_tooltip_1b = Select a file to upload, then click Next
+view_upload_tooltip_2 = File upload had previously failed
+view_upload_success = File successfully uploaded
+view_upload_upload = Upload
+view_upload_uploadFile = UploadFile
+
+# Group Create Wizard
+view_groupCreateWizard_membersStepName = Select Members
+view_groupCreateWizard_createStepName = Group Settings
+view_groupCreateWizard_createStep_recursive = Recursive
+view_groupCreateWizard_title = グループ生成
+view_groupCreateWizard_windowTitle = グループ生成
+view_groupCreateWizard_createFailure = Failed to create the resource group
+view_groupCreateWizard_createSuccessful_concise = You have created a new resource group. [<a href="{0}">View Group</a>]
+view_groupCreateWizard_createSuccessful_full = You have created a new [{0}] resource group with the name [{1}] that contains [{2}] member resources
+
+# Resource Type / Plugin View/Datasources
+view_type_resourceTypes = Resource Types
+view_type_parentId = Parent ID
+view_type_typeTreeLoadFailure = Failed to load resource type tree data
+
+# Tabs
+view_tabs_invalidSubTab = Invalid subtab: {0}
+view_tabs_invalidTab = Invalid tab: {0}
+
+# Group Tree
+group_tree_partialClusterTooltip = {0} out of {1} group members have a ''{2}'' resource
+
+#=================== Dashboard =====================
+view_dashboard_favorites_error1 = Failed to load favorite Resources.
+view_dashboardManager_error = Failed to save dashboard to server
+view_dashboardManager_saved = Saved dashboard {0} to server
+view_dashboardManager_success = Saved dashboard
+view_dashboardManager_deleteFail = Failed to delete dashboard.
+view_dashboardManager_deleted = Successfully deleted dashboard {0}
+view_dashboards_title = ダッシュボード
+view_dashboards_confirm1 = Are you sure you want to delete
+view_dashboards_portlets_refresh_fail1=Failed to update interval for portlets that auto-refresh
+view_dashboards_portlets_refresh_fail2=Failed to disable reload for portlets that auto-refresh
+view_dashboards_portlets_refresh_none = No Refresh
+view_dashboards_portlets_refresh_one_min = 1 minute
+view_dashboards_portlets_refresh_multiple_min = {0} minutes
+view_dashboards_portlets_refresh_success1=Updated interval for portlets that auto-refresh
+view_dashboards_portlets_refresh_success2=Stopping reload for portlets that auto-refresh
+view_dashboardsManager_error1 = Failed to add new dashboard
+view_dashboardsManager_message_title_details = <h1>RHQへようこそ2</h1>\n<p>RHQプロジェクトは抽象化されたプラグインベースのシステム管理スイートで、複数のプロダクトやプラットフォームに対してコア機能を横断的に適用できる拡張可能で、統合化されたシステム管理を提供します。このプロジェクトはレイヤ化されたモジュールによって設計されていて、デプロイのための柔軟なアーキテクチャを提供します。それは企業全体に対する監査と履歴の管理を提供するコアとなるユーザーインタフェースを導入します。サーバー/エージェントアーキテクチャはリモートでの管理と特定プロダクトのサポートを実現するプラグインを提供します。 </p>\n <p>このデフォルトのダッシュボードは上の「編集モード」ボタンをすることで編集可能です。</p>
+
+view_portlet_factory_invalidPortlet = This is an obsolete portlet that is no longer valid. Please delete it.
+
+view_portlet_defaultName_autodiscovery = ディスカバリキュー
+view_portlet_defaultName_favoriteResources = お気に入りリソース
+view_portlet_defaultName_resourceMetric = Resource Metric Graph
+view_portlet_defaultName_groupMetric = Resource Group Metric Graph
+view_portlet_defaultName_inventorySummary = インベントリサマリ
+view_portlet_defaultName_mashup = マッシュアップ
+view_portlet_defaultName_message = メッセージ
+view_portlet_defaultName_operations = 最近のオペレーション
+view_portlet_defaultName_platformSummary = プラットフォーム利用率
+view_portlet_defaultName_problemResources = アラートまたは利用できないリソース
+view_portlet_defaultName_recentAlerts = 最近のアラート
+view_portlet_defaultName_recentlyAddedResources = 最近追加されたリソース
+view_portlet_defaultName_tagCloud = タグ数
+
+view_portlet_defaultName_group_alerts =グループ: アラート
+view_portlet_defaultName_group_bundles = グループ: バンドルデプロイ
+view_portlet_defaultName_group_config_updates = グループ: 構成の更新
+view_portlet_defaultName_group_events = グループ: イベント数
+view_portlet_defaultName_group_metrics = グループ: メトリックス
+view_portlet_defaultName_group_oobs = グループ: OOB 条件
+view_portlet_defaultName_group_operations = グループ: オペレーション
+view_portlet_defaultName_group_pkg_hisory = グループ: パッケージ履歴
+view_portlet_defaultName_resource_alerts = リソース: アラート
+view_portlet_defaultName_resource_bundles = リソース: バンドルデプロイ
+view_portlet_defaultName_resource_config_updates = リソース: 構成の更新
+view_portlet_defaultName_resource_events = リソース: イベント数
+view_portlet_defaultName_resource_metrics = リソース: 測定
+view_portlet_defaultName_resource_oobs = リソース: OOB メトリックス
+view_portlet_defaultName_resource_operations = リソース: オペレーション
+view_portlet_defaultName_resource_pkg_hisory = リソース: パッケージ履歴
+
+view_portlet_help_autodiscovery = This portlet allows import or ignore of newly discovered resources. Imported resources are added to inventory for monitoring and management. Ignored resources are not imported and are hidden from view unless explicitly unignored.
+view_portlet_help_bundle_deps = This portlet shows relevant bundle deployments based on display criteria configured.
+view_portlet_help_config_updates =This portlet displays recent configuration changes consistent with configuration settings.
+view_portlet_help_eventcounts = This portlet displays Event counts consistent with display criteria configured.
+view_portlet_help_favoriteResources = This portlet displays the current user''s favorite resources.
+view_portlet_help_graph = This portlet displays the resource metric graph.
+view_portlet_help_inventorySummary = This portlet displays a short summary of the current user''s viewable inventory and metric collection rate.
+view_portlet_help_mashup = This portlet displays the returned content of a remote HTTP request (via an iframe).
+view_portlet_help_metrics = This portlet graphs relevant recent metric data based on display criteria configured.
+view_portlet_help_message = This portlet displays a static HTML message. The <i>message</i> property must be configured.
+view_portlet_help_oobs = This portlet displays OOB(Out of Bound) metric conditions.
+view_portlet_help_operations = This portlet displays the most recently executed operations for the current user''s inventory.
+view_portlet_help_scheduledOperations = This portlet displays the next scheduled operations for the current user''s inventory.
+view_portlet_help_operations_criteria = This portlet displays Operations consistent with display criteria configured.
+view_portlet_help_pkg_history = This portlet shows relevant package history based on display criteria configured.
+view_portlet_help_platformSummary = This portlet displays utilization data (such as current CPU and memory usage) for platform resources that are accessible by the current user.
+view_portlet_help_problemResources = This portlet displays the current user''s alerted or unavailable resources.
+view_portlet_help_recentAlerts = This portlet displays alerts recently fired on the current user''s viewable inventory.
+view_portlet_help_recentlyAdded = This portlet displays resources that have recently been imported into inventory.
+view_portlet_help_tagCloud = This portlet displays the relative tag counts for the current user''s inventory.
+view_portlet_help_none = There is no help available for this portlet.
+
+view_portlet_configure_needed = Click the Settings button to configure this portlet.
+view_portlet_configure_notNeeded = Configuration is not necessary for this portlet.
+view_portlet_configure_definitionTitle = Portlet Configuration
+view_portlet_configure_definitionDesc = The configuration settings for the portlet.
+
+view_portlet_autodiscovery_setting_platforms = discovered platforms
+
+view_portlet_graph_configure_resource_graph = The resource to graph
+view_portlet_graph_configure_metricDefinition_graph = The metric definition id to graph
+
+view_portlet_inventory_error1 = Failed to retrieve inventory summary
+view_portlet_inventory_tooltip_expand = Click to show more details for this resource.
+view_portlet_inventory_tooltip_collapse = Click to hide details for this resource.
+
+view_portlet_message_title = The message to display.
+
+view_portlet_operations_config_completed_maximum = Maximum number of Completed operations to display.
+view_portlet_operations_config_completed_enable = Whether to enable completed operations results grouping for dashboard.
+view_portlet_operations_config_scheduled_enable = Whether to enable scheduled operations results grouping for dashboard.
+view_portlet_operations_config_scheduled_maximum = Maximum number of Scheduled operations to display.
+view_portlet_operations_config_completed = completed operations
+view_portlet_operations_config_show_last = show Last
+view_portlet_operations_config_show_next = show Next
+view_portlet_operations_disabled = (Results currently disabled. Change settings to enable results.
+
+view_portlet_platform_platform_error_1 = Failed to load platform metrics
+view_portlet_platform_type_error_1 = Could not load type data
+
+view_portlet_problemResources_config_display_maximum = Maximum number of Problem resources to display.
+view_portlet_problemResources_config_display_range = Show problem resources going back this many hours.
+view_portlet_problemResources_config_display_range2 = From {0} to {1}
+view_portlet_problemResources_maxDisplaySetting = maximum resources.
+
+view_portlet_recentAlerts_config_members = Select Members
+view_portlet_recentAlerts_config_priority_label = priority Alerts,
+view_portlet_recentAlerts_config_when = within the past
+view_portlet_recentAlerts_fail_msg = Failed to load resources assigned for alert filtering.
+
+view_portlet_recentlyAdded_setting_addedPlatforms = recently added platforms
+view_portlet_recentlyAdded_error1 = Failed to load recently added resources
+view_portlet_results_empty = 指定されたクライテリアの結果は見つかりません
+
+# =================== Inventory =====================
+view_inventory_adq = ディスカバリキュー
+view_inventory_sectionHelp = このセクションにおいて、新規に発見されたリソース、インベントリに登録されたリソース、グループの表示と管理がおこなわれます。
+view_inventory_problemGroups = 問題グループ
+view_inventory_collectionInterval = コレクション間隔
+view_inventory_mixed = mixed
+view_inventory_unavailableServers = 利用不能サーバー
+view_inventory_groups = グループ
+view_inventory_allGroups = すべてのグループ
+view_inventory_allResources = すべてのリソース
+view_inventory_platforms = プラットフォーム
+view_inventory_servers = サーバー
+view_inventory_services = サービス
+view_inventory_summary_agent_error1 = Failed to locate agent managing resource id
+view_inventory_summary_agent_error2 = Failed to ping agent managing resource id
+view_inventory_summary_agent_error3 = You do not have permission to view details for this Agent.
+view_inventory_summary_agent_fullEnpoint = Full Endpoint
+view_inventory_summary_agent_fullEnpoint_err1 = !No remote endpoint associated with this resource!
+view_inventory_summary_agent_last_title = Last Received Availability Report
+view_inventory_summary_agent_status_title = Agent Communications Status
+view_inventory_summary_agent_title = Agent Managing this Resource
+view_inventory_dynagroupDefs = 動的グループ定義
+view_metric_traits = Traits
+view_metric_viewTraitHistory = Value History for Trait [{0}]
+view_inventory_eventHistory_groupEventHistory = Group Event History
+view_inventory_eventHistory_resourceEventHistory = Resource Event History
+view_inventory_eventHistory_sourceFilter = Source Filter
+view_inventory_eventHistory_detailsFilter = Details Filter
+view_inventory_eventHistory_severityFilter = Severity Filter
+view_inventory_eventHistory_timestamp = Timestamp
+view_inventory_eventHistory_severity = Severity
+view_inventory_eventHistory_details = Details
+view_inventory_eventHistory_sourceLocation = Source Location
+view_inventory_eventHistory_deleteSuccessful = You have successfully deleted [{0}] events for [{1}]
+view_inventory_eventHistory_deleteFailed = Failed to deleted selected events for [{0}]
+view_inventory_eventHistory_purgeSuccessful = You have successfully purged [{0}] events for [{1}]
+view_inventory_eventHistory_purgeFailed = Failed to purge events for [{0}]
+view_inventory_eventDetails_loadFailed = An error occurred loading the event details
+view_inventory_groups_resourceGroups = Resource Groups
+view_inventory_groups_children = Children
+view_inventory_groups_descendants = Descendants
+view_inventory_groups_deleteSuccessful = You have successfully deleted the selected resource groups
+view_inventory_groups_deleteFailed = Failed to delete the selected resource groups
+view_inventory_groups_loadFailed = Failed to load group composite data
+view_inventory_resource_loadFailed = Resource with id [{0}] does not exist or is not accessible
+view_inventory_resources_deleteConfirm = Are you sure you want to delete the selected resources?
+view_inventory_resources_deleteSuccessful = You have successfully deleted the selected resources
+view_inventory_resources_deleteFailed = Failed to delete the selected resources
+view_inventory_resources_uninventoryConfirm = Are you sure you want to uninventory the selected resources? Note that if a selected resource still exists, then it will get rediscovered during its agent''s next discovery scan.
+view_inventory_resources_uninventorySuccessful = You have successfully uninventoried the selected resources
+view_inventory_resources_uninventoryFailed = Failed to uninventory the selected resources
+view_inventory_resources_loadFailed = Failed to load resource composite data
+view_inventory_resources_title = リソース
+view_inventory_resources_title_children = 子リソース
+view_inventory_resources_title_members = メンバーリソース
+view_resource_inventory_activity_changed_by=Changed by
+view_resource_inventory_activity_criteria_no_recent_events=表示クライテリアに基づくイベントはありません
+view_resource_inventory_activity_no_recent_alerts=No recent alerts
+view_resource_inventory_activity_no_recent_bundle_deploy=No recent bundle deployments
+view_resource_inventory_activity_no_recent_config_history=No configuration change history
+view_resource_inventory_activity_no_recent_events =No events in the last 24 hours
+view_resource_inventory_activity_no_recent_metrics=This resource has no recent metrics
+view_resource_inventory_activity_no_recent_oob=OOBの条件はみつかりません
+view_resource_inventory_activity_no_recent_operations=No recent operation history
+view_resource_inventory_activity_no_recent_pkg_history=No recent package history
+view_resource_inventory_childhistory_createdChild = Created Child
+view_resource_inventory_childhistory_deletedChild = Deleted Child
+view_resource_inventory_childhistory_status_invalidArtifact = Invalid Artifact
+view_resource_inventory_childhistory_status_invalidConfig = Invalid Configuration
+view_resource_inventory_childhistory_filterTitle = Past N Days
+view_resource_monitor_availability_loadFailed = Failed to load availability history
+view_resource_monitor_graphs_noneAvailable = No graphs available
+view_resource_monitor_graphs_loadFailed = Failed to load graph data
+view_resource_monitor_graphs_lookupFailed = Failed to find resource for graph
+view_resource_monitor_graph_instructions = Point your mouse to a data point on the chart
+view_resource_monitor_graph_live_tooltip = Click for a live graph of current values
+view_resource_monitor_table_min = Minimum
+view_resource_monitor_table_max = Maximum
+view_resource_monitor_table_avg = Average
+view_resource_monitor_table_last = Last
+view_resource_monitor_table_alerts = アラート
+view_resource_monitor_detailed_graph_label = Detailed Graph
+view_resource_monitor_calltime_title = Call Time Data
+view_resource_monitor_calltime_destination = Call Destination
+view_resource_monitor_calltime_count = Count
+view_resource_monitor_calltime_minimum = Minimum
+view_resource_monitor_calltime_average = Average
+view_resource_monitor_calltime_maximum = Maximum
+view_resource_monitor_calltime_total = Total
+view_resource_monitor_calltime_loadFailed = Could not load call time data
+view_resource_monitor_calltime_lookupFailed = Could not load resource for call time
+view_resource_monitor_calltime_editFailed = Call time data can not be edited
+view_resource_monitor_schedules_title = Resource Metric Collection Schedules
+view_resource_title_tagUpdateFailed = Failed to update resource tags
+view_resource_title_component_errors_tooltip = Shows managed component errors. Click for details
+view_tree_common_loadFailed_generic = Failed to load data for tree
+view_tree_common_loadFailed_root = Failed to load root for tree
+view_tree_common_loadFailed_descendants = Failed to load descendants for tree
+view_tree_common_loadFailed_children = Failed to load children for node
+view_tree_common_createFailed_autoCluster = Failed to create or update autocluster backing group
+view_tree_common_loadFailed_group = Failed to load group with id [{0}]
+view_tree_common_loadFailed_groupTree = Failed to load group tree
+view_tree_common_loadFailed_selection = Failed to select this node
+view_tree_common_loadFailed_node = Failed to load data for this node
+view_tree_common_loadFailed_create = Failed to create view for this node
+view_tree_common_loadFailed_update = Failed to update view for this node
+view_tree_common_contextMenu_loadFail_children = Failed to load platform manual add children
+view_tree_common_contextMenu_loadFail_dashboards = Failed to load user dashboards
+view_tree_common_contextMenu_loadFail_group = Failed to load group for context menu
+view_tree_common_contextMenu_type_name_label = Type: {0}
+view_tree_common_contextMenu_resourceConfiguration = Resource Configuration
+view_tree_common_contextMenu_editPluginConfiguration = Edit [{0}] Plugin Configuration
+view_tree_common_contextMenu_editResourceConfiguration = Edit [{0}] Resource Configuration
+view_tree_common_contextMenu_operations = Operations
+view_tree_common_contextMenu_operations_loadFailed = Failure to start wizard for running operations
+view_tree_common_contextMenu_measurements = Measurements
+view_tree_common_contextMenu_addChartToDashboard = Add chart to dashboard [{0}]
+view_tree_common_contextMenu_resourceGraph = Resource Metric Graph
+view_tree_common_contextMenu_groupGraph = Group Metric Graph
+view_tree_common_contextMenu_saveChartToDashboardSuccessful = You have saved dashboard [{0}]
+view_tree_common_contextMenu_saveChartToDashboardFailure = Failed to save the dashboard
+view_tree_common_contextMenu_loadFailed_dashboard = Failed to load user dashboards
+view_tree_common_contextMenu_loadFailed_manualAddChildren = Failed to load platform manual add children
+view_tree_group_error_updateAutoCluster = Failed to create or update autocluster backing group. key: [{0}]
+view_tabs_common_activity = アクティビティ
+view_tabs_common_agent = エージェント
+view_tabs_common_summary = サマリ
+view_tabs_common_overview = 概要
+view_tabs_common_dashboard = ダッシュボード
+view_tabs_common_timeline = タイムライン
+view_tabs_common_monitoring = モニタリング
+view_tabs_common_graphs = グラフ
+view_tabs_common_tables = テーブル
+view_tabs_common_traits = Traits
+view_tabs_common_availability = アベイラビリティ
+view_tabs_common_schedules = スケジュール
+view_tabs_common_calltime = 呼び出し時間e
+view_tabs_common_inventory = インベントリ
+view_tabs_common_groups = グループ
+view_tabs_common_members = メンバー
+view_tabs_common_group_members = グループメンバー
+view_tabs_common_group_membership = グループメンバーシップ
+view_tabs_common_child_resources = 子リソース
+view_tabs_common_child_history = 子の履歴
+view_tabs_common_connectionSettings = 接続設定
+view_tabs_common_connectionSettingsHistory = 接続設定の履歴
+view_tabs_common_operations = オペレーション
+view_tabs_common_schedule = スケジュール
+view_tabs_common_history = 履歴
+view_tabs_common_alerts = アラート
+view_tabs_common_definitions = 定義
+view_tabs_common_current = 現在
+view_tabs_common_events = イベント
+view_tabs_common_configuration = 構成
+view_tabs_common_content = コンテント
+view_tabs_common_deployed = デプロイ済み
+view_tabs_common_new = 新規
+view_tabs_common_subscriptions = サブスクリプション
+view_titleBar_common_updateTagsSuccessful = The tags for [{0}] have been updated
+view_titleBar_common_updateTagsFailure = Failed to update the tags for [{0}]
+view_titleBar_common_loadTagsFailure = Failed to load the tags for [{0}]
+view_titleBar_common_clickToRemoveFav = Click to remove this as a favorite
+view_titleBar_common_clickToAddFav = Click to add this as a favorite
+view_titleBar_common_removedFav = You have removed [{0}] as one of your favorites
+view_titleBar_common_addedFav = You have added [{0}] as a favorite
+view_titleBar_common_removedFavFailure = Failed to remove [{0}] as one of your favorites
+view_titleBar_common_addedFavFailure = Failed to add [{0}] as a favorite
+view_titleBar_group_failInfo = Failed to get general info on group [{0}] with ID [{1}]
+view_titleBar_group_summary_collapsedTooltip = Click to show more details for this group
+view_titleBar_group_summary_expandedTooltip = Click to hide details for this group
+view_dynagroup_expressionSet = Expression Set
+view_dynagroup_recalculationInterval = Recalculation Interval (ms)
+view_dynagroup_lastCalculationTime = Last Calculation Time
+view_dynagroup_nextCalculationTime = Next Calculation Time
+view_dynagroup_definitionCreated = You have successfully created a group definition named [{0}]
+view_dynagroup_definitionLoadFailure = Failed to load group definitions
+view_dynagroup_definitionAlreadyExists = A group definition already exists with this name
+view_dynagroup_saveSuccessful = You have successfully saved the group definition named [{0}]
+view_dynagroup_saveFailure = Failed to save the group definition named [{0}]
+view_dynagroup_singleSaveFailure = An error occurred - there should have been one created, but instead there were [{0}] created
+view_dynagroup_saveAndRecalculate = Save & Recalculate
+view_dynagroup_recalculate = Recalculate
+view_dynagroup_recalcSuccessful = You have successfully recalculated this group definition
+view_dynagroup_recalcFailure = Failed to recalculated this group definition
+view_dynagroup_recalcSuccessfulSelection = You have successfully recalculated [{0}] group definitions
+view_dynagroup_recalcFailureSelection = Failed to recalculated the selected group definitions
+view_dynagroup_deleteSuccessfulSelection = You have successfully deleted [{0}] group definitions
+view_dynagroup_deleteFailureSelection = Failed to delete the selected group definitions
+view_dynagroup_children = DynaGroup Children
+view_dynagroup_newGroupDefinition = New Group Definition
+view_dynagroup_editing = Editing [{0}]
+view_dynagroup_expression = Expression
+view_dynagroup_recursive = Recursive
+view_dynagroup_loadDefinitionFailure = Failed to load group definition [{0}]
+view_dynagroup_loadDefinitionMissing = There is no group definition with the ID of [{0}]
+view_dynagroup_permDenied = You do not have permission to view group definitions
+view_dynagroup_definitions = DynaGroup Definitions
+view_dynagroup_template_customExpression = Custom Expression...
+view_dynagroup_template_jbossas4_clusters = JBossAS 4 - Clusters
+view_dynagroup_template_jbossas5_clusters = JBossAS 5/6 - Clusters
+view_dynagroup_template_jbossas4_earClusters = JBossAS 4 - Clustered EARs
+view_dynagroup_template_jbossas4_uniqueVersions = JBossAS 4 - Unique versions
+view_dynagroup_template_platforms = Platform resources in inventory
+view_dynagroup_template_uniqueResourceTypes = Unique resource types in inventory
+view_dynagroup_template_jbossas4_hostingApp = JBossAS 4 - All hosting any version of "my" app
+view_dynagroup_template_jbossas4_nonsecured = JBossAS 4 - All non-secured
+view_dynagroup_template_downedResources = All resources currently down
+view_dynagroup_mixed = Mixed
+view_dynagroup_compatible = Compatible
+view_dynagroup_expressionBuilderIconTooltip = Expression Builder...
+view_dynagroup_exprBuilder_title = Expression Builder
+view_dynagroup_exprBuilder_expression = Expression
+view_dynagroup_exprBuilder_expression_tooltip = This is the full expression that is represented by the selections in the form below. This text will be added to your group definition expression text when you click the "Add Expression" button.
+view_dynagroup_exprBuilder_addExpression = Add Expression
+view_dynagroup_exprBuilder_value_tooltip = The string value for the expression to query
+view_dynagroup_exprBuilder_comparisonType = Comparison Type
+view_dynagroup_exprBuilder_comparisonType_tooltip = Comparison Type
+view_dynagroup_exprBuilder_unset = Unset
+view_dynagroup_exprBuilder_unset_tooltip = Unset will find all of the values that have a null value in the database. This is not possible using the "=" operator because of how databases store and query data.
+view_dynagroup_exprBuilder_propertyName = Property Name
+view_dynagroup_exprBuilder_propertyName_tooltip = The name of the property to query. This is defined by the expression type as well as the resource type.
+view_dynagroup_exprBuilder_resourceType = Resource Type
+view_dynagroup_exprBuilder_resourceType_tooltip = The type of resource
+view_dynagroup_exprBuilder_definingPlugin = Defining Plugin
+view_dynagroup_exprBuilder_definingPlugin_tooltip = The plugin to search
+view_dynagroup_exprBuilder_expressionType = Expression Type
+view_dynagroup_exprBuilder_expressionType_tooltip = The type of property this expression switches on:<br/> \
+<b>Resource</b>: A resource property such as its name or version<br/> \
+<b>Resource Type</b>: Search for resources of a specific type<br/> \
+<b>Resource Category</b>: Search for resources by category: platform, server, service<br/> \
+<b>Trait</b>: Resources that have selected values for a monitored trait<br/> \
+<b>Plugin Configuration</b>: Search by the plugin component configuration setting of the component<br/> \
+<b>Resource Configuration</b>: Search by the configuration setting of the managed resource
+view_dynagroup_exprBuilder_resource = Resource
+view_dynagroup_exprBuilder_resource_tooltip = Choose the level of the resource you wish to select. For example, select "parent" will find resources whose parent resource matches the rest of the expression.
+view_dynagroup_exprBuilder_groupBy = Group by
+view_dynagroup_exprBuilder_groupBy_tooltip = GroupBy will cause the system to pivot on the values from the entered expressions creating a separate group for each value. For example, GroupBy on the cluster name to create a group for each cluster with all cluster members in it.
+view_dynagroup_exprBuilder_resource_resource = Resource
+view_dynagroup_exprBuilder_resource_child = Child
+view_dynagroup_exprBuilder_resource_parent = Parent
+view_dynagroup_exprBuilder_resource_grandparent = Grandparent
+view_dynagroup_exprBuilder_resource_greatGrandparent = GreatGrandparent
+view_dynagroup_exprBuilder_resource_greatGreatGrandparent = GreatGreatGrandparent
+view_dynagroup_exprBuilder_comparisonType_equals = equals
+view_dynagroup_exprBuilder_comparisonType_startsWith = starts with
+view_dynagroup_exprBuilder_comparisonType_endsWith = ends with
+view_dynagroup_exprBuilder_comparisonType_contains = contains
+view_dynagroup_exprBuilder_expressionType_resource = Resource
+view_dynagroup_exprBuilder_expressionType_resourceType = Resource Type
+view_dynagroup_exprBuilder_expressionType_resourceCategory = Resource Category
+view_dynagroup_exprBuilder_expressionType_trait = Trait
+view_dynagroup_exprBuilder_expressionType_pluginConfig = Plugin Configuration
+view_dynagroup_exprBuilder_expressionType_resourceConfig = Resource Configuration
+view_dynagroup_exprBuilder_pluginLoadFailure = Cannot get the list of plugins
+view_dynagroup_exprBuilder_resTypeLoadFailure = Cannot get list of resource types for plugin [{0}]
+view_dynagroup_exprBuilder_propLoadFailure = Cannot get list of properties
+view_dynagroup_exprBuilder_noResourceTypes = --No resource types--
+view_dynagroup_exprBuilder_noProperties = --No properties--
+view_dynagroup_exprBuilder_noPlugins = --No plugins--
+
+view_group_detail_failLoad = Failed to load group for group with ID [{0}]
+view_group_detail_failLoadComp = Failed to load group composite for group with ID [{0}]
+view_group_detail_recursiveChange = You successfully changed the recursive setting for group [{0}]
+view_group_detail_failRecursiveChange = Failed to update the recursive setting for group [{0}]
+view_group_inventory_activity_no_recent_metrics=This group has no recent metrics
+view_group_membership_failFetch = Failed to fetch Resource Group
+view_group_membership_saveFailure = Failed to update membership of group [{0}]
+view_group_membership_saveSuccessful = You have updated the membership of group [{0}]
+view_group_resConfig_edit_saveTooltip = Update the configurations of all group members
+view_group_resConfig_edit_loadFail = Failed to retrieve member Resource configurations for [{0}]
+view_group_resConfig_edit_noperm = You do not have permission to edit this group configuration
+view_group_resConfig_edit_saveInitiated_concise = The group configuration updates have been initiated
+view_group_resConfig_edit_saveInitiated_full = The group configuration updates have been initiated for the [{0}] compatible group named [{1}]
+view_group_resConfig_edit_saveFailure = Failed to initiate group configuration update for [{0}] compatible group named [{1}]
+view_group_resConfig_edit_valid = All configuration properties have valid values, so the configuration can now be saved
+view_group_resConfig_edit_invalid = The following configuration properties have invalid values and must be corrected before the configuration can be saved: [{0}]
+
+view_group_resConfig_view_noperm = You do not have permissions to see the resource configuration settings
+view_group_resConfig_view_groupProperties = Group Properties
+view_group_resConfig_table_title = Group Resource Configuration History
+view_group_resConfig_table_statusDetails = Status Details
+view_group_resConfig_table_viewSettings = View Settings
+view_group_resConfig_table_viewMemberHistory = View Member History
+view_group_resConfig_table_msg1 = View Member History for status of each individual resource
+view_group_resConfig_table_failFetch = Failed to get group resource config history
+view_group_resConfig_table_deleteSuccessful = You have deleted [{0}] history items
+view_group_resConfig_table_deleteFailure = Failed to delete group resource config history
+view_group_resConfig_table_statusSuccess = This group configuration update was successful
+view_group_resConfig_table_statusInprogress = This group configuration update is still in progress
+view_group_resConfig_table_statusNochange = No changes were made to this group configuration
+view_group_resConfig_table_statusFailure = This group configuration update failed
+view_group_resConfig_table_clickStatusIcon = Click the status icon for full details
+view_group_resConfig_members_title = Group Resource Configuration Member Histories
+view_group_resConfig_members_fetchFailure = Failed to get resource config update history for members of group [{0}]
+view_group_resConfig_members_fetchFailureConfig = Failed to retrieve member resource configuration settings for [{0}]
+view_group_resConfig_members_fetchFailureConfigInProgress = A group resource configuration update is currently in progress. You must wait until the update is finished before you can view the group settings.
+view_group_resConfig_members_statusDetails = Status Details
+view_group_resConfig_members_statusSuccess = This configuration update was successful
+view_group_resConfig_members_statusInprogress = This configuration update is still in progress
+view_group_resConfig_members_statusNochange = No changes were made to this configuration
+view_group_resConfig_members_statusFailure = This configuration update failed for an unknown reason
+
+view_group_pluginConfig_view_noperm = You do not have permissions to see the connection settings
+view_group_pluginConfig_view_groupProperties = Group Properties
+view_group_pluginConfig_table_failFetch = Failed to get group plugin config history
+view_group_pluginConfig_table_title = Group Connection Settings History
+view_group_pluginConfig_table_statusDetails = Status Details
+view_group_pluginConfig_table_viewSettings = View Settings
+view_group_pluginConfig_table_viewMemberHistory = View Member History
+view_group_pluginConfig_table_deleteSuccessful = You have deleted [{0}] history items
+view_group_pluginConfig_table_deleteFailure = Failed to delete group plugin config history
+view_group_pluginConfig_table_msg1 = View Member History for status of each individual resource
+view_group_pluginConfig_table_statusSuccess = This group configuration update was successful
+view_group_pluginConfig_table_statusInprogress = This group configuration update is still in progress
+view_group_pluginConfig_table_statusNochange = No changes were made to this group configuration
+view_group_pluginConfig_table_statusFailure = This group configuration update failed
+view_group_pluginConfig_table_clickStatusIcon = Click the status icon for full details
+view_group_pluginConfig_members_title = Group Connection Settings Member Histories
+view_group_pluginConfig_members_statusDetails = Status Details
+view_group_pluginConfig_members_statusSuccess = This configuration update was successful
+view_group_pluginConfig_members_statusInprogress = This configuration update is still in progress
+view_group_pluginConfig_members_statusNochange = No changes were made to this configuration
+view_group_pluginConfig_members_statusFailure = This configuration update failed for an unknown reason
+view_group_pluginConfig_members_fetchFailure = Failed to get plugin config update history for members of group [{0}]
+view_group_pluginConfig_members_fetchFailureConn = Failed to retrieve member connection settings for [{0}]
+view_group_pluginConfig_members_fetchFailureConnInProgress = A group plugin configuration update is currently in progress. You must wait until the update is finished before you can view the group settings.
+view_group_pluginConfig_edit_currentGroupProperties = Current Group Properties
+view_group_pluginConfig_edit_saveTooltip = Update the connection settings of all group members
+view_group_pluginConfig_edit_noperm = You do not have permission to edit this group connection settings
+view_group_pluginConfig_edit_saveInitiated_concise = The group connection setting updates have been initiated
+view_group_pluginConfig_edit_saveInitiated_full = The group connection setting updates have been initiated for the [{0}] compatible group named [{1}]
+view_group_pluginConfig_edit_saveFailure = Failed to initiate group connection setting update for [{0}] compatible group named [{1}]
+view_group_pluginConfig_edit_valid = All connection setting properties have valid values, so the connection settings can now be saved
+view_group_pluginConfig_edit_invalid = The following connection setting properties have invalid values and must be corrected before the connection settings can be saved: [{0}]
+view_group_meas_schedules_title = Group Metric Collection Schedules
+view_group_summary_nameUpdateFailure = Failed to change the name of the resource group with ID [{0}] - could not change from [{1}] to [{2}]
+view_group_summary_nameUpdateSuccessful = You have changed the name of the resource group with ID [{0}] from [{1}] to [{2}]
+view_group_summary_memberType = Member Type
+view_group_summary_memberCount = Member Count
+view_group_summary_dynamic = Dynamic
+view_group_summary_recursive = Recursive
+view_group_summary_groupDefinition = Group Definition
+view_group_summary_mixed = Mixed
+view_group_summary_compatible = Compatible
+view_group_summary_descUpdateFailure = Failed to change the description of the resource group with ID [{0}]
+view_group_summary_descUpdateSuccessful = You have changed the description of this resource group
+view_group_summary_dynamicNote = Dynamic group names and descriptions are managed, and therefore are not editable
+
+# Connection Settings Details
+#------------------------------------------
+view_connectionSettingsDetails_noPermission = You do not have permission to edit this Resource''s connection settings.
+view_connectionSettingsDetails_error_updateFailure = Failed to update connection settings.
+view_connectionSettingsDetails_messageConcise_updateSuccess = Connection settings updated.
+view_connectionSettingsDetails_messageDetailed_updateSuccess = Connection settings updated for Resource [{0}].
+view_connectionSettingsDetails_allPropertiesValid = All connection settings have valid values, so the settings can now be saved.
+view_connectionSettingsDetails_somePropertiesInvalid = The following connection settings have invalid values: {0}. The values must be corrected before the settings can be saved.
+
+# Resource Resource Groups
+#-----------------------------------------
+view_resourceResourceGroupList_error_fetchFailure = Failed to fetch Resource''s groups.
+view_resourceResourceGroupList_error_updateFailure = Failed to update assigned Resource groups.
+view_resourceResourceGroupList_message_updateSuccess = Group membership updated for [{0}].
+
+# Configuration Details
+#-------------------------------
+view_configurationDetails_noPermission = You do not have permission to edit this Resource''s configuration.
+view_configurationDetails_error_updateFailure = Failed to update configuration.
+view_configurationDetails_messageConcise = Configuration updated - current version is {0}.
+view_configurationDetails_messageDetailed = Configuration updated to version {0} for Resource [{1}].
+view_configurationDetails_allPropertiesValid = All configuration properties have valid values, so the configuration can now be saved.
+view_configurationDetails_somePropertiesInvalid = The following configuration properties have invalid values: {0}. The values must be corrected before the configuration can be saved.
+view_configurationDetails_configNotUpdatedDueToNoChange = Configuration was not updated, since the new configuration is equivalent to the current configuration.
+
+# Resource Configuration History List
+#-------------------------------
+view_configurationHistoryList_title = 構成履歴
+
+# Abstract Configuration History List
+#-------------------------------
+view_configurationHistoryList_rollback = Rollback
+view_configurationHistoryList_rollback_success = You successfully rolled back the configuration to the selected past configuration.
+view_configurationHistoryList_rollback_failure = Failed to rollback the configuration. The original configuration is still in effect.
+view_configurationHistoryList_delete_success = You successfully deleted the selected configuration history items.
+view_configurationHistoryList_delete_failure = Failed to delete the configuration history items.
+view_configurationHistoryList_cannotDeleteGroupItems = One or more selected configuration history items are part of a group configuration update. \
+You must purge that parent group history item before you can delete its individual resource history items.
+view_configurationHistoryList_cannotDeleteCurrent = One of the selected history items represents the current configuration - you cannot delete it.
+view_configurationHistoryList_table_statusSuccess = This configuration update was successful
+view_configurationHistoryList_table_statusInprogress = This configuration update is still in progress
+view_configurationHistoryList_table_statusNochange = No changes were made to this configuration
+view_configurationHistoryList_table_statusFailure = This configuration update failed
+view_configurationHistoryList_table_clickStatusIcon = Click the status icon for full details
+
+# Configuration History Details
+#------------------------------------------
+view_configurationHistoryDetails_error_loadFailure = Unable to load configuration history.
+
+
+# Operation Schedule List
+#------------------------
+xxx =
+
+# Operation Schedule Details
+#---------------------------
+view_operationScheduleDetails_operationSchedule = オペレーションスケジュール
+view_operationScheduleDetails_field_description = 説明
+view_operationScheduleDetails_field_parameters = パラメータ
+view_operationScheduleDetails_field_timeout = タイムアウト
+view_operationScheduleDetails_fieldHelp_timeout = a time duration - if specified, if the duration elapses before a scheduled operation execution has completed, the RHQ Server will timeout the operation and consider it to have failed; note, it is usually not possible to abort the underlying managed resource operation if it was already initiated
+view_operationScheduleDetails_fieldHelp_description = an optional description of this scheduled operation (e.g. nightly maintenance app server restart)
+view_operationScheduleDetails_fieldDefault_description = Select an operation to see its description.
+view_operationScheduleDetails_fieldDefault_parameters = Select an operation to see its parameters.
+view_operationScheduleDetails_noParameters = This operation does not take any parameters.
+view_operationScheduleDetails_enterParametersBelow = Enter parameters below...
+
+view_group_operationScheduleDetails_failedToLoadMembers = Failed to load group member Resources.
+view_group_operationScheduleDetails_field_execute = Execute
+view_group_operationScheduleDetails_value_parallel = in parallel
+view_group_operationScheduleDetails_value_sequential = in the order specified below (drag and drop member Resources to change order)
+view_group_operationScheduleDetails_field_haltOnFailure = Halt on Failure?
+view_group_operationScheduleDetails_memberResource = Member Resource
+
+
+# Operation History List
+#-----------------------
+view_operationHistoryList_title = オペレーション履歴
+view_operationHistoryList_button_runOperation = Run Operation
+view_operationHistoryList_button_forceDelete = Force Delete
+view_operationHistoryList_notYetStarted = not yet started
+
+# Operation History Details
+#--------------------------
+view_operationHistoryDetails_error_fetchFailure = Failure loading operation history.
+view_operationHistoryDetails_operation = オペレーション
+view_operationHistoryDetails_dateSubmitted = 発行日
+view_operationHistoryDetails_dateCompleted = 完了日
+view_operationHistoryDetails_requestor = 要求者
+view_operationHistoryDetails_status = ステータス
+view_operationHistoryDetails_parameters = パラメータ
+view_operationHistoryDetails_results = 結果
+view_operationHistoryDetails_noResults = This operation does not return any results.
+
+
+# Summary Overview
+#-----------------------------
+view_summaryOverview_header_detectedErrors = 検出済みエラー
+view_summaryOverview_tooltip_detectedErrors = Click on the rows to see the error details.
+view_summaryOverview_title_errorDetailsWindow = エラー詳細
+
+# Summary Overview Form
+#-------------------------------------
+view_summaryOverviewForm_field_type = タイプ
+view_summaryOverviewForm_field_name = 名前
+view_summaryOverviewForm_field_description = 説明
+view_summaryOverviewForm_field_location = 場所
+view_summaryOverviewForm_field_version = バージョン
+view_summaryOverviewForm_error_traitsLoadFailure = Failed to load traits for {0}.
+view_summaryOverviewForm_label_plugin = プラグイン:
+view_summaryOverviewForm_label_type = タイプ:
+view_summaryOverviewForm_header_summary = サマリ
+view_summaryOverviewForm_error_nameChangeFailure = Failed to change name of Resource with id {0} from [{1}] to [{2}].
+view_summaryOverviewForm_message_nameChangeSuccess = Name of Resource with id {0} was changed from [{1}] to [{2}].
+view_summaryOverviewForm_error_descriptionChangeFailure = Failed to change description of Resource with id {0} from [{1}] to [{2}].
+view_summaryOverviewForm_message_descriptionChangeSuccess = Description of Resource with id {0} was changed from [{1}] to [{2}].
+view_summaryOverviewForm_error_locationChangeFailure = Failed to change location of Resource with id {0} from [{1}] to [{2}].
+view_summaryOverviewForm_message_locationChangeSuccess = Location of Resource with id {0} was changed from [{1}] to [{2}].
+
+# Summary Dashboard
+#-----------------------------
+view_summaryDashboard_resetConfirm = Reset to default summary dashboard (lose local changes)?
+
+# Group Inventory>Members subtab
+#-----------------------------------------
+view_groupInventoryMembers_button_updateMembership = Update Membership...
+view_groupInventoryMembers_title_updateMembership = Update Membership
+
+
+#==================== Reports ======================
+
+view_reportsTop_title = レポート
+view_reportsTop_description = このセクションはグローバルレポートへのアクセスを提供します。
+view_reports_platforms = プラットフォーム利用率
+view_reports_subsystems = サブシステム
+view_reports_alertDefinitions = アラート定義
+
+view_measurementOob_title = 疑わしいメトリックス
+
+view_tagCloud_title = Tag Cloud
+view_tagCloud_error_fetchFailure = Failed to load tags.
+view_tagCloud_error_tagUsedCount = Tag used {0} times.
+view_tagCloud_deleteTag = Delete Tag
+view_tagCloud_deleteTagFailure = Failed to delete the tag [{0}]
+view_tagCloud_deleteTagSuccess = You successfully deleted the tag [{0}]
+
+view_reports_inventorySummary_failFetch = Failed to get inventory summary
+
+view_taggedResources_title = リソース
+
+view_reports_alertDefinitions_parentHover = Click to go to the parent alert definition
+view_reports_alertDefinitions_resTypeLoadError = Cannot get the template resource type - unable to view the alert template.
+
+#==================== Help ======================
+
+view_helpTop_description = このセクションはドキュメンテーション、チュートリアル、バージョン、その他のヘルプ情報を提供します。
+view_help_section_product = プロダクト
+view_help_section_product_about = RHQについて
+
+
+#===================== Test =======================
+view_testTop_title = テスト
+view_testTop_description = This section contains pages for testing various GUI components.
+
+#=================== Top Level =====================
+
+# About Box
+#----------
+view_aboutBox_allRightsReserved = All Rights Reserved.
+view_aboutBox_buildNumber = ビルド番号:
+view_aboutBox_failedToLoad = Failed to load product information.
+view_aboutBox_homepage = ホームページ
+view_aboutBox_jbossByRedHat = JBoss by Red Hat
+view_aboutBox_title = {0}について
+view_aboutBox_version = バージョン:
+
+# CoreGUI
+#--------------
+view_core_error_1 = New Alerts lookup failed
+#view_core_loggedInAs = Logged in as {0}
+view_core_loggedOut = Logged out
+view_core_recentAlerts = There are [{0}] recent alerts - click to go to the recent alerts report
+view_core_noRecentAlerts = There are no recent alerts to report
+view_core_uncaught = グローバルにキャッチされない例外
+
+# Login
+#--------------
+view_login_invalidEmail = Invalid e-mail address
+view_login_login = ログイン
+view_login_logout = ログアウト
+view_login_noBackend = The backend datasource is unavailable.
+view_login_noLdap = Note: Optional retrieval of ldap details unsuccessful. Manual entry is required.
+view_login_noUser = The username or password provided does not match our records.
+view_login_prompt = ログインしてください
+view_login_registerLater = (Cancel - Complete registration later.)
+view_login_registerLdapSuccess = Successfully registered the new LDAP User.
+view_login_registerUser = Register User
+view_login_welcome = ようこそ
+view_login_welcomeMsg = Welcome to RHQ! <br/><br/> Enter/update the following fields to complete your registration process.<br/> Once you click "OK", you will be logged in.<br/><br/>
+
+# Menu Bar
+#--------------
+view_menuBar_logout = ログアウト
+
+# Search Bar, GUI
+#-----------------
+view_searchBar_resources = リソース
+view_searchBar_resourceGroups = リソースグループ
+# TODO: i18n pluralization
+view_searchBar_welcomeMessage = search for {0}s
+view_searchBar_defaultPattern = name your pattern
+view_searchBar_error_selectSavedSearch = ''Error selecting saved search''
+view_searchBar_query = Query
+
+view_searchGUI_loginStatus = Unable to determine login status, check server status
+
+# Message Center
+#--------------------------
+view_messageCenter_messageTitle = メッセージセンター
+view_messageCenter_noRecentMessages = No Recent Messages
+view_messageCenter_maxMessages = Max Messages
+view_messageCenter_lastNMessages = Last {0} Messages
+view_messageCenter_clearAllMessages = Clear All Messages
+view_messageCenter_messageTime = Time
+view_messageCenter_messageSeverity = Severity
+view_messageCenter_messageDetail = Detail
+view_messageCenter_stackTraceFollows = --- STACK TRACE FOLLOWS ---
+view_messageCenter_messageBarShowDetails = Show Details
13 years
[rhq] 3 commits - modules/core
by Heiko W. Rupp
modules/core/dbutils/pom.xml | 2 -
modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml | 19 +++++-----
2 files changed, 12 insertions(+), 9 deletions(-)
New commits:
commit 9d08c53f0b3d85e00ff76459ac41092b44120147
Merge: 341a653 33a45f8
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Fri May 6 11:26:16 2011 +0200
Merge branch 'master' of ssh://git.fedorahosted.org/git/rhq/rhq
commit 341a6533382ceee1bd134bbe346fc593ea75d90d
Merge: ae4f1ec f8d1ed1
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Wed May 4 15:25:09 2011 +0200
Merge branch 'master' of ssh://git.fedorahosted.org/git/rhq/rhq
commit ae4f1ec7485c7a15de42a9a5554069867e7a1a7d
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Mon May 2 15:49:08 2011 +0200
BZ 667218 - create operation schedule sequence on upgrade
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index 50ad317..64af8e7 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -22,7 +22,7 @@
<properties>
<scm.module.path>modules/core/dbutils/</scm.module.path>
- <db.schema.version>2.106</db.schema.version>
+ <db.schema.version>2.107</db.schema.version>
</properties>
<dependencies>
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 57f82f0..b7f801f 100644
--- a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
+++ b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
@@ -3204,7 +3204,7 @@
<!-- give the 'SUPER USER' and 'ALL RESOURCES' roles permission to delete/purge events (this permission
previously did not exist, and event deletion/purging could be performed by any user with authz to
view the resource/group in question).
-
+
a user with MANAGE_SECURITY must explicitly grant this permission to other roles after upgrade-->
<schema-directSQL>
<statement desc="Inserting MANAGE_EVENTS permission for 'Super User' role">
@@ -3235,7 +3235,7 @@
</statement>
</schema-directSQL>
</schemaSpec>
-
+
<schemaSpec version="2.97">
<!-- Support subject-owned groups (e.g. autogroups) -->
<schema-addColumn table="RHQ_RESOURCE_GROUP" column="SUBJECT_ID" columnType="INTEGER" />
@@ -3328,7 +3328,7 @@
REFERENCES RHQ_RESOURCE_GROUP (ID)
</statement>
</schema-directSQL>
-
+
<!-- Add category for distinguishing what kind of dashboard this is -->
<schema-addColumn table="RHQ_DASHBOARD" column="CATEGORY" columnType="VARCHAR2" precision="20"/>
<schema-directSQL>
@@ -3337,12 +3337,12 @@
SET CATEGORY = 'INVENTORY'
</statement>
</schema-directSQL>
- <schema-alterColumn table="RHQ_DASHBOARD" column="CATEGORY" nullable="FALSE" />
+ <schema-alterColumn table="RHQ_DASHBOARD" column="CATEGORY" nullable="FALSE" />
</schemaSpec>
<schemaSpec version="2.104">
<!-- package types no longer require to be coupled with a resource type. They can exist on their own. -->
- <schema-alterColumn table="RHQ_PACKAGE_TYPE" column="RESOURCE_TYPE_ID" nullable="true"/>
+ <schema-alterColumn table="RHQ_PACKAGE_TYPE" column="RESOURCE_TYPE_ID" nullable="true"/>
</schemaSpec>
<schemaSpec version="2.105">
@@ -3367,12 +3367,12 @@
REFERENCES RHQ_SUBJECT (ID)
</statement>
</schema-directSQL>
-
+
<!-- Now add modify the permissions to give all the roles with MANAGE_INVENTORY
the new MANAGE_REPOSITORIES privilege so that people's privs remain unchanged. -->
<schema-directSQL>
<statement>
- INSERT INTO RHQ_PERMISSION (role_id, operation)
+ INSERT INTO RHQ_PERMISSION (role_id, operation)
SELECT role_id, 15 FROM RHQ_PERMISSION WHERE operation = 1
</statement>
</schema-directSQL>
@@ -3381,9 +3381,12 @@
<schemaSpec version="2.106">
<!-- add pre-computed disambiguated name for Resource -->
<schema-addColumn table="RHQ_RESOURCE" column="ANCESTRY" columnType="VARCHAR2" precision="4000" />
- <schema-javaTask className="ResourceAncestryUpgradeTask" />
+ <schema-javaTask className="ResourceAncestryUpgradeTask" />
</schemaSpec>
+ <schemaSpec version="2.107">
+ <schema-createSequence name="RHQ_OPERATION_SCHEDULE_ID_SEQ" initial="10001"/>
+ </schemaSpec>
</dbupgrade>
</target>
</project>
13 years
[rhq] modules/enterprise
by Jay Shaughnessy
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/bundle/BundleManagerBeanTest.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 33a45f8580b5d6634394229435104cb44cc806c4
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Thu May 5 17:23:59 2011 -0400
Fix test compile problem
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/bundle/BundleManagerBeanTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/bundle/BundleManagerBeanTest.java
index 6675c88..624a815 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/bundle/BundleManagerBeanTest.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/bundle/BundleManagerBeanTest.java
@@ -246,7 +246,8 @@ public class BundleManagerBeanTest extends UpdateSubsytemTestBase {
}
// remove ResourceTypes which cascade remove BundleTypes
- q = em.createQuery("SELECT rt FROM ResourceType rt WHERE rt.deleted = false and rt.name LIKE '" + TEST_PREFIX + "%'");
+ q = em.createQuery("SELECT rt FROM ResourceType rt WHERE rt.deleted = false and rt.name LIKE '"
+ + TEST_PREFIX + "%'");
doomed = q.getResultList();
for (Object removeMe : doomed) {
em.remove(em.getReference(ResourceType.class, ((ResourceType) removeMe).getId()));
@@ -788,7 +789,6 @@ public class BundleManagerBeanTest extends UpdateSubsytemTestBase {
BundleDeploymentCriteria bdc = new BundleDeploymentCriteria();
bdc.addFilterId(bd1d.getId());
bdc.fetchBundleVersion(true);
- bdc.fetchConfiguration(true);
bdc.fetchDestination(true);
bdc.fetchResourceDeployments(true);
bdc.fetchTags(true);
13 years
[rhq] Branch 'release-3.0.0' - modules/enterprise
by Jay Shaughnessy
modules/enterprise/server/safe-invoker/src/main/java/org/rhq/enterprise/server/safeinvoker/HibernateDetachUtility.java | 179 ++++++----
1 file changed, 111 insertions(+), 68 deletions(-)
New commits:
commit 179e648953450b86da32dca740ffde0d6203abd3
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Thu May 5 15:41:50 2011 -0400
Apply several fixes to HibernateDetachUtility
[BZ 702109]
[BZ 699542]
[BZ 688000]
The 702109 fix allows for a configurable max-depth, which can be used to
avoid serialization the issue in BZ 702390]
diff --git a/modules/enterprise/server/safe-invoker/src/main/java/org/rhq/enterprise/server/safeinvoker/HibernateDetachUtility.java b/modules/enterprise/server/safe-invoker/src/main/java/org/rhq/enterprise/server/safeinvoker/HibernateDetachUtility.java
index 803f9ce..de57afb 100644
--- a/modules/enterprise/server/safe-invoker/src/main/java/org/rhq/enterprise/server/safeinvoker/HibernateDetachUtility.java
+++ b/modules/enterprise/server/safe-invoker/src/main/java/org/rhq/enterprise/server/safeinvoker/HibernateDetachUtility.java
@@ -16,16 +16,7 @@
* 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.safeinvoker;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.hibernate.Hibernate;
-import org.hibernate.proxy.HibernateProxy;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlTransient;
+package org.rhq.enterprise.server.util;
import java.beans.BeanInfo;
import java.beans.Introspector;
@@ -33,9 +24,9 @@ import java.beans.PropertyDescriptor;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -43,9 +34,19 @@ import java.util.ListIterator;
import java.util.Map;
import java.util.Set;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlTransient;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.hibernate.Hibernate;
+import org.hibernate.proxy.HibernateProxy;
+
/**
* @author Greg Hinkle
*/
+@SuppressWarnings("unchecked")
public class HibernateDetachUtility {
private static final Log LOG = LogFactory.getLog(HibernateDetachUtility.class);
@@ -54,40 +55,79 @@ public class HibernateDetachUtility {
SERIALIZATION, JAXB
}
+ // be able to configure the deepest recursion this utility will be allowed to go (see BZ 702109 that precipitated this need)
+ private static final String DEPTH_ALLOWED_SYSPROP = "rhq.server.hibernate-detach-utility.depth-allowed";
+ private static final int depthAllowed;
+ static {
+ int value;
+ try {
+ String str = System.getProperty(DEPTH_ALLOWED_SYSPROP, "50");
+ value = Integer.parseInt(str);
+ } catch (Throwable t) {
+ value = 50;
+ }
+ depthAllowed = value;
+ }
+
public static void nullOutUninitializedFields(Object value, SerializationType serializationType) throws Exception {
long start = System.currentTimeMillis();
- Set<Integer> checkedObjs = new HashSet<Integer>();
- nullOutUninitializedFields(value, checkedObjs, 0, serializationType);
+ Map<Integer, Object> checkedObjects = new HashMap<Integer, Object>();
+ nullOutUninitializedFields(value, checkedObjects, 0, serializationType);
long duration = System.currentTimeMillis() - start;
if (duration > 1000) {
- LOG.info("Detached [" + checkedObjs.size() + "] objects in [" + duration + "]ms");
+ LOG.info("Detached [" + checkedObjects.size() + "] objects in [" + duration + "]ms");
} else {
- LOG.debug("Detached [" + checkedObjs.size() + "] objects in [" + duration + "]ms");
+ LOG.debug("Detached [" + checkedObjects.size() + "] objects in [" + duration + "]ms");
}
+ // help the garbage collector be clearing these before we leave
+ checkedObjects.clear();
}
- private static void nullOutUninitializedFields(Object value, Set<Integer> nulledObjects, int depth,
- SerializationType serializationType) throws Exception {
- if (depth > 50) {
- LOG.warn("Getting different object hierarchies back from calls: " + value.getClass().getName());
+ private static void nullOutUninitializedFields(Object value, Map<Integer, Object> checkedObjects, int depth,
+ SerializationType serializationType) throws Exception {
+ if (depth > depthAllowed) {
+ LOG.warn("Recursed too deep [" + depth + " > " + depthAllowed
+ + "], will not attempt to detach object of type ["
+ + ((value != null) ? value.getClass().getName() : "N/A")
+ + "]. This may cause serialization errors later. If so, "
+ + "you can try to work around this by setting the system property [" + DEPTH_ALLOWED_SYSPROP
+ + "] to a value higher than [" + depth + "].");
return;
}
- if ((value == null) || nulledObjects.contains(System.identityHashCode(value))) {
+ if (null == value) {
return;
}
- nulledObjects.add(System.identityHashCode(value));
+ // System.identityHashCode is a hash code, and therefore not guaranteed to be unique. And we've seen this
+ // be the case. So, we use it to try and avoid duplicating work, but handle the case when two objects may
+ // have an identity crisis.
+ Integer valueIdentity = System.identityHashCode(value);
+ Object checkedObject = checkedObjects.get(valueIdentity);
+
+ if (null == checkedObject) {
+ checkedObjects.put(valueIdentity, value);
+
+ } else if (value == checkedObject) {
+ return;
+
+ } else {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("UNEQUAL IDENTITY HASHCODE [" + valueIdentity + "]\n\tCurrent : "
+ + value.getClass().getName() + "\n\t" + value + "\n\tPrevious: "
+ + checkedObject.getClass().getName() + "\n\t" + checkedObject);
+ }
+ }
if (value instanceof Object[]) {
Object[] objArray = (Object[]) value;
for (int i = 0; i < objArray.length; i++) {
- nullOutUninitializedFields(objArray[i], nulledObjects, depth + 1, serializationType);
+ nullOutUninitializedFields(objArray[i], checkedObjects, depth + 1, serializationType);
}
} else if (value instanceof List) {
// Null out any entries in initialized collections
- ListIterator i = ((List)value).listIterator();
+ ListIterator i = ((List) value).listIterator();
while (i.hasNext()) {
Object val = i.next();
Object replace = replaceObject(val);
@@ -95,7 +135,7 @@ public class HibernateDetachUtility {
val = replace;
i.set(replace);
}
- nullOutUninitializedFields(val, nulledObjects, depth + 1, serializationType);
+ nullOutUninitializedFields(val, checkedObjects, depth + 1, serializationType);
}
} else if (value instanceof Collection) {
@@ -109,55 +149,55 @@ public class HibernateDetachUtility {
replacementItems.add(replacementItem);
item = replacementItem;
}
- nullOutUninitializedFields(item, nulledObjects, depth + 1, serializationType);
+ nullOutUninitializedFields(item, checkedObjects, depth + 1, serializationType);
}
collection.removeAll(itemsToBeReplaced);
- collection.addAll(replacementItems);
+ collection.addAll(replacementItems); // watch out! if this collection is a Set, HashMap$MapSet doesn't support addAll. See BZ 688000
} else if (value instanceof Map) {
for (Object key : ((Map) value).keySet()) {
- nullOutUninitializedFields(((Map) value).get(key), nulledObjects, depth + 1, serializationType);
- nullOutUninitializedFields(key, nulledObjects, depth + 1, serializationType);
+ nullOutUninitializedFields(((Map) value).get(key), checkedObjects, depth + 1, serializationType);
+ nullOutUninitializedFields(key, checkedObjects, depth + 1, serializationType);
}
} else if (value instanceof Enum) {
// don't need to detach enums, treat them as special objects
return;
}
-
if (serializationType == SerializationType.JAXB) {
XmlAccessorType at = value.getClass().getAnnotation(XmlAccessorType.class);
if (at != null && at.value() == XmlAccessType.FIELD) {
- //System.out.println("----------XML--------- field access");
- nullOutFieldsByFieldAccess(value, nulledObjects, depth, serializationType);
+ nullOutFieldsByFieldAccess(value, checkedObjects, depth, serializationType);
} else {
- //System.out.println("----------XML--------- accessor access");
- nullOutFieldsByAccessors(value, nulledObjects, depth, serializationType);
+ nullOutFieldsByAccessors(value, checkedObjects, depth, serializationType);
}
} else if (serializationType == SerializationType.SERIALIZATION) {
- // System.out.println("-----------JRMP-------- field access");
- nullOutFieldsByFieldAccess(value, nulledObjects, depth, serializationType);
+ nullOutFieldsByFieldAccess(value, checkedObjects, depth, serializationType);
}
}
- private static void nullOutFieldsByFieldAccess(Object object, Set<Integer> nulledObjects, int depth,
- SerializationType serializationType) throws Exception {
-
+ private static void nullOutFieldsByFieldAccess(Object object, Map<Integer, Object> checkedObjects, int depth,
+ SerializationType serializationType) throws Exception {
Class tmpClass = object.getClass();
List<Field> fieldsToClean = new ArrayList<Field>();
while (tmpClass != null && tmpClass != Object.class) {
- Collections.addAll(fieldsToClean, tmpClass.getDeclaredFields());
+ Field[] declaredFields = tmpClass.getDeclaredFields();
+ for (Field declaredField : declaredFields) {
+ // do not process static final or transient fields since they won't be serialized anyway
+ int modifiers = declaredField.getModifiers();
+ if (!((Modifier.isFinal(modifiers) && Modifier.isStatic(modifiers)) || Modifier.isTransient(modifiers))) {
+ fieldsToClean.add(declaredField);
+ }
+ }
tmpClass = tmpClass.getSuperclass();
}
- nullOutFieldsByFieldAccess(object, fieldsToClean, nulledObjects, depth, serializationType);
+ nullOutFieldsByFieldAccess(object, fieldsToClean, checkedObjects, depth, serializationType);
}
-
- @SuppressWarnings("unchecked")
- private static void nullOutFieldsByFieldAccess(Object object, List<Field> classFields, Set<Integer> nulledObjects, int depth,
- SerializationType serializationType) throws Exception {
+ private static void nullOutFieldsByFieldAccess(Object object, List<Field> classFields,
+ Map<Integer, Object> checkedObjects, int depth, SerializationType serializationType) throws Exception {
boolean accessModifierFlag = false;
for (Field field : classFields) {
@@ -182,14 +222,14 @@ public class HibernateDetachUtility {
String className = fieldValue.getClass().getName();
className = className.substring(0, className.indexOf("_$$_"));
if (!replacement.getClass().getName().contains("hibernate")) {
- nullOutUninitializedFields(replacement, nulledObjects, depth + 1, serializationType);
+ nullOutUninitializedFields(replacement, checkedObjects, depth + 1, serializationType);
field.set(object, replacement);
} else {
replacement = null;
}
} catch (Exception e) {
- System.out.println("Unable to write replace object " + fieldValue.getClass());
+ LOG.error("Unable to write replace object " + fieldValue.getClass(), e);
}
}
@@ -197,12 +237,13 @@ public class HibernateDetachUtility {
String className = ((HibernateProxy) fieldValue).getHibernateLazyInitializer().getEntityName();
Class clazz = Class.forName(className);
- Class[] constArgs = {Integer.class};
+ Class[] constArgs = { Integer.class };
Constructor construct = null;
try {
construct = clazz.getConstructor(constArgs);
- replacement = construct.newInstance((Integer) ((HibernateProxy) fieldValue).getHibernateLazyInitializer().getIdentifier());
+ replacement = construct.newInstance((Integer) ((HibernateProxy) fieldValue)
+ .getHibernateLazyInitializer().getIdentifier());
field.set(object, replacement);
} catch (NoSuchMethodException nsme) {
@@ -214,17 +255,17 @@ public class HibernateDetachUtility {
if (!idField.isAccessible()) {
idField.setAccessible(true);
}
- idField.set(replacement, (Integer) ((HibernateProxy) fieldValue).getHibernateLazyInitializer().getIdentifier());
+ idField.set(replacement, (Integer) ((HibernateProxy) fieldValue)
+ .getHibernateLazyInitializer().getIdentifier());
} catch (Exception e) {
e.printStackTrace();
- System.out.println("No id constructor and unable to set field id for base bean " + className);
+ LOG.error("No id constructor and unable to set field id for base bean " + className, e);
}
field.set(object, replacement);
}
}
-
} else {
if (fieldValue instanceof org.hibernate.collection.PersistentCollection) {
// Replace hibernate specific collection types
@@ -234,27 +275,31 @@ public class HibernateDetachUtility {
} else {
Object replacement = null;
+ boolean needToNullOutFields = true; // needed for BZ 688000
if (fieldValue instanceof Map) {
replacement = new HashMap((Map) fieldValue);
} else if (fieldValue instanceof List) {
replacement = new ArrayList((List) fieldValue);
} else if (fieldValue instanceof Set) {
- replacement = new HashSet((Set) fieldValue);
+ ArrayList l = new ArrayList((Set) fieldValue); // cannot recurse Sets, see BZ 688000
+ nullOutUninitializedFields(l, checkedObjects, depth + 1, serializationType);
+ replacement = new HashSet(l); // convert it back to a Set since that's the type of the real collection, see BZ 688000
+ needToNullOutFields = false;
} else if (fieldValue instanceof Collection) {
replacement = new ArrayList((Collection) fieldValue);
}
setField(object, field.getName(), replacement);
- nullOutUninitializedFields(replacement, nulledObjects, depth + 1, serializationType);
+ if (needToNullOutFields) {
+ nullOutUninitializedFields(replacement, checkedObjects, depth + 1, serializationType);
+ }
}
} else {
- if (fieldValue != null &&
- (fieldValue.getClass().getName().contains("org.rhq") ||
- fieldValue instanceof Collection ||
- fieldValue instanceof Object[] ||
- fieldValue instanceof Map))
- nullOutUninitializedFields((fieldValue), nulledObjects, depth + 1, serializationType);
+ if (fieldValue != null
+ && (fieldValue.getClass().getName().contains("org.rhq") || fieldValue instanceof Collection
+ || fieldValue instanceof Object[] || fieldValue instanceof Map))
+ nullOutUninitializedFields((fieldValue), checkedObjects, depth + 1, serializationType);
}
}
if (accessModifierFlag) {
@@ -264,7 +309,6 @@ public class HibernateDetachUtility {
}
-
private static Object replaceObject(Object object) {
Object replacement = null;
@@ -277,16 +321,15 @@ public class HibernateDetachUtility {
String className = object.getClass().getName();
} catch (Exception e) {
- System.out.println("Unable to write replace object " + object.getClass());
+ LOG.error("Unable to write replace object " + object.getClass(), e);
}
}
}
return replacement;
}
-
- private static void nullOutFieldsByAccessors(Object value, Set<Integer> nulledObjects, int depth,
- SerializationType serializationType) throws Exception {
+ private static void nullOutFieldsByAccessors(Object value, Map<Integer, Object> checkedObjects, int depth,
+ SerializationType serializationType) throws Exception {
// Null out any collections that aren't loaded
BeanInfo bi = Introspector.getBeanInfo(value.getClass(), Object.class);
@@ -309,19 +352,19 @@ public class HibernateDetachUtility {
Method writeMethod = pd.getWriteMethod();
if ((writeMethod != null) && (writeMethod.getAnnotation(XmlTransient.class) == null)) {
- pd.getWriteMethod().invoke(value, new Object[]{null});
+ pd.getWriteMethod().invoke(value, new Object[] { null });
} else {
nullOutField(value, pd.getName());
}
} catch (Exception lie) {
LOG.debug("Couldn't null out: " + pd.getName() + " off of " + value.getClass().getSimpleName()
- + " trying field access", lie);
+ + " trying field access", lie);
nullOutField(value, pd.getName());
}
} else {
if ((propertyValue instanceof Collection)
- || ((propertyValue != null) && propertyValue.getClass().getName().startsWith("org.rhq.core.domain"))) {
- nullOutUninitializedFields(propertyValue, nulledObjects, depth + 1, serializationType);
+ || ((propertyValue != null) && propertyValue.getClass().getName().startsWith("org.rhq.core.domain"))) {
+ nullOutUninitializedFields(propertyValue, checkedObjects, depth + 1, serializationType);
}
}
}
13 years
[rhq] modules/enterprise
by Simeon Pinder
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupContextMenu.java | 213 ++++++--
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeView.java | 240 +++++++---
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties | 1
3 files changed, 342 insertions(+), 112 deletions(-)
New commits:
commit cf96f1f4792a405f99a51f40adf4025794db4dd5
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Thu May 5 15:02:02 2011 -0400
BZ: 698100: ability to add graphable elements to monitor/graphs tab.
-additionally pruned out traits from being listed for measurement additions to default dash and to graphs views.
-added sorting to Resource/Group menu item lists for Operations,Measurements and Imports.
-removed autogroup specific url bits as all are persisted groups now.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupContextMenu.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupContextMenu.java
index bc2da4f..525f92c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupContextMenu.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupContextMenu.java
@@ -23,7 +23,17 @@
package org.rhq.enterprise.gui.coregui.client.inventory.groups.detail;
import java.util.EnumSet;
-
+import java.util.HashMap;
+import java.util.Map;
+import java.util.TreeSet;
+
+import com.allen_sauer.gwt.log.client.Log;
+import com.google.gwt.http.client.Request;
+import com.google.gwt.http.client.RequestBuilder;
+import com.google.gwt.http.client.RequestCallback;
+import com.google.gwt.http.client.RequestException;
+import com.google.gwt.http.client.Response;
+import com.google.gwt.user.client.History;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.widgets.menu.Menu;
import com.smartgwt.client.widgets.menu.MenuItem;
@@ -36,6 +46,7 @@ import org.rhq.core.domain.criteria.DashboardCriteria;
import org.rhq.core.domain.criteria.ResourceGroupCriteria;
import org.rhq.core.domain.dashboard.Dashboard;
import org.rhq.core.domain.dashboard.DashboardPortlet;
+import org.rhq.core.domain.measurement.DataType;
import org.rhq.core.domain.measurement.MeasurementDefinition;
import org.rhq.core.domain.operation.OperationDefinition;
import org.rhq.core.domain.resource.ResourceType;
@@ -143,10 +154,11 @@ public class ResourceGroupContextMenu extends LocatableMenu {
pluginConfiguration.addClickHandler(new ClickHandler() {
public void onClick(MenuItemClickEvent event) {
if (isAutoGroup) {
- CoreGUI.goToView(LinkManager.getAutoGroupTabLink(group.getId(), "Inventory", "ConnectionSettings"));
+ CoreGUI.goToView(LinkManager.getAutoGroupTabLink(group.getId(), "Inventory",
+ "ConnectionSettings"));
} else if (isAutoCluster) {
- CoreGUI.goToView(LinkManager
- .getAutoClusterTabLink(group.getId(), "Inventory", "ConnectionSettings"));
+ CoreGUI.goToView(LinkManager.getAutoClusterTabLink(group.getId(), "Inventory",
+ "ConnectionSettings"));
} else {
CoreGUI.goToView(LinkManager.getResourceGroupTabLink(group.getId(), "Inventory",
"ConnectionSettings"));
@@ -182,18 +194,28 @@ public class ResourceGroupContextMenu extends LocatableMenu {
// Operations Menu
MenuItem operations = new MenuItem(MSG.view_tree_common_contextMenu_operations());
- boolean operationsEnabled = (groupComposite.getResourcePermission().isControl() && null != resourceType.getOperationDefinitions() && !resourceType
- .getOperationDefinitions().isEmpty());
+ boolean operationsEnabled = (groupComposite.getResourcePermission().isControl()
+ && null != resourceType.getOperationDefinitions() && !resourceType.getOperationDefinitions().isEmpty());
operations.setEnabled(operationsEnabled);
if (operationsEnabled) {
Menu opSubMenu = new Menu();
- for (final OperationDefinition operationDefinition : resourceType.getOperationDefinitions()) {
+ //sort the display items alphabetically
+ TreeSet<String> ordered = new TreeSet<String>();
+ Map<String, OperationDefinition> definitionMap = new HashMap<String, OperationDefinition>();
+ for (OperationDefinition o : resourceType.getOperationDefinitions()) {
+ ordered.add(o.getDisplayName());
+ definitionMap.put(o.getDisplayName(), o);
+ }
+
+ for (String displayName : ordered) {
+ final OperationDefinition operationDefinition = definitionMap.get(displayName);
+
MenuItem operationItem = new MenuItem(operationDefinition.getDisplayName());
operationItem.addClickHandler(new ClickHandler() {
public void onClick(MenuItemClickEvent event) {
- String viewPath = LinkManager.getResourceGroupTabLink(group,
- ResourceDetailView.Tab.OPERATIONS, ResourceDetailView.OperationsSubTab.SCHEDULES)
- + "/0/" + operationDefinition.getId();
+ String viewPath = LinkManager.getResourceGroupTabLink(group, ResourceDetailView.Tab.OPERATIONS,
+ ResourceDetailView.OperationsSubTab.SCHEDULES)
+ + "/0/" + operationDefinition.getId();
CoreGUI.goToView(viewPath);
}
});
@@ -284,57 +306,135 @@ public class ResourceGroupContextMenu extends LocatableMenu {
public void onSuccess(PageList<Dashboard> result) {
if (type.getMetricDefinitions() != null) {
- for (final MeasurementDefinition def : type.getMetricDefinitions()) {
-
- MenuItem defItem = new MenuItem(def.getDisplayName());
- measurementsSubMenu.addItem(defItem);
- Menu defSubItem = new Menu();
- defItem.setSubmenu(defSubItem);
-
- for (final Dashboard d : result) {
- MenuItem addToDBItem = new MenuItem(MSG
- .view_tree_common_contextMenu_addChartToDashboard(d.getName()));
- defSubItem.addItem(addToDBItem);
-
- addToDBItem.addClickHandler(new ClickHandler() {
- public void onClick(MenuItemClickEvent menuItemClickEvent) {
-
- DashboardPortlet p = new DashboardPortlet(MSG
- .view_tree_common_contextMenu_groupGraph(), ResourceGroupGraphPortlet.KEY,
- 250);
- p.getConfiguration().put(
- new PropertySimple(ResourceGroupGraphPortlet.CFG_RESOURCE_GROUP_ID, group
- .getId()));
- p.getConfiguration()
- .put(
+ //sort the display items alphabetically
+ TreeSet<String> ordered = new TreeSet<String>();
+ Map<String, MeasurementDefinition> definitionMap = new HashMap<String, MeasurementDefinition>();
+ for (MeasurementDefinition m : type.getMetricDefinitions()) {
+ ordered.add(m.getDisplayName());
+ definitionMap.put(m.getDisplayName(), m);
+ }
+
+ for (String displayName : ordered) {
+ final MeasurementDefinition def = definitionMap.get(displayName);
+ //only add menu items for Measurement
+ if (def.getDataType().equals(DataType.MEASUREMENT)) {
+ MenuItem defItem = new MenuItem(def.getDisplayName());
+ measurementsSubMenu.addItem(defItem);
+ Menu defSubItem = new Menu();
+ defItem.setSubmenu(defSubItem);
+
+ for (final Dashboard d : result) {
+ MenuItem addToDBItem = new MenuItem(MSG
+ .view_tree_common_contextMenu_addChartToDashboard(d.getName()));
+ defSubItem.addItem(addToDBItem);
+
+ addToDBItem.addClickHandler(new ClickHandler() {
+ public void onClick(MenuItemClickEvent menuItemClickEvent) {
+
+ DashboardPortlet p = new DashboardPortlet(MSG
+ .view_tree_common_contextMenu_groupGraph(),
+ ResourceGroupGraphPortlet.KEY, 250);
+ p.getConfiguration().put(
+ new PropertySimple(ResourceGroupGraphPortlet.CFG_RESOURCE_GROUP_ID,
+ group.getId()));
+ p.getConfiguration().put(
new PropertySimple(ResourceGroupGraphPortlet.CFG_DEFINITION_ID, def
.getId()));
- d.addPortlet(p);
-
- GWTServiceLookup.getDashboardService().storeDashboard(d,
- new AsyncCallback<Dashboard>() {
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(
- MSG.view_tree_common_contextMenu_saveChartToDashboardFailure(),
- caught);
+ d.addPortlet(p);
+
+ GWTServiceLookup.getDashboardService().storeDashboard(d,
+ new AsyncCallback<Dashboard>() {
+ public void onFailure(Throwable caught) {
+ CoreGUI
+ .getErrorHandler()
+ .handleError(
+ MSG
+ .view_tree_common_contextMenu_saveChartToDashboardFailure(),
+ caught);
+ }
+
+ public void onSuccess(Dashboard result) {
+ String msg = MSG
+ .view_tree_common_contextMenu_saveChartToDashboardSuccessful(result
+ .getName());
+ CoreGUI.getMessageCenter().notify(
+ new Message(msg, Message.Severity.Info));
+ }
+ });
+
+ }
+ });
+
+ //add new menu item for adding current graphable element to view if on Monitor/Graphs tab
+ String currentViewPath = History.getToken();
+ if (currentViewPath.indexOf("Monitoring/Graphs") > -1) {
+ MenuItem addGraphItem = new MenuItem(MSG.common_title_add_graph_to_view());
+ defSubItem.addItem(addGraphItem);
+
+ addGraphItem.addClickHandler(new ClickHandler() {
+ public void onClick(MenuItemClickEvent menuItemClickEvent) {
+ //generate javascript to call out to.
+ //Ex. menuLayers.hide();addMetric('${metric.resourceId},${metric.scheduleId}')
+ String grpGraphElements = "";
+ if (isAutoGroup) {
+ grpGraphElements += "ag,";
+ } else {
+ grpGraphElements += "cg,";
}
-
- public void onSuccess(Dashboard result) {
- String msg = MSG
- .view_tree_common_contextMenu_saveChartToDashboardSuccessful(result
- .getName());
- CoreGUI.getMessageCenter().notify(
- new Message(msg, Message.Severity.Info));
+ grpGraphElements += group.getId() + "," + def.getId();
+ if (isAutoGroup) {//need to postpend the resource type as third element
+ grpGraphElements += "," + group.getResourceType().getId();
}
- });
-
- }
- });
-
- }
-
- }
+ //construct portal.war url to access
+ String baseUrl = "/resource/common/monitor/visibility/IndicatorCharts.do";
+ //No need to rebuild the autogroup url as everything handled as a compatible group now
+ // if (isAutoGroup) {
+ // //Ex. ?parent=10001&ctype=1013&view=Default
+ // baseUrl += "?parent=" + group.getAutoGroupParentResource().getId()
+ // + "&ctype="
+ // + group.getResourceType().getId();
+ // jsCode = "ag," + group.getAutoGroupParentResource().getId() + ","
+ // + def.getId() + ","
+ // + group.getResourceType().getId();
+ // } else {
+ //Ex. ?groupId=10001&view=Default
+ baseUrl += "?groupId=" + group.getId();
+ baseUrl += "&view=Default";
+ baseUrl += "&action=addChart&metric=" + grpGraphElements;
+ baseUrl += "&view=Default";
+ final String url = baseUrl;
+ //initiate HTTP request
+ final RequestBuilder b = new RequestBuilder(RequestBuilder.GET, baseUrl);
+
+ try {
+ b.setCallback(new RequestCallback() {
+ public void onResponseReceived(final Request request,
+ final Response response) {
+ Log
+ .trace("Successfully submitted request to add graph to view:"
+ + url);
+
+ //kick off a page reload.
+ String currentViewPath = History.getToken();
+ CoreGUI.goToView(currentViewPath, true);
+ }
+
+ @Override
+ public void onError(Request request, Throwable t) {
+ Log.trace("Error adding Metric:" + url, t);
+ }
+ });
+ b.send();
+ } catch (RequestException e) {
+ Log.trace("Error adding Metric:" + url, e);
+ }
+ }//end of onClick definition
+ });//end of onClick Handler definition
+ }//end of Monitoring/Graphs view check
+ }//end of dashabord iteration
+ }//end of check for Measurement
+ }//end of metric definition iteration
}
}
@@ -342,4 +442,5 @@ public class ResourceGroupContextMenu extends LocatableMenu {
measurements.setSubmenu(measurementsSubMenu);
return measurements;
}
+
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeView.java
index ceb74c1..7149726 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeView.java
@@ -27,8 +27,14 @@ import java.util.EnumSet;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.TreeSet;
import com.allen_sauer.gwt.log.client.Log;
+import com.google.gwt.http.client.Request;
+import com.google.gwt.http.client.RequestBuilder;
+import com.google.gwt.http.client.RequestCallback;
+import com.google.gwt.http.client.RequestException;
+import com.google.gwt.http.client.Response;
import com.google.gwt.user.client.History;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.data.DSCallback;
@@ -57,7 +63,9 @@ import org.rhq.core.domain.criteria.ResourceGroupCriteria;
import org.rhq.core.domain.criteria.ResourceTypeCriteria;
import org.rhq.core.domain.dashboard.Dashboard;
import org.rhq.core.domain.dashboard.DashboardPortlet;
+import org.rhq.core.domain.measurement.DataType;
import org.rhq.core.domain.measurement.MeasurementDefinition;
+import org.rhq.core.domain.measurement.MeasurementSchedule;
import org.rhq.core.domain.operation.OperationDefinition;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceCategory;
@@ -344,6 +352,7 @@ public class ResourceTreeView extends LocatableVLayout {
// fetch the resource composite, we need resource permission info for enablement decisions
ResourceCriteria criteria = new ResourceCriteria();
criteria.addFilterId(resourceId);
+ criteria.fetchSchedules(true);
GWTServiceLookup.getResourceService().findResourceCompositesByCriteria(criteria,
new AsyncCallback<PageList<ResourceComposite>>() {
@@ -405,7 +414,8 @@ public class ResourceTreeView extends LocatableVLayout {
pluginConfiguration.addClickHandler(new ClickHandler() {
public void onClick(MenuItemClickEvent event) {
- CoreGUI.goToView(LinkManager.getResourceTabLink(resource.getId(), "Inventory", "ConnectionSettings"));
+ CoreGUI.goToView(LinkManager
+ .getResourceTabLink(resource.getId(), "Inventory", "ConnectionSettings"));
}
});
}
@@ -436,14 +446,24 @@ public class ResourceTreeView extends LocatableVLayout {
operations.setEnabled(operationsEnabled);
if (operationsEnabled) {
Menu opSubMenu = new Menu();
- for (final OperationDefinition operationDefinition : resourceType.getOperationDefinitions()) {
+
+ //sort the display items alphabetically
+ TreeSet<String> ordered = new TreeSet<String>();
+ Map<String, OperationDefinition> definitionMap = new HashMap<String, OperationDefinition>();
+ for (OperationDefinition o : resourceType.getOperationDefinitions()) {
+ ordered.add(o.getDisplayName());
+ definitionMap.put(o.getDisplayName(), o);
+ }
+ for (String displayName : ordered) {
+ final OperationDefinition operationDefinition = definitionMap.get(displayName);
+
MenuItem operationItem = new MenuItem(operationDefinition.getDisplayName());
operationItem.addClickHandler(new ClickHandler() {
public void onClick(MenuItemClickEvent event) {
String viewPath = LinkManager.getResourceTabLink(resource.getId(),
- ResourceDetailView.Tab.OPERATIONS, ResourceDetailView.OperationsSubTab.SCHEDULES)
- + "/0/" + operationDefinition.getId();
+ ResourceDetailView.Tab.OPERATIONS, ResourceDetailView.OperationsSubTab.SCHEDULES)
+ + "/0/" + operationDefinition.getId();
CoreGUI.goToView(viewPath);
}
});
@@ -461,7 +481,16 @@ public class ResourceTreeView extends LocatableVLayout {
boolean createChildResourcesEnabled = resourcePermission.isCreateChildResources();
if (createChildResourcesEnabled) {
Menu createChildSubMenu = new Menu();
- for (final ResourceType childType : resourceType.getChildResourceTypes()) {
+ //sort the display items alphabetically
+ TreeSet<String> ordered = new TreeSet<String>();
+ Map<String, ResourceType> typeMap = new HashMap<String, ResourceType>();
+ for (ResourceType o : resourceType.getChildResourceTypes()) {
+ ordered.add(o.getName());
+ typeMap.put(o.getName(), o);
+ }
+
+ for (String type : ordered) {
+ final ResourceType childType = typeMap.get(type);
if (childType.isCreatable()) {
MenuItem createItem = new MenuItem(childType.getName());
@@ -487,7 +516,16 @@ public class ResourceTreeView extends LocatableVLayout {
boolean manualImportEnabled = resourcePermission.isCreateChildResources();
if (manualImportEnabled) {
Menu importChildSubMenu = new Menu();
- for (final ResourceType childType : resourceType.getChildResourceTypes()) {
+
+ //sort the display items alphabetically
+ TreeSet<String> ordered = new TreeSet<String>();
+ Map<String, ResourceType> typeMap = new HashMap<String, ResourceType>();
+ for (ResourceType o : resourceType.getChildResourceTypes()) {
+ ordered.add(o.getName());
+ typeMap.put(o.getName(), o);
+ }
+ for (String name : ordered) {
+ final ResourceType childType = typeMap.get(name);
if (childType.isSupportsManualAdd()) {
MenuItem importItem = new MenuItem(childType.getName());
@@ -501,7 +539,6 @@ public class ResourceTreeView extends LocatableVLayout {
importChildSubMenu.addItem(importItem);
}
}
-
if (resourceType.getCategory() == ResourceCategory.PLATFORM) {
loadManuallyAddServersToPlatforms(importChildSubMenu, resource);
}
@@ -527,7 +564,17 @@ public class ResourceTreeView extends LocatableVLayout {
}
public void onSuccess(PageList<ResourceType> result) {
- for (final ResourceType type : result) {
+ //sort the display items alphabetically
+ TreeSet<String> ordered = new TreeSet<String>();
+ Map<String, ResourceType> displayTypes = new HashMap<String, ResourceType>();
+ for (ResourceType type : result) {
+ displayTypes.put(type.getName(), type);
+ ordered.add(type.getName());
+ }
+
+ int idx = 0;
+ for (String displayType : ordered) {
+ final ResourceType type = displayTypes.get(displayType);
if (type.getParentResourceTypes() == null || type.getParentResourceTypes().isEmpty()) {
MenuItem item = new MenuItem(type.getName());
@@ -538,7 +585,7 @@ public class ResourceTreeView extends LocatableVLayout {
}
});
- manuallyAddMenu.addItem(item);
+ manuallyAddMenu.addItem(item, idx++);
}
}
}
@@ -559,57 +606,118 @@ public class ResourceTreeView extends LocatableVLayout {
}
public void onSuccess(PageList<Dashboard> result) {
+ //sort the display items alphabetically
+ TreeSet<String> ordered = new TreeSet<String>();
+ Map<String, MeasurementDefinition> definitionMap = new HashMap<String, MeasurementDefinition>();
+ for (MeasurementDefinition m : type.getMetricDefinitions()) {
+ ordered.add(m.getDisplayName());
+ definitionMap.put(m.getDisplayName(), m);
+ }
- for (final MeasurementDefinition def : type.getMetricDefinitions()) {
-
- MenuItem defItem = new MenuItem(def.getDisplayName());
- measurementsSubMenu.addItem(defItem);
- Menu defSubItem = new Menu();
- defItem.setSubmenu(defSubItem);
-
- for (final Dashboard d : result) {
- MenuItem addToDBItem = new MenuItem(MSG.view_tree_common_contextMenu_addChartToDashboard(d
- .getName()));
- defSubItem.addItem(addToDBItem);
-
- addToDBItem.addClickHandler(new ClickHandler() {
-
- public void onClick(MenuItemClickEvent menuItemClickEvent) {
- DashboardPortlet p = new DashboardPortlet(MSG
- .view_tree_common_contextMenu_resourceGraph(), ResourceGraphPortlet.KEY, 250);
- p.getConfiguration().put(
- new PropertySimple(ResourceGraphPortlet.CFG_RESOURCE_ID, resource.getId()));
- p.getConfiguration().put(
- new PropertySimple(ResourceGraphPortlet.CFG_DEFINITION_ID, def.getId()));
-
- d.addPortlet(p);
-
- GWTServiceLookup.getDashboardService().storeDashboard(d,
- new AsyncCallback<Dashboard>() {
-
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(
- MSG.view_tree_common_contextMenu_saveChartToDashboardFailure(),
- caught);
- }
+ for (String displayName : ordered) {
+ final MeasurementDefinition def = definitionMap.get(displayName);
+ //only add menu items for Measurement
+ if (def.getDataType().equals(DataType.MEASUREMENT)) {
+ MenuItem defItem = new MenuItem(def.getDisplayName());
+ measurementsSubMenu.addItem(defItem);
+ Menu defSubItem = new Menu();
+ defItem.setSubmenu(defSubItem);
+
+ for (final Dashboard d : result) {
+ MenuItem addToDBItem = new MenuItem(MSG
+ .view_tree_common_contextMenu_addChartToDashboard(d.getName()));
+ defSubItem.addItem(addToDBItem);
+
+ addToDBItem.addClickHandler(new ClickHandler() {
+
+ public void onClick(MenuItemClickEvent menuItemClickEvent) {
+ DashboardPortlet p = new DashboardPortlet(MSG
+ .view_tree_common_contextMenu_resourceGraph(), ResourceGraphPortlet.KEY,
+ 250);
+ p.getConfiguration().put(
+ new PropertySimple(ResourceGraphPortlet.CFG_RESOURCE_ID, resource.getId()));
+ p.getConfiguration().put(
+ new PropertySimple(ResourceGraphPortlet.CFG_DEFINITION_ID, def.getId()));
+
+ d.addPortlet(p);
+
+ GWTServiceLookup.getDashboardService().storeDashboard(d,
+ new AsyncCallback<Dashboard>() {
+
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(
+ MSG.view_tree_common_contextMenu_saveChartToDashboardFailure(),
+ caught);
+ }
+
+ public void onSuccess(Dashboard result) {
+ CoreGUI
+ .getMessageCenter()
+ .notify(
+ new Message(
+ MSG
+ .view_tree_common_contextMenu_saveChartToDashboardSuccessful(result
+ .getName()), Message.Severity.Info));
+ }
+ });
- public void onSuccess(Dashboard result) {
- CoreGUI
- .getMessageCenter()
- .notify(
- new Message(
- MSG
- .view_tree_common_contextMenu_saveChartToDashboardSuccessful(result
- .getName()), Message.Severity.Info));
+ }
+ });
+
+ //add new menu item for adding current graphable element to view if on Monitor/Graphs tab
+ String currentViewPath = History.getToken();
+ if (currentViewPath.indexOf("Monitoring/Graphs") > -1) {
+ MenuItem addGraphItem = new MenuItem(MSG.common_title_add_graph_to_view());
+ defSubItem.addItem(addGraphItem);
+
+ addGraphItem.addClickHandler(new ClickHandler() {
+ public void onClick(MenuItemClickEvent menuItemClickEvent) {
+ //generate javascript to call out to.
+ //Ex. menuLayers.hide();addMetric('${metric.resourceId},${metric.scheduleId}')
+ if (getScheduleDefinitionId(resource, def.getName()) > -1) {
+ String resourceGraphElements = resource.getId() + ","
+ + getScheduleDefinitionId(resource, def.getName());
+
+ //construct portal.war url to access
+ String baseUrl = "/resource/common/monitor/visibility/IndicatorCharts.do";
+ baseUrl += "?id=" + resource.getId();
+ baseUrl += "&view=Default";
+ baseUrl += "&action=addChart&metric=" + resourceGraphElements;
+ baseUrl += "&view=Default";
+ final String url = baseUrl;
+ //initiate HTTP request
+ final RequestBuilder b = new RequestBuilder(RequestBuilder.GET, baseUrl);
+
+ try {
+ b.setCallback(new RequestCallback() {
+ public void onResponseReceived(final Request request,
+ final Response response) {
+ Log
+ .trace("Successfully submitted request to add graph to view:"
+ + url);
+
+ //kick off a page reload.
+ String currentViewPath = History.getToken();
+ CoreGUI.goToView(currentViewPath, true);
+ }
+
+ @Override
+ public void onError(Request request, Throwable t) {
+ Log.trace("Error adding Metric:" + url, t);
+ }
+ });
+ b.send();
+ } catch (RequestException e) {
+ Log.trace("Error adding Metric:" + url, e);
+ }
}
- });
-
+ }
+ });
}
- });
-
- }
-
- }
+ // }//end trait check
+ }//end dashboard iteration
+ }//end trait exclusion
+ }//end measurement def iteration
}
});
@@ -617,6 +725,26 @@ public class ResourceTreeView extends LocatableVLayout {
return measurements;
}
+ /** Locate the specific schedule definition using the definition identifier.
+ */
+ private int getScheduleDefinitionId(Resource resource, String definitionName) {
+ int id = -1;
+ if (resource.getSchedules() != null) {
+ boolean located = false;
+ MeasurementSchedule[] schedules = new MeasurementSchedule[resource.getSchedules().size()];
+ resource.getSchedules().toArray(schedules);
+ for (int i = 0; (!located && i < resource.getSchedules().size()); i++) {
+ MeasurementSchedule schedule = schedules[i];
+ MeasurementDefinition definition = schedule.getDefinition();
+ if ((definition != null) && definition.getName().equals(definitionName)) {
+ located = true;
+ id = schedule.getId();
+ }
+ }
+ }
+ return id;
+ }
+
private void setRootResource(Resource rootResource) {
this.rootResource = rootResource;
}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
index 0f75682..d387c9e 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
@@ -94,6 +94,7 @@ common_severity_fatal = Fatal
#--------------
common_title_address = Address
common_title_add_column = Add Column
+common_title_add_graph_to_view = Add Graph to Monitor View
common_title_add_portlet = Add Portlet
common_title_alert_range = Alert Range
common_title_ancestry = Ancestry
13 years
[rhq] modules/core modules/enterprise
by Jay Shaughnessy
modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleDeployment.java | 31 +++----
modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BundleDeploymentCriteria.java | 10 --
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/SelectBundleVersionStep.java | 1
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deployment/BundleDeploymentView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/revert/ConfirmationStep.java | 43 +++++++++-
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/bundle/BundleManagerBean.java | 13 +--
6 files changed, 63 insertions(+), 37 deletions(-)
New commits:
commit 976c5fc6ed0e7e5354ea6a890caafa58b3f1c7bc
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Thu May 5 13:45:09 2011 -0400
[BZ 702390 - Large number of BundleDeployments for a single Bundle causes fetch serialization issues]
Remove self-referring entity association for
BundleDeployment.replacedBundleDeployment. This prevents eager loading of
the entire deployment chain when fetching a BundleDeployment, and in turn
avoids issues with Hibernate class scrubbing when remote fetching deployments.
Instead of using the entity as the field member, just use the ID.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleDeployment.java b/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleDeployment.java
index fc0c72c..dcf6c27 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleDeployment.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleDeployment.java
@@ -68,14 +68,14 @@ import org.rhq.core.domain.tagging.Tag;
+ "SELECT bd FROM BundleDeployment bd "),
@NamedQuery(name = BundleDeployment.QUERY_UPDATE_FOR_DESTINATION_REMOVE, query = "" //
+ "UPDATE BundleDeployment bd " //
- + " SET bd.replacedBundleDeployment = NULL " //
- + " WHERE bd.replacedBundleDeployment.id IN " //
+ + " SET bd.replacedBundleDeploymentId = NULL " //
+ + " WHERE bd.replacedBundleDeploymentId IN " //
+ " ( SELECT innerbd.id FROM BundleDeployment innerbd " //
+ " WHERE innerbd.destination.id = :destinationId ) "),
@NamedQuery(name = BundleDeployment.QUERY_UPDATE_FOR_VERSION_REMOVE, query = "" //
+ "UPDATE BundleDeployment bd " //
- + " SET bd.replacedBundleDeployment = NULL " //
- + " WHERE bd.replacedBundleDeployment.id IN " //
+ + " SET bd.replacedBundleDeploymentId = NULL " //
+ + " WHERE bd.replacedBundleDeploymentId IN " //
+ " ( SELECT innerbd.id FROM BundleDeployment innerbd " //
+ " WHERE innerbd.bundleVersion.id = :bundleVersionId ) ") })
@SequenceGenerator(name = "SEQ", sequenceName = "RHQ_BUNDLE_DEPLOYMENT_ID_SEQ")
@@ -118,20 +118,23 @@ public class BundleDeployment implements Serializable {
@Column(name = "MTIME")
private Long mtime = System.currentTimeMillis();
- @JoinColumn(name = "REPLACED_BUNDLE_DEPLOYMENT_ID", referencedColumnName = "ID", nullable = true)
- @OneToOne(fetch = FetchType.LAZY, optional = true)
- private BundleDeployment replacedBundleDeployment;
+ // This is not a join column on purpose. Since it is nullable the OneToOne association would be forced to EAGER
+ // fetch. That leads to basically fetching every BundleDeployment every time, in a deeply recursive way if you
+ // have a lot deployments.
+ @Column(name = "REPLACED_BUNDLE_DEPLOYMENT_ID", nullable = true)
+ private Integer replacedBundleDeploymentId;
+ // note - eager fetch, can not lazy fetch an optional OneToOne
@JoinColumn(name = "CONFIG_ID", referencedColumnName = "ID", nullable = true)
- @OneToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL, optional = true)
+ @OneToOne(cascade = CascadeType.ALL, optional = true)
private Configuration configuration;
@JoinColumn(name = "BUNDLE_VERSION_ID", referencedColumnName = "ID", nullable = false)
- @ManyToOne(fetch = FetchType.LAZY)
+ @ManyToOne(fetch = FetchType.LAZY, optional = false)
private BundleVersion bundleVersion;
@JoinColumn(name = "BUNDLE_DESTINATION_ID", referencedColumnName = "ID", nullable = false)
- @ManyToOne(fetch = FetchType.LAZY)
+ @ManyToOne(fetch = FetchType.LAZY, optional = false)
private BundleDestination destination;
@OneToMany(mappedBy = "bundleDeployment", fetch = FetchType.LAZY, cascade = CascadeType.ALL)
@@ -284,12 +287,12 @@ public class BundleDeployment implements Serializable {
/**
* @return The previously "live" BundleDeployment.
*/
- public BundleDeployment getReplacedBundleDeployment() {
- return replacedBundleDeployment;
+ public Integer getReplacedBundleDeploymentId() {
+ return replacedBundleDeploymentId;
}
- public void setReplacedBundleDeployment(BundleDeployment replacedBundleDeployment) {
- this.replacedBundleDeployment = replacedBundleDeployment;
+ public void setReplacedBundleDeploymentId(Integer replacedBundleDeploymentId) {
+ this.replacedBundleDeploymentId = replacedBundleDeploymentId;
}
public Configuration getConfiguration() {
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BundleDeploymentCriteria.java b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BundleDeploymentCriteria.java
index 3ad25b8..aa437e3 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BundleDeploymentCriteria.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/criteria/BundleDeploymentCriteria.java
@@ -49,9 +49,7 @@ public class BundleDeploymentCriteria extends TaggedCriteria {
private String filterSubjectName;
private boolean fetchBundleVersion;
- private boolean fetchConfiguration;
private boolean fetchDestination;
- private boolean fetchReplacedBundleDeployment;
private boolean fetchResourceDeployments;
public BundleDeploymentCriteria() {
@@ -110,18 +108,10 @@ public class BundleDeploymentCriteria extends TaggedCriteria {
this.fetchBundleVersion = fetchBundleVersion;
}
- public void fetchConfiguration(boolean fetchConfiguration) {
- this.fetchConfiguration = fetchConfiguration;
- }
-
public void fetchDestination(boolean fetchDestination) {
this.fetchDestination = fetchDestination;
}
- public void fetchReplacedBundleDeployment(boolean fetchReplacedBundleDeployment) {
- this.fetchReplacedBundleDeployment = fetchReplacedBundleDeployment;
- }
-
public void fetchResourceDeployments(boolean fetchResourceDeployments) {
this.fetchResourceDeployments = fetchResourceDeployments;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/SelectBundleVersionStep.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/SelectBundleVersionStep.java
index e1367e8..b13df74 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/SelectBundleVersionStep.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/SelectBundleVersionStep.java
@@ -143,7 +143,6 @@ public class SelectBundleVersionStep extends AbstractWizardStep {
criteria.addFilterDestinationId(wizard.getDestination().getId());
criteria.addFilterIsLive(true);
criteria.fetchBundleVersion(true);
- criteria.fetchConfiguration(true);
bundleServer.findBundleDeploymentsByCriteria(criteria, //
new AsyncCallback<PageList<BundleDeployment>>() {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deployment/BundleDeploymentView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deployment/BundleDeploymentView.java
index e220cfc..73ea70c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deployment/BundleDeploymentView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deployment/BundleDeploymentView.java
@@ -328,6 +328,7 @@ public class BundleDeploymentView extends LocatableVLayout implements Bookmarkab
return tagEditor;
}
+ @SuppressWarnings("unchecked")
private Table addMemberDeploymentsTable() {
Table table = new Table(extendLocatorId("Deployments"), MSG.view_bundle_deploy_deploymentPlatforms());
@@ -420,7 +421,6 @@ public class BundleDeploymentView extends LocatableVLayout implements Bookmarkab
BundleDeploymentCriteria criteria = new BundleDeploymentCriteria();
criteria.addFilterId(bundleDeploymentId);
criteria.fetchBundleVersion(true);
- criteria.fetchConfiguration(true);
criteria.fetchResourceDeployments(true);
criteria.fetchDestination(true);
criteria.fetchTags(true);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/revert/ConfirmationStep.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/revert/ConfirmationStep.java
index 3d298c2..00007cb 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/revert/ConfirmationStep.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/revert/ConfirmationStep.java
@@ -69,13 +69,14 @@ public class ConfirmationStep extends AbstractWizardStep {
}
layout.setMembersMargin(10);
+ // Get the Live Deployment
BundleDeploymentCriteria c = new BundleDeploymentCriteria();
c.addFilterDestinationId(this.wizard.getDestination().getId());
c.addFilterIsLive(true);
- c.fetchReplacedBundleDeployment(true);
c.fetchBundleVersion(true);
bundleServer.findBundleDeploymentsByCriteria(c, //
new AsyncCallback<PageList<BundleDeployment>>() {
+
public void onSuccess(PageList<BundleDeployment> liveDeployments) {
if (1 != liveDeployments.size()) {
nextPage = false;
@@ -86,9 +87,11 @@ public class ConfirmationStep extends AbstractWizardStep {
CoreGUI.getMessageCenter().notify(
new Message(messageConcise, message, Message.Severity.Warning));
}
+
wizard.setLiveDeployment(liveDeployments.get(0));
- wizard.setPreviousDeployment(wizard.getLiveDeployment().getReplacedBundleDeployment());
- if (null == wizard.getPreviousDeployment()) {
+ Integer replacedBundleDeploymentId = wizard.getLiveDeployment().getReplacedBundleDeploymentId();
+
+ if (null == replacedBundleDeploymentId) {
nextPage = false;
String messageConcise = MSG
.view_bundle_revertWizard_confirmStep_noPriorDeployment_concise();
@@ -99,7 +102,39 @@ public class ConfirmationStep extends AbstractWizardStep {
new Message(messageConcise, message, Message.Severity.Warning));
}
- setLayout();
+ // Get the Replaced Deployment (the one we want to revert to_
+ BundleDeploymentCriteria c = new BundleDeploymentCriteria();
+ c.addFilterId(replacedBundleDeploymentId);
+ bundleServer.findBundleDeploymentsByCriteria(c, //
+ new AsyncCallback<PageList<BundleDeployment>>() {
+
+ public void onSuccess(PageList<BundleDeployment> replacedBundleDeployments) {
+ if (1 != replacedBundleDeployments.size()) {
+ nextPage = false;
+ String messageConcise = MSG
+ .view_bundle_revertWizard_confirmStep_noPriorDeployment_concise();
+ String message = MSG.view_bundle_revertWizard_confirmStep_noPriorDeployment(
+ wizard.getLiveDeployment().toString(), wizard.getDestination().toString());
+ wizard.getView().showMessage(message);
+ CoreGUI.getMessageCenter().notify(
+ new Message(messageConcise, message, Message.Severity.Warning));
+ }
+
+ wizard.setPreviousDeployment(replacedBundleDeployments.get(0));
+ setLayout();
+ }
+
+ public void onFailure(Throwable caught) {
+ nextPage = false;
+ String messageConcise = MSG
+ .view_bundle_revertWizard_confirmStep_noPriorDeployment_concise();
+ String message = MSG.view_bundle_revertWizard_confirmStep_noPriorDeployment(wizard
+ .getLiveDeployment().toString(), wizard.getDestination().toString());
+ wizard.getView().showMessage(message);
+ CoreGUI.getMessageCenter().notify(
+ new Message(messageConcise, message, Message.Severity.Warning));
+ }
+ });
}
public void onFailure(Throwable caught) {
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/bundle/BundleManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/bundle/BundleManagerBean.java
index d0ddc8f..7a6e08a 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/bundle/BundleManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/bundle/BundleManagerBean.java
@@ -926,7 +926,6 @@ public class BundleManagerBean implements BundleManagerLocal, BundleManagerRemot
BundleDeploymentCriteria c = new BundleDeploymentCriteria();
c.addFilterDestinationId(bundleDestinationId);
c.addFilterIsLive(true);
- c.fetchReplacedBundleDeployment(true);
c.fetchDestination(true);
List<BundleDeployment> liveDeployments = bundleManager.findBundleDeploymentsByCriteria(subject, c);
if (1 != liveDeployments.size()) {
@@ -934,15 +933,15 @@ public class BundleManagerBean implements BundleManagerLocal, BundleManagerRemot
+ "]");
}
BundleDeployment liveDeployment = liveDeployments.get(0);
- BundleDeployment prevDeployment = liveDeployment.getReplacedBundleDeployment();
- if (null == prevDeployment) {
+ Integer prevDeploymentId = liveDeployment.getReplacedBundleDeploymentId();
+ if (null == prevDeploymentId) {
throw new IllegalArgumentException(
"Live deployment ["
+ liveDeployment
+ "] can not be reverted. The Live deployment is either an initial deployment or a reverted deployment for destinationId ["
+ bundleDestinationId + "]");
}
- prevDeployment = entityManager.find(BundleDeployment.class, prevDeployment.getId());
+ BundleDeployment prevDeployment = entityManager.find(BundleDeployment.class, prevDeploymentId);
if (null == prevDeployment) {
throw new IllegalArgumentException("Live deployment [" + liveDeployment
+ "] can not be reverted. There is no prior deployment for destinationId [" + bundleDestinationId + "]");
@@ -999,9 +998,9 @@ public class BundleManagerBean implements BundleManagerLocal, BundleManagerRemot
for (BundleDeployment d : currentDeployments) {
if (d.isLive()) {
d.setLive(false);
- // you can not revert a revert, it does not logically replace anything, it is
+ // you can not revert a revert, it does not logically replace anything
if (!isRevert) {
- newDeployment.setReplacedBundleDeployment(d);
+ newDeployment.setReplacedBundleDeploymentId(d.getId());
}
break;
}
@@ -1096,7 +1095,6 @@ public class BundleManagerBean implements BundleManagerLocal, BundleManagerRemot
BundleDeploymentCriteria bdc = new BundleDeploymentCriteria();
bdc.addFilterId(resourceDeployment.getBundleDeployment().getId());
bdc.fetchBundleVersion(true);
- bdc.fetchConfiguration(true);
bdc.fetchDestination(true);
BundleDeployment deployment = bundleManager.findBundleDeploymentsByCriteria(subject, bdc).get(0);
@@ -1471,6 +1469,7 @@ public class BundleManagerBean implements BundleManagerLocal, BundleManagerRemot
// to break the FK dependency with nulls.
Query q = entityManager.createNamedQuery(BundleDeployment.QUERY_UPDATE_FOR_VERSION_REMOVE);
q.setParameter("bundleVersionId", bundleVersionId);
+ @SuppressWarnings("unused")
int rowsUpdated = q.executeUpdate();
entityManager.flush();
13 years