[rhq] modules/enterprise
by ips
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LoginView.java | 13 ----------
1 file changed, 1 insertion(+), 12 deletions(-)
New commits:
commit 59387081b9bf66be0970958473d8cc52debae774
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Wed Aug 31 17:33:18 2011 -0400
[BZ 734610] remove validator on username field that was disallowing usernames
less than 6 characters long (https://bugzilla.redhat.com/show_bug.cgi?id=734610)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LoginView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LoginView.java
index b0d418f..5e915c6 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LoginView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LoginView.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
@@ -55,7 +55,6 @@ import com.smartgwt.client.widgets.form.fields.SubmitItem;
import com.smartgwt.client.widgets.form.fields.TextItem;
import com.smartgwt.client.widgets.form.fields.events.KeyPressEvent;
import com.smartgwt.client.widgets.form.fields.events.KeyPressHandler;
-import com.smartgwt.client.widgets.form.validator.LengthRangeValidator;
import com.smartgwt.client.widgets.form.validator.RegExpValidator;
import com.smartgwt.client.widgets.layout.HStack;
@@ -495,16 +494,6 @@ public class LoginView extends LocatableCanvas {
for (FormItem item : form.getFields()) {
String name = item.getName();
if ((name != null) && (!name.isEmpty())) {
- if (name.equals(USERNAME)) {
- LengthRangeValidator validator = new LengthRangeValidator();
- validator.setMin(6);
- item.setValidators(validator);
- }
- if (name.equals(FIRST)) {
- LengthRangeValidator validator = new LengthRangeValidator();
- validator.setMin(1);
- item.setValidators(validator);
- }
if (name.equals(EMAIL)) {
RegExpValidator emailValidator = new RegExpValidator();
emailValidator.setErrorMessage(MSG.view_login_invalidEmail());
12 years, 7 months
[rhq] modules/enterprise
by ips
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/GWTServiceLookup.java | 15 ++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/TestGWTService.java | 34 ++++++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/schedules/SchedulesDataSource.java | 8 +
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/AbstractConfigurationHistoryDataSource.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/AutodiscoveryQueueDataSource.java | 8 +
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java | 14 ++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/TestRpcView.java | 52 ++++++++++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/TestTopView.java | 9 +
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/TestGWTServiceImpl.java | 43 ++++++++
modules/enterprise/gui/coregui/src/main/webapp/WEB-INF/web.xml | 8 +
10 files changed, 184 insertions(+), 11 deletions(-)
New commits:
commit f4fdec760496263f02cba9e1e713f124e597a83b
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Wed Aug 31 17:18:11 2011 -0400
[BZ 722548] add new #Test/Rpc view that can be used to invoke a new sleep() RPC
method that sleeps for a specified number of seconds; increase default RPC
timeout from 10s to 30s; use custom timeouts for autodiscovery queue,
config history list, group schedules list views, which may exceed even the new
default timeout (https://bugzilla.redhat.com/show_bug.cgi?id=722548)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/GWTServiceLookup.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/GWTServiceLookup.java
index 8f5dbc1..c516592 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/GWTServiceLookup.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/GWTServiceLookup.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
@@ -58,6 +58,10 @@ public class GWTServiceLookup {
return secure(ConfigurationGWTServiceAsync.Util.getInstance());
}
+ public static ConfigurationGWTServiceAsync getConfigurationService(int timeout) {
+ return secure(ConfigurationGWTServiceAsync.Util.getInstance(), timeout);
+ }
+
public static DriftGWTServiceAsync getDriftService() {
return secure(DriftGWTServiceAsync.Util.getInstance());
}
@@ -190,6 +194,10 @@ public class GWTServiceLookup {
return secure(AgentGWTServiceAsync.Util.getInstance());
}
+ public static TestGWTServiceAsync getTestService() {
+ return secure(TestGWTServiceAsync.Util.getInstance());
+ }
+
@SuppressWarnings("unchecked")
private static <T> T secure(Object sdt) {
return (T) secure(sdt, -1);
@@ -208,7 +216,8 @@ public class GWTServiceLookup {
public static class SessionRpcRequestBuilder extends RpcRequestBuilder {
private static int DEBUG_TIMEOUT_FUDGE_FACTOR = 30000;
- private static int DEFAULT_RPC_TIMEOUT = 10000;
+ private static int DEFAULT_RPC_TIMEOUT = 30000;
+
private int timeout;
public SessionRpcRequestBuilder(int timeout) {
@@ -221,7 +230,7 @@ public class GWTServiceLookup {
this.timeout = (timeout <= 0) ? DEFAULT_RPC_TIMEOUT : timeout;
}
- if (CoreGUI.isDebugMode()) {
+ if (CoreGUI.isDebugMode() && (this.timeout != 0)) {
// debug mode is slow, so give requests more time to complete otherwise you'll get
// weird exceptions whose messages are extremely unhelpful in finding root cause
this.timeout += DEBUG_TIMEOUT_FUDGE_FACTOR;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/TestGWTService.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/TestGWTService.java
new file mode 100644
index 0000000..168edfa
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/TestGWTService.java
@@ -0,0 +1,34 @@
+/*
+ * 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.gwt;
+
+import com.google.gwt.user.client.rpc.RemoteService;
+
+/**
+ * @author Ian Springer
+ */
+public interface TestGWTService extends RemoteService {
+
+ void sleep(int seconds) throws RuntimeException;
+
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/schedules/SchedulesDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/schedules/SchedulesDataSource.java
index 1f4d491..c21484d 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/schedules/SchedulesDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/monitoring/schedules/SchedulesDataSource.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2010 Red Hat, Inc.
+ * Copyright (C) 2010-2011 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -43,7 +43,10 @@ import org.rhq.enterprise.gui.coregui.client.util.message.Message;
* @author Ian Springer
*/
public class SchedulesDataSource extends AbstractMeasurementScheduleCompositeDataSource {
- private MeasurementDataGWTServiceAsync measurementService = GWTServiceLookup.getMeasurementDataService();
+
+ // Specify 60s timeout to compensate for schedule updates taking a long time for large groups.
+ // TODO (ips, 08/31/11): Remove this once updating of group schedules has been optimized.
+ private MeasurementDataGWTServiceAsync measurementService = GWTServiceLookup.getMeasurementDataService(60 * 1000);
private int resourceGroupId;
public SchedulesDataSource(int resourceGroupId) {
@@ -157,4 +160,5 @@ public class SchedulesDataSource extends AbstractMeasurementScheduleCompositeDat
}
});
}
+
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/AbstractConfigurationHistoryDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/AbstractConfigurationHistoryDataSource.java
index b92fb94..9991f9c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/AbstractConfigurationHistoryDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/AbstractConfigurationHistoryDataSource.java
@@ -78,7 +78,9 @@ public abstract class AbstractConfigurationHistoryDataSource<T extends AbstractR
public static final String RESOURCE_ID = "resourceId";
}
- private ConfigurationGWTServiceAsync configurationService = GWTServiceLookup.getConfigurationService();
+ // Specify 60s timeout to compensate for Configurations being fetched for all of the config updates.
+ // TODO (ips, 08/31/11): Remove this once fetching of Configurations has been disabled.
+ private ConfigurationGWTServiceAsync configurationService = GWTServiceLookup.getConfigurationService(60 * 1000);
protected ConfigurationGWTServiceAsync getConfigurationService() {
return this.configurationService;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/AutodiscoveryQueueDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/AutodiscoveryQueueDataSource.java
index 6769b9c..cccc08a 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/AutodiscoveryQueueDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/AutodiscoveryQueueDataSource.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
@@ -65,7 +65,11 @@ public class AutodiscoveryQueueDataSource extends DataSource {
private int unlimited = -1;
private int maximumPlatformsToDisplay = -1;
- private ResourceGWTServiceAsync resourceService = GWTServiceLookup.getResourceService(1000000);
+
+ // Specify 60s timeout to compensate for slow loading of this view due to lack of paging of results.
+ // TODO (ips, 08/31/11): Remove this once paging has been implemented.
+ private ResourceGWTServiceAsync resourceService = GWTServiceLookup.getResourceService(60 * 1000);
+
private PermissionsLoader permissionsLoader = new PermissionsLoader();
private TreeGrid dataContainerReference = null;
private static final Permission MANAGE_INVENTORY = Permission.MANAGE_INVENTORY;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
index 4daa3c6..9b0cfe3 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
@@ -79,7 +79,14 @@ public class ResourceAutodiscoveryView extends LocatableVLayout implements Refre
// This allows the selection handler to ignore selection changes initiated by us, as opposed to by the user.
private boolean selectionChangedHandlerDisabled;
- private ResourceGWTServiceAsync resourceService = GWTServiceLookup.getResourceService(1000000);
+ private ResourceGWTServiceAsync resourceService = GWTServiceLookup.getResourceService();
+
+ // Specify 3m timeout to compensate for import taking a long time for a large number of Resources.
+ // TODO (ips, 08/31/11): Remove this once import has been refactored to be partially asynchronous, i.e. where the
+ // call to importResources() flips all the Resources to a new COMMITTING inventory status
+ // and then kicks off a background job to do the actual work of committing (syncing to
+ // Agents, etc.).
+ private ResourceGWTServiceAsync importResourceService = GWTServiceLookup.getResourceService(3 * 60 * 1000);
public ResourceAutodiscoveryView(String locatorId) {
super(locatorId);
@@ -317,11 +324,14 @@ public class ResourceAutodiscoveryView extends LocatableVLayout implements Refre
importButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent clickEvent) {
disableButtons(selectAllButton, deselectAllButton, importButton, ignoreButton, unignoreButton);
+ // TODO (ips): Make the below message sticky, but add a new ClearSticky Message option that the
+ // below callback methods can use to clear it once the importResources() call has
+ // completed.
CoreGUI.getMessageCenter().notify(
new Message(MSG.view_autoDiscoveryQ_importInProgress(), Message.Severity.Info, EnumSet
.of(Message.Option.Transient)));
- resourceService.importResources(getSelectedIds(), new AsyncCallback<Void>() {
+ importResourceService.importResources(getSelectedIds(), new AsyncCallback<Void>() {
public void onFailure(Throwable caught) {
CoreGUI.getErrorHandler().handleError(MSG.view_autoDiscoveryQ_importFailure(), caught);
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/TestRpcView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/TestRpcView.java
new file mode 100644
index 0000000..b3c333f
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/TestRpcView.java
@@ -0,0 +1,52 @@
+package org.rhq.enterprise.gui.coregui.client.test;
+
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.smartgwt.client.widgets.form.DynamicForm;
+import com.smartgwt.client.widgets.form.fields.ButtonItem;
+import com.smartgwt.client.widgets.form.fields.FormItem;
+import com.smartgwt.client.widgets.form.fields.events.ClickEvent;
+import com.smartgwt.client.widgets.form.fields.events.ClickHandler;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.gwt.TestGWTServiceAsync;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
+
+/**
+ * @author Ian Springer
+ */
+public class TestRpcView extends LocatableVLayout {
+
+ public TestRpcView(String locatorId) {
+ super(locatorId);
+ setMargin(10);
+
+ DynamicForm form = new DynamicForm();
+ form.setWidth(400);
+
+ final FormItem item = new FormItem("seconds");
+ item.setTitle("Seconds to sleep");
+ item.setRequired(true);
+
+ ButtonItem button = new ButtonItem("execute", "Execute");
+ button.addClickHandler(new ClickHandler() {
+ public void onClick(ClickEvent event) {
+ TestGWTServiceAsync testService = GWTServiceLookup.getTestService();
+ final int seconds = Integer.valueOf((String)item.getValue());
+ testService.sleep(seconds, new AsyncCallback<Void>() {
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError("sleep(" + seconds + ") RPC call failed.", caught);
+ }
+
+ public void onSuccess(Void result) {
+ CoreGUI.getMessageCenter().notify(new Message("sleep(" + seconds + ") RPC completed."));
+ }
+ });
+ }
+ });
+ form.setItems(item, button);
+
+ addMember(form);
+ }
+
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/TestTopView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/TestTopView.java
index 58a6cd6..a9e131b 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/TestTopView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/TestTopView.java
@@ -79,6 +79,7 @@ public class TestTopView extends AbstractSectionedLeftNavigationView {
private static final ViewName MISC_SECTION_VIEW_ID = new ViewName("Misc");
private static final ViewName PAGE_PLURALIZATION_TEST = new ViewName("PluralizationTest");
private static final ViewName PAGE_ASYNC = new ViewName("Async");
+ private static final ViewName PAGE_RPC = new ViewName("Rpc");
public TestTopView() {
// This is a top level view, so our locator id can simply be our view id.
@@ -235,7 +236,13 @@ public class TestTopView extends AbstractSectionedLeftNavigationView {
}
});
- return new NavigationSection(MISC_SECTION_VIEW_ID, pluralizationItem, asyncItem);
+ NavigationItem rpcItem = new NavigationItem(PAGE_RPC, null, new ViewFactory() {
+ public Canvas createView() {
+ return new TestRpcView(extendLocatorId(PAGE_RPC.getName()));
+ }
+ });
+
+ return new NavigationSection(MISC_SECTION_VIEW_ID, pluralizationItem, asyncItem, rpcItem);
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/TestGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/TestGWTServiceImpl.java
new file mode 100644
index 0000000..8f9a518
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/TestGWTServiceImpl.java
@@ -0,0 +1,43 @@
+/*
+ * 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.server.gwt;
+
+import org.rhq.enterprise.gui.coregui.client.gwt.TestGWTService;
+
+/**
+ * @author Ian Springer
+ */
+public class TestGWTServiceImpl extends AbstractGWTServiceImpl implements TestGWTService {
+
+ private static final long serialVersionUID = 1L;
+
+ public void sleep(int seconds) throws RuntimeException {
+ try {
+ Thread.sleep(seconds * 1000);
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ throw getExceptionToThrowToClient(e);
+ }
+ }
+
+}
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/WEB-INF/web.xml b/modules/enterprise/gui/coregui/src/main/webapp/WEB-INF/web.xml
index c4943ed..ebc12f5 100644
--- a/modules/enterprise/gui/coregui/src/main/webapp/WEB-INF/web.xml
+++ b/modules/enterprise/gui/coregui/src/main/webapp/WEB-INF/web.xml
@@ -161,6 +161,10 @@
<servlet-name>org.rhq.enterprise.gui.coregui.CoreGUI DriftGWTService</servlet-name>
<servlet-class>org.rhq.enterprise.gui.coregui.server.gwt.DriftGWTServiceImpl</servlet-class>
</servlet>
+ <servlet>
+ <servlet-name>org.rhq.enterprise.gui.coregui.CoreGUI TestGWTService</servlet-name>
+ <servlet-class>org.rhq.enterprise.gui.coregui.server.gwt.TestGWTServiceImpl</servlet-class>
+ </servlet>
<servlet-mapping>
@@ -311,6 +315,10 @@
<servlet-name>org.rhq.enterprise.gui.coregui.CoreGUI DriftGWTService</servlet-name>
<url-pattern>/org.rhq.enterprise.gui.coregui.CoreGUI/DriftGWTService</url-pattern>
</servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>org.rhq.enterprise.gui.coregui.CoreGUI TestGWTService</servlet-name>
+ <url-pattern>/org.rhq.enterprise.gui.coregui.CoreGUI/TestGWTService</url-pattern>
+ </servlet-mapping>
<welcome-file-list>
12 years, 7 months
[rhq] Branch 'drift' - modules/enterprise
by mazz
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java | 54 ++++++----
1 file changed, 34 insertions(+), 20 deletions(-)
New commits:
commit 64e471e7310e066177d00a15d67bc2fd72ed0f5b
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Aug 31 16:57:48 2011 -0400
after we persist a drift change set, hand off the summary data to the alert condition cache manager to check to see if drift alerts need to be fired
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
index 27ec698..31c7084 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
@@ -71,6 +71,8 @@ import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.server.RHQConstants;
import org.rhq.enterprise.server.agentclient.AgentClient;
+import org.rhq.enterprise.server.alert.engine.AlertConditionCacheManagerLocal;
+import org.rhq.enterprise.server.alert.engine.AlertConditionCacheStats;
import org.rhq.enterprise.server.auth.SubjectManagerLocal;
import org.rhq.enterprise.server.core.AgentManagerLocal;
import org.rhq.enterprise.server.plugin.pc.MasterServerPluginContainer;
@@ -170,6 +172,9 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
@EJB
private SubjectManagerLocal subjectManager;
+ @EJB
+ private AlertConditionCacheManagerLocal alertConditionCacheManager;
+
// use a new transaction when putting things on the JMS queue. see
// http://management-platform.blogspot.com/2008/11/transaction-recovery-in-j...
@Override
@@ -359,6 +364,7 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
public DriftChangeSetSummary saveChangeSet(Subject subject, int resourceId, File changeSetZip) throws Exception {
DriftServerPluginFacet driftServerPlugin = getServerPlugin();
DriftChangeSetSummary summary = driftServerPlugin.saveChangeSet(subject, resourceId, changeSetZip);
+ notifyAlertConditionCacheManager("saveChangeSet", summary);
return summary;
}
@@ -520,7 +526,8 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
PageList<? extends Drift<?, ?>> results = driftServerPlugin.findDriftsByCriteria(subject, criteria);
if (results.size() == 0) {
- log.warn("Unable to get the drift details for drift id " + driftId + ". No drift object found with that id.");
+ log.warn("Unable to get the drift details for drift id " + driftId
+ + ". No drift object found with that id.");
return null;
}
@@ -528,33 +535,40 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
driftDetails.setDrift(drift);
try {
switch (drift.getCategory()) {
- case FILE_ADDED:
- newFile = driftServerPlugin.getDriftFile(subject, drift.getNewDriftFile().getHashId());
- driftDetails.setNewFileStatus(newFile.getStatus());
- break;
- case FILE_CHANGED:
- newFile = driftServerPlugin.getDriftFile(subject, drift.getNewDriftFile().getHashId());
- oldFile = driftServerPlugin.getDriftFile(subject, drift.getOldDriftFile().getHashId());
-
- driftDetails.setNewFileStatus(newFile.getStatus());
- driftDetails.setOldFileStatus(oldFile.getStatus());
-
- driftDetails.setPreviousChangeSet(loadPreviousChangeSet(subject, drift));
- break;
- case FILE_REMOVED:
- oldFile = driftServerPlugin.getDriftFile(subject, drift.getOldDriftFile().getHashId());
- driftDetails.setOldFileStatus(oldFile.getStatus());
- break;
+ case FILE_ADDED:
+ newFile = driftServerPlugin.getDriftFile(subject, drift.getNewDriftFile().getHashId());
+ driftDetails.setNewFileStatus(newFile.getStatus());
+ break;
+ case FILE_CHANGED:
+ newFile = driftServerPlugin.getDriftFile(subject, drift.getNewDriftFile().getHashId());
+ oldFile = driftServerPlugin.getDriftFile(subject, drift.getOldDriftFile().getHashId());
+
+ driftDetails.setNewFileStatus(newFile.getStatus());
+ driftDetails.setOldFileStatus(oldFile.getStatus());
+
+ driftDetails.setPreviousChangeSet(loadPreviousChangeSet(subject, drift));
+ break;
+ case FILE_REMOVED:
+ oldFile = driftServerPlugin.getDriftFile(subject, drift.getOldDriftFile().getHashId());
+ driftDetails.setOldFileStatus(oldFile.getStatus());
+ break;
}
} catch (Exception e) {
- log.error("An error occurred while loading the drift details for drift id " + driftId + ": " +
- e.getMessage());
+ log.error("An error occurred while loading the drift details for drift id " + driftId + ": "
+ + e.getMessage());
throw new RuntimeException("An error occurred while loading th drift details for drift id " + driftId, e);
}
driftDetails.setBinaryFile(isBinaryFile(drift));
return driftDetails;
}
+ private void notifyAlertConditionCacheManager(String callingMethod, DriftChangeSetSummary summary) {
+ AlertConditionCacheStats stats = alertConditionCacheManager.checkConditions(summary);
+ if (log.isDebugEnabled()) {
+ log.debug(callingMethod + ": " + stats.toString());
+ }
+ }
+
private DriftChangeSet loadPreviousChangeSet(Subject subject, Drift drift) {
GenericDriftChangeSetCriteria criteria = new GenericDriftChangeSetCriteria();
criteria.addFilterResourceId(drift.getChangeSet().getResourceId());
12 years, 7 months
[rhq] Branch 'drift' - etc/eclipse-tools
by mazz
etc/eclipse-tools/maven/RHQ | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 9b3d7aba530b08276da95dd7e2e9ddf2d8a65a6b
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Aug 31 14:54:11 2011 -0400
have eclipse use skipTests when doing full builds
diff --git a/etc/eclipse-tools/maven/RHQ Maven Build - Dev Profile Full Enterprise with DBSetup.launch b/etc/eclipse-tools/maven/RHQ Maven Build - Dev Profile Full Enterprise with DBSetup.launch
index 2eae613..4dc816d 100644
--- a/etc/eclipse-tools/maven/RHQ Maven Build - Dev Profile Full Enterprise with DBSetup.launch
+++ b/etc/eclipse-tools/maven/RHQ Maven Build - Dev Profile Full Enterprise with DBSetup.launch
@@ -6,6 +6,6 @@
<listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
</listAttribute>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${env_var:M2_HOME}/bin/${MAVEN_EXE}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-o -Dmaven.test.skip=true -Pdev,enterprise -Ddbsetup -Ddb=dev install"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-o -DskipTests=true -Pdev,enterprise -Ddbsetup -Ddb=dev install"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/rhq}"/>
</launchConfiguration>
diff --git a/etc/eclipse-tools/maven/RHQ Maven Build - Dev Profile Full Enterprise.launch b/etc/eclipse-tools/maven/RHQ Maven Build - Dev Profile Full Enterprise.launch
index ebd9747..4e20f34 100644
--- a/etc/eclipse-tools/maven/RHQ Maven Build - Dev Profile Full Enterprise.launch
+++ b/etc/eclipse-tools/maven/RHQ Maven Build - Dev Profile Full Enterprise.launch
@@ -6,6 +6,6 @@
<listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
</listAttribute>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${env_var:M2_HOME}/bin/${MAVEN_EXE}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-o -Dmaven.test.skip=true -Pdev,enterprise -Ddb=dev install"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-o -DskipTests=true -Pdev,enterprise -Ddb=dev install"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/rhq}"/>
</launchConfiguration>
12 years, 7 months
[rhq] Branch 'drift' - modules/core
by mazz
modules/core/plugin-container/src/test/java/org/rhq/core/pc/PluginContainerTest.java | 47 +++++-----
modules/core/plugin-container/src/test/java/org/rhq/core/pc/inventory/ResourceContainerTest.java | 9 +
2 files changed, 33 insertions(+), 23 deletions(-)
New commits:
commit ed6424e5954ab8e78613a5d6574e105adac0cbaf
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Aug 31 14:49:49 2011 -0400
set the data directory so we don't get changesets directory outside of the target/ dir
diff --git a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/PluginContainerTest.java b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/PluginContainerTest.java
index f97db7c..6c5cb3a 100644
--- a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/PluginContainerTest.java
+++ b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/PluginContainerTest.java
@@ -1,29 +1,31 @@
- /*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, 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.
- */
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, 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.core.pc;
import java.io.File;
+
import org.testng.annotations.Test;
+
import org.rhq.core.pc.plugin.FileSystemPluginFinder;
@Test
@@ -31,6 +33,7 @@ public class PluginContainerTest {
public void testStartup() {
PluginContainerConfiguration config = new PluginContainerConfiguration();
config.setPluginFinder(new FileSystemPluginFinder(new File(".")));
+ config.setDataDirectory(new File("target/PluginContainerTest"));
PluginContainer pc = PluginContainer.getInstance();
pc.setConfiguration(config);
pc.initialize();
diff --git a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/inventory/ResourceContainerTest.java b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/inventory/ResourceContainerTest.java
index 27c026a..fd3e68a 100644
--- a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/inventory/ResourceContainerTest.java
+++ b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/inventory/ResourceContainerTest.java
@@ -22,6 +22,8 @@
*/
package org.rhq.core.pc.inventory;
+import java.io.File;
+
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@@ -30,6 +32,7 @@ import org.rhq.core.clientapi.agent.metadata.PluginMetadataManager;
import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.pc.PluginContainer;
+import org.rhq.core.pc.PluginContainerConfiguration;
import org.rhq.core.pc.util.FacetLockType;
import org.rhq.core.pluginapi.availability.AvailabilityFacet;
import org.rhq.core.pluginapi.inventory.ResourceComponent;
@@ -45,7 +48,11 @@ public class ResourceContainerTest {
@BeforeClass
public void beforeClass() {
- PluginContainer.getInstance().initialize();
+ PluginContainerConfiguration config = new PluginContainerConfiguration();
+ config.setDataDirectory(new File("target/PluginContainerTest"));
+ PluginContainer pc = PluginContainer.getInstance();
+ pc.setConfiguration(config);
+ pc.initialize();
ResourceContainer.initialize();
}
12 years, 7 months
[rhq] modules/enterprise
by John Sanda
modules/enterprise/remoting/cli/src/main/samples/drift.js | 153 +++++++++++---
modules/enterprise/remoting/cli/src/main/samples/util.js | 17 +
2 files changed, 140 insertions(+), 30 deletions(-)
New commits:
commit 3bcea7dc24cf65119b17b2f19a95e21777980082
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Aug 31 14:25:07 2011 -0400
[BZ 734814] Adding docs
diff --git a/modules/enterprise/remoting/cli/src/main/samples/drift.js b/modules/enterprise/remoting/cli/src/main/samples/drift.js
index 5a1e6e0a..ff7c31a 100644
--- a/modules/enterprise/remoting/cli/src/main/samples/drift.js
+++ b/modules/enterprise/remoting/cli/src/main/samples/drift.js
@@ -1,10 +1,64 @@
-// This script has a dependency on rhq/etc/cl-scripts/util.js. The following
-// command needs to be run in order to load the functions in util.js:
-//
-// exec -f /path/to/rhq/etc/cli-scripts/util.js
-//
-// Then the same exec command can be run to load functions in this script.
+/**
+ * file: drift.js
+ *
+ * description: This script contains functions that illustrate and highlight
+ * drift monitoring functionality. Some of the functionality demonstrated in
+ * this script is currently available only via RHQ's remote client (and CLI)
+ * at the time of this writing. This script has a dependency on util.js. To
+ * load this script's functions into your CLI session execute the following
+ * from the CLI shell,
+ *
+ * $ login <username> <password>
+ * $ exec -f samples/util.js
+ * $ exec -f samples/drift.js
+ *
+ * Note that you must login before you can load the scripts. Also please note
+ * that if a function is not documented, then it is not intended for public
+ * use. It is used only as an internal helper function.
+ *
+ * author: jsanda(a)redhat.com
+ */
+/**
+ * description: Generates a snapshot of changes sets belonging to a particular
+ * drift configuration of a specific resource. By default all change sets are
+ * included in the snapshot. An optional third argument can be specified to
+ * limit or control the number of change sets included in the snapshot.
+ *
+ * Note that a snapshot is an accumulation or aggregation of change sets that
+ * provides a view of a resource, or more precisely, all files being monitored
+ * for drift, at a particular version or point in time.
+ *
+ * arguments:
+ * rid: A resource id, expected to be an integer
+ *
+ * cname: The drift configuration name as a string
+ *
+ * filters: (optional) A map or JS object that limits the number of
+ * change sets included in the snapshot
+ *
+ * return: A org.rhq.core.domamin.drift.DriftSnapshot object
+ *
+ * usage:
+ * // generates a snapshot that includes all change sets belonging to the
+ * // mydrift drift configuration.
+ * createSnapshot(123, 'mydrift')
+ *
+ * // generates a snapshot starting a change set version 3 and including
+ * // everything more recent than it.
+ * createSnapshot(123, 'mydrift', {"startVersion": 3})
+ *
+ * // generates a snapshot that includes change sets 3 through 5 inclusive.
+ * createSnapshot(123, 'mydrift', {"startVersion": 3, "endVersion": 5})
+ *
+ * // generates a snaphot that includes everything after the specified
+ * // timestamp. Note that the timestamp should be specified in milliseconds.
+ * createSnapshot(123, 'mydrift', {"createdAfter": 1314811734365})
+ *
+ * // generates a snapshot that includes all change sets that were created
+ * // between the two timestamps.
+ * createSnapshot(123, 'mydrift', {"createdAfter": 1314811734365, "createdBefore": 9994811734365})
+ */
function createSnapshot(rid, cname) {
var config = findDriftConfig(rid, function(c) { return cname.equals(c.name) });
@@ -35,6 +89,39 @@ function findDriftConfig(rid, filter) {
});
}
+/**
+ * description: Generates a diff report that is printed to the console. By
+ * default this function generates a snapshot diff. The function expects two
+ * arguments which should be DriftSnapshot objects. A diff between those two
+ * snapshots is generated and printed to the console. A path can be specified
+ * as an optional third argument. If a path is a specified as a third argument,
+ * then a file diff will be performed using the file that matches the path in
+ * each change set. The format will be a unified diff.
+ *
+ * Note that the snapshots can be from the same or from different resources;
+ * however, if they are from different resources, it is assumed that the
+ * resources are of the same type.
+ *
+ * arguments:
+ * s1: A DriftSnapshot object
+ *
+ * s2: A DriftSnapshot object
+ *
+ * path: (optional) A string that specifies a path that exists in both s1 and
+ * s2.
+ *
+ * return: This function does not return a useful value. It may be an empty
+ * string or it could be null. Instead of returns its results, the function
+ * prints them to the CLI console. As such, this function is intended for
+ * use from the interactive CLI shell.
+ *
+ * usage:
+ * // Generates a snapshot diff report
+ * diff(s1, s2)
+ *
+ * // Generates a file diff report in the unified format
+ * diff(s1, s2, 'jboss_home/bin/run.conf')
+ */
function diff(s1, s2) {
var theDiff = s1.diff(s2);
@@ -73,12 +160,40 @@ function diff(s1, s2) {
report('elements not in right', theDiff.elementsNotInRight);
}
+/**
+ * description: Generates and returns the drift history for a file being
+ * monitored for drift. This function takes three arguments. The first two, the
+ * resource id drift configuration name, uniquely identify the drift
+ * configuration. The third argument specifies a path that is set up for
+ * monitoring by the drift configuration.
+ *
+ * arguments:
+ * rid: A resource id
+ *
+ * configName: A drift configuration name
+ *
+ * path: A path that is set up for drift monitoring by the drift
+ * configuration that is identified by the first two arguments. The path
+ * should be specified as relative to the base directory from which
+ * monitoring is done.
+ *
+ * return: A History object, which is a native JS object. This object contains
+ * a few methods for working with the file history:
+ *
+ * list: prints a short summary of all versions of the file
+ * view: returns the contents of a particular version of the file
+ * compare: compares two versions of the file and prints a unified diff
+ *
+ * usage:
+ * $ history = fetchHistory(123, 'mydrift', 'bin/run.conf')
+ * $ history.list() // prints a summary of all versions of 'bin/run.conf'
+ * $ history.view(1) // returns the full contents of version 1 of the file
+ * $ history.compare(1, 2) // generates and prints a unified diff of versions 1 and 2
+ */
function fetchHistory(rid, configName, path) {
function History() {
var entries = [];
- this.echo = function(msg) {println(msg);}
-
function findDrift(version) {
return find(entries, function(drift) {
return drift.changeSet.version == version
@@ -139,26 +254,4 @@ function fetchHistory(rid, configName, path) {
}
return new History();
-
-/*
- var criteria = GenericDriftCriteria();
- criteria.addFilterResourceIds([rid]);
- criteria.fetchChangeSet(true);
- criteria.addFilterPath(path);
-
- var drifts = DriftManager.findDriftsByCriteria(criteria);
- var history = [];
- foreach(drifts, function(drift) {
- if (drift.changeSet.driftConfiguration.name == configName &&
- drift.path == path) {
- history.push(drift);
- }
- });
-
- history.sort(function(d1, d2) {
- return d1.changeSet.version <= d2.changeSet.version
- });
-
- return history;
-*/
}
diff --git a/modules/enterprise/remoting/cli/src/main/samples/util.js b/modules/enterprise/remoting/cli/src/main/samples/util.js
index e0bb219..0369fe8 100644
--- a/modules/enterprise/remoting/cli/src/main/samples/util.js
+++ b/modules/enterprise/remoting/cli/src/main/samples/util.js
@@ -1,4 +1,21 @@
/**
+ * file: util.js
+ *
+ * description: This script contains functions that provide core, low-level
+ * functionality such as iterating over a collection or searching a collection.
+ * This has no other script or library dependencies. To load the functions into
+ * your CLI session execute the following from the CLI shell,
+ *
+ * $ login <username> <password>
+ * $ exec -f samples/util.js
+ *
+ * Note that you must login before you can load the script.
+ *
+ * author: jsanda(a)redhat.com
+ */
+
+
+/**
* If obj is a JS array or a java.util.Collection, each element is passed to
* the callback function. If obj is a java.util.Map, each map entry is passed
* to the callback function as a key/value pair. If obj is none of the
12 years, 7 months
[rhq] Branch 'drift' - 3 commits - modules/core modules/enterprise modules/plugins
by mazz
modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertCondition.java | 22 ++
modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertConditionCategory.java | 3
modules/core/domain/src/main/java/org/rhq/core/domain/alert/composite/AlertConditionDriftCategoryComposite.java | 40 ++++
modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceType.java | 3
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertFormatUtility.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ConditionsEditor.java | 87 ++++++---
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/NewConditionEditor.java | 31 +++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypeRepository.java | 41 ++--
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties | 3
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties | 7
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties | 3
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties | 3
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties | 3
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertConditionManagerBean.java | 3
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertManagerBean.java | 37 +++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/AlertConditionCacheManagerBean.java | 7
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/AlertConditionCacheManagerLocal.java | 9
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/internal/AgentConditionCache.java | 59 +++++-
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/internal/AlertConditionCacheCoordinator.java | 44 ++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/internal/AlertConditionCacheUtils.java | 5
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/mbean/AlertConditionCacheMonitor.java | 25 ++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/mbean/AlertConditionCacheMonitorMBean.java | 10 +
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/model/AbstractCacheElement.java | 6
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/model/DriftCacheElement.java | 45 ++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/i18n/AlertI18NResourceKeys.java | 26 +-
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java | 34 +--
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/JPADriftServerBean.java | 23 ++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/JPADriftServerLocal.java | 4
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftChangeSetSummary.java | 93 ++++++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java | 11 +
modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java | 27 ++
modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/JPADriftServerPluginComponent.java | 9
modules/plugins/rhq-server/src/main/resources/META-INF/rhq-plugin.xml | 6
33 files changed, 628 insertions(+), 105 deletions(-)
New commits:
commit 3d607576bbaf20c0aa3e5a292cf895b7561e18e7
Merge: 6aa3c58 5d4fbbe
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Aug 31 13:22:29 2011 -0400
Merge commit 'origin/master' into drift-alert
commit 6aa3c583f37107dedf6d75a30dd4e62c1dd4b148
Merge: 89731c7 044113e
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue Aug 30 22:43:33 2011 -0400
Merge commit 'origin/master' into drift-alert
Conflicts:
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/JPADriftServerBean.java
diff --cc modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
index 738d69f,898a4c2..27ec698
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
@@@ -59,7 -54,9 +61,8 @@@ import org.rhq.core.domain.drift.DriftC
import org.rhq.core.domain.drift.DriftComposite;
import org.rhq.core.domain.drift.DriftConfiguration;
import org.rhq.core.domain.drift.DriftConfigurationComparator;
-import org.rhq.core.domain.drift.DriftConfigurationComparator.CompareMode;
import org.rhq.core.domain.drift.DriftConfigurationDefinition;
+ import org.rhq.core.domain.drift.DriftDetails;
import org.rhq.core.domain.drift.DriftFile;
import org.rhq.core.domain.drift.DriftSnapshot;
import org.rhq.core.domain.drift.FileDiffReport;
commit 89731c7d830f3b9293b8307002e4ae015d17406b
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue Aug 30 22:40:51 2011 -0400
start of drift alerting support.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertCondition.java b/modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertCondition.java
index 355c854..00a409b 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertCondition.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertCondition.java
@@ -242,6 +242,21 @@ import org.rhq.core.domain.operation.OperationRequestStatus;
+ " AND ad.deleted = FALSE " //
+ " AND ac.category = 'RESOURCE_CONFIG' " //
+ "ORDER BY ac.id"), //
+ @NamedQuery(name = AlertCondition.QUERY_BY_CATEGORY_DRIFT, query = "" //
+ + " SELECT new org.rhq.core.domain.alert.composite.AlertConditionDriftCategoryComposite " //
+ + " ( " //
+ + " ac, " //
+ + " res.id " //
+ + " ) " //
+ + " FROM AlertCondition AS ac " //
+ + " JOIN ac.alertDefinition ad " //
+ + " JOIN ad.resource res " //
+ + " WHERE " + AlertCondition.RECOVERY_CONDITIONAL_EXPRESSION //
+ + " AND ( res.agent.id = :agentId OR :agentId IS NULL ) " //
+ + " AND ad.enabled = TRUE " //
+ + " AND ad.deleted = FALSE " //
+ + " AND ac.category = 'DRIFT' " //
+ + "ORDER BY ac.id"), //
@NamedQuery(name = AlertCondition.QUERY_BY_CATEGORY_COUNT_PARAMETERIZED, query = "" //
+ " SELECT count(ac.id) " //
+ " FROM AlertCondition AS ac " //
@@ -273,6 +288,7 @@ public class AlertCondition implements Serializable {
public static final String QUERY_BY_CATEGORY_THRESHOLD = "AlertCondition.byCategoryThreshold";
public static final String QUERY_BY_CATEGORY_EVENT = "AlertCondition.byCategoryEvent";
public static final String QUERY_BY_CATEGORY_RESOURCE_CONFIG = "AlertCondition.byCategoryResourceConfig";
+ public static final String QUERY_BY_CATEGORY_DRIFT = "AlertCondition.byCategoryDrift";
public static final String QUERY_BY_CATEGORY_COUNT_BASELINE = "AlertCondition.byCategoryCountBaseline";
public static final String QUERY_BY_CATEGORY_COUNT_PARAMETERIZED = "AlertCondition.byCategoryCountParameterized";
@@ -395,6 +411,8 @@ public class AlertCondition implements Serializable {
* TRAIT: the name of the trait (TODO: today its the display name, very bad for i18n purposes)
* CONTROL: the name of the operation (not its display name)
* EVENT: the level of event to compare with (DEBUG, INFO, WARN, ERROR, FATAL)
+ * RESOURCE_CONFIG: n/a (null)
+ * DRIFT: n/a (null)
*
* @return additional information about the condition
*/
@@ -450,7 +468,9 @@ public class AlertCondition implements Serializable {
* TRAIT: n/a
* CONTROL: the {@link OperationRequestStatus} name (SUCCESS, FAILURE, etc).
* EVENT: the regular expression of the message to match (which may be empty string if not specified)
- *
+ * RESOURCE_CONFIG: n/a
+ * DRIFT: n/a (TODO driftalert - regular expression to match files whose content drifted (may be empty string if not specified)
+ *
* @return additional information about the condition
*/
public String getOption() {
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertConditionCategory.java b/modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertConditionCategory.java
index 531857b..e80c221 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertConditionCategory.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertConditionCategory.java
@@ -31,7 +31,8 @@ public enum AlertConditionCategory {
CONTROL("Control Action"), //
ALERT("Alert Fired"), //
RESOURCE_CONFIG("Resource Configuration Property Value Change"), //
- EVENT("Log Event");
+ EVENT("Log Event"), //
+ DRIFT("Drift Detected");
/*
* legacyOrder exists to support code that still uses the old EventConstants.TYPE_* attributes, which was one-based
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/alert/composite/AlertConditionDriftCategoryComposite.java b/modules/core/domain/src/main/java/org/rhq/core/domain/alert/composite/AlertConditionDriftCategoryComposite.java
new file mode 100644
index 0000000..7b56a4c
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/alert/composite/AlertConditionDriftCategoryComposite.java
@@ -0,0 +1,40 @@
+/*
+ * 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, 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.core.domain.alert.composite;
+
+import org.rhq.core.domain.alert.AlertCondition;
+
+public class AlertConditionDriftCategoryComposite extends AbstractAlertConditionCategoryComposite {
+
+ private final Integer resourceId;
+
+ public AlertConditionDriftCategoryComposite(AlertCondition condition, Integer resourceId) {
+ super(condition);
+ this.resourceId = resourceId;
+ }
+
+ public Integer getResourceId() {
+ return resourceId;
+ }
+
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceType.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceType.java
index 777d2fb..6fcdcc5 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceType.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/ResourceType.java
@@ -834,6 +834,9 @@ public class ResourceType implements Serializable, Comparable<ResourceType> {
}
public void addDriftConfigurationTemplate(ConfigurationTemplate template) {
+ if (driftConfigurationTemplates == null) {
+ driftConfigurationTemplates = new HashSet<ConfigurationTemplate>(1);
+ }
driftConfigurationTemplates.add(template);
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertFormatUtility.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertFormatUtility.java
index 26a2477..c25855c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertFormatUtility.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertFormatUtility.java
@@ -187,6 +187,10 @@ public class AlertFormatUtility {
}
break;
}
+ case DRIFT: {
+ str.append(MSG.view_alert_common_tab_conditions_type_drift());
+ break;
+ }
default: {
str.append(MSG.view_alert_common_tab_invalid_condition_category(category.name()));
break;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ConditionsEditor.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ConditionsEditor.java
index c113008..4410315 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ConditionsEditor.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/ConditionsEditor.java
@@ -22,6 +22,7 @@
*/
package org.rhq.enterprise.gui.coregui.client.alert.definitions;
+import java.util.EnumSet;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -38,12 +39,15 @@ import com.smartgwt.client.widgets.events.CloseClientEvent;
import com.smartgwt.client.widgets.grid.ListGridRecord;
import org.rhq.core.domain.alert.AlertCondition;
+import org.rhq.core.domain.configuration.definition.ConfigurationTemplate;
import org.rhq.core.domain.criteria.Criteria;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.enterprise.gui.coregui.client.alert.AlertFormatUtility;
import org.rhq.enterprise.gui.coregui.client.components.table.AbstractTableAction;
import org.rhq.enterprise.gui.coregui.client.components.table.Table;
import org.rhq.enterprise.gui.coregui.client.components.table.TableActionEnablement;
+import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository;
+import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository.MetadataType;
import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableWindow;
@@ -55,7 +59,7 @@ public class ConditionsEditor extends LocatableVLayout {
private ResourceType resourceType;
private HashSet<AlertCondition> conditions;
- private Table table;
+ private Table<ConditionDataSource> table;
public ConditionsEditor(String locatorId, ResourceType resourceType, HashSet<AlertCondition> conditions) {
super(locatorId);
@@ -110,36 +114,63 @@ public class ConditionsEditor extends LocatableVLayout {
protected void configureTable() {
addTableAction(this.extendLocatorId("add"), "Add", null, new AbstractTableAction() {
public void executeAction(ListGridRecord[] selection, Object actionValue) {
- final Window winModal = new LocatableWindow(ConditionsEditor.this
- .extendLocatorId("newConditionEditorWindow"));
- winModal.setTitle(MSG.view_alert_common_tab_conditions_modal_title());
- winModal.setOverflow(Overflow.VISIBLE);
- winModal.setShowMinimizeButton(false);
- winModal.setIsModal(true);
- winModal.setShowModalMask(true);
- winModal.setAutoSize(true);
- winModal.setAutoCenter(true);
- //winModal.setShowResizer(true);
- //winModal.setCanDragResize(true);
- winModal.centerInPage();
- winModal.addCloseClickHandler(new CloseClickHandler() {
- @Override
- public void onCloseClick(CloseClientEvent event) {
- winModal.markForDestroy();
- }
- });
-
- NewConditionEditor newConditionEditor = new NewConditionEditor(
- extendLocatorId("newConditionEditor"), conditions, ConditionsEditor.this.resourceType,
- new Runnable() {
+
+ // we need the drift config templates (if there are any) so we know if we should offer drift conditions as an option
+ ResourceTypeRepository.Cache.getInstance().getResourceTypes(resourceType.getId(),
+ EnumSet.of(MetadataType.driftConfigurationTemplates),
+ new ResourceTypeRepository.TypeLoadedCallback() {
@Override
- public void run() {
- winModal.markForDestroy();
- refresh();
+ public void onTypesLoaded(ResourceType type) {
+ // the resource type repo caches types - so if this resource type was already cached prior
+ // to the conditions editor component created (which it probably was) then we are getting the same
+ // exact instance that we had before (resourceType). When this happens, great! Our resourceType
+ // instance will have its drift config templates populated. But, I'm being paranoid. If somehow
+ // we have a resourceType that is different than the type being passed to us, we need to copy
+ // the drift config.
+ if (type != resourceType) {
+ // paranoia, unsure if this is needed but clear out any old drift config still hanging around
+ if (resourceType.getDriftConfigurationTemplates() != null) {
+ resourceType.getDriftConfigurationTemplates().clear();
+ }
+ // if the newly loaded resource type supports drift, put it in our type object
+ if (type.getDriftConfigurationTemplates() != null) {
+ for (ConfigurationTemplate ct : type.getDriftConfigurationTemplates()) {
+ resourceType.addDriftConfigurationTemplate(ct);
+ }
+ }
+ }
+ final Window winModal = new LocatableWindow(ConditionsEditor.this
+ .extendLocatorId("newConditionEditorWindow"));
+ winModal.setTitle(MSG.view_alert_common_tab_conditions_modal_title());
+ winModal.setOverflow(Overflow.VISIBLE);
+ winModal.setShowMinimizeButton(false);
+ winModal.setIsModal(true);
+ winModal.setShowModalMask(true);
+ winModal.setAutoSize(true);
+ winModal.setAutoCenter(true);
+ //winModal.setShowResizer(true);
+ //winModal.setCanDragResize(true);
+ winModal.centerInPage();
+ winModal.addCloseClickHandler(new CloseClickHandler() {
+ @Override
+ public void onCloseClick(CloseClientEvent event) {
+ winModal.markForDestroy();
+ }
+ });
+
+ NewConditionEditor newConditionEditor = new NewConditionEditor(
+ extendLocatorId("newConditionEditor"), conditions,
+ ConditionsEditor.this.resourceType, new Runnable() {
+ @Override
+ public void run() {
+ winModal.markForDestroy();
+ refresh();
+ }
+ });
+ winModal.addItem(newConditionEditor);
+ winModal.show();
}
});
- winModal.addItem(newConditionEditor);
- winModal.show();
}
});
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/NewConditionEditor.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/NewConditionEditor.java
index 44875d8..8b9986f 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/NewConditionEditor.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/definitions/NewConditionEditor.java
@@ -99,6 +99,7 @@ public class NewConditionEditor extends LocatableDynamicForm {
private boolean supportsOperations = false;
private boolean supportsEvents = false;
private boolean supportsResourceConfig = false;
+ private boolean supportsDrift = false;
private Runnable closeFunction; // this is called after a button is pressed and the editor should close
private ResourceType resourceType;
@@ -112,6 +113,8 @@ public class NewConditionEditor extends LocatableDynamicForm {
this.supportsEvents = (rtype.getEventDefinitions() != null && rtype.getEventDefinitions().size() > 0);
this.supportsResourceConfig = (rtype.getResourceConfigurationDefinition() != null);
+ this.supportsDrift = (rtype.getDriftConfigurationTemplates() != null && rtype.getDriftConfigurationTemplates()
+ .size() > 0);
Set<MeasurementDefinition> metricDefinitions = rtype.getMetricDefinitions();
if (metricDefinitions != null && metricDefinitions.size() > 0) {
@@ -183,6 +186,10 @@ public class NewConditionEditor extends LocatableDynamicForm {
condTypes.put(AlertConditionCategory.EVENT.name(), MSG
.view_alert_definition_condition_editor_option_event());
}
+ if (supportsDrift) {
+ condTypes.put(AlertConditionCategory.DRIFT.name(), MSG
+ .view_alert_definition_condition_editor_option_drift());
+ }
conditionTypeSelectItem.setValueMap(condTypes);
conditionTypeSelectItem.setDefaultValue(AlertConditionCategory.AVAILABILITY.name());
conditionTypeSelectItem.setWrapTitle(false);
@@ -245,6 +252,9 @@ public class NewConditionEditor extends LocatableDynamicForm {
if (supportsResourceConfig) {
formItems.addAll(buildResourceConfigChangeFormItems());
}
+ if (supportsDrift) {
+ formItems.addAll(buildDriftFormItems());
+ }
formItems.add(spacer2);
formItems.add(ok);
formItems.add(cancel);
@@ -367,6 +377,15 @@ public class NewConditionEditor extends LocatableDynamicForm {
break;
}
+ case DRIFT: {
+ newCondition.setName(null);
+ newCondition.setComparator(null);
+ newCondition.setThreshold(null);
+ newCondition.setOption(null); // TODO driftalert - be able to regex for only certain files that drifted
+ newCondition.setMeasurementDefinition(null);
+ break;
+ }
+
default: {
CoreGUI.getErrorHandler()
.handleError(MSG.view_alert_common_tab_invalid_condition_category(category.name())); // should never happen
@@ -702,6 +721,18 @@ public class NewConditionEditor extends LocatableDynamicForm {
return formItems;
}
+ private ArrayList<FormItem> buildDriftFormItems() {
+ ArrayList<FormItem> formItems = new ArrayList<FormItem>();
+
+ ShowIfCategoryFunction ifFunc = new ShowIfCategoryFunction(AlertConditionCategory.DRIFT);
+
+ String helpStr = MSG.view_alert_definition_condition_editor_drift_tooltip();
+ StaticTextItem helpItem = buildHelpTextItem("driftHelp", helpStr, ifFunc);
+ formItems.add(helpItem);
+
+ return formItems;
+ }
+
private SelectItem buildMetricDropDownMenu(String itemName, boolean dynamicOnly, FormItemIfFunction ifFunc) {
LinkedHashMap<String, String> metricsMap = new LinkedHashMap<String, String>();
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypeRepository.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypeRepository.java
index c4630dd..d9689aa 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypeRepository.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypeRepository.java
@@ -30,6 +30,7 @@ import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
+import org.rhq.core.domain.configuration.definition.ConfigurationTemplate;
import org.rhq.core.domain.criteria.ResourceTypeCriteria;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceCategory;
@@ -57,7 +58,7 @@ public class ResourceTypeRepository {
private static ResourceTypeGWTServiceAsync resourceTypeService = GWTServiceLookup.getResourceTypeGWTService();
public enum MetadataType {
- children, operations, measurements, content, events, pluginConfigurationDefinition, resourceConfigurationDefinition, subCategory, parentTypes, processScans, productVersions
+ children, operations, measurements, content, events, pluginConfigurationDefinition, resourceConfigurationDefinition, subCategory, parentTypes, processScans, productVersions, driftConfigurationTemplates
}
public static class Cache {
@@ -245,6 +246,9 @@ public class ResourceTypeRepository {
case subCategory:
criteria.fetchSubCategory(true);
break;
+ case driftConfigurationTemplates:
+ criteria.fetchDriftConfigurationTemplates(true);
+ break;
default:
Log.error("ERROR: metadataType " + metadataType.name()
+ " not incorporated into ResourceType criteria.");
@@ -254,11 +258,10 @@ public class ResourceTypeRepository {
criteria.setPageControl(PageControl.getUnlimitedInstance());
- Log.info("Loading " + typesNeeded.size()
- + ((metadataTypes != null) ? (" types: " + metadataTypes) : ""));
+ Log.info("Loading " + typesNeeded.size() + ((metadataTypes != null) ? (" types: " + metadataTypes) : ""));
- if ((topLevelServerAndServiceTypes == null) && (metadataTypes != null) &&
- metadataTypes.contains(MetadataType.children)) {
+ if ((topLevelServerAndServiceTypes == null) && (metadataTypes != null)
+ && metadataTypes.contains(MetadataType.children)) {
// Perform a one-time load of server and service types with no parent types. These types are implicitly
// children of all platform types, even though they are not included in the platform types'
// childResourceTypes field.
@@ -269,9 +272,8 @@ public class ResourceTypeRepository {
}
private void loadTopLevelServerAndServiceTypes(final TypesLoadedCallback callback,
- final EnumSet<MetadataType> metadataTypes,
- final ResourceTypeCriteria criteria, final Map<Integer,
- ResourceType> cachedTypes) {
+ final EnumSet<MetadataType> metadataTypes, final ResourceTypeCriteria criteria,
+ final Map<Integer, ResourceType> cachedTypes) {
ResourceTypeCriteria topLevelCriteria = new ResourceTypeCriteria();
topLevelCriteria.fetchParentResourceTypes(true);
resourceTypeService.findResourceTypesByCriteria(topLevelCriteria, new AsyncCallback<PageList<ResourceType>>() {
@@ -283,8 +285,8 @@ public class ResourceTypeRepository {
public void onSuccess(PageList<ResourceType> types) {
topLevelServerAndServiceTypes = new HashSet<ResourceType>();
for (ResourceType type : types) {
- if ((type.getCategory() != ResourceCategory.PLATFORM) &&
- (type.getParentResourceTypes() == null || type.getParentResourceTypes().isEmpty())) {
+ if ((type.getCategory() != ResourceCategory.PLATFORM)
+ && (type.getParentResourceTypes() == null || type.getParentResourceTypes().isEmpty())) {
topLevelServerAndServiceTypes.add(type);
}
}
@@ -293,7 +295,8 @@ public class ResourceTypeRepository {
});
}
- private void loadRequestedTypes(final TypesLoadedCallback callback, final EnumSet<MetadataType> metadataTypes, ResourceTypeCriteria criteria, final Map<Integer, ResourceType> cachedTypes) {
+ private void loadRequestedTypes(final TypesLoadedCallback callback, final EnumSet<MetadataType> metadataTypes,
+ ResourceTypeCriteria criteria, final Map<Integer, ResourceType> cachedTypes) {
resourceTypeService.findResourceTypesByCriteria(criteria, new AsyncCallback<PageList<ResourceType>>() {
public void onFailure(Throwable caught) {
CoreGUI.getErrorHandler().handleError(MSG.widget_typeCache_loadFail(), caught);
@@ -308,8 +311,8 @@ public class ResourceTypeRepository {
switch (metadataType) {
case children:
Set<ResourceType> childTypes = type.getChildResourceTypes();
- if (type.getCategory() == ResourceCategory.PLATFORM &&
- topLevelServerAndServiceTypes != null) {
+ if (type.getCategory() == ResourceCategory.PLATFORM
+ && topLevelServerAndServiceTypes != null) {
// Add server and service types with no parent types to the list of child types.
// These types are implicitly children of all platform types, even though they
// are not included in the platform types' childResourceTypes field.
@@ -349,9 +352,19 @@ public class ResourceTypeRepository {
case subCategory:
cachedType.setSubCategory(type.getSubCategory());
break;
+ case driftConfigurationTemplates:
+ if (cachedType.getDriftConfigurationTemplates() != null) {
+ cachedType.getDriftConfigurationTemplates().clear(); // remove any old ones hanging around
+ }
+ if (type.getDriftConfigurationTemplates() != null) {
+ for (ConfigurationTemplate ct : type.getDriftConfigurationTemplates()) {
+ cachedType.addDriftConfigurationTemplate(ct);
+ }
+ }
+ break;
default:
Log.error("ERROR: metadataType " + metadataType.name()
- + " not merged into cached ResourceType.");
+ + " not merged into cached ResourceType.");
}
}
}
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 beb105b..2c62f90 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
@@ -612,6 +612,7 @@ view_alert_common_tab_conditions_text = Condition
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_drift = Drift Detection
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_type_metric_baseline = Metric Value Baseline
@@ -666,6 +667,7 @@ view_alert_definition_condition_editor_common_avg = Average
view_alert_definition_condition_editor_common_max = Maximum
view_alert_definition_condition_editor_common_min = Minimum
view_alert_definition_condition_editor_delete_confirm = Delete the selected alert condition(s)?
+view_alert_definition_condition_editor_drift_tooltip = This condition is triggered when drift has been detected.
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_event_severity = Event Severity
@@ -716,6 +718,7 @@ view_alert_definition_condition_editor_operation_status_success = Success
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 = Operation
view_alert_definition_condition_editor_option_availability = Availability Change
+view_alert_definition_condition_editor_option_drift = Drift Detection
view_alert_definition_condition_editor_option_event = Event Detection
view_alert_definition_condition_editor_option_label = Condition Type
view_alert_definition_condition_editor_option_metric_baseline = Measurement Baseline Threshold
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
index 5bb5a98..54c4599 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
@@ -489,7 +489,8 @@ view_alert_common_tab_conditions_text = Bedingung
view_alert_common_tab_conditions_type_availability = Ãnderung der VerfÃŒgbarkeit
view_alert_common_tab_conditions_type_availability_down = Wurde unverfÃŒgbar
view_alert_common_tab_conditions_type_availability_up = Wurde wieder verfÃŒgbar
-view_alert_common_tab_conditions_type_event = Event Detection~
+##view_alert_common_tab_conditions_type_drift = Drift Detection
+##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_type_metric_baseline = Metrik ÃŒberschreitet Referenzband
view_alert_common_tab_conditions_type_metric_baseline_verb = von
@@ -543,6 +544,7 @@ view_alert_definition_condition_editor_common_avg = Durchschnitt
view_alert_definition_condition_editor_common_max = Maximum
view_alert_definition_condition_editor_common_min = Minimum
view_alert_definition_condition_editor_delete_confirm = Die ausgewÀhlte(n) Alarm-Bedingung(en) löschen?
+##view_alert_definition_condition_editor_drift_tooltip = This condition is triggered when drift has been detected.
view_alert_definition_condition_editor_event_regex = RegulÀrer Ausdruck
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_event_severity = Schwere des Ereignisses
@@ -593,7 +595,8 @@ view_alert_definition_condition_editor_operation_status_success = Erfolg
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 = Operation
view_alert_definition_condition_editor_option_availability = Ãnderung der VerfÃŒgbarkeit
-view_alert_definition_condition_editor_option_event = Event Detection~
+##view_alert_definition_condition_editor_option_drift = Drift Detection
+##view_alert_definition_condition_editor_option_event = Event Detection
view_alert_definition_condition_editor_option_label = Typ der Bedingung
view_alert_definition_condition_editor_option_metric_baseline = Schwelle des Referenzbands
view_alert_definition_condition_editor_option_metric_calltime_change = Ãnderung des Call-Time-Werts
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
index 98a20a4..bafd11f 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
@@ -607,6 +607,7 @@ view_alert_common_tab_conditions_text = æ¡ä»¶
view_alert_common_tab_conditions_type_availability = ã¢ãã€ã©ããªãã£ã®å€å
view_alert_common_tab_conditions_type_availability_down = äžé
view_alert_common_tab_conditions_type_availability_up = äžæ
+##view_alert_common_tab_conditions_type_drift = Drift Detection
view_alert_common_tab_conditions_type_event = ã€ãã³ãã®æ€åº
view_alert_common_tab_conditions_type_event_matching = ã€ãã³ããœãŒã¹ãäžèŽ
view_alert_common_tab_conditions_type_metric_baseline = ã¡ããªãã¯å€ã®ããŒã¹ã©ã€ã³
@@ -661,6 +662,7 @@ view_alert_definition_condition_editor_common_avg = å¹³å
view_alert_definition_condition_editor_common_max = æ倧
view_alert_definition_condition_editor_common_min = æå°
view_alert_definition_condition_editor_delete_confirm = éžæãããã¢ã©ãŒãå®çŸ©ãåé€ããŸãã?
+##view_alert_definition_condition_editor_drift_tooltip = This condition is triggered when drift has been detected.
view_alert_definition_condition_editor_event_regex = æ£èŠè¡šçŸ
view_alert_definition_condition_editor_event_regex_tooltip = ããæå®ããããªããããã¯æ£èŠè¡šçŸã§ããããã®æ¡ä»¶ãåŒãèµ·ããããã«åéãããã€ãã³ãã¡ãã»ãŒãžã«äžèŽããªããã°ãªããŸããã
view_alert_definition_condition_editor_event_severity = ã€ãã³ãé倧床
@@ -711,6 +713,7 @@ view_alert_definition_condition_editor_operation_status_success = æå
view_alert_definition_condition_editor_operation_tooltip = æ¡ä»¶ãåŒãèµ·ããããã«éžæããããå®è¡ããããšãçºçããªããã°ãªããªãçµæãæå®ããŸã
view_alert_definition_condition_editor_operation_value = ãªãã¬ãŒã·ã§ã³
view_alert_definition_condition_editor_option_availability = ã¢ãã€ã©ããªãã£ã®å€å
+##view_alert_definition_condition_editor_option_drift = Drift Detection
view_alert_definition_condition_editor_option_event = ã€ãã³ãã®æ€åº
view_alert_definition_condition_editor_option_label = æ¡ä»¶ã¿ã€ã
view_alert_definition_condition_editor_option_metric_baseline = 枬å®ããŒã¹ã©ã€ã³ã®éŸå€
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
index 48cae04..2722b0d 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
@@ -623,6 +623,7 @@ view_alert_common_tab_conditions_text = Condi\u00E7\u00E3o
view_alert_common_tab_conditions_type_availability = Mudan\u00E7a na Disponibilidade
view_alert_common_tab_conditions_type_availability_down = Indispon\u00EDvel
view_alert_common_tab_conditions_type_availability_up = Dispon\u00EDvel
+##view_alert_common_tab_conditions_type_drift = Drift Detection
view_alert_common_tab_conditions_type_event = Detec\u00E7\u00E3o de Envento
view_alert_common_tab_conditions_type_event_matching = combinando com o evento de origem
view_alert_common_tab_conditions_type_metric_baseline = Valor da m\u00E9trica excede a linha de base (baseline)
@@ -679,6 +680,7 @@ view_alert_definition_condition_editor_common_avg = M\u00E9dio
view_alert_definition_condition_editor_common_max = M\u00E1ximo
view_alert_definition_condition_editor_common_min = M\u00EDnimo
view_alert_definition_condition_editor_delete_confirm = Delete the selected alert condition(s)?
+##view_alert_definition_condition_editor_drift_tooltip = This condition is triggered when drift has been detected.
view_alert_definition_condition_editor_event_regex = Express\u00E3o Regular
view_alert_definition_condition_editor_event_regex_tooltip = Se definida, a condi\u00E7\u00E3o somente ser\u00E1 disparada caso o evento satisfa\u00E7a a express\u00E3o.
view_alert_definition_condition_editor_event_severity = Severidade do Evento
@@ -729,6 +731,7 @@ view_alert_definition_condition_editor_operation_status_success = Sucesso
view_alert_definition_condition_editor_operation_tooltip = Define o resultado esperado quando a opera\u00E7\u00E3o selecionada for executada para dispararo da confi\u00E7\u00E3o.
view_alert_definition_condition_editor_operation_value = Opera\u00E7\u00E3o
view_alert_definition_condition_editor_option_availability = Mudan\u00E7a de Disponibilidade
+##view_alert_definition_condition_editor_option_drift = Drift Detection
view_alert_definition_condition_editor_option_event = Detec\u00E7\u00E3o de Evento
view_alert_definition_condition_editor_option_label = Tipo de Condi\u00E7\u00E3o
view_alert_definition_condition_editor_option_metric_baseline = Threshold base da M\u00E9trica
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
index 77d3749..f73be85 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
@@ -606,6 +606,7 @@ view_alert_common_tab_conditions_text = \u6761\u4ef6
view_alert_common_tab_conditions_type_availability = \u53ef\u7528\u6027\u6539\u53d8
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_drift = Drift Detection
view_alert_common_tab_conditions_type_event = \u4e8b\u4ef6\u68c0\u6d4b
view_alert_common_tab_conditions_type_event_matching = with event source matching
view_alert_common_tab_conditions_type_metric_baseline = \u6307\u6807\u57fa\u51c6
@@ -660,6 +661,7 @@ view_alert_definition_condition_editor_common_avg = \u5e73\u5747
view_alert_definition_condition_editor_common_max = \u6700\u5927
view_alert_definition_condition_editor_common_min = \u6700\u5c0f
view_alert_definition_condition_editor_delete_confirm = \u5220\u9664\u9009\u5b9a\u7684\u8b66\u62a5\u6761\u4ef6?
+##view_alert_definition_condition_editor_drift_tooltip = This condition is triggered when drift has been detected.
view_alert_definition_condition_editor_event_regex = \u6b63\u5219\u8868\u8fbe\u5f0f
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_event_severity = \u4e8b\u4ef6\u4e25\u91cd\u6027
@@ -710,6 +712,7 @@ view_alert_definition_condition_editor_operation_status_success = Success
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 = \u64cd\u4f5c
view_alert_definition_condition_editor_option_availability = \u53ef\u7528\u6027\u6539\u53d8
+##view_alert_definition_condition_editor_option_drift = Drift Detection
view_alert_definition_condition_editor_option_event = \u4e8b\u4ef6\u68c0\u6d4b
view_alert_definition_condition_editor_option_label = \u6761\u4ef6\u7c7b\u578b
view_alert_definition_condition_editor_option_metric_baseline = \u6307\u6807\u57fa\u7ebf\u9600\u503c
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 ef2ac95..05e2af6 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
@@ -112,6 +112,9 @@ public class AlertConditionManagerBean implements AlertConditionManagerLocal {
} else if (category == AlertConditionCategory.RESOURCE_CONFIG) {
queryName = AlertCondition.QUERY_BY_CATEGORY_RESOURCE_CONFIG;
+ } else if (category == AlertConditionCategory.DRIFT) {
+ queryName = AlertCondition.QUERY_BY_CATEGORY_DRIFT;
+
} else {
throw new IllegalArgumentException("getAlertConditionComposites does not support category '" + category
+ "'");
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertManagerBean.java
index 02ae7b1..728ceff 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertManagerBean.java
@@ -620,7 +620,9 @@ public class AlertManagerBean implements AlertManagerLocal, AlertManagerRemote {
* flushing org.jboss.on.domain.event.alert.AlertConditionLog.alert -> org.jboss.on.domain.event.alert.Alert"
*/
this.createAlert(newAlert);
- log.debug("New alert identifier=" + newAlert.getId());
+ if (log.isDebugEnabled()) {
+ log.debug("New alert identifier=" + newAlert.getId());
+ }
// AlertNotificationLog alertNotifLog = new AlertNotificationLog(newAlert); TODO - is that all?
// entityManager.persist(alertNotifLog);
@@ -628,7 +630,9 @@ public class AlertManagerBean implements AlertManagerLocal, AlertManagerRemote {
List<AlertConditionLog> unmatchedConditionLogs = alertConditionLogManager
.getUnmatchedLogsByAlertDefinitionId(alertDefinitionId);
for (AlertConditionLog unmatchedLog : unmatchedConditionLogs) {
- log.debug("Matched alert condition log for alertId=" + newAlert.getId() + ": " + unmatchedLog);
+ if (log.isDebugEnabled()) {
+ log.debug("Matched alert condition log for alertId=" + newAlert.getId() + ": " + unmatchedLog);
+ }
newAlert.addConditionLog(unmatchedLog); // adds both relationships
}
@@ -651,7 +655,9 @@ public class AlertManagerBean implements AlertManagerLocal, AlertManagerRemote {
* to give them some way to explicitly try to re-send the notification for some client-side auditing purposes
*/
try {
- log.debug("Sending alert notifications for " + alert.toSimpleString() + "...");
+ if (log.isDebugEnabled()) {
+ log.debug("Sending alert notifications for " + alert.toSimpleString() + "...");
+ }
List<AlertNotification> alertNotifications = alert.getAlertDefinition().getAlertNotifications();
//Set<String> emailAddresses = new LinkedHashSet<String>();
@@ -721,7 +727,9 @@ public class AlertManagerBean implements AlertManagerLocal, AlertManagerRemote {
}
public Collection<String> sendAlertNotificationEmails(Alert alert, Collection<String> emailAddresses) {
- log.debug("Sending alert notifications for " + alert.toSimpleString() + "...");
+ if (log.isDebugEnabled()) {
+ log.debug("Sending alert notifications for " + alert.toSimpleString() + "...");
+ }
if (emailAddresses.size() == 0) {
return new ArrayList<String>(0); // No email to send -> no bad addresses
@@ -885,6 +893,13 @@ public class AlertManagerBean implements AlertManagerLocal, AlertManagerRemote {
else
builder.append(AlertI18NFactory.getMessage(AlertI18NResourceKeys.ALERT_CONFIG_PROPS_CB_AVAILABILITY,
condition.getOption()));
+ } else if (category == AlertConditionCategory.DRIFT) {
+ if (shortVersion)
+ builder.append(AlertI18NFactory.getMessage(AlertI18NResourceKeys.ALERT_CONFIG_PROPS_CB_DRIFT_SHORT,
+ condition.getOption()));
+ else
+ builder.append(AlertI18NFactory.getMessage(AlertI18NResourceKeys.ALERT_CONFIG_PROPS_CB_DRIFT, condition
+ .getOption()));
} else {
// do nothing
}
@@ -915,17 +930,19 @@ public class AlertManagerBean implements AlertManagerLocal, AlertManagerRemote {
Integer recoveryDefinitionId = firedDefinition.getRecoveryId();
if (recoveryDefinitionId != 0) {
- log.debug("Processing recovery rules...");
- log.debug("Found recoveryDefinitionId " + recoveryDefinitionId);
+ if (log.isDebugEnabled()) {
+ log.debug("Processing recovery rules... Found recoveryDefinitionId " + recoveryDefinitionId);
+ }
AlertDefinition toBeRecoveredDefinition = alertDefinitionManager.getAlertDefinitionById(overlord,
recoveryDefinitionId);
boolean wasEnabled = toBeRecoveredDefinition.getEnabled();
- log
- .debug(firedDefinition + (wasEnabled ? "does not need to recover " : "needs to recover ")
+ if (log.isDebugEnabled()) {
+ log.debug(firedDefinition + (wasEnabled ? "does not need to recover " : "needs to recover ")
+ toBeRecoveredDefinition
+ (wasEnabled ? ", it was already enabled " : ", it was currently disabled "));
+ }
if (!wasEnabled) {
/*
@@ -941,7 +958,9 @@ public class AlertManagerBean implements AlertManagerLocal, AlertManagerRemote {
* update the cache indirectly via the status field on the owning agent and the periodic job that checks it.
*/
} else if (firedDefinition.getWillRecover()) {
- log.debug("Disabling " + firedDefinition + " until recovered manually or by recovery definition");
+ if (log.isDebugEnabled()) {
+ log.debug("Disabling " + firedDefinition + " until recovered manually or by recovery definition");
+ }
/*
* disable until recovered manually or by recovery definition
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/AlertConditionCacheManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/AlertConditionCacheManagerBean.java
index 525585e..57cf70d 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/AlertConditionCacheManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/AlertConditionCacheManagerBean.java
@@ -38,6 +38,7 @@ import org.rhq.core.domain.operation.OperationHistory;
import org.rhq.core.domain.resource.Agent;
import org.rhq.enterprise.server.alert.engine.internal.AlertConditionCacheCoordinator;
import org.rhq.enterprise.server.cloud.instance.ServerManagerLocal;
+import org.rhq.enterprise.server.plugin.pc.drift.DriftChangeSetSummary;
/**
* @author Joseph Marques
@@ -88,6 +89,12 @@ public class AlertConditionCacheManagerBean implements AlertConditionCacheManage
return stats;
}
+ public AlertConditionCacheStats checkConditions(DriftChangeSetSummary driftChangeSetSummary) {
+ AlertConditionCacheStats stats;
+ stats = AlertConditionCacheCoordinator.getInstance().checkConditions(driftChangeSetSummary);
+ return stats;
+ }
+
public void reloadCachesForAgent(int agentId) {
AlertConditionCacheCoordinator.getInstance().reloadCachesForAgent(agentId);
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/AlertConditionCacheManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/AlertConditionCacheManagerLocal.java
index 0281d05..1eed43d 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/AlertConditionCacheManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/AlertConditionCacheManagerLocal.java
@@ -31,6 +31,7 @@ import org.rhq.core.domain.measurement.Availability;
import org.rhq.core.domain.measurement.MeasurementData;
import org.rhq.core.domain.measurement.calltime.CallTimeData;
import org.rhq.core.domain.operation.OperationHistory;
+import org.rhq.enterprise.server.plugin.pc.drift.DriftChangeSetSummary;
/**
* This is the SLSB interface for interacting with the clustered cache that stores and computes whether AlertDefinition
@@ -95,6 +96,14 @@ public interface AlertConditionCacheManagerLocal {
*/
AlertConditionCacheStats checkConditions(ResourceConfigurationUpdate update);
+ /**
+ * Drift changes that an agent reported.
+ *
+ * @param driftChangeSetSummary data on the change set that is to be checked
+ * @return the number of conditions that were true against this argument
+ */
+ AlertConditionCacheStats checkConditions(DriftChangeSetSummary driftChangeSetSummary);
+
void reloadCachesForAgent(int agentId);
void reloadGlobalCache();
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/internal/AgentConditionCache.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/internal/AgentConditionCache.java
index 0100d3a..ac19d37 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/internal/AgentConditionCache.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/internal/AgentConditionCache.java
@@ -32,6 +32,7 @@ import org.rhq.core.domain.alert.AlertConditionCategory;
import org.rhq.core.domain.alert.composite.AbstractAlertConditionCategoryComposite;
import org.rhq.core.domain.alert.composite.AlertConditionBaselineCategoryComposite;
import org.rhq.core.domain.alert.composite.AlertConditionChangesCategoryComposite;
+import org.rhq.core.domain.alert.composite.AlertConditionDriftCategoryComposite;
import org.rhq.core.domain.alert.composite.AlertConditionEventCategoryComposite;
import org.rhq.core.domain.alert.composite.AlertConditionScheduleCategoryComposite;
import org.rhq.core.domain.alert.composite.AlertConditionTraitCategoryComposite;
@@ -54,6 +55,7 @@ import org.rhq.enterprise.server.alert.engine.internal.AlertConditionCacheCoordi
import org.rhq.enterprise.server.alert.engine.mbean.AlertConditionCacheMonitor;
import org.rhq.enterprise.server.alert.engine.model.AlertConditionOperator;
import org.rhq.enterprise.server.alert.engine.model.CallTimeDataCacheElement;
+import org.rhq.enterprise.server.alert.engine.model.DriftCacheElement;
import org.rhq.enterprise.server.alert.engine.model.EventCacheElement;
import org.rhq.enterprise.server.alert.engine.model.InvalidCacheElementException;
import org.rhq.enterprise.server.alert.engine.model.MeasurementBaselineCacheElement;
@@ -63,6 +65,7 @@ import org.rhq.enterprise.server.alert.engine.model.NumericDoubleCacheElement;
import org.rhq.enterprise.server.alert.engine.model.CallTimeDataCacheElement.CallTimeElementValue;
import org.rhq.enterprise.server.auth.SubjectManagerLocal;
import org.rhq.enterprise.server.measurement.MeasurementDataManagerLocal;
+import org.rhq.enterprise.server.plugin.pc.drift.DriftChangeSetSummary;
import org.rhq.enterprise.server.util.LookupUtil;
/**
@@ -74,6 +77,7 @@ class AgentConditionCache extends AbstractConditionCache {
private Map<Integer, List<MeasurementTraitCacheElement>> measurementTraitCache;
private Map<Integer, List<CallTimeDataCacheElement>> callTimeCache;
private Map<Integer, List<EventCacheElement>> eventsCache;
+ private Map<Integer, List<DriftCacheElement>> driftCache;
private AlertConditionManagerLocal alertConditionManager;
private MeasurementDataManagerLocal measurementDataManager;
@@ -90,6 +94,7 @@ class AgentConditionCache extends AbstractConditionCache {
measurementTraitCache = new HashMap<Integer, List<MeasurementTraitCacheElement>>();
callTimeCache = new HashMap<Integer, List<CallTimeDataCacheElement>>();
eventsCache = new HashMap<Integer, List<EventCacheElement>>();
+ driftCache = new HashMap<Integer, List<DriftCacheElement>>();
alertConditionManager = LookupUtil.getAlertConditionManager();
measurementDataManager = LookupUtil.getMeasurementDataManager();
@@ -110,14 +115,15 @@ class AgentConditionCache extends AbstractConditionCache {
AlertConditionCacheStats stats = new AlertConditionCacheStats();
try {
- if (log.isDebugEnabled())
+ if (log.isDebugEnabled()) {
log.debug("Loading Alert Condition Caches for agent[id=" + agentId + "]...");
+ }
Subject overlord = subjectManager.getOverlord();
EnumSet<AlertConditionCategory> supportedCategories = EnumSet.of(AlertConditionCategory.BASELINE,
AlertConditionCategory.CHANGE, AlertConditionCategory.TRAIT, AlertConditionCategory.THRESHOLD,
- AlertConditionCategory.EVENT);
+ AlertConditionCategory.EVENT, AlertConditionCategory.DRIFT);
for (AlertConditionCategory nextCategory : supportedCategories) {
// page thru all alert definitions
@@ -146,12 +152,14 @@ class AgentConditionCache extends AbstractConditionCache {
pc.setPageNumber(pc.getPageNumber() + 1);
}
- if (log.isDebugEnabled())
+ if (log.isDebugEnabled()) {
log.debug("Loaded " + rowsProcessed + " Alert Condition Composites of type '" + nextCategory + "'");
+ }
}
- if (log.isDebugEnabled())
+ if (log.isDebugEnabled()) {
log.debug("Loaded Alert Condition Caches for agent[id=" + agentId + "]");
+ }
} catch (Throwable t) {
// don't let any exceptions bubble up to the calling SLSB layer
log.error("Error loading cache for agent[id=" + agentId + "]", t);
@@ -304,6 +312,10 @@ class AgentConditionCache extends AbstractConditionCache {
}
addTo("eventsCache", eventsCache, eventComposite.getResourceId(), cacheElement, alertConditionId, stats);
+ } else if (alertConditionCategory == AlertConditionCategory.DRIFT) {
+ AlertConditionDriftCategoryComposite driftComposite = (AlertConditionDriftCategoryComposite) composite;
+ DriftCacheElement cacheElement = new DriftCacheElement(alertConditionOperator, alertConditionId);
+ addTo("driftCache", driftCache, driftComposite.getResourceId(), cacheElement, alertConditionId, stats);
}
}
@@ -340,7 +352,7 @@ class AgentConditionCache extends AbstractConditionCache {
log.debug("Check Measurements[size=" + measurementData.length + "] - " + stats);
} catch (Throwable t) {
// don't let any exceptions bubble up to the calling SLSB layer
- log.error("Error during cache processing for agent[id=" + agentId + "]", t);
+ log.error("Error during measurement data cache processing for agent[id=" + agentId + "]", t);
}
return stats;
}
@@ -372,8 +384,9 @@ class AgentConditionCache extends AbstractConditionCache {
private HashMap<Integer, HashMap<String, ArrayList<CallTimeDataValue>>> produceOrderedCallTimeDataStructure(
CallTimeData... callTime) {
long beginTime = 0;
- if (log.isDebugEnabled())
+ if (log.isDebugEnabled()) {
beginTime = System.nanoTime();
+ }
//Insert all CallTimeDataValue in data structure
HashMap<Integer, HashMap<String, ArrayList<CallTimeDataValue>>> order = new HashMap<Integer, HashMap<String, ArrayList<CallTimeDataValue>>>();
@@ -396,9 +409,10 @@ class AgentConditionCache extends AbstractConditionCache {
for (ArrayList<CallTimeDataValue> bottomList : topList.values())
Collections.sort(bottomList, getCallTimeComparator());
- if (log.isDebugEnabled())
+ if (log.isDebugEnabled()) {
log.debug("sorting call-time data during alerting took: "
+ TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - beginTime) + "ms");
+ }
return order;
}
@@ -447,11 +461,32 @@ class AgentConditionCache extends AbstractConditionCache {
AlertConditionCacheMonitor.getMBean().incrementEventCacheElementMatches(stats.matched);
AlertConditionCacheMonitor.getMBean().incrementEventProcessingTime(stats.getAge());
- if (log.isDebugEnabled())
+ if (log.isDebugEnabled()) {
log.debug("Check Events[size=" + events.length + "] - " + stats);
+ }
+ } catch (Throwable t) {
+ // don't let any exceptions bubble up to the calling SLSB layer
+ log.error("Error during event cache processing for agent[id=" + agentId + "]", t);
+ }
+ return stats;
+ }
+
+ public AlertConditionCacheStats checkConditions(DriftChangeSetSummary driftChangeSetSummary) {
+ AlertConditionCacheStats stats = new AlertConditionCacheStats();
+ try {
+ int resourceId = driftChangeSetSummary.getResourceId();
+ List<DriftCacheElement> cacheElements = lookupDriftCacheElements(resourceId);
+
+ processCacheElements(cacheElements, (Object) "", driftChangeSetSummary.getCreatedTime(), stats);
+
+ AlertConditionCacheMonitor.getMBean().incrementDriftCacheElementMatches(stats.matched);
+ AlertConditionCacheMonitor.getMBean().incrementDriftProcessingTime(stats.getAge());
+ if (log.isDebugEnabled()) {
+ log.debug("Check Drift[resourceId=" + resourceId + "] - " + stats);
+ }
} catch (Throwable t) {
// don't let any exceptions bubble up to the calling SLSB layer
- log.error("Error during cache processing for agent[id=" + agentId + "]", t);
+ log.error("Error during drift cache processing for agent[id=" + agentId + "]", t);
}
return stats;
}
@@ -472,6 +507,10 @@ class AgentConditionCache extends AbstractConditionCache {
return eventsCache.get(resourceId); // yup, might be null
}
+ private List<DriftCacheElement> lookupDriftCacheElements(int resourceId) {
+ return driftCache.get(resourceId); // yup, might be null
+ }
+
private Double getCalculatedBaselineValue(int conditionId, AlertConditionBaselineCategoryComposite composite,
String optionStatus, Double threshold) {
int baselineId = composite.getBaselineId();
@@ -517,6 +556,8 @@ class AgentConditionCache extends AbstractConditionCache {
return AlertConditionCacheUtils.getMapListCount(callTimeCache);
} else if (cache == AlertConditionCacheCoordinator.Cache.EventsCache) {
return AlertConditionCacheUtils.getMapListCount(eventsCache);
+ } else if (cache == AlertConditionCacheCoordinator.Cache.DriftCache) {
+ return AlertConditionCacheUtils.getMapListCount(driftCache);
} else {
throw new IllegalArgumentException("The " + AgentConditionCache.class.getSimpleName()
+ " either does not manage caches of type " + cache.type + ", or does not support obtaining their size");
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/internal/AlertConditionCacheCoordinator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/internal/AlertConditionCacheCoordinator.java
index f24b7d9..db4b0b9 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/internal/AlertConditionCacheCoordinator.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/internal/AlertConditionCacheCoordinator.java
@@ -40,6 +40,7 @@ import org.rhq.enterprise.server.alert.engine.AlertConditionCacheStats;
import org.rhq.enterprise.server.alert.engine.model.AbstractCacheElement;
import org.rhq.enterprise.server.cloud.StatusManagerLocal;
import org.rhq.enterprise.server.core.AgentManagerLocal;
+import org.rhq.enterprise.server.plugin.pc.drift.DriftChangeSetSummary;
import org.rhq.enterprise.server.util.LookupUtil;
/**
@@ -66,7 +67,8 @@ public final class AlertConditionCacheCoordinator {
ResourceOperationCache(Type.Global), //
AvailabilityCache(Type.Global), //
EventsCache(Type.Agent), //
- ResourceConfigurationCache(Type.Global);
+ ResourceConfigurationCache(Type.Global), //
+ DriftCache(Type.Agent);
public enum Type {
Global, //
@@ -298,6 +300,35 @@ public final class AlertConditionCacheCoordinator {
return stats;
}
+ public AlertConditionCacheStats checkConditions(DriftChangeSetSummary driftChangeSetSummary) {
+ if (driftChangeSetSummary == null) {
+ return new AlertConditionCacheStats();
+ }
+
+ Integer agentId = getAgentId(driftChangeSetSummary);
+ if (agentId == null) {
+ log.error("Could not find agent for resourceId = " + driftChangeSetSummary.getResourceId());
+ return new AlertConditionCacheStats();
+ }
+
+ AlertConditionCacheStats stats = null;
+ AgentConditionCache agentCache = null;
+ agentReadWriteLock.readLock().lock();
+ try {
+ agentCache = agentCaches.get(agentId);
+ } catch (Throwable t) {
+ log.error("Error during checkConditions", t); // don't let any exceptions bubble up to the calling SLSB layer
+ } finally {
+ agentReadWriteLock.readLock().unlock();
+ }
+ if (agentCache != null) {
+ stats = agentCache.checkConditions(driftChangeSetSummary);
+ } else {
+ stats = new AlertConditionCacheStats();
+ }
+ return stats;
+ }
+
public AlertConditionCacheStats checkConditions(Availability... availabilities) {
AlertConditionCacheStats stats = null;
try {
@@ -311,6 +342,17 @@ public final class AlertConditionCacheCoordinator {
return stats;
}
+ private Integer getAgentId(DriftChangeSetSummary driftChangeSetSummary) {
+ try {
+ int resourceId = driftChangeSetSummary.getResourceId();
+ Integer agentId = agentManager.getAgentIdByResourceId(resourceId);
+ return agentId;
+ } catch (Throwable t) {
+ log.error("Error looking up agent by DriftChangeSet", t);
+ }
+ return null;
+ }
+
private Integer getAgentId(EventSource source) {
try {
int resourceId = source.getResource().getId();
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/internal/AlertConditionCacheUtils.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/internal/AlertConditionCacheUtils.java
index 6fc8407..2e3ace3 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/internal/AlertConditionCacheUtils.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/internal/AlertConditionCacheUtils.java
@@ -49,6 +49,11 @@ class AlertConditionCacheUtils {
return AlertConditionOperator.GREATER_THAN_OR_EQUAL_TO;
}
+ if (category == AlertConditionCategory.DRIFT) {
+ // any drift that is detected infers a change to its previous state
+ return AlertConditionOperator.CHANGES;
+ }
+
if (category == AlertConditionCategory.RESOURCE_CONFIG || category == AlertConditionCategory.CHANGE
|| category == AlertConditionCategory.TRAIT) {
// the model currently supports CHANGE as a category type instead of a comparator
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/mbean/AlertConditionCacheMonitor.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/mbean/AlertConditionCacheMonitor.java
index e997ac1..1442dce 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/mbean/AlertConditionCacheMonitor.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/mbean/AlertConditionCacheMonitor.java
@@ -42,6 +42,7 @@ public class AlertConditionCacheMonitor implements AlertConditionCacheMonitorMBe
public AtomicInteger measurementCacheElementMatches = new AtomicInteger();
public AtomicInteger resourceConfigurationCacheElementMatches = new AtomicInteger();
public AtomicInteger operationCacheElementMatches = new AtomicInteger();
+ public AtomicInteger driftCacheElementMatches = new AtomicInteger();
public AtomicInteger totalCacheElementMatches = new AtomicInteger();
public AtomicLong availabilityProcessingTime = new AtomicLong();
@@ -49,6 +50,7 @@ public class AlertConditionCacheMonitor implements AlertConditionCacheMonitorMBe
public AtomicLong measurementProcessingTime = new AtomicLong();
public AtomicLong resourceConfigurationProcessingTime = new AtomicLong();
public AtomicLong operationProcessingTime = new AtomicLong();
+ public AtomicLong driftProcessingTime = new AtomicLong();
public AtomicLong totalProcessingTime = new AtomicLong();
private static MBeanServer mbeanServer;
@@ -97,6 +99,11 @@ public class AlertConditionCacheMonitor implements AlertConditionCacheMonitorMBe
AlertConditionCacheCoordinator.Cache.ResourceOperationCache);
}
+ public int getDriftCacheElementCount() {
+ return AlertConditionCacheCoordinator.getInstance().getCacheSize(
+ AlertConditionCacheCoordinator.Cache.DriftCache);
+ }
+
public Map<String, Integer> getCacheCounts() {
return AlertConditionCacheCoordinator.getInstance().getCacheCounts();
}
@@ -121,6 +128,10 @@ public class AlertConditionCacheMonitor implements AlertConditionCacheMonitorMBe
return operationCacheElementMatches.get();
}
+ public int getDriftCacheElementMatches() {
+ return driftCacheElementMatches.get();
+ }
+
public int getTotalCacheElementMatches() {
return totalCacheElementMatches.get();
}
@@ -150,6 +161,11 @@ public class AlertConditionCacheMonitor implements AlertConditionCacheMonitorMBe
totalCacheElementMatches.addAndGet(matches);
}
+ public void incrementDriftCacheElementMatches(int matches) {
+ driftCacheElementMatches.addAndGet(matches);
+ totalCacheElementMatches.addAndGet(matches);
+ }
+
public long getAvailabilityProcessingTime() {
return availabilityProcessingTime.get();
}
@@ -166,6 +182,10 @@ public class AlertConditionCacheMonitor implements AlertConditionCacheMonitorMBe
return operationProcessingTime.get();
}
+ public long getDriftProcessingTime() {
+ return driftProcessingTime.get();
+ }
+
public long getTotalProcessingTime() {
return totalProcessingTime.get();
}
@@ -195,6 +215,11 @@ public class AlertConditionCacheMonitor implements AlertConditionCacheMonitorMBe
totalProcessingTime.addAndGet(moreMillis);
}
+ public void incrementDriftProcessingTime(long moreMillis) {
+ driftProcessingTime.addAndGet(moreMillis);
+ totalProcessingTime.addAndGet(moreMillis);
+ }
+
public void reloadCaches() {
LookupUtil.getAlertConditionCacheManager().reloadAllCaches();
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/mbean/AlertConditionCacheMonitorMBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/mbean/AlertConditionCacheMonitorMBean.java
index 6af167b..9e0a1f8 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/mbean/AlertConditionCacheMonitorMBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/mbean/AlertConditionCacheMonitorMBean.java
@@ -40,6 +40,8 @@ public interface AlertConditionCacheMonitorMBean {
public long getOperationProcessingTime();
+ public long getDriftProcessingTime();
+
public void incrementAvailabilityProcessingTime(long moreMillis);
public void incrementMeasurementProcessingTime(long moreMillis);
@@ -50,6 +52,8 @@ public interface AlertConditionCacheMonitorMBean {
public void incrementOperationProcessingTime(long moreMillis);
+ public void incrementDriftProcessingTime(long moreMillis);
+
/*
* for current congestion
*/
@@ -63,6 +67,8 @@ public interface AlertConditionCacheMonitorMBean {
public int getOperationCacheElementCount();
+ public int getDriftCacheElementCount();
+
public Map<String, Integer> getCacheCounts();
/*
@@ -80,6 +86,8 @@ public interface AlertConditionCacheMonitorMBean {
public int getOperationCacheElementMatches();
+ public int getDriftCacheElementMatches();
+
public void incrementAvailabilityCacheElementMatches(int matches);
public void incrementMeasurementCacheElementMatches(int matches);
@@ -90,6 +98,8 @@ public interface AlertConditionCacheMonitorMBean {
public void incrementOperationCacheElementMatches(int matches);
+ public void incrementDriftCacheElementMatches(int matches);
+
/*
* cache contents
*/
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/model/AbstractCacheElement.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/model/AbstractCacheElement.java
index f91e167..e09ddae 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/model/AbstractCacheElement.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/model/AbstractCacheElement.java
@@ -68,8 +68,10 @@ public abstract class AbstractCacheElement<T> {
if (value == null) {
if ((operator == AlertConditionOperator.CHANGES) || (operator == AlertConditionOperator.CHANGES_TO)
|| (operator == AlertConditionOperator.CHANGES_FROM)) {
- log.debug("Possible invalid Cache Element: " + "condition with id=" + conditionId + " "
- + "and operator='" + operator.toString() + "' " + "passed a null value argument");
+ if (log.isDebugEnabled()) {
+ log.debug("Possible invalid Cache Element: " + "condition with id=" + conditionId + " "
+ + "and operator='" + operator.toString() + "' " + "passed a null value argument");
+ }
} else {
throw new InvalidCacheElementException("Invalid Cache Element: " + "condition with id=" + conditionId
+ " " + "and operator='" + operator.toString() + "' " + "requires a non-null value");
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/model/DriftCacheElement.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/model/DriftCacheElement.java
new file mode 100644
index 0000000..d11ab51
--- /dev/null
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/model/DriftCacheElement.java
@@ -0,0 +1,45 @@
+/*
+ * 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.enterprise.server.alert.engine.model;
+
+public class DriftCacheElement extends AbstractCacheElement<Object> {
+
+ public DriftCacheElement(AlertConditionOperator operator, int conditionTriggerId) {
+ super(operator, "", conditionTriggerId);
+ }
+
+ @Override
+ public boolean matches(Object providedValue, Object... extraParams) {
+ if (alertConditionOperator == AlertConditionOperator.CHANGES) {
+ return true; // any drift report we get implies the content has changed
+ } else {
+ throw new UnsupportedAlertConditionOperatorException(getClass().getSimpleName() + " does not support "
+ + alertConditionOperator);
+ }
+ }
+
+ @Override
+ public AlertConditionOperator.Type getOperatorSupportsType(AlertConditionOperator operator) {
+ if (operator == AlertConditionOperator.CHANGES) {
+ return operator.getDefaultType();
+ }
+
+ return AlertConditionOperator.Type.NONE;
+ }
+}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/i18n/AlertI18NResourceKeys.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/i18n/AlertI18NResourceKeys.java
index 1de3d85..fb5f392 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/i18n/AlertI18NResourceKeys.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/i18n/AlertI18NResourceKeys.java
@@ -28,34 +28,38 @@ import mazz.i18n.annotation.I18NResourceBundle;
@I18NResourceBundle(baseName = "alert-messages", defaultLocale = "en")
public interface AlertI18NResourceKeys {
+ @I18NMessages( { @I18NMessage("Drift detected"), @I18NMessage(locale = "de", value = "Ãnderung erkannt") })
+ String ALERT_CONFIG_PROPS_CB_DRIFT = "alert.config.props.CB.Drift";
+
+ @I18NMessages( { @I18NMessage("Drift detected"), @I18NMessage(locale = "de", value = "Ãnderung erkannt") })
+ String ALERT_CONFIG_PROPS_CB_DRIFT_SHORT = "alert.config.props.CB.Drift.short";
+
@I18NMessages( { @I18NMessage("Availability goes {0}"),
- @I18NMessage(locale = "de", value = "Verfgbarkeit wird {0}") })
+ @I18NMessage(locale = "de", value = "Verfï¿œgbarkeit wird {0}") })
String ALERT_CONFIG_PROPS_CB_AVAILABILITY = "alert.config.props.CB.Availability";
- @I18NMessages( { @I18NMessage("Avail goes {0}"),
- @I18NMessage(locale = "de", value = "Verf. wird {0}") })
+ @I18NMessages( { @I18NMessage("Avail goes {0}"), @I18NMessage(locale = "de", value = "Verf. wird {0}") })
String ALERT_CONFIG_PROPS_CB_AVAILABILITY_SHORT = "alert.config.props.CB.Availability.short";
@I18NMessages( { @I18NMessage("Event Severity: {0}"),
@I18NMessage(locale = "de", value = "Schwere des Ereignesses: {0}") })
String ALERT_CONFIG_PROPS_CB_EVENT_SEVERITY = "alert.config.props.CB.EventSeverity";
- @I18NMessages( { @I18NMessage("Sev: {0}"),
- @I18NMessage(locale = "de", value = "Schwere: {0}") })
+ @I18NMessages( { @I18NMessage("Sev: {0}"), @I18NMessage(locale = "de", value = "Schwere: {0}") })
String ALERT_CONFIG_PROPS_CB_EVENT_SEVERITY_SHORT = "alert.config.props.CB.EventSeverity.short";
@I18NMessages( { @I18NMessage("Event Severity: {0} and matching expression \"{1}\""),
- @I18NMessage(locale = "de", value = "Schwere des Ereignesses: {0} und zugehriger Ausdruck \"{1}\"") })
+ @I18NMessage(locale = "de", value = "Schwere des Ereignesses: {0} und zugehï¿œriger Ausdruck \"{1}\"") })
String ALERT_CONFIG_PROPS_CB_EVENT_SEVERITY_REGEX_MATCH = "alert.config.props.CB.EventSeverity.RegexMatch";
@I18NMessages( { @I18NMessage("Sev: {0} & exp \"{1}\""),
@I18NMessage(locale = "de", value = "Schwere: {0} & Ausdruck \"{1}\"") })
String ALERT_CONFIG_PROPS_CB_EVENT_SEVERITY_REGEX_MATCH_SHORT = "alert.config.props.CB.EventSeverity.RegexMatch.short";
- @I18NMessages( { @I18NMessage("value changed"), @I18NMessage(locale = "de", value = "Der Wert hat sich gendert") })
+ @I18NMessages( { @I18NMessage("value changed"), @I18NMessage(locale = "de", value = "Der Wert hat sich geï¿œndert") })
String ALERT_CURRENT_LIST_VALUE_CHANGED = "alert.current.list.ValueChanged";
- @I18NMessages( { @I18NMessage("val chg"), @I18NMessage(locale = "de", value = "Wertnd.") })
+ @I18NMessages( { @I18NMessage("val chg"), @I18NMessage(locale = "de", value = "Wertï¿œnd.") })
String ALERT_CURRENT_LIST_VALUE_CHANGED_SHORT = "alert.current.list.ValueChanged.short";
@I18NMessages( {
@@ -64,9 +68,7 @@ public interface AlertI18NResourceKeys {
+ "\\ - Details: {3}\\n\\\n") })
String ALERT_EMAIL_CONDITION_LOG_FORMAT = "alert.email.condition.log.format";
- @I18NMessages( {
- @I18NMessage("\\ - Cond {0}: {1}\\n\\\n" + "\\ - Time: {2}\\n\\\n" + "\\ - Det: {3}\\n\\\n"),
- @I18NMessage(locale = "de", value = " - Bed {0}: {1}\\n\\\n - Zeit: {2}\\n\\\n"
- + "\\ - Det: {3}\\n\\\n") })
+ @I18NMessages( { @I18NMessage("\\ - Cond {0}: {1}\\n\\\n" + "\\ - Time: {2}\\n\\\n" + "\\ - Det: {3}\\n\\\n"),
+ @I18NMessage(locale = "de", value = " - Bed {0}: {1}\\n\\\n - Zeit: {2}\\n\\\n" + "\\ - Det: {3}\\n\\\n") })
String ALERT_EMAIL_CONDITION_LOG_FORMAT_SHORT = "alert.email.condition.log.format.short";
}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
index b1a7415..738d69f 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
@@ -18,6 +18,10 @@
*/
package org.rhq.enterprise.server.drift;
+import static java.util.Arrays.asList;
+import static javax.ejb.TransactionAttributeType.NOT_SUPPORTED;
+import static javax.ejb.TransactionAttributeType.REQUIRES_NEW;
+
import java.io.File;
import java.io.InputStream;
import java.util.HashSet;
@@ -36,6 +40,9 @@ import javax.jms.Session;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
+import difflib.DiffUtils;
+import difflib.Patch;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -52,11 +59,11 @@ import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftComposite;
import org.rhq.core.domain.drift.DriftConfiguration;
import org.rhq.core.domain.drift.DriftConfigurationComparator;
-import org.rhq.core.domain.drift.DriftConfigurationComparator.CompareMode;
import org.rhq.core.domain.drift.DriftConfigurationDefinition;
import org.rhq.core.domain.drift.DriftFile;
import org.rhq.core.domain.drift.DriftSnapshot;
import org.rhq.core.domain.drift.FileDiffReport;
+import org.rhq.core.domain.drift.DriftConfigurationComparator.CompareMode;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.server.RHQConstants;
@@ -64,6 +71,7 @@ import org.rhq.enterprise.server.agentclient.AgentClient;
import org.rhq.enterprise.server.auth.SubjectManagerLocal;
import org.rhq.enterprise.server.core.AgentManagerLocal;
import org.rhq.enterprise.server.plugin.pc.MasterServerPluginContainer;
+import org.rhq.enterprise.server.plugin.pc.drift.DriftChangeSetSummary;
import org.rhq.enterprise.server.plugin.pc.drift.DriftServerPluginContainer;
import org.rhq.enterprise.server.plugin.pc.drift.DriftServerPluginFacet;
import org.rhq.enterprise.server.plugin.pc.drift.DriftServerPluginManager;
@@ -71,13 +79,6 @@ import org.rhq.enterprise.server.util.CriteriaQueryGenerator;
import org.rhq.enterprise.server.util.CriteriaQueryRunner;
import org.rhq.enterprise.server.util.LookupUtil;
-import difflib.DiffUtils;
-import difflib.Patch;
-
-import static java.util.Arrays.asList;
-import static javax.ejb.TransactionAttributeType.NOT_SUPPORTED;
-import static javax.ejb.TransactionAttributeType.REQUIRES_NEW;
-
/**
* The SLSB supporting Drift management to clients.
*
@@ -100,10 +101,10 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
binaryFileTypes.add("jar");
binaryFileTypes.add("war");
binaryFileTypes.add("ear");
- binaryFileTypes.add("sar"); // jboss service
- binaryFileTypes.add("har"); // hibernate archive
- binaryFileTypes.add("rar"); // resource adapter
- binaryFileTypes.add("wsr"); // jboss web service archive
+ binaryFileTypes.add("sar"); // jboss service
+ binaryFileTypes.add("har"); // hibernate archive
+ binaryFileTypes.add("rar"); // resource adapter
+ binaryFileTypes.add("wsr"); // jboss web service archive
binaryFileTypes.add("zip");
binaryFileTypes.add("tar");
binaryFileTypes.add("bz2");
@@ -351,9 +352,10 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
@Override
@TransactionAttribute(NOT_SUPPORTED)
- public void saveChangeSet(Subject subject, int resourceId, File changeSetZip) throws Exception {
+ public DriftChangeSetSummary saveChangeSet(Subject subject, int resourceId, File changeSetZip) throws Exception {
DriftServerPluginFacet driftServerPlugin = getServerPlugin();
- driftServerPlugin.saveChangeSet(subject, resourceId, changeSetZip);
+ DriftChangeSetSummary summary = driftServerPlugin.saveChangeSet(subject, resourceId, changeSetZip);
+ return summary;
}
@Override
@@ -415,8 +417,8 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
List<String> content2List = asList(content2.split("\\n"));
Patch patch = DiffUtils.diff(content1List, content2List);
- List<String> deltas = DiffUtils.generateUnifiedDiff(drift1.getPath(), drift2.getPath(), content1List, patch,
- 10);
+ List<String> deltas = DiffUtils
+ .generateUnifiedDiff(drift1.getPath(), drift2.getPath(), content1List, patch, 10);
return new FileDiffReport(patch.getDeltas().size(), deltas);
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/JPADriftServerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/JPADriftServerBean.java
index c3a34bf..105164f 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/JPADriftServerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/JPADriftServerBean.java
@@ -19,6 +19,8 @@
*/
package org.rhq.enterprise.server.drift;
+import static javax.ejb.TransactionAttributeType.REQUIRES_NEW;
+
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.File;
@@ -73,11 +75,10 @@ import org.rhq.enterprise.server.RHQConstants;
import org.rhq.enterprise.server.agentclient.AgentClient;
import org.rhq.enterprise.server.auth.SubjectManagerLocal;
import org.rhq.enterprise.server.core.AgentManagerLocal;
+import org.rhq.enterprise.server.plugin.pc.drift.DriftChangeSetSummary;
import org.rhq.enterprise.server.util.CriteriaQueryGenerator;
import org.rhq.enterprise.server.util.CriteriaQueryRunner;
-import static javax.ejb.TransactionAttributeType.REQUIRES_NEW;
-
/**
* The SLSB method implementation needed to support the JPA (RHQ Default) Drift Server Plugin.
*
@@ -222,12 +223,15 @@ public class JPADriftServerBean implements JPADriftServerLocal {
@Override
@TransactionAttribute(REQUIRES_NEW)
- public void storeChangeSet(Subject subject, final int resourceId, File changeSetZip) throws Exception {
+ public DriftChangeSetSummary storeChangeSet(Subject subject, final int resourceId, File changeSetZip)
+ throws Exception {
final Resource resource = entityManager.find(Resource.class, resourceId);
if (null == resource) {
throw new IllegalArgumentException("Resource not found [" + resourceId + "]");
}
+ final DriftChangeSetSummary summary = new DriftChangeSetSummary();
+
try {
ZipUtil.walkZipFile(changeSetZip, new ChangeSetFileVisitor() {
@@ -254,6 +258,11 @@ public class JPADriftServerBean implements JPADriftServerLocal {
driftChangeSet = new JPADriftChangeSet(resource, version, category, config);
entityManager.persist(driftChangeSet);
+ summary.setCategory(category);
+ summary.setResourceId(resourceId);
+ summary.setDriftConfigurationName(reader.getHeaders().getDriftConfigurationName());
+ summary.setCreatedTime(driftChangeSet.getCtime());
+
for (FileEntry entry : reader) {
JPADriftFile oldDriftFile = getDriftFile(entry.getOldSHA(), emptyDriftFiles);
JPADriftFile newDriftFile = getDriftFile(entry.getNewSHA(), emptyDriftFiles);
@@ -269,6 +278,14 @@ public class JPADriftServerBean implements JPADriftServerLocal {
JPADrift drift = new JPADrift(driftChangeSet, path, entry.getType(), oldDriftFile,
newDriftFile);
entityManager.persist(drift);
+
+ // we are taking advantage of the fact that we know the summary is only used by the server
+ // if the change set is a DRIFT report. If its a coverage report, it is not used (we do
+ // not alert on coverage reports) - so don't waste memory by collecting all the paths
+ // when we know they aren't going to be used anyway.
+ if (category == DriftChangeSetCategory.DRIFT) {
+ summary.addDriftPathname(path);
+ }
}
// send a message to the agent requesting the empty JPADriftFile content
if (!emptyDriftFiles.isEmpty()) {
@@ -295,6 +312,9 @@ public class JPADriftServerBean implements JPADriftServerLocal {
return true;
}
});
+
+ return summary;
+
} catch (Exception e) {
String msg = "Failed to store drift changeset for ";
if (null != resource) {
@@ -304,6 +324,7 @@ public class JPADriftServerBean implements JPADriftServerLocal {
}
log.error(msg, e);
+ return null;
} finally {
// delete the changeSetFile?
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/JPADriftServerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/JPADriftServerLocal.java
index 7142ead..e4c57df 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/JPADriftServerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/JPADriftServerLocal.java
@@ -33,6 +33,7 @@ import org.rhq.core.domain.drift.JPADrift;
import org.rhq.core.domain.drift.JPADriftChangeSet;
import org.rhq.core.domain.drift.JPADriftFile;
import org.rhq.core.domain.util.PageList;
+import org.rhq.enterprise.server.plugin.pc.drift.DriftChangeSetSummary;
/**
* The SLSB methods needed to support the JPA (RHQ Default) Drift Server Plugin.
@@ -94,9 +95,10 @@ public interface JPADriftServerLocal {
*
* @param resourceId The resource for which the change-set is being reported.
* @param changeSetZip The change-set zip file
+ * @return a summary of the change set that was persisted
* @throws Exception
*/
- void storeChangeSet(Subject subject, int resourceId, File changeSetZip) throws Exception;
+ DriftChangeSetSummary storeChangeSet(Subject subject, int resourceId, File changeSetZip) throws Exception;
/**
* This method stores the provided drift files. The files should correspond to requested drift files.
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftChangeSetSummary.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftChangeSetSummary.java
new file mode 100644
index 0000000..8148690
--- /dev/null
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftChangeSetSummary.java
@@ -0,0 +1,93 @@
+/*
+ * 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.enterprise.server.plugin.pc.drift;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.rhq.core.domain.drift.DriftChangeSetCategory;
+
+/**
+ * Provides a summary of a change set.
+ *
+ * This object is mainly used to pass to the alert subsystem in order to determine which alerts should be triggered.
+ * It doesn't have all the information that a DriftChangeSet has - it's a summary that only has the data necessary
+ * for the alert subsystem to be able to determine what alerts need to be triggered.
+ *
+ * @author John Mazzitelli
+ */
+public class DriftChangeSetSummary {
+ private long createdTime;
+ private DriftChangeSetCategory category;
+ private int resourceId;
+ private String driftConfigurationName;
+ private List<String> driftPathnames;
+
+ public long getCreatedTime() {
+ return createdTime;
+ }
+
+ public void setCreatedTime(long createdTime) {
+ this.createdTime = createdTime;
+ }
+
+ public DriftChangeSetCategory getCategory() {
+ return category;
+ }
+
+ public void setCategory(DriftChangeSetCategory category) {
+ this.category = category;
+ }
+
+ public int getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(int resourceId) {
+ this.resourceId = resourceId;
+ }
+
+ public String getDriftConfigurationName() {
+ return driftConfigurationName;
+ }
+
+ public void setDriftConfigurationName(String driftConfigurationName) {
+ this.driftConfigurationName = driftConfigurationName;
+ }
+
+ public List<String> getDriftPathnames() {
+ return obtainDriftPathnamesList();
+ }
+
+ public void setDriftPathnames(List<String> driftPathnames) {
+ this.driftPathnames = driftPathnames;
+ }
+
+ public void addDriftPathname(String driftPathname) {
+ obtainDriftPathnamesList().add(driftPathname);
+ }
+
+ private List<String> obtainDriftPathnamesList() {
+ if (driftPathnames == null) {
+ driftPathnames = new ArrayList<String>();
+ }
+ return driftPathnames;
+ }
+}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java
index 7a960dd..cedf437 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/drift/DriftServerPluginFacet.java
@@ -72,7 +72,16 @@ public interface DriftServerPluginFacet {
*/
DriftFile getDriftFile(Subject subject, String hashId) throws Exception;
- void saveChangeSet(Subject subject, int resourceId, File changeSetZip) throws Exception;
+ /**
+ * Parses the given change set file and persists its data.
+ *
+ * @param subject
+ * @param resourceId
+ * @param changeSetZip
+ * @return a summary of what was in the change set file
+ * @throws Exception
+ */
+ DriftChangeSetSummary saveChangeSet(Subject subject, int resourceId, File changeSetZip) throws Exception;
void saveChangeSetFiles(Subject subject, File changeSetFilesZip) throws Exception;
diff --git a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
index 561d434..644ee60 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
+++ b/modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/MongoDBDriftServer.java
@@ -19,6 +19,8 @@
package org.rhq.enterprise.server.plugins.drift.mongodb;
+import static org.rhq.enterprise.server.util.LookupUtil.getResourceManager;
+
import java.io.BufferedReader;
import java.io.File;
import java.io.InputStreamReader;
@@ -46,6 +48,7 @@ import org.rhq.core.domain.criteria.DriftCriteria;
import org.rhq.core.domain.criteria.ResourceCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
+import org.rhq.core.domain.drift.DriftChangeSetCategory;
import org.rhq.core.domain.drift.DriftComposite;
import org.rhq.core.domain.drift.DriftFile;
import org.rhq.core.domain.drift.DriftSnapshot;
@@ -58,14 +61,13 @@ import org.rhq.core.util.ZipUtil;
import org.rhq.core.util.file.FileUtil;
import org.rhq.enterprise.server.plugin.pc.ServerPluginComponent;
import org.rhq.enterprise.server.plugin.pc.ServerPluginContext;
+import org.rhq.enterprise.server.plugin.pc.drift.DriftChangeSetSummary;
import org.rhq.enterprise.server.plugin.pc.drift.DriftServerPluginFacet;
import org.rhq.enterprise.server.plugins.drift.mongodb.entities.MongoDBChangeSet;
import org.rhq.enterprise.server.plugins.drift.mongodb.entities.MongoDBChangeSetEntry;
import org.rhq.enterprise.server.plugins.drift.mongodb.entities.MongoDBFile;
import org.rhq.enterprise.server.resource.ResourceManagerLocal;
-import static org.rhq.enterprise.server.util.LookupUtil.getResourceManager;
-
public class MongoDBDriftServer implements DriftServerPluginFacet, ServerPluginComponent {
//private final Log log = LogFactory.getLog(MongoDBDriftServer.class);
@@ -101,7 +103,11 @@ public class MongoDBDriftServer implements DriftServerPluginFacet, ServerPluginC
}
@Override
- public void saveChangeSet(final Subject subject, final int resourceId, final File changeSetZip) throws Exception {
+ public DriftChangeSetSummary saveChangeSet(final Subject subject, final int resourceId, final File changeSetZip)
+ throws Exception {
+
+ final DriftChangeSetSummary summary = new DriftChangeSetSummary();
+
ZipUtil.walkZipFile(changeSetZip, new ZipUtil.ZipEntryVisitor() {
@Override
public boolean visit(ZipEntry zipEntry, ZipInputStream stream) throws Exception {
@@ -115,18 +121,33 @@ public class MongoDBDriftServer implements DriftServerPluginFacet, ServerPluginC
changeSet.setDriftConfigurationId(1);
changeSet.setVersion(changeSetVersions++);
+ summary.setCategory(headers.getType());
+ summary.setResourceId(resourceId);
+ summary.setDriftConfigurationName(headers.getDriftConfigurationName());
+ summary.setCreatedTime(changeSet.getCtime());
+
for (FileEntry fileEntry : reader) {
String path = FileUtil.useForwardSlash(fileEntry.getFile());
MongoDBChangeSetEntry entry = new MongoDBChangeSetEntry();
entry.setCategory(fileEntry.getType());
entry.setPath(path);
changeSet.add(entry);
+
+ // we are taking advantage of the fact that we know the summary is only used by the server
+ // if the change set is a DRIFT report. If its a coverage report, it is not used (we do
+ // not alert on coverage reports) - so don't waste memory by collecting all the paths
+ // when we know they aren't going to be used anyway.
+ if (headers.getType() == DriftChangeSetCategory.DRIFT) {
+ summary.addDriftPathname(path);
+ }
}
ds.save(changeSet);
return true;
}
});
+
+ return summary;
}
@Override
diff --git a/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/JPADriftServerPluginComponent.java b/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/JPADriftServerPluginComponent.java
index 1dadcb9..ee542d0 100644
--- a/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/JPADriftServerPluginComponent.java
+++ b/modules/enterprise/server/plugins/drift-rhq/src/main/java/org/rhq/enterprise/server/plugins/drift/JPADriftServerPluginComponent.java
@@ -19,6 +19,8 @@
*/
package org.rhq.enterprise.server.plugins.drift;
+import static org.rhq.enterprise.server.util.LookupUtil.getJPADriftServer;
+
import java.io.File;
import org.apache.commons.logging.Log;
@@ -37,10 +39,9 @@ import org.rhq.core.domain.drift.JPADriftChangeSet;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.server.plugin.pc.ServerPluginComponent;
import org.rhq.enterprise.server.plugin.pc.ServerPluginContext;
+import org.rhq.enterprise.server.plugin.pc.drift.DriftChangeSetSummary;
import org.rhq.enterprise.server.plugin.pc.drift.DriftServerPluginFacet;
-import static org.rhq.enterprise.server.util.LookupUtil.getJPADriftServer;
-
/**
* A drift server-side plugin component that the server uses to process drift files.
*
@@ -104,8 +105,8 @@ public class JPADriftServerPluginComponent implements DriftServerPluginFacet, Se
}
@Override
- public void saveChangeSet(Subject subject, int resourceId, File changeSetZip) throws Exception {
- getJPADriftServer().storeChangeSet(subject, resourceId, changeSetZip);
+ public DriftChangeSetSummary saveChangeSet(Subject subject, int resourceId, File changeSetZip) throws Exception {
+ return getJPADriftServer().storeChangeSet(subject, resourceId, changeSetZip);
}
@Override
diff --git a/modules/plugins/rhq-server/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/rhq-server/src/main/resources/META-INF/rhq-plugin.xml
index cbcbf44..9f0f6a3 100644
--- a/modules/plugins/rhq-server/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/rhq-server/src/main/resources/META-INF/rhq-plugin.xml
@@ -48,6 +48,8 @@
description="The number of elements in the alerts cache that check conditions against operation history data"/>
<metric property="ResourceConfigurationCacheElementCount" category="throughput" displayType="summary"
description="The number of elements in the alerts cache that check conditions against resource configuration data"/>
+ <metric property="DriftCacheElementCount" category="throughput" displayType="summary"
+ description="The number of elements in the alerts cache that check conditions against drift data"/>
<metric property="TotalCacheElementMatches" category="throughput" displayType="summary" measurementType="trendsup"
description="The total number of times ANY cache element has triggered against incoming data since this RHQ Server instance was started"/>
@@ -61,6 +63,8 @@
description="The total number of times resource configuration-based conditions have triggered against incoming data since this RHQ Server instance was started"/>
<metric property="OperationCacheElementMatches" category="throughput" displayType="summary" measurementType="trendsup"
description="The total number of times operation-based conditions have triggered against incoming data since this RHQ Server instance was started"/>
+ <metric property="DriftCacheElementMatches" category="throughput" displayType="summary" measurementType="trendsup"
+ description="The total number of times drift conditions have triggered against incoming data since this RHQ Server instance was started"/>
<metric property="TotalProcessingTime" units="milliseconds" displayType="summary" measurementType="trendsup"
description="The total amount of time spent by the alerts cache processing ALL types of data"/>
@@ -74,6 +78,8 @@
description="The total amount of time spent by the alerts cache processing resource configuration data"/>
<metric property="OperationProcessingTime" units="milliseconds" displayType="summary" measurementType="trendsup"
description="The total amount of time spent by the alerts cache processing operation history data"/>
+ <metric property="DriftProcessingTime" units="milliseconds" displayType="summary" measurementType="trendsup"
+ description="The total amount of time spent by the alerts cache processing drift data"/>
</service>
12 years, 7 months
[rhq] Branch 'drift' - 123 commits - .classpath etc/cli-scripts etc/samples modules/common modules/core modules/enterprise modules/integration-tests modules/plugins pom.xml publish_release.sh release.sh
by mazz
.classpath | 2
etc/cli-scripts/drift.js | 66 -
etc/cli-scripts/measurement_utils.js | 134 --
etc/cli-scripts/util.js | 95 -
etc/samples/custom-serverplugin/pom.xml | 9
etc/samples/custom-serverplugin/src/main/resources/META-INF/rhq-serverplugin.xml | 4
etc/samples/simplereport-serverplugin/src/main/resources/META-INF/rhq-serverplugin.xml | 4
modules/common/drift/src/main/java/org/rhq/common/drift/ChangeSetReaderImpl.java | 19
modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/DriftMetadataParser.java | 3
modules/core/client-api/src/test/java/org/rhq/core/clientapi/agent/metadata/test/PluginMetadataParserTest.java | 3
modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftConfigurationDefinition.java | 2
modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDetails.java | 126 ++
modules/core/domain/src/main/java/org/rhq/core/domain/drift/FileDiffReport.java | 11
modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java | 13
modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftConfigurationTest.java | 20
modules/core/plugin-container/pom.xml | 3
modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftClient.java | 9
modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java | 26
modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftInputStream.java | 93 +
modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java | 169 ++
modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java | 38
modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java | 59 +
modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftManagerTest.java | 365 ++++++
modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftTest.java | 14
modules/core/plugin-container/src/test/xml/rhq-plugin-jmx-server-test.xml | 2
modules/core/plugindoc/pom.xml | 38
modules/core/pom.xml | 3
modules/enterprise/agent/ant-run.xml | 11
modules/enterprise/agent/pom.xml | 38
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/CoreGUI.java | 5
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/Footer.java | 102 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/ImageManager.java | 48
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LoginView.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/UserSessionManager.java | 6
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/PermissionsEditor.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UsersDataSource.java | 21
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UsersView.java | 32
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/BundleDeployWizard.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/GetDeploymentConfigStep.java | 11
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/GetDeploymentOptionsStep.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/GetDestinationStep.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/SelectBundleStep.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/SelectBundleVersionStep.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundlesListView.java | 9
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java | 17
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/AbstractRecordEditor.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java | 68 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/view/AbstractSectionedLeftNavigationView.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/wizard/WizardView.java | 24
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupConfigurationUpdatesPortlet.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupOperationsPortlet.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/inventory/queue/AutodiscoveryPortlet.java | 5
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/platform/PlatformMetricDataSource.java | 17
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/platform/PlatformSummaryPortlet.java | 80 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/drift/AbstractRecentDriftsPortlet.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/operations/AbstractOperationHistoryPortlet.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/problems/ProblemResourcesPortlet.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceConfigurationUpdatesPortlet.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftConfigurationView.java | 3
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java | 259 ++--
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java | 7
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/AbstractMeasurementDataTraitListView.java | 16
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/AbstractTwoLevelTabSetView.java | 24
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/operation/schedule/AbstractOperationScheduleDetailsView.java | 71 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupCompositeDataSource.java | 8
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupListView.java | 3
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupContextMenu.java | 41
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTreeContextMenu.java | 8
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTreeView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceCompositeDataSource.java | 10
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceCompositeSearchView.java | 39
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceDatasource.java | 8
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceSearchView.java | 38
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ChildHistoryView.java | 5
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/CustomResourceTreeGrid.java | 3
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java | 6
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTopView.java | 1
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeView.java | 39
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/ResourceResourceAgentView.java | 3
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/summary/TimelineView.java | 66 +
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/AbstractResourceFactoryWizard.java | 6
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryConfigurationStep.java | 87 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryCreateWizard.java | 17
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryImportWizard.java | 3
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryInfoStep.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/menu/SearchBarPane.java | 212 ---
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java | 132 --
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/SearchBar.java | 3
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/favorites/SavedSearchGrid.java | 3
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java | 72 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/message/MessageBar.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/message/MessageCenter.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/message/MessageCenterView.java | 9
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/TrackingRequestCallback.java | 42
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java | 22
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SearchGWTServiceImpl.java | 1
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SubjectGWTServiceImpl.java | 9
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties | 21
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties | 17
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties | 17
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties | 17
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties | 17
modules/enterprise/gui/coregui/src/main/webapp/css/search.css | 122 +-
modules/enterprise/gui/coregui/src/main/webapp/images/resources/folder_mixed_closed.png |binary
modules/enterprise/gui/coregui/src/main/webapp/images/resources/folder_mixed_opened.png |binary
modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/inventory/CreateChild_16.png |binary
modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/inventory/CreateChild_failed_16.png |binary
modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/inventory/CreateChild_success_16.png |binary
modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/inventory/DeleteChild_16.png |binary
modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/inventory/DeleteChild_failed_16.png |binary
modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/inventory/DeleteChild_success_16.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icn_create_child.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icn_create_child_failed.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icn_create_child_success.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icn_delete_child.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icn_delete_child_failed.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icn_delete_child_success.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Drift_16.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventAlertJSON.jsp | 5
modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventContentJSON.jsp | 9
modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventCreateDeleteChildJSON.jsp | 21
modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventDriftJSON.jsp | 59 +
modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventEventsJSON.jsp | 35
modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventInventoryJSON.jsp | 52
modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventOperationsJSON.jsp | 10
modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventPluginConfigJSON.jsp | 2
modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventsView.jsp | 356 +++---
modules/enterprise/remoting/cli/src/main/samples/README.txt | 24
modules/enterprise/remoting/cli/src/main/samples/drift.js | 164 ++
modules/enterprise/remoting/cli/src/main/samples/measurement_utils.js | 134 ++
modules/enterprise/remoting/cli/src/main/samples/util.js | 95 +
modules/enterprise/remoting/cli/src/main/scripts/rhq-client.build.xml | 11
modules/enterprise/server/ear/pom.xml | 7
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java | 140 ++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java | 21
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerRemote.java | 20
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/JPADriftServerBean.java | 5
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/GlobalActivationContext.java | 3
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/GroupActivationContext.java | 5
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/ResourceActivationContext.java | 3
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SavedSearchManagerBean.java | 8
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/execution/SearchAssistManager.java | 121 +-
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest.java | 8
modules/enterprise/server/plugins/alert-cli/src/main/java/org/rhq/enterprise/server/plugins/alertCli/CliSender.java | 14
modules/enterprise/server/plugins/cloud/src/main/resources/META-INF/rhq-serverplugin.xml | 2
modules/enterprise/server/plugins/pom.xml | 6
modules/enterprise/server/safe-invoker/src/main/java/org/rhq/enterprise/server/util/HibernateDetachUtility.java | 208 ++-
modules/enterprise/server/safe-invoker/src/test/java/org/rhq/enterprise/server/util/HibernateDetachUtilityTest.java | 141 ++
modules/integration-tests/apache-plugin-test/pom.xml | 4
modules/integration-tests/mod_cluster-plugin-test/pom.xml | 396 ++++++
modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModClusterPluginIntegrationTest.java | 229 +++
modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java | 210 ---
modules/plugins/aliases/pom.xml | 2
modules/plugins/apache/pom.xml | 2
modules/plugins/augeas/pom.xml | 6
modules/plugins/cobbler/pom.xml | 2
modules/plugins/cron/pom.xml | 2
modules/plugins/grub/pom.xml | 2
modules/plugins/hosts/pom.xml | 2
modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/helper/JBossInstallationInfo.java | 4
modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml | 2
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java | 2
modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/helper/JBossInstallationInfo.java | 6
modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/MBeanResourceComponent.java | 13
modules/plugins/mod-cluster/pom.xml | 64 -
modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/CatalinaServiceComponent.java | 121 ++
modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ClassNameMBeanComponent.java | 64 +
modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ClassNameMBeanDiscoveryComponent.java | 109 +
modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java | 102 -
modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java | 118 --
modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java | 155 ++
modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java | 92 +
modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterDiscoveryComponent.java | 85 +
modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServerComponent.java | 70 +
modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServiceComponent.java | 51
modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java | 45
modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java | 310 -----
modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/WebappContextComponent.java | 117 ++
modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/WebappContextDiscoveryComponent.java | 105 +
modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java | 81 +
modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java | 92 +
modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java | 253 ++++
modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/helper/JBossHelper.java | 49
modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/model/ProxyInfo.java | 310 +++++
modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml | 581 ++++++++--
modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java | 2
modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java | 91 +
modules/plugins/mod-cluster/src/test/resources/xml_config/mod_cluster-jboss-beans.xml | 337 +++++
modules/plugins/mod-cluster/src/test/resources/xml_config/server.xml | 157 ++
modules/plugins/perftest/pom.xml | 76 +
modules/plugins/postfix/pom.xml | 2
modules/plugins/samba/pom.xml | 2
modules/plugins/sshd/pom.xml | 2
modules/plugins/sudoers/pom.xml | 2
pom.xml | 159 +-
publish_release.sh | 61 -
release.sh | 61 -
198 files changed, 7155 insertions(+), 2721 deletions(-)
New commits:
commit 5d4fbbefb4f9ee8767e3fb8e18c87a95bdd80d79
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Aug 31 12:49:03 2011 -0400
[BZ 734842] Adding more detailed logging around drift detection
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
index 4bffe9e..d2956d3 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
@@ -243,8 +243,8 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
@Override
public void detectDrift(int resourceId, DriftConfiguration driftConfiguration) {
- if (log.isDebugEnabled()) {
- log.debug("Received request to schedule drift detection immediately for [resourceId: " + resourceId
+ if (log.isInfoEnabled()) {
+ log.info("Received request to schedule drift detection immediately for [resourceId: " + resourceId
+ ", driftConfigurationId: " + driftConfiguration.getId() + ", driftConfigurationName: "
+ driftConfiguration.getName() + "]");
}
@@ -258,16 +258,41 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
}
log.debug("Resetting " + schedule + " for immediate detection.");
schedule.resetSchedule();
- schedulesQueue.addSchedule(schedule);
+ boolean queueUpdated = schedulesQueue.addSchedule(schedule);
+
+ if (queueUpdated) {
+ if (log.isDebugEnabled()) {
+ log.debug(schedule + " has been added to " + schedulesQueue + " for immediate detection.");
+ }
+ } else {
+ log.warn("Failed to add " + schedule + " to " + schedulesQueue + " for immediate detection.");
+ }
}
@Override
public void scheduleDriftDetection(int resourceId, DriftConfiguration driftConfiguration) {
- schedulesQueue.addSchedule(new DriftDetectionSchedule(resourceId, driftConfiguration));
+ DriftDetectionSchedule schedule = new DriftDetectionSchedule(resourceId, driftConfiguration);
+ if (log.isInfoEnabled()) {
+ log.info("Scheduling drift detection for " + schedule);
+ }
+ boolean added = schedulesQueue.addSchedule(schedule);
+
+ if (added) {
+ if (log.isDebugEnabled()) {
+ log.debug(schedule + " has been added to " + schedulesQueue);
+ } else {
+ log.warn("Failed to add " + schedule + " to " + schedulesQueue);
+ }
+ }
}
@Override
public boolean requestDriftFiles(int resourceId, Headers headers, List<? extends DriftFile> driftFiles) {
+ if (log.isInfoEnabled()) {
+ log.info("Server is requesting files for [resourceId: " + resourceId + ", driftConfigurationId: " +
+ headers.getDriftCofigurationId() + ", driftConfigurationName: " + headers.getDriftConfigurationName() +
+ "]");
+ }
DriftFilesSender sender = new DriftFilesSender();
sender.setResourceId(resourceId);
sender.setDriftClient(this);
@@ -282,8 +307,8 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
@Override
public void unscheduleDriftDetection(final int resourceId, final DriftConfiguration driftConfiguration) {
- log.debug("Received request to unschedule drift detection for [resourceId:" + resourceId +
- ", driftConfigurationId:" + driftConfiguration.getId() + ", driftConfigurationName: " +
+ log.info("Received request to unschedule drift detection for [resourceId:" + resourceId +
+ ", driftConfigurationId: " + driftConfiguration.getId() + ", driftConfigurationName: " +
driftConfiguration.getName() + "].");
DriftDetectionSchedule schedule = schedulesQueue.removeAndExecute(resourceId, driftConfiguration,
@@ -298,15 +323,29 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
}
});
- log.debug("Removed " + schedule + " from the schedule queue.");
+ if (log.isDebugEnabled()) {
+ log.debug("Removed " + schedule + " from the queue " + schedulesQueue);
+ }
}
@Override
public void updateDriftDetection(int resourceId, DriftConfiguration driftConfiguration) {
+ log.info("Received request to update schedule for [resourceId: " + resourceId + ", driftConfigurationId: " +
+ driftConfiguration.getId() + ", driftConfigurationName: " + driftConfiguration.getName() + "]");
DriftDetectionSchedule updatedSchedule = schedulesQueue.update(resourceId, driftConfiguration);
if (updatedSchedule == null) {
updatedSchedule = new DriftDetectionSchedule(resourceId, driftConfiguration);
- schedulesQueue.addSchedule(updatedSchedule);
+ if (log.isInfoEnabled()) {
+ log.info("Adding " + updatedSchedule + " to " + schedulesQueue);
+ }
+ boolean added = schedulesQueue.addSchedule(updatedSchedule);
+ if (added) {
+ if (log.isDebugEnabled()) {
+ log.debug(updatedSchedule + " has been added to " + schedulesQueue);
+ }
+ } else {
+ log.warn("Failed to add " + updatedSchedule + " to " + schedulesQueue);
+ }
}
InventoryManager inventoryMgr = PluginContainer.getInstance().getInventoryManager();
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
index f944299..003868d 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
@@ -166,4 +166,25 @@ public class ScheduleQueueImpl implements ScheduleQueue {
lock.writeLock().unlock();
}
}
+
+ @Override
+ public String toString() {
+ try {
+ lock.readLock().lock();
+ if (queue.isEmpty()) {
+ return "ScheduleQueue[]";
+ }
+ StringBuilder buffer = new StringBuilder("ScheduleQueue[");
+ for (DriftDetectionSchedule schedule : queue) {
+ buffer.append(schedule).append(", ");
+ }
+ int end = buffer.length();
+ buffer.delete(end - 2, end);
+ buffer.append("]");
+
+ return buffer.toString();
+ } finally {
+ lock.readLock().unlock();
+ }
+ }
}
commit e7acb51347c550e38c5a35d6a5fbba61e5908110
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Wed Aug 31 18:03:07 2011 +0200
BZ 707669 - Forgot to check in the plugin-container pom that actually fetches the augeas-native as its dependency.
diff --git a/modules/core/plugin-container/pom.xml b/modules/core/plugin-container/pom.xml
index 1d12869..5e8397b 100644
--- a/modules/core/plugin-container/pom.xml
+++ b/modules/core/plugin-container/pom.xml
@@ -104,7 +104,8 @@
<dependency>
<groupId>net.augeas</groupId>
<artifactId>augeas-native</artifactId>
- <version>0.7.1.1</version>
+ <version>${augeas.version}</version>
+ <classifier>${augeas.classifier}</classifier>
<type>zip</type>
</dependency>
commit 405c128a92bd65d24dad5ae40b26e2b6bfc12a84
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Wed Aug 31 17:27:43 2011 +0200
BZ 707669 - The bundled native augeas libraries have been bumped to version 0.9.0.
diff --git a/modules/enterprise/agent/ant-run.xml b/modules/enterprise/agent/ant-run.xml
index 20617c5..384e283 100644
--- a/modules/enterprise/agent/ant-run.xml
+++ b/modules/enterprise/agent/ant-run.xml
@@ -12,8 +12,11 @@ Ant Script that provides ways to package the Agent.
<property name="settings.localRepository" location="${user.home}/.m2/repository"/>
<property name="project.version" value="2.0.0-SNAPSHOT"/>
<property name="sigar.version" value="1.6.5.132"/>
- <property name="augeas.version" value="0.7.1.1"/>
- <property name="augeas.zip.version" value="0.7.1"/>
+ <property name="augeas.version" value="0.9.0"/>
+ <property name="augeas.classifier" value="el5"/>
+ <property name="augeas.zip.location" value="${settings.localRepository}/net/augeas/augeas-native/${augeas.version}/"/>
+ <property name="augeas.zip.mask" value="*-${augeas.classifier}.zip"/>
+ <property name="augeas.zip.version" value="0.9.0"/>
<property name="getopt.version" value="1.0.13"/>
<property name="jaxb-api.version" value="2.1"/>
<property name="jaxb-impl.version" value="2.1"/>
@@ -79,8 +82,8 @@ Ant Script that provides ways to package the Agent.
<include name="org/hyperic/sigar-dist/${sigar.version}/sigar-dist-${sigar.version}.zip" />
</fileset>
- <fileset dir="${settings.localRepository}" id="augeas.native.fileset">
- <include name="net/augeas/augeas-native/${augeas.version}/augeas-native-${augeas.version}.zip" />
+ <fileset dir="${augeas.zip.location}" id="augeas.native.fileset">
+ <include name="${augeas.zip.mask}" />
</fileset>
<fileset dir="${settings.localRepository}" id="plugins.fileset">
diff --git a/modules/enterprise/agent/pom.xml b/modules/enterprise/agent/pom.xml
index 17690d3..199a996 100644
--- a/modules/enterprise/agent/pom.xml
+++ b/modules/enterprise/agent/pom.xml
@@ -188,6 +188,9 @@ Build-Number=${buildNumber}
<property name="jaxb-impl.version" value="${jaxb-impl.version}" />
<property name="jline.version" value="${jline.version}" />
<property name="augeas.version" value="${augeas.version}" />
+ <property name="augeas.classifier" value="${augeas.classifier}"/>
+ <property name="augeas.zip.location" value="${augeas.zip.location}"/>
+ <property name="augeas.zip.mask" value="${augeas.zip.mask}"/>
<property name="augeas.zip.version" value="${augeas.zip.version}" />
</ant>
</tasks>
diff --git a/modules/integration-tests/apache-plugin-test/pom.xml b/modules/integration-tests/apache-plugin-test/pom.xml
index bba3c06..206a7a7 100644
--- a/modules/integration-tests/apache-plugin-test/pom.xml
+++ b/modules/integration-tests/apache-plugin-test/pom.xml
@@ -198,8 +198,8 @@
<unzip dest="target/itest/lib">
<fileset
- dir="${settings.localRepository}/net/augeas/augeas-native/${augeas.version}"
- includes="*.zip" />
+ dir="${augeas.zip.location}"
+ includes="${augeas.zip.mask}" />
<patternset>
<include name="**/lib*/*.so" />
<include name="**/lib*/*.so.*" />
diff --git a/modules/plugins/aliases/pom.xml b/modules/plugins/aliases/pom.xml
index 959fa3c..d983b6a 100644
--- a/modules/plugins/aliases/pom.xml
+++ b/modules/plugins/aliases/pom.xml
@@ -114,7 +114,7 @@
<delete dir="target/itest/lib/hyperic-sigar-${sigar.zip.version}" />
<unzip dest="target/itest/lib">
- <fileset dir="${settings.localRepository}/net/augeas/augeas-native/${augeas.version}" includes="*.zip" />
+ <fileset dir="${augeas.zip.location}" includes="${augeas.zip.mask}" />
<patternset>
<include name="**/lib*/*.so" />
<include name="**/lib*/*.so.*" />
diff --git a/modules/plugins/apache/pom.xml b/modules/plugins/apache/pom.xml
index 0694d78..e68547f 100644
--- a/modules/plugins/apache/pom.xml
+++ b/modules/plugins/apache/pom.xml
@@ -178,7 +178,7 @@
<delete dir="target/itest/lib/hyperic-sigar-${sigar.zip.version}" />
<unzip dest="target/itest/lib">
- <fileset dir="${settings.localRepository}/net/augeas/augeas-native/${augeas.version}" includes="*.zip" />
+ <fileset dir="${augeas.zip.location}" includes="${augeas.zip.mask}" />
<patternset>
<include name="**/lib*/*.so" />
<include name="**/lib*/*.so.*" />
diff --git a/modules/plugins/augeas/pom.xml b/modules/plugins/augeas/pom.xml
index 66d35d1..ff7d21f 100644
--- a/modules/plugins/augeas/pom.xml
+++ b/modules/plugins/augeas/pom.xml
@@ -18,7 +18,7 @@
<description>An abstract plugin for configuring resources via Augeas</description>
<properties>
- <augeas.version>0.0.2</augeas.version>
+ <augeas-bindings.version>0.0.2</augeas-bindings.version>
</properties>
<dependencies>
@@ -50,7 +50,7 @@
<dependency>
<groupId>net.augeas</groupId>
<artifactId>augeas</artifactId>
- <version>${augeas.version}</version>
+ <version>${augeas-bindings.version}</version>
</dependency>
<dependency>
@@ -84,7 +84,7 @@
<artifactItem>
<groupId>net.augeas</groupId>
<artifactId>augeas</artifactId>
- <version>${augeas.version}</version>
+ <version>${augeas-bindings.version}</version>
</artifactItem>
</artifactItems>
diff --git a/modules/plugins/cobbler/pom.xml b/modules/plugins/cobbler/pom.xml
index 9a45599..78156f3 100644
--- a/modules/plugins/cobbler/pom.xml
+++ b/modules/plugins/cobbler/pom.xml
@@ -120,7 +120,7 @@
<delete dir="target/itest/lib/hyperic-sigar-${sigar.zip.version}" />
<unzip dest="target/itest/lib">
- <fileset dir="${settings.localRepository}/net/augeas/augeas-native/${augeas.version}" includes="*.zip" />
+ <fileset dir="${augeas.zip.location}" includes="${augeas.zip.mask}" />
<patternset>
<include name="**/lib*/*.so" />
<include name="**/lib*/*.so.*" />
diff --git a/modules/plugins/cron/pom.xml b/modules/plugins/cron/pom.xml
index e42d480..5f2c454 100644
--- a/modules/plugins/cron/pom.xml
+++ b/modules/plugins/cron/pom.xml
@@ -108,7 +108,7 @@
<delete dir="target/itest/lib/hyperic-sigar-${sigar.zip.version}" />
<unzip dest="target/itest/lib">
- <fileset dir="${settings.localRepository}/net/augeas/augeas-native/${augeas.version}" includes="*.zip" />
+ <fileset dir="${augeas.zip.location}" includes="${augeas.zip.mask}" />
<patternset>
<include name="**/lib*/*.so" />
<include name="**/lib*/*.so.*" />
diff --git a/modules/plugins/grub/pom.xml b/modules/plugins/grub/pom.xml
index 93b5dd3..d197727 100644
--- a/modules/plugins/grub/pom.xml
+++ b/modules/plugins/grub/pom.xml
@@ -105,7 +105,7 @@
<delete dir="target/itest/lib/hyperic-sigar-${sigar.zip.version}" />
<unzip dest="target/itest/lib">
- <fileset dir="${settings.localRepository}/net/augeas/augeas-native/${augeas.version}" includes="*.zip" />
+ <fileset dir="${augeas.zip.location}" includes="${augeas.zip.mask}" />
<patternset>
<include name="**/lib*/*.so" />
<include name="**/lib*/*.so.*" />
diff --git a/modules/plugins/hosts/pom.xml b/modules/plugins/hosts/pom.xml
index 31af33b..0c7ec29 100644
--- a/modules/plugins/hosts/pom.xml
+++ b/modules/plugins/hosts/pom.xml
@@ -115,7 +115,7 @@
<delete dir="target/itest/lib/hyperic-sigar-${sigar.zip.version}" />
<unzip dest="target/itest/lib">
- <fileset dir="${settings.localRepository}/net/augeas/augeas-native/${augeas.version}" includes="*.zip" />
+ <fileset dir="${augeas.zip.location}" includes="${augeas.zip.mask}" />
<patternset>
<include name="**/lib*/*.so" />
<include name="**/lib*/*.so.*" />
diff --git a/modules/plugins/postfix/pom.xml b/modules/plugins/postfix/pom.xml
index 5ef7252..2a0eb28 100644
--- a/modules/plugins/postfix/pom.xml
+++ b/modules/plugins/postfix/pom.xml
@@ -113,7 +113,7 @@
<delete dir="target/itest/lib/hyperic-sigar-${sigar.zip.version}" />
<unzip dest="target/itest/lib">
- <fileset dir="${settings.localRepository}/net/augeas/augeas-native/${augeas.version}" includes="*.zip" />
+ <fileset dir="${augeas.zip.location}" includes="${augeas.zip.mask}" />
<patternset>
<include name="**/lib*/*.so" />
<include name="**/lib*/*.so.*" />
diff --git a/modules/plugins/samba/pom.xml b/modules/plugins/samba/pom.xml
index 84fc9b7..90337ed 100644
--- a/modules/plugins/samba/pom.xml
+++ b/modules/plugins/samba/pom.xml
@@ -113,7 +113,7 @@
<delete dir="target/itest/lib/hyperic-sigar-${sigar.zip.version}" />
<unzip dest="target/itest/lib">
- <fileset dir="${settings.localRepository}/net/augeas/augeas-native/${augeas.version}" includes="*.zip" />
+ <fileset dir="${augeas.zip.location}" includes="${augeas.zip.mask}" />
<patternset>
<include name="**/lib*/*.so" />
<include name="**/lib*/*.so.*" />
diff --git a/modules/plugins/sshd/pom.xml b/modules/plugins/sshd/pom.xml
index 83da74a..3a1df45 100644
--- a/modules/plugins/sshd/pom.xml
+++ b/modules/plugins/sshd/pom.xml
@@ -105,7 +105,7 @@
<delete dir="target/itest/lib/hyperic-sigar-${sigar.zip.version}" />
<unzip dest="target/itest/lib">
- <fileset dir="${settings.localRepository}/net/augeas/augeas-native/${augeas.version}" includes="*.zip" />
+ <fileset dir="${augeas.zip.location}" includes="${augeas.zip.mask}" />
<patternset>
<include name="**/lib*/*.so" />
<include name="**/lib*/*.so.*" />
diff --git a/modules/plugins/sudoers/pom.xml b/modules/plugins/sudoers/pom.xml
index 1b69180..9429831 100644
--- a/modules/plugins/sudoers/pom.xml
+++ b/modules/plugins/sudoers/pom.xml
@@ -103,7 +103,7 @@
<delete dir="target/itest/lib/hyperic-sigar-${sigar.zip.version}" />
<unzip dest="target/itest/lib">
- <fileset dir="${settings.localRepository}/net/augeas/augeas-native/${augeas.version}" includes="*.zip" />
+ <fileset dir="${augeas.zip.location}" includes="${augeas.zip.mask}" />
<patternset>
<include name="**/lib*/*.so" />
<include name="**/lib*/*.so.*" />
diff --git a/pom.xml b/pom.xml
index c57a43b..ab342f5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -99,8 +99,11 @@
<commons-codec.version>1.4</commons-codec.version>
<testng.version>5.13.1</testng.version>
<cobertura.version>1.9.4.1</cobertura.version>
- <augeas.version>0.7.1.1</augeas.version>
- <augeas.zip.version>0.7.1</augeas.zip.version>
+ <augeas.version>0.9.0</augeas.version>
+ <augeas.classifier>el5</augeas.classifier>
+ <augeas.zip.version>0.9.0</augeas.zip.version>
+ <augeas.zip.location>${settings.localRepository}/net/augeas/augeas-native/${augeas.version}</augeas.zip.location>
+ <augeas.zip.mask>*-${augeas.classifier}.zip</augeas.zip.mask>
<ant.contrib.version>1.0b3</ant.contrib.version>
<rhq.db.admin.username>rhqadmin</rhq.db.admin.username>
commit 044113ead28a4449d07651e9f402eddac928c646
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Aug 30 21:42:31 2011 -0400
fixing test failures
diff --git a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftConfigurationTest.java b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftConfigurationTest.java
index 1cf29d6..b59dd01 100644
--- a/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftConfigurationTest.java
+++ b/modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftConfigurationTest.java
@@ -1,12 +1,5 @@
package org.rhq.core.domain.drift;
-import static java.util.Arrays.asList;
-import static org.rhq.core.domain.drift.DriftConfigurationDefinition.PROP_BASEDIR;
-import static org.rhq.core.domain.drift.DriftConfigurationDefinition.PROP_BASEDIR_VALUECONTEXT;
-import static org.rhq.core.domain.drift.DriftConfigurationDefinition.PROP_BASEDIR_VALUENAME;
-import static org.rhq.core.domain.drift.DriftConfigurationDefinition.BaseDirValueContext.fileSystem;
-import static org.testng.Assert.assertEquals;
-
import java.util.List;
import org.testng.annotations.Test;
@@ -18,6 +11,13 @@ import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.domain.drift.DriftConfigurationComparator.CompareMode;
import org.rhq.core.domain.drift.DriftConfigurationDefinition.BaseDirValueContext;
+import static java.util.Arrays.asList;
+import static org.rhq.core.domain.drift.DriftConfigurationDefinition.BaseDirValueContext.fileSystem;
+import static org.rhq.core.domain.drift.DriftConfigurationDefinition.PROP_BASEDIR;
+import static org.rhq.core.domain.drift.DriftConfigurationDefinition.PROP_BASEDIR_VALUECONTEXT;
+import static org.rhq.core.domain.drift.DriftConfigurationDefinition.PROP_BASEDIR_VALUENAME;
+import static org.testng.Assert.assertEquals;
+
public class DriftConfigurationTest {
@Test
public void getCompareIgnoreIncludesExcludes() {
@@ -28,7 +28,7 @@ public class DriftConfigurationTest {
// make sure our comparator can deal with all the nulls that are in empty configs
assert comparator.compare(dc1, dc2) == 0 : dc1 + " should equal " + dc2;
- dc1.setEnabled(true);
+ dc1.setEnabled(false);
assert comparator.compare(dc1, dc2) != 0 : dc1 + " should not equal " + dc2;
assert comparator.compare(dc2, dc1) != 0 : dc2 + " should not equal " + dc1;
dc1.setInterval(1000L);
@@ -38,14 +38,14 @@ public class DriftConfigurationTest {
assert comparator.compare(dc1, dc2) != 0 : dc1 + " should not equal " + dc2;
assert comparator.compare(dc2, dc1) != 0 : dc2 + " should not equal " + dc1;
- dc2.setEnabled(true);
+ dc2.setEnabled(false);
dc2.setInterval(1000L);
dc2.setName("the-name");
assert comparator.compare(dc1, dc2) == 0 : dc1 + " should equal " + dc2;
dc1.setEnabled(!dc2.isEnabled());
- assert comparator.compare(dc1, dc2) < 0 : dc1 + " should have different enabled than " + dc2;
+ assert comparator.compare(dc1, dc2) > 0 : dc1 + " should have different enabled than " + dc2;
dc1.setEnabled(dc2.isEnabled()); // put them back to the same value
dc1.setInterval(dc2.getInterval() + 2222L);
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest.java
index 511df03..ca9ee2a 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/ResourceMetadataManagerBeanTest.java
@@ -168,7 +168,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
for (ConfigurationTemplate drift : drifts) {
if (drift.getName().equals("drift-pc")) {
driftConfig = new DriftConfiguration(drift.getConfiguration());
- assertFalse(driftConfig.isEnabled());
+ assertTrue(driftConfig.isEnabled());
assertEquals(BaseDirValueContext.pluginConfiguration, driftConfig.getBasedir().getValueContext());
assertEquals("connectionPropertyX", driftConfig.getBasedir().getValueName());
assertEquals(123456L, driftConfig.getInterval());
@@ -185,7 +185,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
assertEquals("", filter.getPattern());
} else if (drift.getName().equals("drift-fs")) {
driftConfig = new DriftConfiguration(drift.getConfiguration());
- assertFalse(driftConfig.isEnabled());
+ assertTrue(driftConfig.isEnabled());
assertEquals(BaseDirValueContext.fileSystem, driftConfig.getBasedir().getValueContext());
assertEquals("/", driftConfig.getBasedir().getValueName());
assertEquals(DriftConfigurationDefinition.DEFAULT_INTERVAL, driftConfig.getInterval());
@@ -290,7 +290,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
for (ConfigurationTemplate drift : drifts) {
if (drift.getName().equals("drift-rc")) {
driftConfig = new DriftConfiguration(drift.getConfiguration());
- assertFalse(driftConfig.isEnabled());
+ assertTrue(driftConfig.isEnabled());
assertEquals(BaseDirValueContext.resourceConfiguration, driftConfig.getBasedir().getValueContext());
assertEquals("resourceConfig1", driftConfig.getBasedir().getValueName());
assertEquals(DriftConfigurationDefinition.DEFAULT_INTERVAL, driftConfig.getInterval());
@@ -298,7 +298,7 @@ public class ResourceMetadataManagerBeanTest extends MetadataBeanTest {
assertEquals(0, driftConfig.getExcludes().size());
} else if (drift.getName().equals("drift-mt")) {
driftConfig = new DriftConfiguration(drift.getConfiguration());
- assertFalse(driftConfig.isEnabled());
+ assertTrue(driftConfig.isEnabled());
assertEquals(BaseDirValueContext.measurementTrait, driftConfig.getBasedir().getValueContext());
assertEquals("trait1", driftConfig.getBasedir().getValueName());
assertEquals(DriftConfigurationDefinition.DEFAULT_INTERVAL, driftConfig.getInterval());
commit 4b12e68d2d7648ed08921f482bb02e3525a3cf81
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Aug 30 21:03:24 2011 -0400
[BZ 734194] Check that content is loaded in db on drift details view
The drift details view page displays links for viewing the current and
previous version of a file as well as a diff between those versions.
The initial implementation failed to take into account that the file
content referenced by the drift may not be in the database. The page
previously attempted to generate a diff report on load instead of on
demand. This of course resulted in an exception getting thrown.
With this commit, links for viewing file content and for viewing a diff
are shown when the file content is available. If the file content is not
available, a message is instead displayed that says the content is not
available.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDetails.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDetails.java
new file mode 100644
index 0000000..283f53f
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDetails.java
@@ -0,0 +1,126 @@
+/*
+ * 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 as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+package org.rhq.core.domain.drift;
+
+import java.io.Serializable;
+
+/**
+ * Encapsulates information and details about drift that can be used in the UI. This class
+ * the Drift object, the change set to which the drift belongs, and the change set in which
+ * the file with drift was last referenced. This class also store statuses of the current
+ * and previous versions of the file to indicate whether or not the content is in the
+ * database. Lastly, it has a flag to indicate whether or not the file is a binary file.
+ */
+public class DriftDetails implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private Drift drift;
+
+ private DriftChangeSet previousChangeSet;
+
+ private DriftFileStatus newFileStatus;
+
+ private DriftFileStatus oldFileStatus;
+
+ private boolean isBinary;
+
+ /** @return The drift object */
+ public Drift getDrift() {
+ return drift;
+ }
+
+ /** @param drift The Drift object to which the details belong */
+ public void setDrift(Drift drift) {
+ this.drift = drift;
+ }
+
+ /** @return The change set to which the drift is part of */
+ public DriftChangeSet getChangeSet() {
+ return drift.getChangeSet();
+ }
+
+ /**
+ * Returns the previous change set for which there was an occurrence of drift on the
+ * file referenced by the Drift object. This can be null if there was no previous
+ * drift.
+ *
+ * @return The previous change set for which there was drift on the file referenced by
+ * the Drift object or null if there is not previous drift on the file.
+ */
+ public DriftChangeSet getPreviousChangeSet() {
+ return previousChangeSet;
+ }
+
+ /**
+ * @param changeSet The previous change set in which drift occurred on the file
+ * referenced by the Drift object.
+ */
+ public void setPreviousChangeSet(DriftChangeSet changeSet) {
+ previousChangeSet = changeSet;
+ }
+
+ /**
+ * @return The status of the file as reported in the current change set. Indicates
+ * whether or not the file has been loaded into the database. Can be null if the type
+ * of drift is a {@link DriftCategory#FILE_REMOVED deletion}.
+ */
+ public DriftFileStatus getNewFileStatus() {
+ return newFileStatus;
+ }
+
+ /**
+ * @param status The status of the file reported in the change set.
+ */
+ public void setNewFileStatus(DriftFileStatus status) {
+ newFileStatus = status;
+ }
+
+ /**
+ * @return The status of the file as reported in the previous change set. Indicates
+ * whether or not the file has been loaded into the database. Can be null if the type
+ * of drift is a {@link DriftCategory#FILE_ADDED addition}.
+ */
+ public DriftFileStatus getOldFileStatus() {
+ return oldFileStatus;
+ }
+
+ /**
+ * @param status The status of the file as reported in the last change set in which the
+ * file was referenced.
+ */
+ public void setOldFileStatus(DriftFileStatus status) {
+ oldFileStatus = status;
+ }
+
+ /**
+ * @return true if the file is a binary file.
+ */
+ public boolean isBinaryFile() {
+ return isBinary;
+ }
+
+ /**
+ * @param binaryFile True if the file is a binary type, false otherwise.
+ */
+ public void setBinaryFile(boolean binaryFile) {
+ isBinary = binaryFile;
+ }
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
index 31c888d..1c0b54e 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
@@ -36,24 +36,20 @@ import com.smartgwt.client.widgets.form.fields.events.ClickEvent;
import com.smartgwt.client.widgets.form.fields.events.ClickHandler;
import com.smartgwt.client.widgets.layout.VLayout;
-import org.rhq.core.domain.criteria.GenericDriftChangeSetCriteria;
-import org.rhq.core.domain.criteria.GenericDriftCriteria;
import org.rhq.core.domain.drift.Drift;
-import org.rhq.core.domain.drift.DriftChangeSet;
+import org.rhq.core.domain.drift.DriftDetails;
+import org.rhq.core.domain.drift.DriftFileStatus;
import org.rhq.core.domain.drift.FileDiffReport;
-import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.PopupWindow;
import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
import org.rhq.enterprise.gui.coregui.client.gwt.DriftGWTServiceAsync;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
-import org.rhq.enterprise.gui.coregui.client.util.message.Message;
-import org.rhq.enterprise.gui.coregui.client.util.message.Message.Severity;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableDynamicForm;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableWindow;
-import static org.rhq.core.domain.drift.DriftCategory.FILE_CHANGED;
+import static org.rhq.core.domain.drift.DriftFileStatus.LOADED;
import static org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter.DATE_TIME_FORMAT_FULL;
/**
@@ -75,165 +71,30 @@ public class DriftDetailsView extends LocatableVLayout {
show(this.driftId);
}
- private void show(String driftId) {
+ private void show(final String driftId) {
final DriftGWTServiceAsync driftService = GWTServiceLookup.getDriftService();
-
- GenericDriftCriteria criteria = new GenericDriftCriteria();
- criteria.addFilterId(driftId);
- criteria.fetchChangeSet(true);
- driftService.findDriftsByCriteria(criteria,
- new AsyncCallback<PageList<? extends Drift>>() {
- @Override
- public void onSuccess(PageList<? extends Drift> result) {
- if (result.getTotalSize() != 1) {
- CoreGUI.getMessageCenter().notify(
- new Message("Got [" + result.getTotalSize()
- + "] results. Should have been 1. The details shown here might not be correct.",
- Severity.Warning));
- }
- final Drift drift = result.get(0);
- if (drift.getCategory() == FILE_CHANGED) {
- GenericDriftChangeSetCriteria criteria = new GenericDriftChangeSetCriteria();
- criteria.addFilterResourceId(drift.getChangeSet().getResourceId());
- criteria.addFilterDriftConfigurationId(drift.getChangeSet().getDriftConfigurationId());
- criteria.addFilterVersion(Integer.toString(drift.getChangeSet().getVersion() - 1));
-
- driftService.findDriftChangeSetsByCriteria(criteria,
- new AsyncCallback<PageList<? extends DriftChangeSet>>() {
- @Override
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to load change set", caught);
- }
-
- @Override
- public void onSuccess(PageList<? extends DriftChangeSet> changeSets) {
- show(drift, changeSets.get(0));
- }
- });
- } else {
- show(drift, null);
- }
- }
-
- @Override
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.view_drift_failure_load(), caught);
- }
- });
- }
-
- private void show(final Drift drift, final DriftChangeSet previousVersion) {
- for (Canvas child : getMembers()) {
- removeMember(child);
- child.destroy();
- }
-
- // the change set to which the drift belongs
-
- DynamicForm changeSetForm = new LocatableDynamicForm(extendLocatorId("changeSetForm"));
- changeSetForm.setIsGroup(true);
- changeSetForm.setGroupTitle(MSG.view_drift_table_changeSet());
- changeSetForm.setWrapItemTitles(false);
-
- StaticTextItem changeSetId = new StaticTextItem("changeSetId", MSG.common_title_id());
- changeSetId.setValue(drift.getChangeSet().getId());
- StaticTextItem changeSetCategory = new StaticTextItem("changeSetCategory", MSG.common_title_category());
- changeSetCategory.setValue(drift.getChangeSet().getCategory().name());
- StaticTextItem changeSetVersion = new StaticTextItem("changeSetVersion", MSG.common_title_version());
- changeSetVersion.setValue(drift.getChangeSet().getVersion());
- changeSetForm.setItems(changeSetId, changeSetCategory, changeSetVersion);
-
- addMember(changeSetForm);
-
- GWTServiceLookup.getDriftService().isBinaryFile(drift, new AsyncCallback<Boolean>() {
+ driftService.getDriftDetails(driftId, new AsyncCallback<DriftDetails>() {
@Override
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to look up file type", caught);
+ CoreGUI.getErrorHandler().handleError("Failed to load drift details for drift id: " + driftId, caught);
}
@Override
- public void onSuccess(Boolean isBinary) {
- if (isBinary) {
- addMember(createDriftFormForBinaryFile(drift, previousVersion));
- } else {
- addMember(createDriftFormForTextFile(drift, previousVersion));
- }
+ public void onSuccess(final DriftDetails details) {
+ show(details);
}
});
- }
-
- private DynamicForm createDriftFormForBinaryFile(Drift drift, DriftChangeSet previousVersion) {
- DynamicForm driftForm = new LocatableDynamicForm(extendLocatorId("form"));
- driftForm.setIsGroup(true);
- driftForm.setGroupTitle(MSG.view_drift());
- driftForm.setWrapItemTitles(false);
- driftForm.setNumCols(4);
-
- SpacerItem spacer = new SpacerItem();
-
- StaticTextItem id = new StaticTextItem("id", MSG.common_title_id());
- id.setValue(drift.getId());
-
- StaticTextItem path = new StaticTextItem("path", MSG.common_title_path());
- path.setValue(drift.getPath());
- StaticTextItem timestamp = new StaticTextItem("timestamp", MSG.common_title_timestamp());
- timestamp.setValue(TimestampCellFormatter.format(drift.getCtime(), DATE_TIME_FORMAT_FULL));
-
- StaticTextItem category = new StaticTextItem("category", MSG.common_title_category());
-
- LinkedHashMap<String, String> catIconsMap = new LinkedHashMap<String, String>(3);
- catIconsMap.put(DriftDataSource.CATEGORY_ICON_ADD, DriftDataSource.CATEGORY_ICON_ADD);
- catIconsMap.put(DriftDataSource.CATEGORY_ICON_CHANGE, DriftDataSource.CATEGORY_ICON_CHANGE);
- catIconsMap.put(DriftDataSource.CATEGORY_ICON_REMOVE, DriftDataSource.CATEGORY_ICON_REMOVE);
- LinkedHashMap<String, String> catValueMap = new LinkedHashMap<String, String>(3);
- catValueMap.put(DriftDataSource.CATEGORY_ICON_ADD, MSG.view_drift_category_fileAdded());
- catValueMap.put(DriftDataSource.CATEGORY_ICON_CHANGE, MSG.view_drift_category_fileChanged());
- catValueMap.put(DriftDataSource.CATEGORY_ICON_REMOVE, MSG.view_drift_category_fileRemoved());
- category.setValueMap(catValueMap);
- category.setValueIcons(catIconsMap);
- category.setShowIcons(true);
-
- StaticTextItem oldFile = new StaticTextItem("oldFile", MSG.view_drift_table_oldFile());
- FormItem oldFileLink = null;
-
- StaticTextItem newFile = new StaticTextItem("newFile", MSG.view_drift_table_newFile());
- FormItem newFileLink = null;
+ }
- switch (drift.getCategory()) {
- case FILE_ADDED:
- category.setValue(DriftDataSource.CATEGORY_ICON_ADD);
- oldFile.setValue(MSG.common_label_none());
- oldFileLink = spacer;
- newFile.setValue(drift.getNewDriftFile().getHashId());
- newFileLink = spacer;
- break;
-
- case FILE_CHANGED:
- category.setValue(DriftDataSource.CATEGORY_ICON_CHANGE);
- oldFile.setValue(drift.getOldDriftFile().getHashId());
- oldFileLink = createViewFileLink(drift.getOldDriftFile().getHashId(), drift.getPath(),
- previousVersion.getVersion());
- newFile.setValue(drift.getNewDriftFile().getHashId());
- newFileLink = spacer;
- break;
-
- case FILE_REMOVED:
- category.setValue(DriftDataSource.CATEGORY_ICON_REMOVE);
- oldFile.setValue(drift.getOldDriftFile().getHashId());
- oldFileLink = spacer;
- newFile.setValue(MSG.common_label_none());
- newFileLink = spacer;
- break;
+ private void show(DriftDetails driftDetails) {
+ for (Canvas child : getMembers()) {
+ removeMember(child);
+ child.destroy();
}
- driftForm.setItems(id, spacer, path, spacer, category, spacer, timestamp, spacer, oldFile, oldFileLink,
- newFile, newFileLink);
-
- return driftForm;
- }
+ addMember(createChangeSetForm(driftDetails.getDrift()));
- private DynamicForm createDriftFormForTextFile(Drift drift, DriftChangeSet previousVersion) {
DynamicForm driftForm = new LocatableDynamicForm(extendLocatorId("form"));
driftForm.setIsGroup(true);
driftForm.setGroupTitle(MSG.view_drift());
@@ -243,13 +104,13 @@ public class DriftDetailsView extends LocatableVLayout {
SpacerItem spacer = new SpacerItem();
StaticTextItem id = new StaticTextItem("id", MSG.common_title_id());
- id.setValue(drift.getId());
+ id.setValue(driftDetails.getDrift().getId());
StaticTextItem path = new StaticTextItem("path", MSG.common_title_path());
- path.setValue(drift.getPath());
+ path.setValue(driftDetails.getDrift().getPath());
StaticTextItem timestamp = new StaticTextItem("timestamp", MSG.common_title_timestamp());
- timestamp.setValue(TimestampCellFormatter.format(drift.getCtime(), DATE_TIME_FORMAT_FULL));
+ timestamp.setValue(TimestampCellFormatter.format(driftDetails.getDrift().getCtime(), DATE_TIME_FORMAT_FULL));
StaticTextItem category = new StaticTextItem("category", MSG.common_title_category());
@@ -271,55 +132,102 @@ public class DriftDetailsView extends LocatableVLayout {
StaticTextItem newFile = new StaticTextItem("newFile", MSG.view_drift_table_newFile());
FormItem newFileLink = null;
- switch (drift.getCategory()) {
- case FILE_ADDED:
- category.setValue(DriftDataSource.CATEGORY_ICON_ADD);
- oldFile.setValue(MSG.common_label_none());
- oldFileLink = spacer;
- newFile.setValue(drift.getNewDriftFile().getHashId());
- newFileLink = createViewFileLink(drift.getNewDriftFile().getHashId(), drift.getPath(),
- drift.getChangeSet().getVersion());
- break;
-
- case FILE_CHANGED:
- category.setValue(DriftDataSource.CATEGORY_ICON_CHANGE);
- oldFile.setValue(drift.getOldDriftFile().getHashId());
- oldFileLink = createViewFileLink(drift.getOldDriftFile().getHashId(), drift.getPath(),
- previousVersion.getVersion());
- newFile.setValue(drift.getNewDriftFile().getHashId());
- newFileLink = createViewFileLink(drift.getNewDriftFile().getHashId(), drift.getPath(),
- drift.getChangeSet().getVersion());
- break;
-
- case FILE_REMOVED:
- category.setValue(DriftDataSource.CATEGORY_ICON_REMOVE);
- oldFile.setValue(drift.getOldDriftFile().getHashId());
- oldFileLink = createViewFileLink(drift.getOldDriftFile().getHashId(), drift.getPath(),
- drift.getChangeSet().getVersion());
- newFile.setValue(MSG.common_label_none());
- newFileLink = spacer;
- break;
+ if (driftDetails.isBinaryFile()) {
+ switch (driftDetails.getDrift().getCategory()) {
+ case FILE_ADDED:
+ category.setValue(DriftDataSource.CATEGORY_ICON_ADD);
+ oldFile.setValue(MSG.common_label_none());
+ oldFileLink = spacer;
+ newFile.setValue(driftDetails.getDrift().getNewDriftFile().getHashId());
+ newFileLink = spacer;
+ break;
+ case FILE_CHANGED:
+ category.setValue(DriftDataSource.CATEGORY_ICON_CHANGE);
+ oldFile.setValue(driftDetails.getDrift().getOldDriftFile().getHashId());
+ oldFileLink = createViewFileLink(driftDetails.getDrift().getOldDriftFile().getHashId(),
+ driftDetails.getDrift().getPath(), driftDetails.getPreviousChangeSet().getVersion());
+ newFile.setValue(driftDetails.getDrift().getNewDriftFile().getHashId());
+ newFileLink = spacer;
+ break;
+ case FILE_REMOVED:
+ category.setValue(DriftDataSource.CATEGORY_ICON_REMOVE);
+ oldFile.setValue(driftDetails.getDrift().getOldDriftFile().getHashId());
+ oldFileLink = spacer;
+ newFile.setValue(MSG.common_label_none());
+ newFileLink = spacer;
+ break;
+ }
+ driftForm.setItems(id, spacer, path, spacer, category, spacer, timestamp, spacer, oldFile, oldFileLink,
+ newFile, newFileLink);
+ } else {
+ FormItem viewDiffLink = spacer;
+ switch (driftDetails.getDrift().getCategory()) {
+ case FILE_ADDED:
+ category.setValue(DriftDataSource.CATEGORY_ICON_ADD);
+ oldFile.setValue(MSG.common_label_none());
+ oldFileLink = spacer;
+ newFile.setValue(driftDetails.getDrift().getNewDriftFile().getHashId());
+ newFileLink = createViewFileLink(driftDetails.getDrift().getNewDriftFile().getHashId(),
+ driftDetails.getDrift().getPath(), driftDetails.getChangeSet().getVersion(),
+ driftDetails.getNewFileStatus());
+ break;
+ case FILE_CHANGED:
+ category.setValue(DriftDataSource.CATEGORY_ICON_CHANGE);
+ oldFile.setValue(driftDetails.getDrift().getOldDriftFile().getHashId());
+ oldFileLink = createViewFileLink(driftDetails.getDrift().getOldDriftFile().getHashId(),
+ driftDetails.getDrift().getPath(), driftDetails.getPreviousChangeSet().getVersion(),
+ driftDetails.getOldFileStatus());
+ newFile.setValue(driftDetails.getDrift().getNewDriftFile().getHashId());
+ newFileLink = createViewFileLink(driftDetails.getDrift().getNewDriftFile().getHashId(),
+ driftDetails.getDrift().getPath(), driftDetails.getChangeSet().getVersion(),
+ driftDetails.getNewFileStatus());
+ if (driftDetails.getNewFileStatus() == LOADED && driftDetails.getOldFileStatus() == LOADED) {
+ viewDiffLink = createViewDiffLink(driftDetails.getDrift(),
+ driftDetails.getPreviousChangeSet().getVersion());
+ }
+ break;
+ case FILE_REMOVED:
+ category.setValue(DriftDataSource.CATEGORY_ICON_REMOVE);
+ oldFile.setValue(driftDetails.getDrift().getOldDriftFile().getHashId());
+ oldFileLink = createViewFileLink(driftDetails.getDrift().getOldDriftFile().getHashId(),
+ driftDetails.getDrift().getPath(), driftDetails.getChangeSet().getVersion(),
+ driftDetails.getOldFileStatus());
+ newFile.setValue(MSG.common_label_none());
+ newFileLink = spacer;
+ break;
+ }
+ driftForm.setItems(id, spacer, path, spacer, category, spacer, timestamp, spacer, oldFile, oldFileLink,
+ newFile, newFileLink, spacer, spacer, spacer, viewDiffLink);
}
+ addMember(driftForm);
+ }
- if (drift.getCategory() == FILE_CHANGED) {
- StaticTextItem numberOfChanges = new StaticTextItem("numberOfChanges", "Number of Changes");
- numberOfChanges.setValue("Loading...");
+ private DynamicForm createChangeSetForm(Drift drift) {
+ DynamicForm changeSetForm = new LocatableDynamicForm(extendLocatorId("changeSetForm"));
+ changeSetForm.setIsGroup(true);
+ changeSetForm.setGroupTitle(MSG.view_drift_table_changeSet());
+ changeSetForm.setWrapItemTitles(false);
- LinkItem viewDiffLink = new LinkItem("viewDiff");
- viewDiffLink.setLinkTitle("(view diff)");
- viewDiffLink.setShowTitle(false);
- viewDiffLink.setDisabled(true);
+ StaticTextItem changeSetId = new StaticTextItem("changeSetId", MSG.common_title_id());
+ changeSetId.setValue(drift.getChangeSet().getId());
+ StaticTextItem changeSetCategory = new StaticTextItem("changeSetCategory", MSG.common_title_category());
+ changeSetCategory.setValue(drift.getChangeSet().getCategory().name());
+ StaticTextItem changeSetVersion = new StaticTextItem("changeSetVersion", MSG.common_title_version());
+ changeSetVersion.setValue(drift.getChangeSet().getVersion());
+ changeSetForm.setItems(changeSetId, changeSetCategory, changeSetVersion);
- driftForm.setItems(id, spacer, path, spacer, category, spacer, timestamp, spacer, oldFile, oldFileLink,
- newFile, newFileLink, numberOfChanges, viewDiffLink);
+ return changeSetForm;
+ }
- generateDiff(drift, previousVersion.getVersion(), numberOfChanges, viewDiffLink);
- } else {
- driftForm.setItems(id, spacer, path, spacer, category, spacer, timestamp, spacer, oldFile, oldFileLink,
- newFile, newFileLink);
+ private FormItem createViewFileLink(String hash, String path, int version, DriftFileStatus status) {
+ if (status == LOADED) {
+ return createViewFileLink(hash, path, version);
}
+ StaticTextItem item = new StaticTextItem(hash + "_fileLink");
+ item.setShowTitle(false);
+ item.setValue("(file not ready for viewing)");
- return driftForm;
+ return item;
}
private LinkItem createViewFileLink(final String hash, final String path, final int version) {
@@ -333,7 +241,11 @@ public class DriftDetailsView extends LocatableVLayout {
GWTServiceLookup.getDriftService().getDriftFileBits(hash, new AsyncCallback<String>() {
@Override
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to load file", caught);
+ try {
+ throw caught;
+ } catch (Throwable r) {
+ CoreGUI.getErrorHandler().handleError("Failed to load file", r);
+ }
}
@Override
@@ -397,31 +309,32 @@ public class DriftDetailsView extends LocatableVLayout {
return window;
}
- private void generateDiff(final Drift drift, final int oldVersion, final StaticTextItem changes,
- final LinkItem viewDiff) {
- GWTServiceLookup.getDriftService().generateUnifiedDiff(drift, new AsyncCallback<FileDiffReport>() {
- @Override
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to load change report", caught);
- }
+ private LinkItem createViewDiffLink(final Drift drift, final int oldVersion) {
+ LinkItem viewDiffLink = new LinkItem("viewDiff");
+ viewDiffLink.setLinkTitle("(view diff)");
+ viewDiffLink.setShowTitle(false);
+ viewDiffLink.addClickHandler(new ClickHandler() {
@Override
- public void onSuccess(final FileDiffReport diffReport) {
- changes.setValue(diffReport.getNumberOfChanges());
- viewDiff.setDisabled(false);
- viewDiff.addClickHandler(new ClickHandler() {
+ public void onClick(ClickEvent clickEvent) {
+ GWTServiceLookup.getDriftService().generateUnifiedDiff(drift, new AsyncCallback<FileDiffReport>() {
@Override
- public void onClick(ClickEvent clickEvent) {
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError("Failed to generate diff", caught);
+ }
+
+ @Override
+ public void onSuccess(FileDiffReport diffReport) {
int newVersion = drift.getChangeSet().getVersion();
String diffContents = toHtml(diffReport.getDiff(), oldVersion, newVersion);
-
- //LocatableWindow window = createFileViewer(diffReport.getDiff());
- LocatableWindow window = createDiffViewer(diffContents, drift.getPath(), oldVersion, newVersion);
+ LocatableWindow window = createDiffViewer(diffContents, drift.getPath(), oldVersion,
+ newVersion);
window.show();
}
});
}
});
+ return viewDiffLink;
}
private String toHtml(List<String> deltas, int oldVersion, int newVersion) {
@@ -441,7 +354,6 @@ public class DriftDetailsView extends LocatableVLayout {
diff.append(line).append("<br/>");
}
}
-
return diff.toString();
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java
index 9b96231..d4faced 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java
@@ -29,6 +29,7 @@ import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftComposite;
import org.rhq.core.domain.drift.DriftConfiguration;
+import org.rhq.core.domain.drift.DriftDetails;
import org.rhq.core.domain.drift.DriftSnapshot;
import org.rhq.core.domain.drift.FileDiffReport;
import org.rhq.core.domain.util.PageList;
@@ -115,4 +116,6 @@ public interface DriftGWTService extends RemoteService {
boolean isBinaryFile(Drift drift) throws RuntimeException;
+ DriftDetails getDriftDetails(String driftId) throws RuntimeException;
+
}
\ No newline at end of file
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
index e8531be..55f9f7e 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
@@ -27,6 +27,7 @@ import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftComposite;
import org.rhq.core.domain.drift.DriftConfiguration;
+import org.rhq.core.domain.drift.DriftDetails;
import org.rhq.core.domain.drift.DriftSnapshot;
import org.rhq.core.domain.drift.FileDiffReport;
import org.rhq.core.domain.util.PageList;
@@ -160,6 +161,16 @@ public class DriftGWTServiceImpl extends AbstractGWTServiceImpl implements Drift
}
@Override
+ public DriftDetails getDriftDetails(String driftId) throws RuntimeException {
+ try {
+ DriftDetails details = driftManager.getDriftDetails(getSessionSubject(), driftId);
+ return SerialUtility.prepare(details, "DriftService.getDriftDetails");
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
public boolean isBinaryFile(Drift drift) throws RuntimeException {
try {
return driftManager.isBinaryFile(drift);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
index b1a7415..898a4c2 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
@@ -47,6 +47,8 @@ import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.criteria.DriftChangeSetCriteria;
import org.rhq.core.domain.criteria.DriftConfigurationCriteria;
import org.rhq.core.domain.criteria.DriftCriteria;
+import org.rhq.core.domain.criteria.GenericDriftChangeSetCriteria;
+import org.rhq.core.domain.criteria.GenericDriftCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftChangeSet;
import org.rhq.core.domain.drift.DriftComposite;
@@ -54,6 +56,7 @@ import org.rhq.core.domain.drift.DriftConfiguration;
import org.rhq.core.domain.drift.DriftConfigurationComparator;
import org.rhq.core.domain.drift.DriftConfigurationComparator.CompareMode;
import org.rhq.core.domain.drift.DriftConfigurationDefinition;
+import org.rhq.core.domain.drift.DriftDetails;
import org.rhq.core.domain.drift.DriftFile;
import org.rhq.core.domain.drift.DriftSnapshot;
import org.rhq.core.domain.drift.FileDiffReport;
@@ -115,6 +118,7 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
binaryFileTypes.add("jpg");
binaryFileTypes.add("png");
binaryFileTypes.add("jpeg");
+ binaryFileTypes.add("gif");
binaryFileTypes.add("pdf");
binaryFileTypes.add("swf");
binaryFileTypes.add("bpm");
@@ -389,12 +393,14 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
@Override
@TransactionAttribute(NOT_SUPPORTED)
public String getDriftFileBits(String hash) {
+ log.debug("Retrieving drift file content for " + hash);
DriftServerPluginFacet driftServerPlugin = getServerPlugin();
return driftServerPlugin.getDriftFileBits(hash);
}
@Override
public FileDiffReport generateUnifiedDiff(Drift drift) {
+ log.debug("Generating diff for " + drift);
String oldContent = getDriftFileBits(drift.getOldDriftFile().getHashId());
List<String> oldList = asList(oldContent.split("\\n"));
String newContent = getDriftFileBits(drift.getNewDriftFile().getHashId());
@@ -495,6 +501,69 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
return binaryFileTypes.contains(path.substring(index + 1, path.length()));
}
+ @Override
+ @TransactionAttribute(NOT_SUPPORTED)
+ public DriftDetails getDriftDetails(Subject subject, String driftId) {
+ log.debug("Loading drift details for drift id: " + driftId);
+
+ GenericDriftCriteria criteria = new GenericDriftCriteria();
+ criteria.addFilterId(driftId);
+ criteria.fetchChangeSet(true);
+
+ DriftDetails driftDetails = new DriftDetails();
+ DriftServerPluginFacet driftServerPlugin = getServerPlugin();
+
+ DriftFile newFile = null;
+ DriftFile oldFile = null;
+
+ PageList<? extends Drift<?, ?>> results = driftServerPlugin.findDriftsByCriteria(subject, criteria);
+ if (results.size() == 0) {
+ log.warn("Unable to get the drift details for drift id " + driftId + ". No drift object found with that id.");
+ return null;
+ }
+
+ Drift drift = results.get(0);
+ driftDetails.setDrift(drift);
+ try {
+ switch (drift.getCategory()) {
+ case FILE_ADDED:
+ newFile = driftServerPlugin.getDriftFile(subject, drift.getNewDriftFile().getHashId());
+ driftDetails.setNewFileStatus(newFile.getStatus());
+ break;
+ case FILE_CHANGED:
+ newFile = driftServerPlugin.getDriftFile(subject, drift.getNewDriftFile().getHashId());
+ oldFile = driftServerPlugin.getDriftFile(subject, drift.getOldDriftFile().getHashId());
+
+ driftDetails.setNewFileStatus(newFile.getStatus());
+ driftDetails.setOldFileStatus(oldFile.getStatus());
+
+ driftDetails.setPreviousChangeSet(loadPreviousChangeSet(subject, drift));
+ break;
+ case FILE_REMOVED:
+ oldFile = driftServerPlugin.getDriftFile(subject, drift.getOldDriftFile().getHashId());
+ driftDetails.setOldFileStatus(oldFile.getStatus());
+ break;
+ }
+ } catch (Exception e) {
+ log.error("An error occurred while loading the drift details for drift id " + driftId + ": " +
+ e.getMessage());
+ throw new RuntimeException("An error occurred while loading th drift details for drift id " + driftId, e);
+ }
+ driftDetails.setBinaryFile(isBinaryFile(drift));
+ return driftDetails;
+ }
+
+ private DriftChangeSet loadPreviousChangeSet(Subject subject, Drift drift) {
+ GenericDriftChangeSetCriteria criteria = new GenericDriftChangeSetCriteria();
+ criteria.addFilterResourceId(drift.getChangeSet().getResourceId());
+ criteria.addFilterDriftConfigurationId(drift.getChangeSet().getDriftConfigurationId());
+ criteria.addFilterVersion(Integer.toString(drift.getChangeSet().getVersion() - 1));
+
+ PageList<? extends DriftChangeSet<?>> results = findDriftChangeSetsByCriteria(subject, criteria);
+ // TODO handle empty results
+ return results.get(0);
+ }
+
private DriftServerPluginFacet getServerPlugin() {
MasterServerPluginContainer masterPC = LookupUtil.getServerPluginService().getMasterPluginContainer();
if (masterPC == null) {
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
index 663b626..5d9838f 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
@@ -28,6 +28,7 @@ import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.criteria.DriftConfigurationCriteria;
import org.rhq.core.domain.drift.Drift;
import org.rhq.core.domain.drift.DriftConfiguration;
+import org.rhq.core.domain.drift.DriftDetails;
import org.rhq.core.domain.drift.FileDiffReport;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.server.plugin.pc.drift.DriftServerPluginFacet;
@@ -130,5 +131,14 @@ public interface DriftManagerLocal extends DriftServerPluginFacet, DriftManagerR
*/
FileDiffReport generateUnifiedDiff(Drift drift);
+ /**
+ * Returns an object that encapsulates the information needed for viewing drift details
+ *
+ * @param subject
+ * @param driftId
+ * @return
+ */
+ DriftDetails getDriftDetails(Subject subject, String driftId);
+
boolean isBinaryFile(Drift drift);
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/JPADriftServerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/JPADriftServerBean.java
index c3a34bf..daa7a68 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/JPADriftServerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/JPADriftServerBean.java
@@ -77,6 +77,7 @@ import org.rhq.enterprise.server.util.CriteriaQueryGenerator;
import org.rhq.enterprise.server.util.CriteriaQueryRunner;
import static javax.ejb.TransactionAttributeType.REQUIRES_NEW;
+import static org.rhq.core.domain.drift.DriftFileStatus.LOADED;
/**
* The SLSB method implementation needed to support the JPA (RHQ Default) Drift Server Plugin.
@@ -217,7 +218,7 @@ public class JPADriftServerBean implements JPADriftServerLocal {
throw new IllegalArgumentException("JPADriftFile not found [" + driftFile.getHashId() + "]");
}
df.setData(Hibernate.createBlob(new BufferedInputStream(data)));
- df.setStatus(DriftFileStatus.LOADED);
+ df.setStatus(LOADED);
}
@Override
commit 85882c6e0e00d5d788032d9c4192577c21e4fcc6
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue Aug 30 13:27:27 2011 -0400
[BZ 733613 - Add button got disabled, if user cancel the drift creation]
Regression due to new footer disablement in Table, on footer action. The
footer actions are now responsible for footer re-enablement upon action
completion (or as soon as it is safe). This commit fixes various instances
of the problem when canceling out of wizards. At the moment there are
no other known occurrences since most actions do perform some sort of
Table refresh on completion.
- Change Table.refreshTableActions public as opposed to private. This allows
actions to update button enablement without requiring a full refresh/cache
invalidation.
- Add jdoc in Table to let adders of table actions know they are responsible
for the necessary refresh.
- Fixed for Group creation, Drift config creation, Child resource create
and import, bundle creation.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundlesListView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundlesListView.java
index bf9db3e..9db4577 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundlesListView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/list/BundlesListView.java
@@ -138,6 +138,9 @@ public class BundlesListView extends Table<BundlesWithLatestVersionDataSource> {
(hasAuth) ? TableActionEnablement.ALWAYS : TableActionEnablement.NEVER) {
public void executeAction(ListGridRecord[] selection, Object actionValue) {
new BundleCreateWizard().startWizard();
+ // we can refresh the table buttons immediately since the wizard is a dialog, the
+ // user can't access enabled buttons anyway.
+ BundlesListView.this.refreshTableInfo();
}
});
@@ -185,6 +188,9 @@ public class BundlesListView extends Table<BundlesWithLatestVersionDataSource> {
public void executeAction(ListGridRecord[] selection, Object actionValue) {
if (selection.length == 0) {
new BundleDeployWizard().startWizard();
+ // we can refresh the table buttons immediately since the wizard is a dialog, the
+ // user can't access enabled buttons anyway.
+ BundlesListView.this.refreshTableInfo();
return;
}
@@ -207,6 +213,9 @@ public class BundlesListView extends Table<BundlesWithLatestVersionDataSource> {
return;
}
new BundleDeployWizard(result.get(0).getId()).startWizard();
+ // we can refresh the table buttons immediately since the wizard is a dialog, the
+ // user can't access enabled buttons anyway.
+ BundlesListView.this.refreshTableInfo();
}
});
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
index 0caeb61..933aa01 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
@@ -801,14 +801,32 @@ public class Table<DS extends RPCDataSource> extends LocatableHLayout implements
this.titleComponent = canvas;
}
+ /**
+ * Note: To prevent user action while a current action completes, all widgets on the footer are disabled
+ * when footer actions take place, typically a button click. It is up to the action to ensure the page
+ * (via refresh() or CoreGUI.refresh()) or footer (via refreshTableActions) are refreshed as needed at action
+ * completion. Failure to do so may leave the widgets disabled.
+ */
public void addTableAction(String locatorId, String title, TableAction tableAction) {
this.addTableAction(locatorId, title, null, null, tableAction);
}
+ /**
+ * Note: To prevent user action while a current action completes, all widgets on the footer are disabled
+ * when footer actions take place, typically a button click. It is up to the action to ensure the page
+ * (via refresh() or CoreGUI.refresh()) or footer (via refreshTableActions) are refreshed as needed at action
+ * completion. Failure to do so may leave the widgets disabled.
+ */
public void addTableAction(String locatorId, String title, String confirmation, TableAction tableAction) {
this.addTableAction(locatorId, title, confirmation, null, tableAction);
}
+ /**
+ * Note: To prevent user action while a current action completes, all widgets on the footer are disabled
+ * when footer actions take place, typically a button click. It is up to the action to ensure the page
+ * (via refresh() or CoreGUI.refresh()) or footer (via refreshTableActions) are refreshed as needed at action
+ * completion. Failure to do so may leave the widgets disabled.
+ */
public void addTableAction(String locatorId, String title, String confirmation,
LinkedHashMap<String, ? extends Object> valueMap, TableAction tableAction) {
// If the specified locator ID is qualified, strip off the ancestry prefix, so we can make sure its locator ID
@@ -831,6 +849,11 @@ public class Table<DS extends RPCDataSource> extends LocatableHLayout implements
/**
* Adds extra widgets to the bottom of the table view.
+ * <br/><br/>
+ * Note: To prevent user action while a current action completes, all widgets on the footer are disabled
+ * when footer actions take place, typically a button click. It is up to the action to ensure the page
+ * (via refresh() or CoreGUI.refresh()) or footer (via refreshTableActions) are refreshed as needed at action
+ * completion. Failure to do so may leave the widgets disabled.
*
* @param widget the new widget to add to the table view
* @param aboveFooter if true, the widget will be placed in a second toolstrip just above the main footer.
@@ -880,7 +903,7 @@ public class Table<DS extends RPCDataSource> extends LocatableHLayout implements
return this.tableActionDisableOverride;
}
- protected void refreshTableInfo() {
+ public void refreshTableInfo() {
if (this.showFooter && (this.listGrid != null)) {
if (this.tableActionDisableOverride) {
this.listGrid.setSelectionType(SelectionStyle.NONE);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupConfigurationUpdatesPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupConfigurationUpdatesPortlet.java
index 653df07..1b23485 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupConfigurationUpdatesPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupConfigurationUpdatesPortlet.java
@@ -354,7 +354,7 @@ public class GroupConfigurationUpdatesPortlet extends LocatableVLayout implement
}
@Override
- protected void refreshTableInfo() {
+ public void refreshTableInfo() {
super.refreshTableInfo();
if (getTableInfo() != null) {
int count = getListGrid().getSelection().length;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupOperationsPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupOperationsPortlet.java
index 901c38d..9cfa362 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupOperationsPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/groups/GroupOperationsPortlet.java
@@ -366,7 +366,7 @@ class GroupOperationsCriteriaHistoryListView extends GroupOperationHistoryListVi
}
@Override
- protected void refreshTableInfo() {
+ public void refreshTableInfo() {
super.refreshTableInfo();
if (getTableInfo() != null) {
int count = getListGrid().getSelection().length;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java
index 7b3b86d..b165048 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java
@@ -16,9 +16,9 @@ import com.smartgwt.client.widgets.form.events.SubmitValuesHandler;
import com.smartgwt.client.widgets.form.fields.CheckboxItem;
import com.smartgwt.client.widgets.form.fields.FormItem;
import com.smartgwt.client.widgets.form.fields.SelectItem;
-
import com.smartgwt.client.widgets.grid.CellFormatter;
import com.smartgwt.client.widgets.grid.ListGridRecord;
+
import org.rhq.core.domain.alert.Alert;
import org.rhq.core.domain.alert.AlertPriority;
import org.rhq.core.domain.authz.Permission;
@@ -281,7 +281,7 @@ public abstract class AbstractRecentAlertsPortlet extends AlertHistoryView imple
}
@Override
- protected void refreshTableInfo() {
+ public void refreshTableInfo() {
super.refreshTableInfo();
if (getTableInfo() != null) {
int count = getListGrid().getSelection().length;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/drift/AbstractRecentDriftsPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/drift/AbstractRecentDriftsPortlet.java
index 94cec23..f26e9b4 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/drift/AbstractRecentDriftsPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/drift/AbstractRecentDriftsPortlet.java
@@ -293,7 +293,7 @@ public abstract class AbstractRecentDriftsPortlet extends DriftHistoryView imple
}
@Override
- protected void refreshTableInfo() {
+ public void refreshTableInfo() {
super.refreshTableInfo();
if (getTableInfo() != null) {
int count = getListGrid().getSelection().length;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/operations/AbstractOperationHistoryPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/operations/AbstractOperationHistoryPortlet.java
index 7b0cb59..150f869 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/operations/AbstractOperationHistoryPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/operations/AbstractOperationHistoryPortlet.java
@@ -249,7 +249,7 @@ public abstract class AbstractOperationHistoryPortlet extends OperationHistoryVi
}
@Override
- protected void refreshTableInfo() {
+ public void refreshTableInfo() {
super.refreshTableInfo();
if (getTableInfo() != null) {
int count = getListGrid().getSelection().length;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/problems/ProblemResourcesPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/problems/ProblemResourcesPortlet.java
index 6c25762..7c91dc1 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/problems/ProblemResourcesPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/problems/ProblemResourcesPortlet.java
@@ -310,7 +310,7 @@ public class ProblemResourcesPortlet extends Table<ProblemResourcesDataSource> i
return definition;
}
- protected void refreshTableInfo() {
+ public void refreshTableInfo() {
if (isShowFooter()) {
long begin = 0;
List<Long> bounds = MeasurementUtility.calculateTimeFrame(getDataSource()
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceConfigurationUpdatesPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceConfigurationUpdatesPortlet.java
index 448f357..002d600 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceConfigurationUpdatesPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/resource/ResourceConfigurationUpdatesPortlet.java
@@ -148,7 +148,7 @@ public class ResourceConfigurationUpdatesPortlet extends GroupConfigurationUpdat
}
@Override
- protected void refreshTableInfo() {
+ public void refreshTableInfo() {
super.refreshTableInfo();
if (getTableInfo() != null) {
int count = getListGrid().getSelection().length;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftConfigurationView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftConfigurationView.java
index abdc35e..364d25d 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftConfigurationView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftConfigurationView.java
@@ -170,6 +170,9 @@ public class DriftConfigurationView extends TableSection<DriftConfigurationDataS
private void add() {
DriftAddConfigWizard.showWizard(context, this);
+ // we can refresh the table buttons immediately since the wizard is a dialog, the
+ // user can't access enabled buttons anyway.
+ DriftConfigurationView.this.refreshTableInfo();
}
private void delete(ListGridRecord[] records) {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupListView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupListView.java
index c0ae2d7..72442eb 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupListView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupListView.java
@@ -201,6 +201,9 @@ public class ResourceGroupListView extends Table<ResourceGroupCompositeDataSourc
Permission.MANAGE_INVENTORY) {
public void executeAction(ListGridRecord[] selection, Object actionValue) {
new GroupCreateWizard(ResourceGroupListView.this).startWizard();
+ // we can refresh the table buttons immediately since the wizard is a dialog, the
+ // user can't access enabled buttons anyway.
+ ResourceGroupListView.this.refreshTableInfo();
}
});
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceCompositeSearchView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceCompositeSearchView.java
index 15ab3dc..beeb982 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceCompositeSearchView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceCompositeSearchView.java
@@ -152,6 +152,9 @@ public class ResourceCompositeSearchView extends ResourceSearchView {
public void executeAction(ListGridRecord[] selection, Object actionValue) {
ResourceFactoryImportWizard.showImportWizard(parentResourceComposite.getResource(),
(ResourceType) actionValue);
+ // we can refresh the table buttons immediately since the wizard is a dialog, the
+ // user can't access enabled buttons anyway.
+ ResourceCompositeSearchView.this.refreshTableInfo();
}
});
}
@@ -172,6 +175,9 @@ public class ResourceCompositeSearchView extends ResourceSearchView {
public void executeAction(ListGridRecord[] selection, Object actionValue) {
ResourceFactoryCreateWizard.showCreateWizard(parentResourceComposite.getResource(),
(ResourceType) actionValue);
+ // we can refresh the table buttons immediately since the wizard is a dialog, the
+ // user can't access enabled buttons anyway.
+ ResourceCompositeSearchView.this.refreshTableInfo();
}
});
}
commit 075070dce17f82c63f868db83de2a2f51c6f01c2
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Tue Aug 30 12:22:20 2011 -0400
reverting back to SNAPSHOT version.
diff --git a/modules/common/ant-bundle/pom.xml b/modules/common/ant-bundle/pom.xml
index c7a482f..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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/common/drift/pom.xml b/modules/common/drift/pom.xml
index 80e6d65..73ab33a 100644
--- a/modules/common/drift/pom.xml
+++ b/modules/common/drift/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-common-parent</artifactId>
- <version>4.1.1-BETA1</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 57fa2b7..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.1.1-BETA1</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 4c3474f..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.1.1-BETA1</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 47c5535..bd88fa0 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.1.1-BETA1</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 f90deb3..9f5f66a 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.1.1-BETA1</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 4bdd540..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.1.1-BETA1</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 335dff6..aa20853 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -3,7 +3,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-parent</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-dbutils</artifactId>
diff --git a/modules/core/domain/pom.xml b/modules/core/domain/pom.xml
index 9cd0ba2..42d28e1 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.1.1-BETA1</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 914a15d..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.1.1-BETA1</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 a47bf81..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.1.1-BETA1</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 a9876b9..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.1.1-BETA1</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 c8be3c2..1d12869 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.1.1-BETA1</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 1f1a904..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.1.1-BETA1</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 61c6295..62a73be 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.1.1-BETA1</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 5d17ff7..dfa5bb8 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.1.1-BETA1</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 4b54d70..17690d3 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.1.1-BETA1</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 485a79e..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.1.1-BETA1</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 71bac05..d96cf83 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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-script-bindings</artifactId>
- <version>4.1.1-BETA1</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 a895109..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.1.1-BETA1</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 23b19cb..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.1.1-BETA1</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 80b21bb..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.1.1-BETA1</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 9eb9c9c..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.1.1-BETA1</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 9cd93ba..de77f3f 100644
--- a/modules/enterprise/gui/coregui/pom.xml
+++ b/modules/enterprise/gui/coregui/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.1.1-BETA1</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 8fdc07e..900d476 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.1.1-BETA1</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 3e0b1c7..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.1.1-BETA1</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 286b89b..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.1.1-BETA1</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 da9d486..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.1.1-BETA1</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 01c9861..24fbb60 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.1.1-BETA1</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 ada9309..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.1.1-BETA1</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 5da2901..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.1.1-BETA1</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 265fcfa..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.1.1-BETA1</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 02ce1cc..dee43bc 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.1.1-BETA1</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 15a32c1..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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-server-client-api</artifactId>
- <version>4.1.1-BETA1</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 c7a52f0..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.1.1-BETA1</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 e45f641..d27c157 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.1.1-BETA1</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 68eeb76..8cdaf8b 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.1.1-BETA1</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 8e783e0..d2f2bc5 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.1.1-BETA1</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 7cbd947..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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>alert-cli</artifactId>
- <version>4.1.1-BETA1</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 3e2d017..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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq.server</groupId>
<artifactId>alert-email</artifactId>
- <version>4.1.1-BETA1</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 ab8d837..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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-irc</artifactId>
- <version>4.1.1-BETA1</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 5b8e1bd..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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-log4j</artifactId>
- <version>4.1.1-BETA1</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 44da984..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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-microblog</artifactId>
- <version>4.1.1-BETA1</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 02fcb76..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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-mobicents</artifactId>
- <version>4.1.1-BETA1</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 9eb3e7c..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.1.1-BETA1</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.1.1-BETA1</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 021dc8a..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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-roles</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
<name>RHQ Enterprise Server Roles Alert Plugin</name>
diff --git a/modules/enterprise/server/plugins/alert-snmp/pom.xml b/modules/enterprise/server/plugins/alert-snmp/pom.xml
index 03b1aeb..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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-snmp</artifactId>
- <version>4.1.1-BETA1</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 e566893..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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-subject</artifactId>
- <version>4.1.1-BETA1</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 37c3b3b..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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/cobbler/pom.xml b/modules/enterprise/server/plugins/cobbler/pom.xml
index 019ae28..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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>rhq-serverplugin-cobbler</artifactId>
- <version>4.1.1-BETA1</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 95f29fa..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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/drift-rhq/pom.xml b/modules/enterprise/server/plugins/drift-rhq/pom.xml
index b287def..9c9d3b6 100644
--- a/modules/enterprise/server/plugins/drift-rhq/pom.xml
+++ b/modules/enterprise/server/plugins/drift-rhq/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
- <version>4.1.1-BETA1</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 2dfde0e..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.1.1-BETA1</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 c9beef5..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.1.1-BETA1</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.1.1-BETA1</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 6701d43..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.1.1-BETA1</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 5168456..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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>packagetype-cli</artifactId>
- <version>4.1.1-BETA1</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 64b3881..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.1.1-BETA1</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 8ef3970..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.1.1-BETA1</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 91cdcf6..3fa05d3 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.1.1-BETA1</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 226e1dd..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.1.1-BETA1</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 a657f95..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.1.1-BETA1</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 455279f..9e221a0 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.1.1-BETA1</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 3b9f1ef..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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/safe-invoker/pom.xml b/modules/enterprise/server/safe-invoker/pom.xml
index 434fa4d..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.1.1-BETA1</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 9be1e89..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.1.1-BETA1</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 1f928c1..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.1.1-BETA1</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 ebbe06a..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.1.1-BETA1</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 b5f2ebb..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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq.helpers</groupId>
<artifactId>bundleGen</artifactId>
- <version>4.1.1-BETA1</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 4716515..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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq.helpers</groupId>
<artifactId>perftest-support</artifactId>
- <version>4.1.1-BETA1</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 da93cb6..0c73fd3 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.1.1-BETA1</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 9a7a0c6..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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/aliases/pom.xml b/modules/plugins/aliases/pom.xml
index 0d7441c..959fa3c 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.1.1-BETA1</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 b0ebced..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.1.1-BETA1</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 d1365b5..0694d78 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.1.1-BETA1</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 c32e484..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.1.1-BETA1</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 fce9e17..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.1.1-BETA1</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 1f0beb7..9a45599 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.1.1-BETA1</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 a150183..e42d480 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.1.1-BETA1</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 2c63916..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.1.1-BETA1</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 a6f0084..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.1.1-BETA1</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 9e2cf83..93b5dd3 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.1.1-BETA1</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 4ba3845..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.1.1-BETA1</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 92e17a4..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.1.1-BETA1</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 0363fe8..31af33b 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.1.1-BETA1</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 edd4a4d..b097071 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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-hudson-plugin</artifactId>
- <version>4.1.1-BETA1</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 f2b629b..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.1.1-BETA1</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 044280b..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.1.1-BETA1</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 d135fa0..6ec0096 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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jboss-as-7/pom.xml b/modules/plugins/jboss-as-7/pom.xml
index 408e30c..ca63c5e 100644
--- a/modules/plugins/jboss-as-7/pom.xml
+++ b/modules/plugins/jboss-as-7/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/jboss-as/pom.xml b/modules/plugins/jboss-as/pom.xml
index c9dbafa..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.1.1-BETA1</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 d0d137a..1a3a1df 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.1.1-BETA1</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 152d019..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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jmx/pom.xml b/modules/plugins/jmx/pom.xml
index 44cd378..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.1.1-BETA1</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 9ccd94e..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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index 901f34c..3a6deaa 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.1.1-BETA1</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 8c0b60d..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.1.1-BETA1</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 6f49a19..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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/oracle/pom.xml b/modules/plugins/oracle/pom.xml
index aaca2d2..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.1.1-BETA1</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 f19c719..6b0791d 100644
--- a/modules/plugins/pattern-generator/pom.xml
+++ b/modules/plugins/pattern-generator/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/perftest/pom.xml b/modules/plugins/perftest/pom.xml
index c4d6307..63dd974 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.1.1-BETA1</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 90a262f..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.1.1-BETA1</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 68814d8..f32159e 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.1.1-BETA1</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 414de6e..5ef7252 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.1.1-BETA1</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 91e7108..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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/rhq-agent/pom.xml b/modules/plugins/rhq-agent/pom.xml
index ac71a33..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.1.1-BETA1</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 e6cbd4d..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.1.1-BETA1</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 a2699d1..84fc9b7 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.1.1-BETA1</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 f9041bb..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.1.1-BETA1</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 ec6ca02..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.1.1-BETA1</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 ba8606f..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.1.1-BETA1</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 f087ca3..83da74a 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.1.1-BETA1</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 6a0391e..1b69180 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.1.1-BETA1</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 6921318..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.1.1-BETA1</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 a6f6f6b..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.1.1-BETA1</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 e5fcd01..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.1.1-BETA1</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 3e56790..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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/pom.xml b/modules/pom.xml
index e90b1d9..2b45c62 100644
--- a/modules/pom.xml
+++ b/modules/pom.xml
@@ -6,7 +6,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.1.1-BETA1</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 a34707c..5c6e85c 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.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<artifactId>test-utils</artifactId>
diff --git a/pom.xml b/pom.xml
index a77185e..c57a43b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>RHQ</name>
commit 2dc925b34f5bb87639c8628654ed05eeb100b2c8
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Tue Aug 30 12:05:19 2011 -0400
add support for dev profile to perftest plugin's pom
diff --git a/modules/plugins/perftest/pom.xml b/modules/plugins/perftest/pom.xml
index 590a89b..c4d6307 100644
--- a/modules/plugins/perftest/pom.xml
+++ b/modules/plugins/perftest/pom.xml
@@ -130,7 +130,81 @@
</build>
<profiles>
- <profile>
+
+ <profile>
+ <id>dev</id>
+
+ <properties>
+ <rhq.rootDir>../../..</rhq.rootDir>
+ <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
+ <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+ </properties>
+
+ <build>
+ <plugins>
+
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+
+ <execution>
+ <id>deploy</id>
+ <phase>compile</phase>
+ <configuration>
+ <tasks>
+ <mkdir dir="${rhq.deploymentDir}" />
+ <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <echo>*** Updating ${deployment.file}...</echo>
+ <jar destfile="${deployment.file}" basedir="${project.build.outputDirectory}" update="true" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ <execution>
+ <id>deploy-jar-meta-inf</id>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <echo>*** Updating META-INF dir in ${deployment.file}...</echo>
+ <unjar src="${project.build.directory}/${project.build.finalName}.jar" dest="${project.build.outputDirectory}">
+ <patternset><include name="META-INF/**" /></patternset>
+ </unjar>
+ <jar destfile="${deployment.file}" manifest="${project.build.outputDirectory}/META-INF/MANIFEST.MF" update="true">
+ </jar>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ <execution>
+ <id>undeploy</id>
+ <phase>clean</phase>
+ <configuration>
+ <tasks>
+ <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" />
+ <echo>*** Deleting ${deployment.file}...</echo>
+ <delete file="${deployment.file}" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
<id>cobertura-plugins</id>
<activation>
<activeByDefault>false</activeByDefault>
commit c7d3cebb0fe0318de2ac02cd73a7cf18061ac264
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Fri Aug 26 08:54:53 2011 -0400
[BZ 676761] add better error handling when user enters an invalid search expression on the Inventory>Children subtab (https://bugzilla.redhat.com/show_bug.cgi?id=676761)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceCompositeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceCompositeDataSource.java
index 5c94399..81afa7c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceCompositeDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceCompositeDataSource.java
@@ -52,9 +52,10 @@ import org.rhq.enterprise.gui.coregui.client.gwt.ResourceGWTServiceAsync;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository.TypesLoadedCallback;
import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
/**
- * A DataSource basically the same as ResourceDatasource in the fields it defines, but that works with
+ * A DataSource, basically the same as ResourceDatasource in the fields it defines, but that works with
* ResourceComposite as opposed to Resource records. In this way the Records can provide additional info,
* like the user's resource permissions, for the resources.
*
@@ -91,7 +92,12 @@ public class ResourceCompositeDataSource extends RPCDataSource<ResourceComposite
getResourceService().findResourceCompositesByCriteria(criteria,
new AsyncCallback<PageList<ResourceComposite>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.view_inventory_resources_loadFailed(), caught);
+ if (caught.getMessage().contains("SearchExpressionException")) {
+ Message message = new Message("Invalid search expression.", Message.Severity.Error);
+ CoreGUI.getMessageCenter().notify(message);
+ } else {
+ CoreGUI.getErrorHandler().handleError(MSG.view_inventory_resources_loadFailed(), caught);
+ }
response.setStatus(RPCResponse.STATUS_FAILURE);
processResponse(request.getRequestId(), response);
}
commit 7a5d54bd65c18664068b83c1ab08130f37abbd21
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Tue Aug 30 11:11:22 2011 -0400
also removing JAVA5 logic from publish_release. Same reason as earlier commit.
diff --git a/publish_release.sh b/publish_release.sh
index 3e5b0c4..3a12b7a 100755
--- a/publish_release.sh
+++ b/publish_release.sh
@@ -84,35 +84,36 @@ fi
# TODO: Check that JDK version is < 1.7.
+# spinder 8/30/11: commenting out the JAVA5 support, but leaving logic in place for when we need the same backwards
+# compatibility logic for JD6 vs. JDK7 support.
# If this is an enterprise release, make sure JAVA5_HOME points to a valid JDK 1.5 install.
# We need this to validate only Java 5 or earlier APIs are used in all modules, except the CLI, which requires Java 6.
-
-if [ "$RELEASE_TYPE" = "enterprise" ]; then
- if [ -z "$JAVA5_HOME" ]; then
- abort "JAVA5_HOME environment variable is not set - JAVA5_HOME must point to a JDK (not JRE) 1.5 install dir."
- fi
-
- if [ ! -d "$JAVA5_HOME" ]; then
- abort "JAVA5_HOME ($JAVA5_HOME) does not exist or is not a directory - JAVA5_HOME must point to a JDK (not JRE) 1.5 install dir."
- fi
-
- if [ ! -x "$JAVA5_HOME/bin/java" ]; then
- abort "$JAVA5_HOME/bin/java does not exist or is not executable - JAVA5_HOME must point to a JDK (not JRE) 1.5 install dir."
- fi
-
- if [ ! -x "$JAVA5_HOME/bin/javac" ]; then
- abort "$JAVA5_HOME/bin/javac does not exist or is not executable - JAVA5_HOME must point to a JDK (not JRE) 1.5 install dir."
- fi
-
- if ! "$JAVA5_HOME/bin/javap" java.lang.Enum >/dev/null 2>&1; then
- abort "java.lang.Enum not found - JAVA5_HOME ($JAVA5_HOME) version appears to be less than 1.5 - version must be 1.5.x."
- fi
-
- if "$JAVA5_HOME/bin/javap" java.util.Deque >/dev/null 2>&1; then
- abort "java.util.Deque found - JAVA5_HOME ($JAVA5_HOME) version appears to be greater than or equal to 1.6 - version must be 1.5.x."
- fi
-fi
-
+#
+#if [ "$RELEASE_TYPE" = "enterprise" ]; then
+# if [ -z "$JAVA5_HOME" ]; then
+# abort "JAVA5_HOME environment variable is not set - JAVA5_HOME must point to a JDK (not JRE) 1.5 install dir."
+# fi
+#
+# if [ ! -d "$JAVA5_HOME" ]; then
+# abort "JAVA5_HOME ($JAVA5_HOME) does not exist or is not a directory - JAVA5_HOME must point to a JDK (not JRE) 1.5 install dir."
+# fi
+#
+# if [ ! -x "$JAVA5_HOME/bin/java" ]; then
+# abort "$JAVA5_HOME/bin/java does not exist or is not executable - JAVA5_HOME must point to a JDK (not JRE) 1.5 install dir."
+# fi
+#
+# if [ ! -x "$JAVA5_HOME/bin/javac" ]; then
+# abort "$JAVA5_HOME/bin/javac does not exist or is not executable - JAVA5_HOME must point to a JDK (not JRE) 1.5 install dir."
+# fi
+#
+# if ! "$JAVA5_HOME/bin/javap" java.lang.Enum >/dev/null 2>&1; then
+# abort "java.lang.Enum not found - JAVA5_HOME ($JAVA5_HOME) version appears to be less than 1.5 - version must be 1.5.x."
+# fi
+#
+# if "$JAVA5_HOME/bin/javap" java.util.Deque >/dev/null 2>&1; then
+# abort "java.util.Deque found - JAVA5_HOME ($JAVA5_HOME) version appears to be greater than or equal to 1.6 - version must be 1.5.x."
+# fi
+#fi
# Make sure M2_HOME points to a valid Maven 2.1.x or 2.2.x install.
@@ -184,7 +185,8 @@ if [ "$MODE" = "test" ]; then
fi
if [ "$RELEASE_TYPE" = "enterprise" ]; then
- MAVEN_ARGS="$MAVEN_ARGS -Dexclude-webdav -Djava5.home=$JAVA5_HOME/jre"
+ MAVEN_ARGS="$MAVEN_ARGS -Dexclude-webdav "
+ #MAVEN_ARGS="$MAVEN_ARGS -Dexclude-webdav -Djava5.home=$JAVA5_HOME/jre"
fi
if [ -n "$RELEASE_DEBUG" ]; then
MAVEN_ARGS="$MAVEN_ARGS --debug"
@@ -217,7 +219,8 @@ export LANG
echo
echo "========================== Environment Variables =============================="
echo "JAVA_HOME=$JAVA_HOME"
-[ "$RELEASE_TYPE" = "enterprise" ] && echo "JAVA5_HOME=$JAVA5_HOME"
+[ "$RELEASE_TYPE" = "enterprise" ]"
+#[ "$RELEASE_TYPE" = "enterprise" ] && echo "JAVA5_HOME=$JAVA5_HOME"
echo "M2_HOME=$M2_HOME"
echo "MAVEN_OPTS=$MAVEN_OPTS"
echo "PATH=$PATH"
commit 51caaf3c21c4ee0b6c6f2948e01f32016312473a
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Tue Aug 30 10:43:08 2011 -0400
removing JAVA5 backwards compatiblity support. Only commenting out logic as similar logic needed for JDK6 vs JDK7 in the near future.
diff --git a/release.sh b/release.sh
index 316af14..b26b3ed 100755
--- a/release.sh
+++ b/release.sh
@@ -85,35 +85,36 @@ fi
# TODO: Check that JDK version is < 1.7.
-
+# spinder 8/30/11: commenting out the JAVA5 support, but leaving logic in place for when we need the same backwards
+# compatibility logic for JD6 vs. JDK7 support.
# If this is an enterprise release, make sure JAVA5_HOME points to a valid JDK 1.5 install.
# We need this to validate only Java 5 or earlier APIs are used in all modules, except the CLI, which requires Java 6.
-
-if [ "$RELEASE_TYPE" = "enterprise" ]; then
- if [ -z "$JAVA5_HOME" ]; then
- abort "JAVA5_HOME environment variable is not set - JAVA5_HOME must point to a JDK (not JRE) 1.5 install dir."
- fi
-
- if [ ! -d "$JAVA5_HOME" ]; then
- abort "JAVA5_HOME ($JAVA5_HOME) does not exist or is not a directory - JAVA5_HOME must point to a JDK (not JRE) 1.5 install dir."
- fi
-
- if [ ! -x "$JAVA5_HOME/bin/java" ]; then
- abort "$JAVA5_HOME/bin/java does not exist or is not executable - JAVA5_HOME must point to a JDK (not JRE) 1.5 install dir."
- fi
-
- if [ ! -x "$JAVA5_HOME/bin/javac" ]; then
- abort "$JAVA5_HOME/bin/javac does not exist or is not executable - JAVA5_HOME must point to a JDK (not JRE) 1.5 install dir."
- fi
-
- if ! "$JAVA5_HOME/bin/javap" java.lang.Enum >/dev/null 2>&1; then
- abort "java.lang.Enum not found - JAVA5_HOME ($JAVA5_HOME) version appears to be less than 1.5 - version must be 1.5.x."
- fi
-
- if "$JAVA5_HOME/bin/javap" java.util.Deque >/dev/null 2>&1; then
- abort "java.util.Deque found - JAVA5_HOME ($JAVA5_HOME) version appears to be greater than or equal to 1.6 - version must be 1.5.x."
- fi
-fi
+#
+#if [ "$RELEASE_TYPE" = "enterprise" ]; then
+# if [ -z "$JAVA5_HOME" ]; then
+# abort "JAVA5_HOME environment variable is not set - JAVA5_HOME must point to a JDK (not JRE) 1.5 install dir."
+# fi
+#
+# if [ ! -d "$JAVA5_HOME" ]; then
+# abort "JAVA5_HOME ($JAVA5_HOME) does not exist or is not a directory - JAVA5_HOME must point to a JDK (not JRE) 1.5 install dir."
+# fi
+#
+# if [ ! -x "$JAVA5_HOME/bin/java" ]; then
+# abort "$JAVA5_HOME/bin/java does not exist or is not executable - JAVA5_HOME must point to a JDK (not JRE) 1.5 install dir."
+# fi
+#
+# if [ ! -x "$JAVA5_HOME/bin/javac" ]; then
+# abort "$JAVA5_HOME/bin/javac does not exist or is not executable - JAVA5_HOME must point to a JDK (not JRE) 1.5 install dir."
+# fi
+#
+# if ! "$JAVA5_HOME/bin/javap" java.lang.Enum >/dev/null 2>&1; then
+# abort "java.lang.Enum not found - JAVA5_HOME ($JAVA5_HOME) version appears to be less than 1.5 - version must be 1.5.x."
+# fi
+#
+# if "$JAVA5_HOME/bin/javap" java.util.Deque >/dev/null 2>&1; then
+# abort "java.util.Deque found - JAVA5_HOME ($JAVA5_HOME) version appears to be greater than or equal to 1.6 - version must be 1.5.x."
+# fi
+#fi
# Make sure M2_HOME points to a valid Maven 2.1.x or 2.2.x install.
@@ -184,7 +185,8 @@ MAVEN_ARGS="--settings $MAVEN_SETTINGS_FILE --batch-mode --errors -Penterprise,d
#fi
MAVEN_ARGS="$MAVEN_ARGS -DskipTests=true"
if [ "$RELEASE_TYPE" = "enterprise" ]; then
- MAVEN_ARGS="$MAVEN_ARGS -Dexclude-webdav -Djava5.home=$JAVA5_HOME/jre"
+ MAVEN_ARGS="$MAVEN_ARGS -Dexclude-webdav "
+ #MAVEN_ARGS="$MAVEN_ARGS -Dexclude-webdav -Djava5.home=$JAVA5_HOME/jre"
fi
if [ -n "$RELEASE_DEBUG" ]; then
MAVEN_ARGS="$MAVEN_ARGS --debug"
@@ -222,7 +224,8 @@ export LANG
echo
echo "========================== Environment Variables =============================="
echo "JAVA_HOME=$JAVA_HOME"
-[ "$RELEASE_TYPE" = "enterprise" ] && echo "JAVA5_HOME=$JAVA5_HOME"
+[ "$RELEASE_TYPE" = "enterprise" ]
+#[ "$RELEASE_TYPE" = "enterprise" ] && echo "JAVA5_HOME=$JAVA5_HOME"
echo "M2_HOME=$M2_HOME"
echo "MAVEN_OPTS=$MAVEN_OPTS"
echo "PATH=$PATH"
commit 42c454258e2ead6c6ccbf6be91132094b34db020
Merge: 535d831 6db75f8
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Aug 30 05:35:30 2011 -0500
Merge branch 'master' of ssh://git.fedorahosted.org/git/rhq/rhq
commit 535d831af59702ddaf0cd85c675b98befd3065e2
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Aug 30 05:35:04 2011 -0500
Add proxy information metric to make the mod_cluster component dyna group friendly for complex queries (eg. group based on httpd proxy).
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServerComponent.java
index 0db722e..b79f751 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServerComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServerComponent.java
@@ -18,7 +18,14 @@
*/
package org.rhq.plugins.modcluster;
+import java.util.Set;
+
+import org.mc4j.ems.connection.bean.EmsBean;
+
import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.domain.measurement.MeasurementDataTrait;
+import org.rhq.core.domain.measurement.MeasurementReport;
+import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
import org.rhq.plugins.jmx.MBeanResourceComponent;
import org.rhq.plugins.modcluster.helper.JBossHelper;
import org.rhq.plugins.modcluster.model.ProxyInfo;
@@ -30,6 +37,21 @@ import org.rhq.plugins.modcluster.model.ProxyInfo;
@SuppressWarnings({ "rawtypes" })
public class ModClusterServerComponent extends MBeanResourceComponent {
+ @SuppressWarnings("unchecked")
+ @Override
+ protected void getValues(MeasurementReport report, Set requests, EmsBean bean) {
+ for (MeasurementScheduleRequest request : (Set<MeasurementScheduleRequest>) requests) {
+ if (request.getName().equals("ProxyInformation")) {
+ String rawProxyInfo = JBossHelper.getRawProxyInfo(bean);
+ report.addData(new MeasurementDataTrait(request, rawProxyInfo));
+ requests.remove(request);
+ break;
+ }
+ }
+
+ super.getValues(report, requests, bean);
+ }
+
@Override
public AvailabilityType getAvailability() {
String rawProxyInfo = JBossHelper.getRawProxyInfo(getEmsBean());
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index b0ad1f2..536e747 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -24,6 +24,9 @@
<operation name="reset" displayName="Reset the node" description="Move this application server out of an error state." />
<operation name="refresh" displayName="Refresh configuration" description="Refresh configuration for this application server." />
+
+ <metric property="ProxyInformation" displayName="Proxy Information" displayType="summary" dataType="trait" />
+
<!-- Start - Configuration for HAModClusterService -->
<service name="HA Service" discovery="ClassNameMBeanDiscoveryComponent"
commit 6db75f8bfbefbdeb7dd6c89a39fc1b8a8bf28c57
Merge: c1ddd73 9446ab1
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Tue Aug 30 02:01:44 2011 -0400
Merge branch 'jon3_test-build' into track_master4
commit 9446ab130f050fe29cb0b0a1317dfc8c99b59159
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Mon Aug 29 18:03:23 2011 -0400
-applying missing brew patches to master. Somehow these got lost in translation.
Applying brew build patches
Conflicts:
modules/enterprise/agent/pom.xml
pom.xml
diff --git a/modules/core/plugindoc/pom.xml b/modules/core/plugindoc/pom.xml
index 831f39f..8364995 100644
--- a/modules/core/plugindoc/pom.xml
+++ b/modules/core/plugindoc/pom.xml
@@ -119,4 +119,40 @@
</plugins>
</build>
+ <profiles>
+ <profile>
+ <id>install-and-deploy-zip</id>
+ <activation>
+ <property>
+ <name>brew</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.5</version>
+ <executions>
+ <execution>
+ <id>attach-installed-file-for-deployment</id>
+ <phase>install</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <type>zip</type>
+ <file>${project.build.directory}/${project.artifactId}-${project.version}.zip</file>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
diff --git a/modules/enterprise/agent/pom.xml b/modules/enterprise/agent/pom.xml
index 2d38f9f..4b54d70 100644
--- a/modules/enterprise/agent/pom.xml
+++ b/modules/enterprise/agent/pom.xml
@@ -324,6 +324,41 @@ Build-Number=${buildNumber}
</plugins>
</build>
</profile>
+ <profile>
+ <id>install-and-deploy-zip</id>
+ <activation>
+ <property>
+ <name>brew</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.5</version>
+ <executions>
+ <execution>
+ <id>attach-installed-file-for-deployment</id>
+ <phase>install</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <type>zip</type>
+ <file>${project.build.directory}/${project.artifactId}-${project.version}.zip</file>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
</profiles>
<repositories>
diff --git a/pom.xml b/pom.xml
index a641b36..a77185e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1130,6 +1130,7 @@
<file>
<exists>.git</exists>
</file>
+
</activation>
<build>
<plugins>
commit c1ddd73fa51dbbdd185558a78b97314b2efa33cf
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Mon Aug 29 17:44:34 2011 -0400
[BZ 34054 - Throws 'Globally uncaught exception' while adding 'Platform Utilization' on dashboard]
More restructuring of this portlet and its datasource to get it to work
both in the report view and in the portlet view.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/platform/PlatformMetricDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/platform/PlatformMetricDataSource.java
index 84786cf..3d5e107 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/platform/PlatformMetricDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/platform/PlatformMetricDataSource.java
@@ -18,22 +18,19 @@
*/
package org.rhq.enterprise.gui.coregui.client.dashboard.portlets.platform;
+import java.util.ArrayList;
import java.util.List;
import com.smartgwt.client.data.DataSourceField;
-import com.smartgwt.client.data.fields.DataSourceTextField;
import com.smartgwt.client.widgets.grid.ListGridRecord;
import org.rhq.core.domain.resource.Resource;
-import org.rhq.enterprise.gui.coregui.client.CoreGUI;
-import org.rhq.enterprise.gui.coregui.client.Messages;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceDatasource;
/**
* @author Greg Hinkle
*/
public class PlatformMetricDataSource extends ResourceDatasource {
- private static final Messages MSG = CoreGUI.getMessages();
PlatformSummaryPortlet view;
@@ -47,17 +44,7 @@ public class PlatformMetricDataSource extends ResourceDatasource {
@Override
protected List<DataSourceField> addDataSourceFields() {
- List<DataSourceField> fields = super.addDataSourceFields();
-
- DataSourceTextField cpuField = new DataSourceTextField("cpu", MSG.dataSource_platforms_field_cpu());
- fields.add(cpuField);
- DataSourceTextField memoryField = new DataSourceTextField("memory", MSG.dataSource_platforms_field_memory());
- fields.add(memoryField);
-
- DataSourceTextField swapField = new DataSourceTextField("swap", MSG.dataSource_platforms_field_swap());
- fields.add(swapField);
-
- return fields;
+ return new ArrayList<DataSourceField>();
}
@Override
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/platform/PlatformSummaryPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/platform/PlatformSummaryPortlet.java
index 5bd705e..69ed9f5 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/platform/PlatformSummaryPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/platform/PlatformSummaryPortlet.java
@@ -18,6 +18,7 @@
*/
package org.rhq.enterprise.gui.coregui.client.dashboard.portlets.platform;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.Set;
@@ -84,43 +85,18 @@ public class PlatformSummaryPortlet extends LocatableListGrid implements Portlet
setWidth100();
setHeight100();
- prefetch();
-
setShowRecordComponents(true);
setShowRecordComponentsByCell(true);
- setUseAllDataSourceFields(true);
setAutoFitData(Autofit.VERTICAL);
setOverflow(Overflow.AUTO);
setAutoFetchData(false);
setDataSource(new PlatformMetricDataSource(this));
- setInitialCriteria(new Criteria(ResourceDataSourceField.CATEGORY.propertyName(), ResourceCategory.PLATFORM
- .name()));
- }
-
- private void prefetch() {
-
- ResourceTypeCriteria typeCriteria = new ResourceTypeCriteria();
- typeCriteria.addFilterCategory(ResourceCategory.PLATFORM);
- typeCriteria.fetchMetricDefinitions(true);
- typeCriteria.fetchOperationDefinitions(true);
-
- // TODO GH: Find a way to pass resource type criteria lookups through the type cache
- typeService.findResourceTypesByCriteria(typeCriteria, new AsyncCallback<PageList<ResourceType>>() {
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.view_portlet_platform_type_error_1(), caught);
- }
-
- public void onSuccess(PageList<ResourceType> result) {
- setTypes(result);
- fetchData(new Criteria(ResourceDataSourceField.CATEGORY.propertyName(), ResourceCategory.PLATFORM
- .name()));
- }
- });
}
protected void onDraw() {
+ ArrayList<ListGridField> fields = new ArrayList<ListGridField>(5);
ListGridField nameField = new ListGridField(ResourceDataSourceField.NAME.propertyName(), MSG
.common_title_name());
@@ -130,13 +106,21 @@ public class PlatformSummaryPortlet extends LocatableListGrid implements Portlet
+ "</a>";
}
});
- nameField.setWidth("20%");
- setFields(nameField);
+ fields.add(nameField);
+
+ ListGridField versionField = new ListGridField(ResourceDataSourceField.VERSION.propertyName(), MSG
+ .common_title_version());
+ fields.add(versionField);
- ListGridField cpuField = getField(FIELD_CPU);
- ListGridField memoryField = getField(FIELD_MEMORY);
- ListGridField swapField = getField(FIELD_SWAP);
+ ListGridField cpuField = new ListGridField("cpu", MSG.dataSource_platforms_field_cpu());
+ fields.add(cpuField);
+ ListGridField memoryField = new ListGridField("memory", MSG.dataSource_platforms_field_memory());
+ fields.add(memoryField);
+ ListGridField swapField = new ListGridField("swap", MSG.dataSource_platforms_field_swap());
+ fields.add(swapField);
+ nameField.setWidth("20%");
+ versionField.setWidth("20%");
cpuField.setWidth("20%");
memoryField.setWidth("20%");
swapField.setWidth("20%");
@@ -146,12 +130,30 @@ public class PlatformSummaryPortlet extends LocatableListGrid implements Portlet
memoryField.setCanSort(false);
swapField.setCanSort(false);
- hideField("id");
- hideField(ResourceDataSourceField.TYPE.propertyName()); // we could show this, do we want to indicate the kind of platform?
- hideField(ResourceDataSourceField.DESCRIPTION.propertyName()); // we could show this, but it makes the table wider
- hideField(ResourceDataSourceField.PLUGIN.propertyName()); // its always the platform plugin, no need to show this
- hideField(ResourceDataSourceField.CATEGORY.propertyName()); // we only ever show platforms, no need to show this
- hideField(ResourceDataSourceField.AVAILABILITY.propertyName()); // the icon badging will indicate availability
+ setFields(fields.toArray(new ListGridField[fields.size()]));
+
+ initialFetch();
+ }
+
+ private void initialFetch() {
+
+ ResourceTypeCriteria typeCriteria = new ResourceTypeCriteria();
+ typeCriteria.addFilterCategory(ResourceCategory.PLATFORM);
+ typeCriteria.fetchMetricDefinitions(true);
+ typeCriteria.fetchOperationDefinitions(true);
+
+ // TODO GH: Find a way to pass resource type criteria lookups through the type cache
+ typeService.findResourceTypesByCriteria(typeCriteria, new AsyncCallback<PageList<ResourceType>>() {
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(MSG.view_portlet_platform_type_error_1(), caught);
+ }
+
+ public void onSuccess(PageList<ResourceType> result) {
+ setTypes(result);
+ fetchData(new Criteria(ResourceDataSourceField.CATEGORY.propertyName(), ResourceCategory.PLATFORM
+ .name()));
+ }
+ });
}
protected void loadMetricsForResource(Resource resource, final Record record) {
@@ -330,6 +332,7 @@ public class PlatformSummaryPortlet extends LocatableListGrid implements Portlet
this.property = property;
}
+ @SuppressWarnings("unused")
public String getProperty() {
return property;
}
@@ -344,6 +347,7 @@ public class PlatformSummaryPortlet extends LocatableListGrid implements Portlet
this.property = property;
}
+ @SuppressWarnings("unused")
public String getProperty() {
return property;
}
@@ -358,6 +362,7 @@ public class PlatformSummaryPortlet extends LocatableListGrid implements Portlet
this.property = property;
}
+ @SuppressWarnings("unused")
public String getProperty() {
return property;
}
@@ -369,6 +374,7 @@ public class PlatformSummaryPortlet extends LocatableListGrid implements Portlet
MeasurementDefinition freeSwap, usedSwap, totalSwap;
MeasurementDefinition idleCpu, systemCpu, userCpu, waitCpu;
+ @SuppressWarnings("unused")
MeasurementDefinition[] definitions = new MeasurementDefinition[] { freeMemory, usedMemory, totalMemory,
freeSwap, usedSwap, totalSwap, idleCpu, systemCpu, userCpu, waitCpu };
commit 8768b15bed6ba114ba094b9661eda7d79b338b01
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Mon Aug 29 15:57:14 2011 -0400
[BZ 734092 - 'Discovery Queue' portlet refresh is not working on dashboard]
Fix the refresh method for AD portlet
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/inventory/queue/AutodiscoveryPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/inventory/queue/AutodiscoveryPortlet.java
index 9ff9d84..1a63686 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/inventory/queue/AutodiscoveryPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/inventory/queue/AutodiscoveryPortlet.java
@@ -215,10 +215,7 @@ public class AutodiscoveryPortlet extends ResourceAutodiscoveryView implements C
@Override
public void refresh() {
if (!isRefreshing()) {
- if (null != dataSource) {
- dataSource.invalidateCache();
- }
- markForRedraw();
+ super.refresh();
}
}
}
commit 5d9aa72083fc7e364735f26cf22c8995293b2838
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Mon Aug 29 15:36:45 2011 -0400
[BZ 734034 - Saved search name should be removed from search bar after user deletes it]
fix mistaken == comparison on Integer objects
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java
index 1a99b85..d5ab23a 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java
@@ -89,7 +89,7 @@ public class FlexSearchBar extends AbstractSearchBar {
private final PopupPanel savedSearchesPanel = new PopupPanel(true);
private SavedSearchGrid savedSearchesGrid;
- private Integer currentSearchId = 0;
+ private int currentSearchId = 0;
private SearchSubsystem searchSubsystem;
private String defaultSearchText;
@@ -271,7 +271,7 @@ public class FlexSearchBar extends AbstractSearchBar {
starImage.setUrl(STAR_OFF_URL);
} else {
// NOTE: currently do not support updated a saved search pattern
- if (currentSearchId == 0) {
+ if (0 == currentSearchId) {
String pattern = autoCompletePatternField.getText();
createSavedSearch(name, pattern);
} else if (nameJustUpdated) {
commit d2b1f45803c91eec3a8eb962d36e8b1ca649609d
Author: John Sanda <jsanda(a)redhat.com>
Date: Mon Aug 29 14:33:18 2011 -0400
Package sample/demo scripts with CLI
diff --git a/etc/cli-scripts/drift.js b/etc/cli-scripts/drift.js
deleted file mode 100644
index 5a1e6e0a..0000000
--- a/etc/cli-scripts/drift.js
+++ /dev/null
@@ -1,164 +0,0 @@
-// This script has a dependency on rhq/etc/cl-scripts/util.js. The following
-// command needs to be run in order to load the functions in util.js:
-//
-// exec -f /path/to/rhq/etc/cli-scripts/util.js
-//
-// Then the same exec command can be run to load functions in this script.
-
-function createSnapshot(rid, cname) {
- var config = findDriftConfig(rid, function(c) { return cname.equals(c.name) });
-
- var criteria = GenericDriftChangeSetCriteria();
- criteria.addFilterResourceId(rid);
- criteria.addFilterDriftConfigurationId(config.id);
-
- if (arguments.length > 2) {
- var filters = arguments[2];
- for (key in filters) {
- criteria['addFilter' + key[0].toUpperCase() + key.substring(1)](filters[key]);
- }
- }
-
- return DriftManager.createSnapshot(criteria);
-}
-
-function findDriftConfig(rid, filter) {
- var criteria = ResourceCriteria();
- criteria.addFilterId(rid);
- criteria.fetchDriftConfigurations(true);
-
- var resources = ResourceManager.findResourcesByCriteria(criteria);
- var resource = resources.get(0);
-
- return find(resource.driftConfigurations, function(config) {
- return filter(DriftConfiguration(config));
- });
-}
-
-function diff(s1, s2) {
- var theDiff = s1.diff(s2);
-
- if (arguments.length > 2) {
- var path = arguments[2];
-
- if (theDiff.elementsInConflict.size() == 0) {
- // If the snapshot diff reports no files in conflict, then there
- // is no need to call the server to perform the file diff. We can
- // instead return quickly.
- println("There are no differences to report");
- return "";
- }
-
- var pathFilter = function(entry) { return entry.path == path; };
- var e1 = find(s1.entries, pathFilter);
- var e2 = find(s2.entries, pathFilter);
-
- var fileDiff = DriftManager.generateUnifiedDiff(e1, e2);
- foreach(fileDiff.diff, println);
- return "";
- }
-
- function printEntry(entry) {
- println(entry.newDriftFile.hashId + '\t' + entry.path);
- }
-
- function report(header, elements) {
- println(header + ':');
- foreach(elements, printEntry);
- println('\n');
- }
-
- report('elements in conflict', theDiff.elementsInConflict);
- report('elements not in left', theDiff.elementsNotInLeft);
- report('elements not in right', theDiff.elementsNotInRight);
-}
-
-function fetchHistory(rid, configName, path) {
- function History() {
- var entries = [];
-
- this.echo = function(msg) {println(msg);}
-
- function findDrift(version) {
- return find(entries, function(drift) {
- return drift.changeSet.version == version
- });
- }
-
-
- var generate = function() {
- entries = [];
- var criteria = GenericDriftCriteria();
- criteria.addFilterResourceIds([rid]);
- criteria.fetchChangeSet(true);
- criteria.addFilterPath(path);
-
- var drifts = DriftManager.findDriftsByCriteria(criteria);
- foreach(drifts, function(drift) {
- if (drift.changeSet.driftConfiguration.name == configName &&
- drift.path == path) {
- entries.push(drift);
- }
- });
-
- entries.sort(function(d1, d2) {
- return d1.changeSet.version <= d2.changeSet.version
- });
- }
-
- this.list = function() {
- var format = java.text.DateFormat.getDateTimeInstance();
- println(path + "\n-----------------------------------");
- foreach(entries, function(drift) {
- println(drift.changeSet.version + "\t" + format.format(drift.ctime));
- });
- }
-
- this.view = function(version) {
- var drift = findDrift(version);
- if (drift == null) {
- return "Could not find version " + version;
- }
- return DriftManager.getDriftFileBits(drift.newDriftFile.hashId);
- }
-
- this.compare = function(v1, v2) {
- var d1 = findDrift(v1);
- if (d1 == null) {
- return "Could not find version " + v1;
- }
- var d2 = findDrift(v2);
- if (d2 == null) {
- return "Could not find version " + v2;
- }
- var fileDiff = DriftManager.generateUnifiedDiff(d1, d2);
- foreach(fileDiff.diff, println);
- }
-
- generate();
- }
-
- return new History();
-
-/*
- var criteria = GenericDriftCriteria();
- criteria.addFilterResourceIds([rid]);
- criteria.fetchChangeSet(true);
- criteria.addFilterPath(path);
-
- var drifts = DriftManager.findDriftsByCriteria(criteria);
- var history = [];
- foreach(drifts, function(drift) {
- if (drift.changeSet.driftConfiguration.name == configName &&
- drift.path == path) {
- history.push(drift);
- }
- });
-
- history.sort(function(d1, d2) {
- return d1.changeSet.version <= d2.changeSet.version
- });
-
- return history;
-*/
-}
diff --git a/etc/cli-scripts/measurement_utils.js b/etc/cli-scripts/measurement_utils.js
deleted file mode 100644
index 261aa8e..0000000
--- a/etc/cli-scripts/measurement_utils.js
+++ /dev/null
@@ -1,134 +0,0 @@
-testUpdates = {
- context: 'Resource',
- id: 10033,
- schedules: {
- 'Late Collections': interval(15, minutes),
- 'Failed Collections per Minute': interval(15, minutes),
- 'Currently Schedule Measurements': 'enabled'
- }
-}
-
-testGroupUpdates = {
- context: 'Group',
- id: 10031,
- schedules: {
- 'Used Swap Space': 'disabled',
- 'Total Memory': interval(3, minutes)
- }
-}
-
-/**
- * MeasurementModule is a class that provides properties and methods for working with
- * measurements.
- */
-function MeasurementModule() {
-
- /**
- * Performs the actual updates, calling MeasurementScheduleManager.
- *
- * @param updates
- * @param criteria
- * @param enableSchedules
- * @param disableSchedules
- * @param updateSchedules
- */
- function doScheduleUpdates(updates, criteria, enableSchedules, disableSchedules, updateSchedules) {
- criteria.fetchDefinition(true);
- var schedules = MeasurementScheduleManager.findSchedulesByCriteria(criteria);
-
- foreach(schedules, function (schedule) {
- var measurementName = schedule.definition.displayName;
-
- if (updates.schedules[measurementName]) {
- switch (updates.schedules[measurementName]) {
- case 'enabled':
- MeasurementScheduleManager[enableSchedules](updates.id, [schedule.definition.id]);
- break;
- case 'disabled':
- MeasurementScheduleManager[disableSchedules](updates.id,
- [schedule.definition.id]);
- break;
- default:
- var interval = updates.schedules[measurementName];
- MeasurementScheduleManager[updateSchedules](updates.id,
- [schedule.definition.id], interval);
- }
- }
- });
-
- }
-
- /**
- * Intended for use with the interval method.
- */
- this.time = {
- seconds: 1000,
- minutes: 60 * seconds,
- hours: 60 * minutes
- }
-
- /**
- * A helper method that calculates a shedule's interval in milliseconds
- * @param num
- * @param time
- */
- this.interval = function (num, time) {
- return num * time;
- }
-
- /**
- * Updates the metric schedule as specified in the updates object. The object is expected
- * to contain three properties or keys. The first of these required keys is <context>.
- * Accepted values are the strings 'Resource' or 'Group'.
- *
- * The next required key is <id>, and its values is expected to be an integer. The
- * interpretation of its values is dependent on the value of <context>. When the value of
- * <context> is 'Resource', then <id> is treated as a resource id. If the value of
- * <context> is 'Group', then <id> is treated as a compatible group id.
- *
- * The third required key is <schedules>, and it a nested object that specifies the
- * schedules to be updated. The keys of <schedules> are the measurement display names.
- * Expected values are 'enabled', 'disabled', or an integer which specifies the
- * collection interval in milliseconds.
- *
- * Here is an example to illustrate what the updates object should look like:
- *
- * resourceSchedulesUpdates = {
- * context: 'Resource',
- * id: 123,
- * schedules: {
- * 'Measurement A': 'enabled',
- * 'Measurement B': 'disabled,
- * 'Measurement C': interval(20, time.minutes)
- * }
- * }
- *
- * @param updates The updates to perform
- */
- this.updateSchedules = function (updates) {
- if (!updates.id) {
- throw '<id> is a required property';
- }
-
- if (!updates.schedules) {
- throw '<schedules> is a required property';
- }
-
- if (updates.context == 'Resource') {
- var criteria = MeasurementScheduleCriteria();
- criteria.addFilterResourceId(updates.id);
- doScheduleUpdates(updates, criteria, 'enableSchedulesForResource',
- 'disableSchedulesForResource', 'updateSchedulesForResource');
- }
- else if (updates.context == 'Group') {
- var criteria = MeasurementScheduleCriteria();
- criteria.addFilterResourceGroupId(updates.id);
- doScheduleUpdates(updates, criteria, 'enableSchedulesForCompatibleGroup',
- 'disableSchedulesForCompatibleGroup', 'updateSchedulesForCompatibleGroup');
- }
- else {
- throw "Unrecognized value for context: " + updates.context + " - expected either " +
- "<Resource> or <Group>";
- }
- }
-}
diff --git a/etc/cli-scripts/util.js b/etc/cli-scripts/util.js
deleted file mode 100644
index e0bb219..0000000
--- a/etc/cli-scripts/util.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * If obj is a JS array or a java.util.Collection, each element is passed to
- * the callback function. If obj is a java.util.Map, each map entry is passed
- * to the callback function as a key/value pair. If obj is none of the
- * aforementioned types, it is treated as a generic object and each of its
- * properties is passed to the callback function as a name/value pair.
- */
-function foreach(obj, fn) {
- if (obj instanceof Array) {
- for (i in obj) {
- fn(obj[i]);
- }
- }
- else if (obj instanceof java.util.Collection) {
- var iterator = obj.iterator();
- while (iterator.hasNext()) {
- fn(iterator.next());
- }
- }
- else if (obj instanceof java.util.Map) {
- var iterator = obj.entrySet().iterator()
- while (iterator.hasNext()) {
- var entry = iterator.next();
- fn(entry.key, entry.value);
- }
- }
- else { // assume we have a generic object
- for (i in obj) {
- fn(i, obj[i]);
- }
- }
-}
-
-/**
- * Iterates over obj similar to foreach. fn should be a predicate that evaluates
- * to true or false. The first match that is found is returned.
- */
-function find(obj, fn) {
- if (obj instanceof Array) {
- for (i in obj) {
- if (fn(obj[i])) {
- return obj[i]
- }
- }
- }
- else if (obj instanceof java.util.Collection) {
- var iterator = obj.iterator();
- while (iterator.hasNext()) {
- var next = iterator.next();
- if (fn(next)) {
- return next;
- }
- }
- }
- else if (obj instanceof java.util.Map) {
- var iterator = obj.entrySet().iterator();
- while (iterator.hasNext()) {
- var entry = iterator.next();
- if (fn(entry.key, entry.value)) {
- return {key: entry.key, value: entry.value};
- }
- }
- }
- else {
- for (i in obj) {
- if (fn(i, obj[i])) {
- return {key: i, value: obj[i]};
- }
- }
- }
- return null;
-}
-
-/**
- * Iterates over obj similar to foreach. fn should be a predicate that evaluates
- * to true or false. All of the matches are returned in a java.util.List.
- */
-function findAll(obj, fn) {
- var matches = java.util.ArrayList();
- if ((obj instanceof Array) || (obj instanceof java.util.Collection)) {
- foreach(obj, function(element) {
- if (fn(element)) {
- matches.add(element);
- }
- });
- }
- else {
- foreach(obj, function(key, value) {
- if (fn(theKey, theValue)) {
- matches.add({key: theKey, value: theValue});
- }
- });
- }
- return matches;
-}
diff --git a/modules/enterprise/remoting/cli/src/main/samples/README.txt b/modules/enterprise/remoting/cli/src/main/samples/README.txt
new file mode 100644
index 0000000..235650a
--- /dev/null
+++ b/modules/enterprise/remoting/cli/src/main/samples/README.txt
@@ -0,0 +1,24 @@
+Overview
+---------
+The scripts located in the samples directory are intended for demonstration
+purposes to illustrate functionality and features in the CLI. These scripts
+have not undergone the same level of testing as other parts of the code base.
+As such, the quality may not meet RHQ standards in some cases. Please consider
+this when using these scripts for anything other than demonstration or testing.
+
+There may be inter-dependencies between some of the scripts. There is currently
+no mechanism in place to automatically handle script-level dependencies;
+consequently, you need to make sure to run scripts in the correct order. If a
+script has a dependency on other scripts, it will be documented within the
+script itself so that you know which scripts need to be run and in what order.
+
+
+Feedback
+--------
+The CLI is still a relatively new, young feature. We welcome and encourage
+feedback. Please send questions, comments, etc. to
+rhq-users(a)lists.fedorahosted.org or and/or to rhq-devel.lists.fedorahosted.org.
+
+Thanks
+
+RHQ development team
diff --git a/modules/enterprise/remoting/cli/src/main/samples/drift.js b/modules/enterprise/remoting/cli/src/main/samples/drift.js
new file mode 100644
index 0000000..5a1e6e0a
--- /dev/null
+++ b/modules/enterprise/remoting/cli/src/main/samples/drift.js
@@ -0,0 +1,164 @@
+// This script has a dependency on rhq/etc/cl-scripts/util.js. The following
+// command needs to be run in order to load the functions in util.js:
+//
+// exec -f /path/to/rhq/etc/cli-scripts/util.js
+//
+// Then the same exec command can be run to load functions in this script.
+
+function createSnapshot(rid, cname) {
+ var config = findDriftConfig(rid, function(c) { return cname.equals(c.name) });
+
+ var criteria = GenericDriftChangeSetCriteria();
+ criteria.addFilterResourceId(rid);
+ criteria.addFilterDriftConfigurationId(config.id);
+
+ if (arguments.length > 2) {
+ var filters = arguments[2];
+ for (key in filters) {
+ criteria['addFilter' + key[0].toUpperCase() + key.substring(1)](filters[key]);
+ }
+ }
+
+ return DriftManager.createSnapshot(criteria);
+}
+
+function findDriftConfig(rid, filter) {
+ var criteria = ResourceCriteria();
+ criteria.addFilterId(rid);
+ criteria.fetchDriftConfigurations(true);
+
+ var resources = ResourceManager.findResourcesByCriteria(criteria);
+ var resource = resources.get(0);
+
+ return find(resource.driftConfigurations, function(config) {
+ return filter(DriftConfiguration(config));
+ });
+}
+
+function diff(s1, s2) {
+ var theDiff = s1.diff(s2);
+
+ if (arguments.length > 2) {
+ var path = arguments[2];
+
+ if (theDiff.elementsInConflict.size() == 0) {
+ // If the snapshot diff reports no files in conflict, then there
+ // is no need to call the server to perform the file diff. We can
+ // instead return quickly.
+ println("There are no differences to report");
+ return "";
+ }
+
+ var pathFilter = function(entry) { return entry.path == path; };
+ var e1 = find(s1.entries, pathFilter);
+ var e2 = find(s2.entries, pathFilter);
+
+ var fileDiff = DriftManager.generateUnifiedDiff(e1, e2);
+ foreach(fileDiff.diff, println);
+ return "";
+ }
+
+ function printEntry(entry) {
+ println(entry.newDriftFile.hashId + '\t' + entry.path);
+ }
+
+ function report(header, elements) {
+ println(header + ':');
+ foreach(elements, printEntry);
+ println('\n');
+ }
+
+ report('elements in conflict', theDiff.elementsInConflict);
+ report('elements not in left', theDiff.elementsNotInLeft);
+ report('elements not in right', theDiff.elementsNotInRight);
+}
+
+function fetchHistory(rid, configName, path) {
+ function History() {
+ var entries = [];
+
+ this.echo = function(msg) {println(msg);}
+
+ function findDrift(version) {
+ return find(entries, function(drift) {
+ return drift.changeSet.version == version
+ });
+ }
+
+
+ var generate = function() {
+ entries = [];
+ var criteria = GenericDriftCriteria();
+ criteria.addFilterResourceIds([rid]);
+ criteria.fetchChangeSet(true);
+ criteria.addFilterPath(path);
+
+ var drifts = DriftManager.findDriftsByCriteria(criteria);
+ foreach(drifts, function(drift) {
+ if (drift.changeSet.driftConfiguration.name == configName &&
+ drift.path == path) {
+ entries.push(drift);
+ }
+ });
+
+ entries.sort(function(d1, d2) {
+ return d1.changeSet.version <= d2.changeSet.version
+ });
+ }
+
+ this.list = function() {
+ var format = java.text.DateFormat.getDateTimeInstance();
+ println(path + "\n-----------------------------------");
+ foreach(entries, function(drift) {
+ println(drift.changeSet.version + "\t" + format.format(drift.ctime));
+ });
+ }
+
+ this.view = function(version) {
+ var drift = findDrift(version);
+ if (drift == null) {
+ return "Could not find version " + version;
+ }
+ return DriftManager.getDriftFileBits(drift.newDriftFile.hashId);
+ }
+
+ this.compare = function(v1, v2) {
+ var d1 = findDrift(v1);
+ if (d1 == null) {
+ return "Could not find version " + v1;
+ }
+ var d2 = findDrift(v2);
+ if (d2 == null) {
+ return "Could not find version " + v2;
+ }
+ var fileDiff = DriftManager.generateUnifiedDiff(d1, d2);
+ foreach(fileDiff.diff, println);
+ }
+
+ generate();
+ }
+
+ return new History();
+
+/*
+ var criteria = GenericDriftCriteria();
+ criteria.addFilterResourceIds([rid]);
+ criteria.fetchChangeSet(true);
+ criteria.addFilterPath(path);
+
+ var drifts = DriftManager.findDriftsByCriteria(criteria);
+ var history = [];
+ foreach(drifts, function(drift) {
+ if (drift.changeSet.driftConfiguration.name == configName &&
+ drift.path == path) {
+ history.push(drift);
+ }
+ });
+
+ history.sort(function(d1, d2) {
+ return d1.changeSet.version <= d2.changeSet.version
+ });
+
+ return history;
+*/
+}
diff --git a/modules/enterprise/remoting/cli/src/main/samples/measurement_utils.js b/modules/enterprise/remoting/cli/src/main/samples/measurement_utils.js
new file mode 100644
index 0000000..261aa8e
--- /dev/null
+++ b/modules/enterprise/remoting/cli/src/main/samples/measurement_utils.js
@@ -0,0 +1,134 @@
+testUpdates = {
+ context: 'Resource',
+ id: 10033,
+ schedules: {
+ 'Late Collections': interval(15, minutes),
+ 'Failed Collections per Minute': interval(15, minutes),
+ 'Currently Schedule Measurements': 'enabled'
+ }
+}
+
+testGroupUpdates = {
+ context: 'Group',
+ id: 10031,
+ schedules: {
+ 'Used Swap Space': 'disabled',
+ 'Total Memory': interval(3, minutes)
+ }
+}
+
+/**
+ * MeasurementModule is a class that provides properties and methods for working with
+ * measurements.
+ */
+function MeasurementModule() {
+
+ /**
+ * Performs the actual updates, calling MeasurementScheduleManager.
+ *
+ * @param updates
+ * @param criteria
+ * @param enableSchedules
+ * @param disableSchedules
+ * @param updateSchedules
+ */
+ function doScheduleUpdates(updates, criteria, enableSchedules, disableSchedules, updateSchedules) {
+ criteria.fetchDefinition(true);
+ var schedules = MeasurementScheduleManager.findSchedulesByCriteria(criteria);
+
+ foreach(schedules, function (schedule) {
+ var measurementName = schedule.definition.displayName;
+
+ if (updates.schedules[measurementName]) {
+ switch (updates.schedules[measurementName]) {
+ case 'enabled':
+ MeasurementScheduleManager[enableSchedules](updates.id, [schedule.definition.id]);
+ break;
+ case 'disabled':
+ MeasurementScheduleManager[disableSchedules](updates.id,
+ [schedule.definition.id]);
+ break;
+ default:
+ var interval = updates.schedules[measurementName];
+ MeasurementScheduleManager[updateSchedules](updates.id,
+ [schedule.definition.id], interval);
+ }
+ }
+ });
+
+ }
+
+ /**
+ * Intended for use with the interval method.
+ */
+ this.time = {
+ seconds: 1000,
+ minutes: 60 * seconds,
+ hours: 60 * minutes
+ }
+
+ /**
+ * A helper method that calculates a shedule's interval in milliseconds
+ * @param num
+ * @param time
+ */
+ this.interval = function (num, time) {
+ return num * time;
+ }
+
+ /**
+ * Updates the metric schedule as specified in the updates object. The object is expected
+ * to contain three properties or keys. The first of these required keys is <context>.
+ * Accepted values are the strings 'Resource' or 'Group'.
+ *
+ * The next required key is <id>, and its values is expected to be an integer. The
+ * interpretation of its values is dependent on the value of <context>. When the value of
+ * <context> is 'Resource', then <id> is treated as a resource id. If the value of
+ * <context> is 'Group', then <id> is treated as a compatible group id.
+ *
+ * The third required key is <schedules>, and it a nested object that specifies the
+ * schedules to be updated. The keys of <schedules> are the measurement display names.
+ * Expected values are 'enabled', 'disabled', or an integer which specifies the
+ * collection interval in milliseconds.
+ *
+ * Here is an example to illustrate what the updates object should look like:
+ *
+ * resourceSchedulesUpdates = {
+ * context: 'Resource',
+ * id: 123,
+ * schedules: {
+ * 'Measurement A': 'enabled',
+ * 'Measurement B': 'disabled,
+ * 'Measurement C': interval(20, time.minutes)
+ * }
+ * }
+ *
+ * @param updates The updates to perform
+ */
+ this.updateSchedules = function (updates) {
+ if (!updates.id) {
+ throw '<id> is a required property';
+ }
+
+ if (!updates.schedules) {
+ throw '<schedules> is a required property';
+ }
+
+ if (updates.context == 'Resource') {
+ var criteria = MeasurementScheduleCriteria();
+ criteria.addFilterResourceId(updates.id);
+ doScheduleUpdates(updates, criteria, 'enableSchedulesForResource',
+ 'disableSchedulesForResource', 'updateSchedulesForResource');
+ }
+ else if (updates.context == 'Group') {
+ var criteria = MeasurementScheduleCriteria();
+ criteria.addFilterResourceGroupId(updates.id);
+ doScheduleUpdates(updates, criteria, 'enableSchedulesForCompatibleGroup',
+ 'disableSchedulesForCompatibleGroup', 'updateSchedulesForCompatibleGroup');
+ }
+ else {
+ throw "Unrecognized value for context: " + updates.context + " - expected either " +
+ "<Resource> or <Group>";
+ }
+ }
+}
diff --git a/modules/enterprise/remoting/cli/src/main/samples/util.js b/modules/enterprise/remoting/cli/src/main/samples/util.js
new file mode 100644
index 0000000..e0bb219
--- /dev/null
+++ b/modules/enterprise/remoting/cli/src/main/samples/util.js
@@ -0,0 +1,95 @@
+/**
+ * If obj is a JS array or a java.util.Collection, each element is passed to
+ * the callback function. If obj is a java.util.Map, each map entry is passed
+ * to the callback function as a key/value pair. If obj is none of the
+ * aforementioned types, it is treated as a generic object and each of its
+ * properties is passed to the callback function as a name/value pair.
+ */
+function foreach(obj, fn) {
+ if (obj instanceof Array) {
+ for (i in obj) {
+ fn(obj[i]);
+ }
+ }
+ else if (obj instanceof java.util.Collection) {
+ var iterator = obj.iterator();
+ while (iterator.hasNext()) {
+ fn(iterator.next());
+ }
+ }
+ else if (obj instanceof java.util.Map) {
+ var iterator = obj.entrySet().iterator()
+ while (iterator.hasNext()) {
+ var entry = iterator.next();
+ fn(entry.key, entry.value);
+ }
+ }
+ else { // assume we have a generic object
+ for (i in obj) {
+ fn(i, obj[i]);
+ }
+ }
+}
+
+/**
+ * Iterates over obj similar to foreach. fn should be a predicate that evaluates
+ * to true or false. The first match that is found is returned.
+ */
+function find(obj, fn) {
+ if (obj instanceof Array) {
+ for (i in obj) {
+ if (fn(obj[i])) {
+ return obj[i]
+ }
+ }
+ }
+ else if (obj instanceof java.util.Collection) {
+ var iterator = obj.iterator();
+ while (iterator.hasNext()) {
+ var next = iterator.next();
+ if (fn(next)) {
+ return next;
+ }
+ }
+ }
+ else if (obj instanceof java.util.Map) {
+ var iterator = obj.entrySet().iterator();
+ while (iterator.hasNext()) {
+ var entry = iterator.next();
+ if (fn(entry.key, entry.value)) {
+ return {key: entry.key, value: entry.value};
+ }
+ }
+ }
+ else {
+ for (i in obj) {
+ if (fn(i, obj[i])) {
+ return {key: i, value: obj[i]};
+ }
+ }
+ }
+ return null;
+}
+
+/**
+ * Iterates over obj similar to foreach. fn should be a predicate that evaluates
+ * to true or false. All of the matches are returned in a java.util.List.
+ */
+function findAll(obj, fn) {
+ var matches = java.util.ArrayList();
+ if ((obj instanceof Array) || (obj instanceof java.util.Collection)) {
+ foreach(obj, function(element) {
+ if (fn(element)) {
+ matches.add(element);
+ }
+ });
+ }
+ else {
+ foreach(obj, function(key, value) {
+ if (fn(theKey, theValue)) {
+ matches.add({key: theKey, value: theValue});
+ }
+ });
+ }
+ return matches;
+}
diff --git a/modules/enterprise/remoting/cli/src/main/scripts/rhq-client.build.xml b/modules/enterprise/remoting/cli/src/main/scripts/rhq-client.build.xml
index baf99e5..803afe6 100644
--- a/modules/enterprise/remoting/cli/src/main/scripts/rhq-client.build.xml
+++ b/modules/enterprise/remoting/cli/src/main/scripts/rhq-client.build.xml
@@ -8,6 +8,7 @@
<property name="conf.home" location="${output.dir}/conf" />
<property name="jboss.home" location="${basedir}/target/jboss-${jboss.version}" />
<property name="lib.home" location="${output.dir}/lib" />
+ <property name="samples.home" location="${output.dir}/samples"/>
<target name="prepare-dist">
<condition property="exclude.cli.jar" value="true">
@@ -20,6 +21,7 @@
<antcall target="prepare-bin-dir" />
<antcall target="prepare-conf-dir" />
<antcall target="prepare-lib-dir" />
+ <antcall target="prepare-samples-dir" />
</target>
<target name="prepare-bin-dir">
@@ -68,5 +70,14 @@
<copy file="${settings.localRepository}/hibernate-annotations/hibernate-annotations/${hibernate-annotations.version}/hibernate-annotations-${hibernate-annotations.version}.jar" todir="${lib.home}" verbose="true" />
</target>
+ <target name="prepare-samples-dir">
+ <echo>*** Creating samples dir...</echo>
+ <mkdir dir="${samples.home}" />
+ <echo>*** Populating sample scripts...</echo>
+ <copy verbose="true" toDir="${samples.home}">
+ <fileset dir="${basedir}/src/main/samples/" includes="*.*" />
+ </copy>
+ </target>
+
</project>
commit 94fe685ea78d43c0c5d24204662f07816b4c3265
Author: John Sanda <jsanda(a)redhat.com>
Date: Mon Aug 29 13:13:31 2011 -0400
Enable drift configurations by default
diff --git a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/DriftMetadataParser.java b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/DriftMetadataParser.java
index c7c0a12..4d95331 100644
--- a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/DriftMetadataParser.java
+++ b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/DriftMetadataParser.java
@@ -56,7 +56,8 @@ public class DriftMetadataParser {
}
private void initEnabled(ConfigurationTemplate template) {
- template.getConfiguration().put(new PropertySimple(DriftConfigurationDefinition.PROP_ENABLED, false));
+ template.getConfiguration().put(new PropertySimple(DriftConfigurationDefinition.PROP_ENABLED,
+ DriftConfigurationDefinition.DEFAULT_ENABLED));
}
private void initName(DriftDescriptor descriptor, ConfigurationTemplate template) {
diff --git a/modules/core/client-api/src/test/java/org/rhq/core/clientapi/agent/metadata/test/PluginMetadataParserTest.java b/modules/core/client-api/src/test/java/org/rhq/core/clientapi/agent/metadata/test/PluginMetadataParserTest.java
index 572bb10..7adf6fa 100644
--- a/modules/core/client-api/src/test/java/org/rhq/core/clientapi/agent/metadata/test/PluginMetadataParserTest.java
+++ b/modules/core/client-api/src/test/java/org/rhq/core/clientapi/agent/metadata/test/PluginMetadataParserTest.java
@@ -22,6 +22,7 @@ import static org.rhq.core.clientapi.shared.PluginDescriptorUtil.toPluginDescrip
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertTrue;
import java.util.HashMap;
import java.util.List;
@@ -823,7 +824,7 @@ public class PluginMetadataParserTest {
"The value is wrong for the <name> property that represents the drift configuration name");
assertNotNull(enabled, "Expected to find simple property <enabled> for the drift configuration");
- assertFalse(enabled.getBooleanValue(), "The <enabled> property should be set to a default value of false");
+ assertTrue(enabled.getBooleanValue(), "The <enabled> property should be set to a default value of true");
test.assertDriftTemplate(driftTemplate);
}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftConfigurationDefinition.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftConfigurationDefinition.java
index dfdc54a..e669a9a 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftConfigurationDefinition.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftConfigurationDefinition.java
@@ -62,7 +62,7 @@ public class DriftConfigurationDefinition implements Serializable {
// Thus, we only allow config names to only include spaces or "." or "-" or alphanumeric or "_" characters.
public static final String PROP_NAME_REGEX_PATTERN = "[ \\.\\-\\w]+";
- public static final boolean DEFAULT_ENABLED = false;
+ public static final boolean DEFAULT_ENABLED = true;
public static final long DEFAULT_INTERVAL = 1800L;
/**
commit 03ebe5d1e03ac836c8618df6761f248d3ef364a8
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Mon Aug 29 12:48:40 2011 -0400
[BZ 733144 - links to non-default subtabs don't work]
The problem occurred, I believe, when you navigated from resource A,
default tab/subtab to resource A, non-default tab/subtab.
An easy example of this would be 1) Favorites Button->resources->A,
bringing you to A->Summary-Activity and then 2) Click on the alert def
name for a recent alert in the alerts portlet.
This scenario manged to generate a smartgwt tabbing event that did not play
well with others. As a response, I've expanded the net ignoring certain
smatgwt tabbing events to catch this as well. Tree/Tab/Subtab
nav should be well exercised (tree/context menu/tabs/subtabs) to ensure
thia change solves the problem without causing others.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/AbstractTwoLevelTabSetView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/AbstractTwoLevelTabSetView.java
index e580b9c..cade8fe 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/AbstractTwoLevelTabSetView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/AbstractTwoLevelTabSetView.java
@@ -201,15 +201,20 @@ public abstract class AbstractTwoLevelTabSetView<T, U extends Layout> extends Lo
this.tabName = null;
}
+ // We are either navigating to a new detail view (new entity: resource or group) or switching tabs
+ // for the current entity. Changing entities may change the available tabs as the same tab set may not
+ // be supported by the new entity's type. To maintain a valid tab selection for the TabSet, smartgwt will
+ // generate events if the current tab is removed (which can happen say, when navigating from a resource of
+ // type A to a resource of type B). We need to ignore tab selection events generated by smartgwt because we
+ // already perform explicit tab management at a higher level. To do this we explicitly set events to be be
+ // ignored. We re-enable the event handling when safe. (see selectTab()). Similarly, even when navigating
+ // within the same entity, when changing tabs we need to suppress smartgwt generated tab events (when
+ // calling TabSet.selectTab). That event can conflict with our subtab management, navigating the user
+ // to the default subtab for the tab and overriding our explicit navigation to a non-default subtab.
+ this.tabSet.setIgnoreSelectEvents(true);
+
if (getSelectedItemId() == null || getSelectedItemId() != id) {
// A different entity (resource or group), load it and try to navigate to the same tabs if possible.
- // Changing entities may change the available tabs as the same tab set may not be supported by the
- // new entity's type. To maintain a valid tab selection for the TabSet, smartgwt will generate an
- // events if the current tab is removed (which can happen say, when navigating from a resource of type A
- // to a resource of type B). We need to ignore tab selection events generated by smartgwt because we
- // handle this at a higher level. To do this we explicitly set events to be be ignored. We re-enable
- // the event handling when safe. (see selectTab()).
- this.tabSet.setIgnoreSelectEvents(true);
this.loadSelectedItem(id, viewPath);
} else {
@@ -261,7 +266,8 @@ public abstract class AbstractTwoLevelTabSetView<T, U extends Layout> extends Lo
// the requested tab/subtab are valid, continue with this path
- // select the tab and subTab (no event fired, we're already dealing with the correct path)
+ // select the tab and subTab (we are suppressing event handling, so the smartgwt fired event is ignored,
+ // alowing us to perform the desired subtab management below)
this.tabSet.selectTab(tab);
// this call adds the subtab canvas as a member of the subtablayout
// don't show the subtab canvas until after we perform any necessary rendering.
commit 0f2a13bb458c38ad5acc6bd53224b44318f7be76
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Mon Aug 29 11:59:22 2011 -0400
we have create-child and delete-child icons - use those rather than re-use the inventory icons
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/PermissionsEditor.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/PermissionsEditor.java
index c2b33eb..0bfd413 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/PermissionsEditor.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/PermissionsEditor.java
@@ -249,13 +249,13 @@ public class PermissionsEditor extends LocatableVStack {
records.add(record);
record = createResourcePermissionRecord(MSG.view_adminRoles_permissions_perm_createChildResources(),
- "subsystems/inventory/Inventory", Permission.VIEW_RESOURCE, MSG
+ "subsystems/inventory/CreateChild", Permission.VIEW_RESOURCE, MSG
.view_adminRoles_permissions_permReadDesc_createChildResources(), Permission.CREATE_CHILD_RESOURCES,
MSG.view_adminRoles_permissions_permWriteDesc_createChildResources());
records.add(record);
record = createResourcePermissionRecord(MSG.view_adminRoles_permissions_perm_deleteChildResources(),
- "subsystems/inventory/Inventory", Permission.VIEW_RESOURCE, MSG
+ "subsystems/inventory/DeleteChild", Permission.VIEW_RESOURCE, MSG
.view_adminRoles_permissions_permReadDesc_deleteChildResources(), Permission.DELETE_RESOURCE, MSG
.view_adminRoles_permissions_permWriteDesc_deleteChildResources());
records.add(record);
commit a3d6358f38c90cc9de130be62723d343aec5f6f6
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Mon Aug 29 11:11:33 2011 -0400
Disabling 'plugindoc' plugin which generated DocBook and Confluence docs off the plugin.xmls. Causing brew dependency issues and doesn't appear to be used.
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index 15ec096..61c6295 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -51,7 +51,8 @@
<module>client-api</module>
<module>plugin-container</module>
<module>gui</module>
- <module>plugindoc</module>
+ <!-- spinder 8/29/11: disabling plugindoc for DocBook and Confluence as they don't seem to be used and causing brew build issues.
+ <module>plugindoc</module>-->
<module>plugin-validator</module>
</modules>
</profile>
commit f884418fb6f62c1538e6151ad0d6c7a547ec3ae6
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Mon Aug 29 01:23:56 2011 -0400
Revert "[maven-release-plugin] prepare for next development iteration"
This reverts commit 136299719cd0ee3914c4fbd49b87322e945641a7 and removes -SNAPSHOT from poms.
diff --git a/modules/common/ant-bundle/pom.xml b/modules/common/ant-bundle/pom.xml
index fdc4fa2..c7a482f 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/common/drift/pom.xml b/modules/common/drift/pom.xml
index 46d9338..80e6d65 100644
--- a/modules/common/drift/pom.xml
+++ b/modules/common/drift/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-common-parent</artifactId>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/common/filetemplate-bundle/pom.xml b/modules/common/filetemplate-bundle/pom.xml
index 0fd63c9..57fa2b7 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/common/jboss-as/pom.xml b/modules/common/jboss-as/pom.xml
index 4ab388f..4c3474f 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/common/pom.xml b/modules/common/pom.xml
index 0b58cbf..47c5535 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/core/client-api/pom.xml b/modules/core/client-api/pom.xml
index c0c4940..f90deb3 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/comm-api/pom.xml b/modules/core/comm-api/pom.xml
index 95c5b16..4bdd540 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index 1d39d80..335dff6 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -3,7 +3,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-parent</artifactId>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-dbutils</artifactId>
diff --git a/modules/core/domain/pom.xml b/modules/core/domain/pom.xml
index fd4195a..9cd0ba2 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/gui/pom.xml b/modules/core/gui/pom.xml
index 8966e8e..914a15d 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/native-system/pom.xml b/modules/core/native-system/pom.xml
index 7ac5cb3..a47bf81 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
diff --git a/modules/core/plugin-api/pom.xml b/modules/core/plugin-api/pom.xml
index c2f870a..a9876b9 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/plugin-container/pom.xml b/modules/core/plugin-container/pom.xml
index 50314a1..c8be3c2 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/plugin-validator/pom.xml b/modules/core/plugin-validator/pom.xml
index 904fa8d..1f1a904 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/plugindoc/pom.xml b/modules/core/plugindoc/pom.xml
index c1378f2..831f39f 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index 87f469f..15ec096 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/core/util/pom.xml b/modules/core/util/pom.xml
index 6a85887..5d17ff7 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/agent/pom.xml b/modules/enterprise/agent/pom.xml
index bf9e1b9..2d38f9f 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/agentupdate/pom.xml b/modules/enterprise/agentupdate/pom.xml
index 6c48c57..485a79e 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/binding/pom.xml b/modules/enterprise/binding/pom.xml
index 1c7a4e8..71bac05 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-script-bindings</artifactId>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 a53bd38..a895109 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 24cffbb..23b19cb 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 333a84e..80b21bb 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 90891ce..9eb9c9c 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/gui/coregui/pom.xml b/modules/enterprise/gui/coregui/pom.xml
index ed14e57..9cd93ba 100644
--- a/modules/enterprise/gui/coregui/pom.xml
+++ b/modules/enterprise/gui/coregui/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 ff90644..8fdc07e 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/gui/pom.xml b/modules/enterprise/gui/pom.xml
index f5dc25c..3e0b1c7 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 bf97c14..286b89b 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/pom.xml b/modules/enterprise/pom.xml
index 47f17f7..da9d486 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/remoting/cli/pom.xml b/modules/enterprise/remoting/cli/pom.xml
index c973f10..01c9861 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 866bf7c..ada9309 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 06afc4b..5da2901 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/remoting/pom.xml b/modules/enterprise/remoting/pom.xml
index 9804786..265fcfa 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/remoting/webservices/pom.xml b/modules/enterprise/remoting/webservices/pom.xml
index aded802..02ce1cc 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 e4eee22..15a32c1 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-server-client-api</artifactId>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 bd7e2a1..c7a52f0 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/container/pom.xml b/modules/enterprise/server/container/pom.xml
index f83ba59..e45f641 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/ear/pom.xml b/modules/enterprise/server/ear/pom.xml
index ec1bc03..68eeb76 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/jar/pom.xml b/modules/enterprise/server/jar/pom.xml
index c84f12b..8e783e0 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 bd72b8f..7cbd947 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>alert-cli</artifactId>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 e9ce7d7..3e2d017 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq.server</groupId>
<artifactId>alert-email</artifactId>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 42b72e3..ab8d837 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-irc</artifactId>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 4dbc87a..5b8e1bd 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-log4j</artifactId>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 a4b0ae9..44da984 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-microblog</artifactId>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 b761ddc..02fcb76 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-mobicents</artifactId>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 8c9c637..9eb3e7c 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-operations</artifactId>
<packaging>jar</packaging>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 3557ea3..021dc8a 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-roles</artifactId>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<name>RHQ Enterprise Server Roles Alert Plugin</name>
diff --git a/modules/enterprise/server/plugins/alert-snmp/pom.xml b/modules/enterprise/server/plugins/alert-snmp/pom.xml
index 7a7de9b..03b1aeb 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-snmp</artifactId>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 6ce4a3e..e566893 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-subject</artifactId>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 8e9915f..37c3b3b 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/cobbler/pom.xml b/modules/enterprise/server/plugins/cobbler/pom.xml
index f1965e9..019ae28 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>rhq-serverplugin-cobbler</artifactId>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 3727fe4..95f29fa 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/drift-rhq/pom.xml b/modules/enterprise/server/plugins/drift-rhq/pom.xml
index 8f58499..b287def 100644
--- a/modules/enterprise/server/plugins/drift-rhq/pom.xml
+++ b/modules/enterprise/server/plugins/drift-rhq/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 d4602dd..2dfde0e 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 520b48c..c9beef5 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>groovy-script-server-plugin</artifactId>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 669b320..6701d43 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 8b6b86e..5168456 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>packagetype-cli</artifactId>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 6dae125..64b3881 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 8d19430..8ef3970 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/plugins/pom.xml b/modules/enterprise/server/plugins/pom.xml
index 2e0edd8..91cdcf6 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 bf392a9..226e1dd 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 7ae2e9e..a657f95 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 7eec4fc..455279f 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 6de1494..3b9f1ef 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/safe-invoker/pom.xml b/modules/enterprise/server/safe-invoker/pom.xml
index a7fd5c0..434fa4d 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 7836bc0..9be1e89 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/sars/pom.xml b/modules/enterprise/server/sars/pom.xml
index db95944..1f928c1 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 b7b5226..ebbe06a 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/helpers/bundleGen/pom.xml b/modules/helpers/bundleGen/pom.xml
index a7bb830..b5f2ebb 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq.helpers</groupId>
<artifactId>bundleGen</artifactId>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<build>
<plugins>
diff --git a/modules/helpers/perftest-support/pom.xml b/modules/helpers/perftest-support/pom.xml
index c0e8820..4716515 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq.helpers</groupId>
<artifactId>perftest-support</artifactId>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 18532ce..da93cb6 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/helpers/rtfilter/pom.xml b/modules/helpers/rtfilter/pom.xml
index 9c13734..9a7a0c6 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/aliases/pom.xml b/modules/plugins/aliases/pom.xml
index 39e6280..0d7441c 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/ant-bundle/pom.xml b/modules/plugins/ant-bundle/pom.xml
index 77329b1..b0ebced 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/apache/pom.xml b/modules/plugins/apache/pom.xml
index 5926702..d1365b5 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/augeas/pom.xml b/modules/plugins/augeas/pom.xml
index 6225c6f..c32e484 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/byteman/pom.xml b/modules/plugins/byteman/pom.xml
index e5396d6..fce9e17 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/cobbler/pom.xml b/modules/plugins/cobbler/pom.xml
index d04c519..1f0beb7 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/cron/pom.xml b/modules/plugins/cron/pom.xml
index d9cab8e..a150183 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/database/pom.xml b/modules/plugins/database/pom.xml
index 72bab9a..2c63916 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/filetemplate-bundle/pom.xml b/modules/plugins/filetemplate-bundle/pom.xml
index 3c084dc..a6f0084 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/grub/pom.xml b/modules/plugins/grub/pom.xml
index f459525..9e2cf83 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/hadoop/pom.xml b/modules/plugins/hadoop/pom.xml
index 972de25..4ba3845 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/hibernate/pom.xml b/modules/plugins/hibernate/pom.xml
index a119803..92e17a4 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/hosts/pom.xml b/modules/plugins/hosts/pom.xml
index b65cb2f..0363fe8 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/hudson/pom.xml b/modules/plugins/hudson/pom.xml
index 67b688f..edd4a4d 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-hudson-plugin</artifactId>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<packaging>jar</packaging>
<name>RHQ Hudson Plugin</name>
diff --git a/modules/plugins/iis/pom.xml b/modules/plugins/iis/pom.xml
index fab32b0..f2b629b 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/irc/pom.xml b/modules/plugins/irc/pom.xml
index 3656824..044280b 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 639d6d4..d135fa0 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jboss-as-7/pom.xml b/modules/plugins/jboss-as-7/pom.xml
index aca53d1..408e30c 100644
--- a/modules/plugins/jboss-as-7/pom.xml
+++ b/modules/plugins/jboss-as-7/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/jboss-as/pom.xml b/modules/plugins/jboss-as/pom.xml
index a8c4e96..c9dbafa 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 aef3de6..d0d137a 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jboss-cache/pom.xml b/modules/plugins/jboss-cache/pom.xml
index 79075af..152d019 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jmx/pom.xml b/modules/plugins/jmx/pom.xml
index 3222d8e..44cd378 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/kickstart/pom.xml b/modules/plugins/kickstart/pom.xml
index d55b229..9ccd94e 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index c04ef86..73cb341 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/mysql/pom.xml b/modules/plugins/mysql/pom.xml
index 540de91..8c0b60d 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/netservices/pom.xml b/modules/plugins/netservices/pom.xml
index a83d54d..6f49a19 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/oracle/pom.xml b/modules/plugins/oracle/pom.xml
index 700e613..aaca2d2 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/pattern-generator/pom.xml b/modules/plugins/pattern-generator/pom.xml
index c862170..f19c719 100644
--- a/modules/plugins/pattern-generator/pom.xml
+++ b/modules/plugins/pattern-generator/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/perftest/pom.xml b/modules/plugins/perftest/pom.xml
index a4578b6..590a89b 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/platform/pom.xml b/modules/plugins/platform/pom.xml
index 474a07a..90a262f 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/pom.xml b/modules/plugins/pom.xml
index 7b0c59d..68814d8 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/plugins/postfix/pom.xml b/modules/plugins/postfix/pom.xml
index 782791e..414de6e 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/postgres/pom.xml b/modules/plugins/postgres/pom.xml
index 1af50f1..91e7108 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/rhq-agent/pom.xml b/modules/plugins/rhq-agent/pom.xml
index c249911..ac71a33 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/rhq-server/pom.xml b/modules/plugins/rhq-server/pom.xml
index 82fb53b..e6cbd4d 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/samba/pom.xml b/modules/plugins/samba/pom.xml
index b026f07..a2699d1 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/script/pom.xml b/modules/plugins/script/pom.xml
index bf32176..f9041bb 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/script2/pom.xml b/modules/plugins/script2/pom.xml
index 8e692e6..ec6ca02 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/snmptrapd/pom.xml b/modules/plugins/snmptrapd/pom.xml
index e4f4d03..ba8606f 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/modules/plugins/sshd/pom.xml b/modules/plugins/sshd/pom.xml
index 9984632..f087ca3 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/sudoers/pom.xml b/modules/plugins/sudoers/pom.xml
index 8221127..6a0391e 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/tomcat/pom.xml b/modules/plugins/tomcat/pom.xml
index 7a4c688..6921318 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/twitter/pom.xml b/modules/plugins/twitter/pom.xml
index 178db88..a6f6f6b 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 6dba688..e5fcd01 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/virt/pom.xml b/modules/plugins/virt/pom.xml
index 5a757a2..3e56790 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/pom.xml b/modules/pom.xml
index bed683e..e90b1d9 100644
--- a/modules/pom.xml
+++ b/modules/pom.xml
@@ -6,7 +6,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/test-utils/pom.xml b/modules/test-utils/pom.xml
index a7362f3..a34707c 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.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<artifactId>test-utils</artifactId>
diff --git a/pom.xml b/pom.xml
index 946ad4c..a641b36 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.1.1-BETA1-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<packaging>pom</packaging>
<name>RHQ</name>
commit 136299719cd0ee3914c4fbd49b87322e945641a7
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Sun Aug 28 19:46:22 2011 -0400
[maven-release-plugin] prepare for next development iteration
diff --git a/modules/common/ant-bundle/pom.xml b/modules/common/ant-bundle/pom.xml
index c7a482f..fdc4fa2 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/common/drift/pom.xml b/modules/common/drift/pom.xml
index 80e6d65..46d9338 100644
--- a/modules/common/drift/pom.xml
+++ b/modules/common/drift/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-common-parent</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/common/filetemplate-bundle/pom.xml b/modules/common/filetemplate-bundle/pom.xml
index 57fa2b7..0fd63c9 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/common/jboss-as/pom.xml b/modules/common/jboss-as/pom.xml
index 4c3474f..4ab388f 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/common/pom.xml b/modules/common/pom.xml
index 47c5535..0b58cbf 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/core/client-api/pom.xml b/modules/core/client-api/pom.xml
index f90deb3..c0c4940 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/comm-api/pom.xml b/modules/core/comm-api/pom.xml
index 4bdd540..95c5b16 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index 335dff6..1d39d80 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -3,7 +3,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-parent</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-dbutils</artifactId>
diff --git a/modules/core/domain/pom.xml b/modules/core/domain/pom.xml
index 9cd0ba2..fd4195a 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/gui/pom.xml b/modules/core/gui/pom.xml
index 914a15d..8966e8e 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/native-system/pom.xml b/modules/core/native-system/pom.xml
index a47bf81..7ac5cb3 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
diff --git a/modules/core/plugin-api/pom.xml b/modules/core/plugin-api/pom.xml
index a9876b9..c2f870a 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/plugin-container/pom.xml b/modules/core/plugin-container/pom.xml
index c8be3c2..50314a1 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/plugin-validator/pom.xml b/modules/core/plugin-validator/pom.xml
index 1f1a904..904fa8d 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/plugindoc/pom.xml b/modules/core/plugindoc/pom.xml
index 831f39f..c1378f2 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index 15ec096..87f469f 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/core/util/pom.xml b/modules/core/util/pom.xml
index 5d17ff7..6a85887 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/agent/pom.xml b/modules/enterprise/agent/pom.xml
index 2d38f9f..bf9e1b9 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/agentupdate/pom.xml b/modules/enterprise/agentupdate/pom.xml
index 485a79e..6c48c57 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/binding/pom.xml b/modules/enterprise/binding/pom.xml
index 71bac05..1c7a4e8 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-script-bindings</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 a895109..a53bd38 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 23b19cb..24cffbb 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 80b21bb..333a84e 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 9eb9c9c..90891ce 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/gui/coregui/pom.xml b/modules/enterprise/gui/coregui/pom.xml
index 9cd93ba..ed14e57 100644
--- a/modules/enterprise/gui/coregui/pom.xml
+++ b/modules/enterprise/gui/coregui/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 8fdc07e..ff90644 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/gui/pom.xml b/modules/enterprise/gui/pom.xml
index 3e0b1c7..f5dc25c 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 286b89b..bf97c14 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/pom.xml b/modules/enterprise/pom.xml
index da9d486..47f17f7 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/remoting/cli/pom.xml b/modules/enterprise/remoting/cli/pom.xml
index 01c9861..c973f10 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 ada9309..866bf7c 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 5da2901..06afc4b 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/remoting/pom.xml b/modules/enterprise/remoting/pom.xml
index 265fcfa..9804786 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/remoting/webservices/pom.xml b/modules/enterprise/remoting/webservices/pom.xml
index 02ce1cc..aded802 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 15a32c1..e4eee22 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-server-client-api</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 c7a52f0..bd7e2a1 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/container/pom.xml b/modules/enterprise/server/container/pom.xml
index e45f641..f83ba59 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/ear/pom.xml b/modules/enterprise/server/ear/pom.xml
index 68eeb76..ec1bc03 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/jar/pom.xml b/modules/enterprise/server/jar/pom.xml
index 8e783e0..c84f12b 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 7cbd947..bd72b8f 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>alert-cli</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 3e2d017..e9ce7d7 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq.server</groupId>
<artifactId>alert-email</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 ab8d837..42b72e3 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-irc</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 5b8e1bd..4dbc87a 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-log4j</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 44da984..a4b0ae9 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-microblog</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 02fcb76..b761ddc 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-mobicents</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 9eb3e7c..8c9c637 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-operations</artifactId>
<packaging>jar</packaging>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 021dc8a..3557ea3 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-roles</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
<name>RHQ Enterprise Server Roles Alert Plugin</name>
diff --git a/modules/enterprise/server/plugins/alert-snmp/pom.xml b/modules/enterprise/server/plugins/alert-snmp/pom.xml
index 03b1aeb..7a7de9b 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-snmp</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 e566893..6ce4a3e 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-subject</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 37c3b3b..8e9915f 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/cobbler/pom.xml b/modules/enterprise/server/plugins/cobbler/pom.xml
index 019ae28..f1965e9 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>rhq-serverplugin-cobbler</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 95f29fa..3727fe4 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/drift-rhq/pom.xml b/modules/enterprise/server/plugins/drift-rhq/pom.xml
index b287def..8f58499 100644
--- a/modules/enterprise/server/plugins/drift-rhq/pom.xml
+++ b/modules/enterprise/server/plugins/drift-rhq/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 2dfde0e..d4602dd 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 c9beef5..520b48c 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>groovy-script-server-plugin</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 6701d43..669b320 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 5168456..8b6b86e 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>packagetype-cli</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 64b3881..6dae125 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 8ef3970..8d19430 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
<relativePath>../../../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/plugins/pom.xml b/modules/enterprise/server/plugins/pom.xml
index 91cdcf6..2e0edd8 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 226e1dd..bf392a9 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 a657f95..7ae2e9e 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 455279f..7eec4fc 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 3b9f1ef..6de1494 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/safe-invoker/pom.xml b/modules/enterprise/server/safe-invoker/pom.xml
index 434fa4d..a7fd5c0 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 9be1e89..7836bc0 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/sars/pom.xml b/modules/enterprise/server/sars/pom.xml
index 1f928c1..db95944 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 ebbe06a..b7b5226 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/helpers/bundleGen/pom.xml b/modules/helpers/bundleGen/pom.xml
index b5f2ebb..a7bb830 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq.helpers</groupId>
<artifactId>bundleGen</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
<build>
<plugins>
diff --git a/modules/helpers/perftest-support/pom.xml b/modules/helpers/perftest-support/pom.xml
index 4716515..c0e8820 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq.helpers</groupId>
<artifactId>perftest-support</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 da93cb6..18532ce 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/helpers/rtfilter/pom.xml b/modules/helpers/rtfilter/pom.xml
index 9a7a0c6..9c13734 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/aliases/pom.xml b/modules/plugins/aliases/pom.xml
index 0d7441c..39e6280 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/ant-bundle/pom.xml b/modules/plugins/ant-bundle/pom.xml
index b0ebced..77329b1 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/apache/pom.xml b/modules/plugins/apache/pom.xml
index d1365b5..5926702 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/augeas/pom.xml b/modules/plugins/augeas/pom.xml
index c32e484..6225c6f 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/byteman/pom.xml b/modules/plugins/byteman/pom.xml
index fce9e17..e5396d6 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/cobbler/pom.xml b/modules/plugins/cobbler/pom.xml
index 1f0beb7..d04c519 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/cron/pom.xml b/modules/plugins/cron/pom.xml
index a150183..d9cab8e 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/database/pom.xml b/modules/plugins/database/pom.xml
index 2c63916..72bab9a 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/filetemplate-bundle/pom.xml b/modules/plugins/filetemplate-bundle/pom.xml
index a6f0084..3c084dc 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/grub/pom.xml b/modules/plugins/grub/pom.xml
index 9e2cf83..f459525 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/hadoop/pom.xml b/modules/plugins/hadoop/pom.xml
index 4ba3845..972de25 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/hibernate/pom.xml b/modules/plugins/hibernate/pom.xml
index 92e17a4..a119803 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/hosts/pom.xml b/modules/plugins/hosts/pom.xml
index 0363fe8..b65cb2f 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/hudson/pom.xml b/modules/plugins/hudson/pom.xml
index edd4a4d..67b688f 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-hudson-plugin</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 f2b629b..fab32b0 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/irc/pom.xml b/modules/plugins/irc/pom.xml
index 044280b..3656824 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 d135fa0..639d6d4 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jboss-as-7/pom.xml b/modules/plugins/jboss-as-7/pom.xml
index 408e30c..aca53d1 100644
--- a/modules/plugins/jboss-as-7/pom.xml
+++ b/modules/plugins/jboss-as-7/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/jboss-as/pom.xml b/modules/plugins/jboss-as/pom.xml
index c9dbafa..a8c4e96 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 d0d137a..aef3de6 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 152d019..79075af 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jmx/pom.xml b/modules/plugins/jmx/pom.xml
index 44cd378..3222d8e 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/kickstart/pom.xml b/modules/plugins/kickstart/pom.xml
index 9ccd94e..d55b229 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index 73cb341..c04ef86 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/mysql/pom.xml b/modules/plugins/mysql/pom.xml
index 8c0b60d..540de91 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/netservices/pom.xml b/modules/plugins/netservices/pom.xml
index 6f49a19..a83d54d 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/oracle/pom.xml b/modules/plugins/oracle/pom.xml
index aaca2d2..700e613 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/pattern-generator/pom.xml b/modules/plugins/pattern-generator/pom.xml
index f19c719..c862170 100644
--- a/modules/plugins/pattern-generator/pom.xml
+++ b/modules/plugins/pattern-generator/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/perftest/pom.xml b/modules/plugins/perftest/pom.xml
index 590a89b..a4578b6 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/platform/pom.xml b/modules/plugins/platform/pom.xml
index 90a262f..474a07a 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/pom.xml b/modules/plugins/pom.xml
index 68814d8..7b0c59d 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/plugins/postfix/pom.xml b/modules/plugins/postfix/pom.xml
index 414de6e..782791e 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/postgres/pom.xml b/modules/plugins/postgres/pom.xml
index 91e7108..1af50f1 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/rhq-agent/pom.xml b/modules/plugins/rhq-agent/pom.xml
index ac71a33..c249911 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/rhq-server/pom.xml b/modules/plugins/rhq-server/pom.xml
index e6cbd4d..82fb53b 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/samba/pom.xml b/modules/plugins/samba/pom.xml
index a2699d1..b026f07 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/script/pom.xml b/modules/plugins/script/pom.xml
index f9041bb..bf32176 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/script2/pom.xml b/modules/plugins/script2/pom.xml
index ec6ca02..8e692e6 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/snmptrapd/pom.xml b/modules/plugins/snmptrapd/pom.xml
index ba8606f..e4f4d03 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/modules/plugins/sshd/pom.xml b/modules/plugins/sshd/pom.xml
index f087ca3..9984632 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/sudoers/pom.xml b/modules/plugins/sudoers/pom.xml
index 6a0391e..8221127 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/tomcat/pom.xml b/modules/plugins/tomcat/pom.xml
index 6921318..7a4c688 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/twitter/pom.xml b/modules/plugins/twitter/pom.xml
index a6f6f6b..178db88 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-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 e5fcd01..6dba688 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/virt/pom.xml b/modules/plugins/virt/pom.xml
index 3e56790..5a757a2 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/pom.xml b/modules/pom.xml
index e90b1d9..bed683e 100644
--- a/modules/pom.xml
+++ b/modules/pom.xml
@@ -6,7 +6,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/test-utils/pom.xml b/modules/test-utils/pom.xml
index a34707c..a7362f3 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.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
</parent>
<artifactId>test-utils</artifactId>
diff --git a/pom.xml b/pom.xml
index a641b36..946ad4c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.1.1-BETA1</version>
+ <version>4.1.1-BETA1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>RHQ</name>
commit 6e7af73ebcb756fd49d8b290e53284f31652589a
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Sun Aug 28 19:46:03 2011 -0400
[maven-release-plugin] prepare release RHQ_4_1_1-BETA1
diff --git a/modules/common/ant-bundle/pom.xml b/modules/common/ant-bundle/pom.xml
index 1eb86ef..c7a482f 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/common/drift/pom.xml b/modules/common/drift/pom.xml
index 73ab33a..80e6d65 100644
--- a/modules/common/drift/pom.xml
+++ b/modules/common/drift/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-common-parent</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/common/filetemplate-bundle/pom.xml b/modules/common/filetemplate-bundle/pom.xml
index 352de33..57fa2b7 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/common/jboss-as/pom.xml b/modules/common/jboss-as/pom.xml
index 184c5ad..4c3474f 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/common/pom.xml b/modules/common/pom.xml
index bd88fa0..47c5535 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/core/client-api/pom.xml b/modules/core/client-api/pom.xml
index 9f5f66a..f90deb3 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/comm-api/pom.xml b/modules/core/comm-api/pom.xml
index 5a8b356..4bdd540 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index aa20853..335dff6 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -3,7 +3,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-parent</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-dbutils</artifactId>
diff --git a/modules/core/domain/pom.xml b/modules/core/domain/pom.xml
index 42d28e1..9cd0ba2 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/gui/pom.xml b/modules/core/gui/pom.xml
index bb4dc2c..914a15d 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/native-system/pom.xml b/modules/core/native-system/pom.xml
index 7d83f3d..a47bf81 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
diff --git a/modules/core/plugin-api/pom.xml b/modules/core/plugin-api/pom.xml
index fc78701..a9876b9 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/plugin-container/pom.xml b/modules/core/plugin-container/pom.xml
index 1d12869..c8be3c2 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/plugin-validator/pom.xml b/modules/core/plugin-validator/pom.xml
index f2953a6..1f1a904 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/plugindoc/pom.xml b/modules/core/plugindoc/pom.xml
index 24243e3..831f39f 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index bc41a9b..15ec096 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/core/util/pom.xml b/modules/core/util/pom.xml
index dfa5bb8..5d17ff7 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/agent/pom.xml b/modules/enterprise/agent/pom.xml
index f12c1a1..2d38f9f 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/agentupdate/pom.xml b/modules/enterprise/agentupdate/pom.xml
index 8b7ffe8..485a79e 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/binding/pom.xml b/modules/enterprise/binding/pom.xml
index d96cf83..71bac05 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-script-bindings</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 f424704..a895109 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 cebd439..23b19cb 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 b66da2c..80b21bb 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 db7d757..9eb9c9c 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/gui/coregui/pom.xml b/modules/enterprise/gui/coregui/pom.xml
index de77f3f..9cd93ba 100644
--- a/modules/enterprise/gui/coregui/pom.xml
+++ b/modules/enterprise/gui/coregui/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 900d476..8fdc07e 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/gui/pom.xml b/modules/enterprise/gui/pom.xml
index 8e8cf66..3e0b1c7 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 4e2ac9f..286b89b 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/pom.xml b/modules/enterprise/pom.xml
index 01fb7f6..da9d486 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/remoting/cli/pom.xml b/modules/enterprise/remoting/cli/pom.xml
index 24fbb60..01c9861 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 1a1c88c..ada9309 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 3fe07b7..5da2901 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/remoting/pom.xml b/modules/enterprise/remoting/pom.xml
index f4b1866..265fcfa 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/remoting/webservices/pom.xml b/modules/enterprise/remoting/webservices/pom.xml
index dee43bc..02ce1cc 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 c57eaba..15a32c1 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-server-client-api</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 1aebae1..c7a52f0 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/container/pom.xml b/modules/enterprise/server/container/pom.xml
index d27c157..e45f641 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/ear/pom.xml b/modules/enterprise/server/ear/pom.xml
index 8cdaf8b..68eeb76 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/jar/pom.xml b/modules/enterprise/server/jar/pom.xml
index d2f2bc5..8e783e0 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 b380393..7cbd947 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>alert-cli</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 e1e1890..3e2d017 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq.server</groupId>
<artifactId>alert-email</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 1b609e1..ab8d837 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-irc</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 1a27831..5b8e1bd 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-log4j</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 ab68d6b..44da984 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-microblog</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 0adccaf..02fcb76 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-mobicents</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 2c9bcfa..9eb3e7c 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-operations</artifactId>
<packaging>jar</packaging>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 06bab65..021dc8a 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-roles</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<name>RHQ Enterprise Server Roles Alert Plugin</name>
diff --git a/modules/enterprise/server/plugins/alert-snmp/pom.xml b/modules/enterprise/server/plugins/alert-snmp/pom.xml
index 3763c54..03b1aeb 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-snmp</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 bb595b5..e566893 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-subject</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 c4e59b2..37c3b3b 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/cobbler/pom.xml b/modules/enterprise/server/plugins/cobbler/pom.xml
index 381f64c..019ae28 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>rhq-serverplugin-cobbler</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 403ef41..95f29fa 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/drift-rhq/pom.xml b/modules/enterprise/server/plugins/drift-rhq/pom.xml
index 9c9d3b6..b287def 100644
--- a/modules/enterprise/server/plugins/drift-rhq/pom.xml
+++ b/modules/enterprise/server/plugins/drift-rhq/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 ad1c570..2dfde0e 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 0d2bf4b..c9beef5 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>groovy-script-server-plugin</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 dacaec2..6701d43 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 9a51242..5168456 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>packagetype-cli</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 f73ecb8..64b3881 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 c2d5c7e..8ef3970 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/plugins/pom.xml b/modules/enterprise/server/plugins/pom.xml
index 3fa05d3..91cdcf6 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 04df0b8..226e1dd 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 79ccf2b..a657f95 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 9e221a0..455279f 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 ce8468c..3b9f1ef 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/safe-invoker/pom.xml b/modules/enterprise/server/safe-invoker/pom.xml
index 05cb339..434fa4d 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 00344d4..9be1e89 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/sars/pom.xml b/modules/enterprise/server/sars/pom.xml
index 2377858..1f928c1 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 90c0da6..ebbe06a 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/helpers/bundleGen/pom.xml b/modules/helpers/bundleGen/pom.xml
index 9e80f1f..b5f2ebb 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq.helpers</groupId>
<artifactId>bundleGen</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<build>
<plugins>
diff --git a/modules/helpers/perftest-support/pom.xml b/modules/helpers/perftest-support/pom.xml
index e488bb0..4716515 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq.helpers</groupId>
<artifactId>perftest-support</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 0c73fd3..da93cb6 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/helpers/rtfilter/pom.xml b/modules/helpers/rtfilter/pom.xml
index 417a3df..9a7a0c6 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/aliases/pom.xml b/modules/plugins/aliases/pom.xml
index 959fa3c..0d7441c 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/ant-bundle/pom.xml b/modules/plugins/ant-bundle/pom.xml
index ff8c753..b0ebced 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/apache/pom.xml b/modules/plugins/apache/pom.xml
index 0694d78..d1365b5 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/augeas/pom.xml b/modules/plugins/augeas/pom.xml
index 66d35d1..c32e484 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/byteman/pom.xml b/modules/plugins/byteman/pom.xml
index 46bcb55..fce9e17 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/cobbler/pom.xml b/modules/plugins/cobbler/pom.xml
index 9a45599..1f0beb7 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/cron/pom.xml b/modules/plugins/cron/pom.xml
index e42d480..a150183 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/database/pom.xml b/modules/plugins/database/pom.xml
index 6c1812b..2c63916 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/filetemplate-bundle/pom.xml b/modules/plugins/filetemplate-bundle/pom.xml
index c1e0a3d..a6f0084 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/grub/pom.xml b/modules/plugins/grub/pom.xml
index 93b5dd3..9e2cf83 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/hadoop/pom.xml b/modules/plugins/hadoop/pom.xml
index 840e619..4ba3845 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/hibernate/pom.xml b/modules/plugins/hibernate/pom.xml
index e482d30..92e17a4 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/hosts/pom.xml b/modules/plugins/hosts/pom.xml
index 31af33b..0363fe8 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/hudson/pom.xml b/modules/plugins/hudson/pom.xml
index b097071..edd4a4d 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-hudson-plugin</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<packaging>jar</packaging>
<name>RHQ Hudson Plugin</name>
diff --git a/modules/plugins/iis/pom.xml b/modules/plugins/iis/pom.xml
index 2cdc32a..f2b629b 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/irc/pom.xml b/modules/plugins/irc/pom.xml
index edf12ea..044280b 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 6ec0096..d135fa0 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jboss-as-7/pom.xml b/modules/plugins/jboss-as-7/pom.xml
index ca63c5e..408e30c 100644
--- a/modules/plugins/jboss-as-7/pom.xml
+++ b/modules/plugins/jboss-as-7/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/jboss-as/pom.xml b/modules/plugins/jboss-as/pom.xml
index 57c8bb3..c9dbafa 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 1a3a1df..d0d137a 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jboss-cache/pom.xml b/modules/plugins/jboss-cache/pom.xml
index ae06793..152d019 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jmx/pom.xml b/modules/plugins/jmx/pom.xml
index 1daf86d..44cd378 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/kickstart/pom.xml b/modules/plugins/kickstart/pom.xml
index dc87ed7..9ccd94e 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index ab52e84..73cb341 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/mysql/pom.xml b/modules/plugins/mysql/pom.xml
index d8ebb5d..8c0b60d 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/netservices/pom.xml b/modules/plugins/netservices/pom.xml
index f1675e4..6f49a19 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/oracle/pom.xml b/modules/plugins/oracle/pom.xml
index 8a3b3c0..aaca2d2 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/pattern-generator/pom.xml b/modules/plugins/pattern-generator/pom.xml
index 6b0791d..f19c719 100644
--- a/modules/plugins/pattern-generator/pom.xml
+++ b/modules/plugins/pattern-generator/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/perftest/pom.xml b/modules/plugins/perftest/pom.xml
index 843fe3d..590a89b 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/platform/pom.xml b/modules/plugins/platform/pom.xml
index 99f36d0..90a262f 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/pom.xml b/modules/plugins/pom.xml
index f32159e..68814d8 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/plugins/postfix/pom.xml b/modules/plugins/postfix/pom.xml
index 5ef7252..414de6e 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/postgres/pom.xml b/modules/plugins/postgres/pom.xml
index 365f6c4..91e7108 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/rhq-agent/pom.xml b/modules/plugins/rhq-agent/pom.xml
index 60471c2..ac71a33 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/rhq-server/pom.xml b/modules/plugins/rhq-server/pom.xml
index e88b97f..e6cbd4d 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/samba/pom.xml b/modules/plugins/samba/pom.xml
index 84fc9b7..a2699d1 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/script/pom.xml b/modules/plugins/script/pom.xml
index d31afb9..f9041bb 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/script2/pom.xml b/modules/plugins/script2/pom.xml
index 2cf689c..ec6ca02 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/snmptrapd/pom.xml b/modules/plugins/snmptrapd/pom.xml
index 05ed401..ba8606f 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/modules/plugins/sshd/pom.xml b/modules/plugins/sshd/pom.xml
index 83da74a..f087ca3 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/sudoers/pom.xml b/modules/plugins/sudoers/pom.xml
index 1b69180..6a0391e 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/tomcat/pom.xml b/modules/plugins/tomcat/pom.xml
index f6dfebd..6921318 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/twitter/pom.xml b/modules/plugins/twitter/pom.xml
index 50ff9b6..a6f6f6b 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</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 6565a7b..e5fcd01 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/virt/pom.xml b/modules/plugins/virt/pom.xml
index 8700a19..3e56790 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/pom.xml b/modules/pom.xml
index 2b45c62..e90b1d9 100644
--- a/modules/pom.xml
+++ b/modules/pom.xml
@@ -6,7 +6,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/test-utils/pom.xml b/modules/test-utils/pom.xml
index 5c6e85c..a34707c 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.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
</parent>
<artifactId>test-utils</artifactId>
diff --git a/pom.xml b/pom.xml
index 1be70d1..a641b36 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>4.1.1-BETA1</version>
<packaging>pom</packaging>
<name>RHQ</name>
commit 0bc492ee40e1d3db63f14d0f1a4a3e1162a7320a
Merge: 36aaee1 78c2fcb
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Sun Aug 28 18:20:31 2011 -0400
Merge branch 'release_jon3.0.0-test-build' of ssh://git.fedorahosted.org/git/rhq/rhq into release_jon3.0.0-test-build
commit a98c893d118b6375bd429986ec177a9be576fbaa
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Sun Aug 28 13:29:12 2011 -0500
BZ733775 - Update the plugin configuration file to have correct descriptions for each service available. Also added a new class to verify the availability of a className mbean resource.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ClassNameMBeanComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ClassNameMBeanComponent.java
new file mode 100644
index 0000000..fc8b818
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ClassNameMBeanComponent.java
@@ -0,0 +1,64 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.modcluster;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.mc4j.ems.connection.bean.EmsBean;
+
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.plugins.jmx.JMXComponent;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+
+/**
+ * @author Stefan Negrea
+ *
+ */
+@SuppressWarnings({ "rawtypes", "deprecation" })
+public class ClassNameMBeanComponent extends MBeanResourceComponent<JMXComponent> {
+ private static final Log log = LogFactory.getLog(WebappContextComponent.class);
+
+ private static final String CLASS_NAME = "className";
+
+ @Override
+ public AvailabilityType getAvailability() {
+ AvailabilityType beanAvailability = super.getAvailability();
+
+ if (beanAvailability.equals(AvailabilityType.UP)) {
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ try {
+ Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
+
+ String className = this.resourceContext.getPluginConfiguration().getSimple(CLASS_NAME).getStringValue();
+ EmsBean emsBean = getEmsBean();
+
+ if (className.equals(emsBean.getClassTypeName())) {
+ return AvailabilityType.UP;
+ }
+ } catch (Exception e) {
+ log.info(e);
+ return AvailabilityType.DOWN;
+ } finally {
+ Thread.currentThread().setContextClassLoader(cl);
+ }
+ }
+
+ return AvailabilityType.DOWN;
+ }
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ClassNameMBeanDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ClassNameMBeanDiscoveryComponent.java
index b854398..686642a 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ClassNameMBeanDiscoveryComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ClassNameMBeanDiscoveryComponent.java
@@ -20,6 +20,8 @@ package org.rhq.plugins.modcluster;
import java.util.Set;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.mc4j.ems.connection.EmsConnection;
import org.mc4j.ems.connection.bean.EmsBean;
@@ -36,6 +38,8 @@ import org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent;
@SuppressWarnings("rawtypes")
public class ClassNameMBeanDiscoveryComponent<T extends JMXComponent> extends MBeanResourceDiscoveryComponent<T> {
+ private static final Log log = LogFactory.getLog(FileConfiguredMBeanResourceComponent.class);
+
private static final String CLASS_NAME = "className";
/* (non-Javadoc)
@@ -62,12 +66,22 @@ public class ClassNameMBeanDiscoveryComponent<T extends JMXComponent> extends MB
* @return
*/
public boolean isBeanConfiguredClassName(ResourceDiscoveryContext<T> context, String objectName) {
- String className = context.getDefaultPluginConfiguration().getSimple(CLASS_NAME).getStringValue();
-
EmsConnection connection = context.getParentResourceComponent().getEmsConnection();
EmsBean emsBean = loadBean(connection, objectName);
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+
+ try {
+ Thread.currentThread().setContextClassLoader(emsBean.getClass().getClassLoader());
- return className.equals(emsBean.getClassTypeName());
+ String className = context.getDefaultPluginConfiguration().getSimple(CLASS_NAME).getStringValue();
+
+ return className.equals(emsBean.getClassTypeName());
+ } catch (Exception e) {
+ log.info(e);
+ return false;
+ } finally {
+ Thread.currentThread().setContextClassLoader(cl);
+ }
}
/**
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
index cc7ea37..046b1fb 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
@@ -30,16 +30,14 @@ import org.rhq.core.domain.configuration.definition.PropertyDefinition;
import org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple;
import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
import org.rhq.core.util.exception.ThrowableUtil;
-import org.rhq.plugins.jmx.JMXComponent;
-import org.rhq.plugins.jmx.MBeanResourceComponent;
import org.rhq.plugins.modcluster.config.ModClusterBeanFile;
/**
* @author Stefan Negrea
*
*/
-@SuppressWarnings({ "deprecation", "rawtypes" })
-public class FileConfiguredMBeanResourceComponent extends MBeanResourceComponent<JMXComponent> {
+@SuppressWarnings({ "deprecation" })
+public class FileConfiguredMBeanResourceComponent extends ClassNameMBeanComponent {
private static final Log log = LogFactory.getLog(FileConfiguredMBeanResourceComponent.class);
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index dafb18f..b0ad1f2 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -29,7 +29,7 @@
<service name="HA Service" discovery="ClassNameMBeanDiscoveryComponent"
class="ModClusterServiceComponent"
supportsManualAdd="true"
- description="HA Service Listener" singleton="true">
+ description="HA Service" singleton="true">
<plugin-configuration>
<c:simple-property name="objectName" readOnly="true" default="jboss.web:service=ModCluster" />
@@ -150,7 +150,8 @@
</resource-configuration>
</service>
- <service name="HA Service Configuration" discovery="ClassNameMBeanDiscoveryComponent" class="FileConfiguredMBeanResourceComponent" supportsManualAdd="true" description="HA Service Configuration" singleton="true">
+ <service name="HA Service Configuration" discovery="ClassNameMBeanDiscoveryComponent" class="FileConfiguredMBeanResourceComponent" supportsManualAdd="true"
+ description="HA Service Configuration" singleton="true">
<plugin-configuration>
<c:simple-property name="objectName" readOnly="true" default="jboss.web:service=ModCluster" />
@@ -199,11 +200,12 @@
<!-- End - Configuration for HAModClusterService -->
<!-- Start - Configuration for ModClusterService -->
- <service name="Service" discovery="ClassNameMBeanDiscoveryComponent" class="ModClusterServiceComponent" supportsManualAdd="true" description="HA Service Listener" singleton="true">
+ <service name="Service" discovery="ClassNameMBeanDiscoveryComponent" class="ModClusterServiceComponent" supportsManualAdd="true"
+ description="Service" singleton="true">
<plugin-configuration>
<c:simple-property name="objectName" readOnly="true" default="jboss.web:service=ModCluster" />
- <c:simple-property name="nameTemplate" default="HA Service" />
+ <c:simple-property name="nameTemplate" default="Service" />
<c:simple-property name="className" readOnly="true" default="org.jboss.modcluster.ModClusterService" />
<c:simple-property name="proxyInfoProperty" readOnly="true" default="ProxyInfo" />
</plugin-configuration>
@@ -280,11 +282,12 @@
<metric property="ProxyInfo" displayName="Proxy Info" displayType="summary" dataType="trait" />
</service>
- <service name="Service Configuration" discovery="ClassNameMBeanDiscoveryComponent" class="FileConfiguredMBeanResourceComponent" supportsManualAdd="true" description="HA Service Configuration" singleton="true">
+ <service name="Service Configuration" discovery="ClassNameMBeanDiscoveryComponent" class="FileConfiguredMBeanResourceComponent" supportsManualAdd="true"
+ description="Service Configuration" singleton="true">
<plugin-configuration>
<c:simple-property name="objectName" readOnly="true" default="jboss.web:service=ModCluster" />
- <c:simple-property name="nameTemplate" default="HA Service Configuration" />
+ <c:simple-property name="nameTemplate" default="Service Configuration" />
<c:simple-property name="className" readOnly="true" default="org.jboss.modcluster.ModClusterService" />
<c:simple-property name="dependencyClassName" readOnly="true" default="org.jboss.modcluster.config.ModClusterConfig" />
<c:simple-property name="proxyInfoProperty" readOnly="true" default="ProxyInfo" />
@@ -325,11 +328,12 @@
</service>
<!-- End - Configuration for ModClusterService -->
- <service name="Catalina Service" discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent" class="CatalinaServiceComponent" supportsManualAdd="true" description="Catalina Service Listener" singleton="true">
+ <service name="Catalina Service" discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent" class="CatalinaServiceComponent" supportsManualAdd="true"
+ description="Catalina Service" singleton="true">
<plugin-configuration>
<c:simple-property name="objectName" readOnly="true" default="Catalina:type=ModClusterListener,*" />
- <c:simple-property name="nameTemplate" default="mod_cluster Catalina Listener" />
+ <c:simple-property name="nameTemplate" default="Catalina Service" />
</plugin-configuration>
<operation name="addProxy" displayName="Add a proxy" description="Add a proxy.">
@@ -397,7 +401,8 @@
</resource-configuration>
</service>
- <service name="Dynamic Load Balancer Factor" discovery="ClassNameMBeanDiscoveryComponent" class="FileConfiguredMBeanResourceComponent" supportsManualAdd="true" description="Dynamic Load balancer factor for mod_cluster" singleton="true">
+ <service name="Dynamic Load Balancer Factor" discovery="ClassNameMBeanDiscoveryComponent" class="FileConfiguredMBeanResourceComponent" supportsManualAdd="true"
+ description="Dynamic Load balancer factor for mod_cluster" singleton="true">
<plugin-configuration>
<c:simple-property name="objectName" readOnly="true" default="jboss.web:provider=LoadBalanceFactor,service=ModCluster,*" />
@@ -411,7 +416,8 @@
</resource-configuration>
</service>
- <service name="Simple Load Balancer Factor" discovery="ClassNameMBeanDiscoveryComponent" class="FileConfiguredMBeanResourceComponent" supportsManualAdd="true" description="Simple load balancer factor for mod_cluster" singleton="true">
+ <service name="Simple Load Balancer Factor" discovery="ClassNameMBeanDiscoveryComponent" class="FileConfiguredMBeanResourceComponent" supportsManualAdd="true"
+ description="Simple load balancer factor for mod_cluster" singleton="true">
<plugin-configuration>
<c:simple-property name="objectName" readOnly="true" default="jboss.web:provider=LoadBalanceFactor,service=ModCluster,*" />
commit 7568e5955dc14df637cd00adc7baaf63d78d12b5
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Sun Aug 28 11:27:49 2011 -0500
BZ727963 - Updated the code to declare the logger locally before using it. The logger declared at parent level was issuing usage warnings on the agent container.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/CatalinaServiceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/CatalinaServiceComponent.java
index 76eb731..957f09b 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/CatalinaServiceComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/CatalinaServiceComponent.java
@@ -20,6 +20,9 @@ package org.rhq.plugins.modcluster;
import java.util.concurrent.TimeUnit;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.ConfigurationUpdateStatus;
import org.rhq.core.domain.configuration.PropertySimple;
@@ -32,6 +35,9 @@ import org.rhq.plugins.modcluster.config.JBossWebServerFile;
@SuppressWarnings({ "rawtypes", "deprecation" })
public class CatalinaServiceComponent extends MBeanResourceComponent {
+
+ private static final Log log = LogFactory.getLog(CatalinaServiceComponent.class);
+
private static final String SERVER_HOME_DIR = "serverHomeDir";
private static final String CONFIGURATION_FILE_RELATIVE_PATH = "/deploy/jboss-web.deployer/server.xml";
commit 65d155d21c05b5b1ed31feeabb2a55bf86d32e74
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Sun Aug 28 11:20:19 2011 -0500
BZ729051 - Extended the default MBean resource component implementation to support TimeUnit arguments.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/CatalinaServiceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/CatalinaServiceComponent.java
index 6e90103..76eb731 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/CatalinaServiceComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/CatalinaServiceComponent.java
@@ -18,6 +18,8 @@
*/
package org.rhq.plugins.modcluster;
+import java.util.concurrent.TimeUnit;
+
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.ConfigurationUpdateStatus;
import org.rhq.core.domain.configuration.PropertySimple;
@@ -53,6 +55,15 @@ public class CatalinaServiceComponent extends MBeanResourceComponent {
}
}
+ @Override
+ protected Object getPropertyValueAsType(PropertySimple propSimple, String typeName) {
+ if (typeName.equals(TimeUnit.class.getName())) {
+ return TimeUnit.valueOf(propSimple.getStringValue());
+ }
+
+ return super.getPropertyValueAsType(propSimple, typeName);
+ }
+
private void saveResouceConfigurationToFile(ConfigurationUpdateReport report, boolean ignoreReadOnly) {
ConfigurationDefinition configurationDefinition = this.getResourceContext().getResourceType()
.getResourceConfigurationDefinition();
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServiceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServiceComponent.java
index d9da81c..6ac8318 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServiceComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServiceComponent.java
@@ -42,7 +42,6 @@ public class ModClusterServiceComponent extends FileConfiguredMBeanResourceCompo
@Override
protected Object getPropertyValueAsType(PropertySimple propSimple, String typeName) {
- System.out.println(typeName);
if (typeName.equals(TimeUnit.class.getName())) {
return TimeUnit.valueOf(propSimple.getStringValue());
}
commit f2bae4b6b175464b5a0e44281727cd7611e3a7f5
Merge: 438c31b 6abff41
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Sun Aug 28 10:59:41 2011 -0500
Merge branch 'master' of ssh://git.fedorahosted.org/git/rhq/rhq
commit 438c31bc4e4fb1bde6585b5a153d0d921e7318a4
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Sun Aug 28 10:59:14 2011 -0500
BZ728621 - The correct procedure to update mod_cluster properties for JBoss 42 is:
1) update JMX properties
2) invoke refresh command to propagate updates to https
3) persist changes server configuration file so that they are reloaded after a restart
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/CatalinaServiceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/CatalinaServiceComponent.java
index 1b390c5..6e90103 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/CatalinaServiceComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/CatalinaServiceComponent.java
@@ -18,6 +18,7 @@
*/
package org.rhq.plugins.modcluster;
+import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.ConfigurationUpdateStatus;
import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
@@ -34,11 +35,21 @@ public class CatalinaServiceComponent extends MBeanResourceComponent {
@Override
public void updateResourceConfiguration(ConfigurationUpdateReport report) {
+ //Update JMX properties
super.updateResourceConfiguration(report);
- try {
- saveResouceConfigurationToFile(report, true);
- } catch (Exception e) {
+ if (report.getStatus() == ConfigurationUpdateStatus.SUCCESS) {
+ //Propagate the JMX configuration updates to HTTPD
+ try {
+ super.invokeOperation("refresh", new Configuration());
+ } catch (Exception e) {
+ report.setErrorMessage("Failed to save the resource configuration to file. " + e.getMessage());
+ }
+
+ //Persist configuration changes to configuration file
+ if (report.getStatus() == ConfigurationUpdateStatus.SUCCESS) {
+ saveResouceConfigurationToFile(report, true);
+ }
}
}
@@ -63,8 +74,7 @@ public class CatalinaServiceComponent extends MBeanResourceComponent {
}
} catch (Exception e) {
property.setErrorMessage(ThrowableUtil.getStackAsString(e));
- report
- .setErrorMessage("Failed setting resource configuration - see property error messages for details");
+ report.setErrorMessage("Failed setting resource configuration. " + e.getMessage());
log.info("Failure setting MBean Resource configuration value for " + key, e);
}
}
@@ -72,6 +82,7 @@ public class CatalinaServiceComponent extends MBeanResourceComponent {
jbossWebServerFile.saveConfigurationFile();
} catch (Exception e) {
+ report.setErrorMessage("Failed to save the resource configuration to file. " + e.getMessage());
log.debug("Unable to save mod_cluster configuration file.", e);
}
}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
index b87bfcd..cc7ea37 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
@@ -141,8 +141,7 @@ public class FileConfiguredMBeanResourceComponent extends MBeanResourceComponent
}
} catch (Exception e) {
property.setErrorMessage(ThrowableUtil.getStackAsString(e));
- report
- .setErrorMessage("Failed setting resource configuration - see property error messages for details");
+ report.setErrorMessage("Failed setting resource configuration. " + e.getMessage());
log.info("Failure setting MBean Resource configuration value for " + key, e);
}
}
@@ -150,6 +149,7 @@ public class FileConfiguredMBeanResourceComponent extends MBeanResourceComponent
modClusterBeanFile.saveConfigurationFile();
} catch (Exception e) {
+ report.setErrorMessage("Failed to save the resource configuration to file. " + e.getMessage());
log.debug("Unable to save mod_cluster configuration file.", e);
}
}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterDiscoveryComponent.java
index b9a73b5..9e4d87e 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterDiscoveryComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterDiscoveryComponent.java
@@ -52,17 +52,32 @@ public class ModClusterDiscoveryComponent extends MBeanResourceDiscoveryComponen
@SuppressWarnings("static-access")
public String findServerHomeDirectory(ResourceComponent parentResourceComponent) {
- if (parentResourceComponent instanceof ApplicationServerComponent) {
- ApplicationServerComponent parentComponent = (ApplicationServerComponent) parentResourceComponent;
+ try {
+ if (parentResourceComponent instanceof ApplicationServerComponent) {
+ ApplicationServerComponent parentComponent = (ApplicationServerComponent) parentResourceComponent;
- return parentComponent.getResourceContext().getPluginConfiguration().getSimple("serverHomeDir")
- .getStringValue();
+ return parentComponent.getResourceContext().getPluginConfiguration().getSimple("serverHomeDir")
+ .getStringValue();
- } else if (parentResourceComponent instanceof JBossASServerComponent) {
- JBossASServerComponent parentComponent = (JBossASServerComponent) parentResourceComponent;
+ }
+ } catch (java.lang.NoClassDefFoundError e) {
+ //Do absolutely nothing, that means the class loader does not have this module loaded.
+ //Just continue with the next discovery attempt.
+ }
+
+ try {
+ if (parentResourceComponent instanceof JBossASServerComponent) {
+
+ JBossASServerComponent parentComponent = (JBossASServerComponent) parentResourceComponent;
+
+ System.out.println(parentComponent.getPluginConfiguration()
+ .getSimple(parentComponent.CONFIGURATION_PATH_CONFIG_PROP).getStringValue());
- return parentComponent.getPluginConfiguration().getSimple(parentComponent.JBOSS_HOME_DIR_CONFIG_PROP)
- .getStringValue();
+ return parentComponent.getPluginConfiguration()
+ .getSimple(parentComponent.CONFIGURATION_PATH_CONFIG_PROP).getStringValue();
+ }
+ } catch (java.lang.NoClassDefFoundError e) {
+ //Do absolutely nothing, that means the class loader does not have this module loaded.
}
return null;
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java
index 01f992e..d5f8680 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java
@@ -16,7 +16,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
package org.rhq.plugins.modcluster.config;
import java.io.File;
@@ -24,7 +23,6 @@ import java.io.IOException;
import javax.xml.parsers.ParserConfigurationException;
-import org.apache.commons.lang.NotImplementedException;
import org.w3c.dom.Attr;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
@@ -73,7 +71,7 @@ public class JBossWebServerFile extends AbstractConfigurationFile {
@Override
public String getPropertyValue(String propertyName) {
- throw new NotImplementedException(
+ throw new UnsupportedOperationException(
"Property values should be retrieved from the JMX interface not from the configuration file.");
}
commit 6abff4105f7a878cb0fb2b8b25a4814c880cc60b
Author: John Sanda <jsanda(a)redhat.com>
Date: Fri Aug 26 22:00:26 2011 -0400
[BZ 732078] Adding support for detecting "viewable" files
This commit introduces a simple approach for determing whether or not a
file is viewable. The approach taken is try and determine whether or not
the file is a binary file. DriftManagerBean uses a hard coded list of
known file extensions for binary files. This is in no way as robust as
it could be but it may be sufficient. Since the solution is not robust,
I think it is important to try and detect if a file is a binary type as
opposed to detecting whether or not it is a text file suitable for
viewing. The rationale behind that is we do not want to prevent a user
from viewing a file or viewing a diff of a file when they should be able
to.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
index 1dd9e56..31c888d 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDetailsView.java
@@ -145,8 +145,95 @@ public class DriftDetailsView extends LocatableVLayout {
addMember(changeSetForm);
- // the drift history item itself
+ GWTServiceLookup.getDriftService().isBinaryFile(drift, new AsyncCallback<Boolean>() {
+ @Override
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError("Failed to look up file type", caught);
+ }
+
+ @Override
+ public void onSuccess(Boolean isBinary) {
+ if (isBinary) {
+ addMember(createDriftFormForBinaryFile(drift, previousVersion));
+ } else {
+ addMember(createDriftFormForTextFile(drift, previousVersion));
+ }
+ }
+ });
+ }
+
+ private DynamicForm createDriftFormForBinaryFile(Drift drift, DriftChangeSet previousVersion) {
+ DynamicForm driftForm = new LocatableDynamicForm(extendLocatorId("form"));
+ driftForm.setIsGroup(true);
+ driftForm.setGroupTitle(MSG.view_drift());
+ driftForm.setWrapItemTitles(false);
+ driftForm.setNumCols(4);
+
+ SpacerItem spacer = new SpacerItem();
+
+ StaticTextItem id = new StaticTextItem("id", MSG.common_title_id());
+ id.setValue(drift.getId());
+
+ StaticTextItem path = new StaticTextItem("path", MSG.common_title_path());
+ path.setValue(drift.getPath());
+
+ StaticTextItem timestamp = new StaticTextItem("timestamp", MSG.common_title_timestamp());
+ timestamp.setValue(TimestampCellFormatter.format(drift.getCtime(), DATE_TIME_FORMAT_FULL));
+
+ StaticTextItem category = new StaticTextItem("category", MSG.common_title_category());
+
+ LinkedHashMap<String, String> catIconsMap = new LinkedHashMap<String, String>(3);
+ catIconsMap.put(DriftDataSource.CATEGORY_ICON_ADD, DriftDataSource.CATEGORY_ICON_ADD);
+ catIconsMap.put(DriftDataSource.CATEGORY_ICON_CHANGE, DriftDataSource.CATEGORY_ICON_CHANGE);
+ catIconsMap.put(DriftDataSource.CATEGORY_ICON_REMOVE, DriftDataSource.CATEGORY_ICON_REMOVE);
+ LinkedHashMap<String, String> catValueMap = new LinkedHashMap<String, String>(3);
+ catValueMap.put(DriftDataSource.CATEGORY_ICON_ADD, MSG.view_drift_category_fileAdded());
+ catValueMap.put(DriftDataSource.CATEGORY_ICON_CHANGE, MSG.view_drift_category_fileChanged());
+ catValueMap.put(DriftDataSource.CATEGORY_ICON_REMOVE, MSG.view_drift_category_fileRemoved());
+ category.setValueMap(catValueMap);
+ category.setValueIcons(catIconsMap);
+ category.setShowIcons(true);
+
+ StaticTextItem oldFile = new StaticTextItem("oldFile", MSG.view_drift_table_oldFile());
+ FormItem oldFileLink = null;
+
+ StaticTextItem newFile = new StaticTextItem("newFile", MSG.view_drift_table_newFile());
+ FormItem newFileLink = null;
+
+ switch (drift.getCategory()) {
+ case FILE_ADDED:
+ category.setValue(DriftDataSource.CATEGORY_ICON_ADD);
+ oldFile.setValue(MSG.common_label_none());
+ oldFileLink = spacer;
+ newFile.setValue(drift.getNewDriftFile().getHashId());
+ newFileLink = spacer;
+ break;
+
+ case FILE_CHANGED:
+ category.setValue(DriftDataSource.CATEGORY_ICON_CHANGE);
+ oldFile.setValue(drift.getOldDriftFile().getHashId());
+ oldFileLink = createViewFileLink(drift.getOldDriftFile().getHashId(), drift.getPath(),
+ previousVersion.getVersion());
+ newFile.setValue(drift.getNewDriftFile().getHashId());
+ newFileLink = spacer;
+ break;
+
+ case FILE_REMOVED:
+ category.setValue(DriftDataSource.CATEGORY_ICON_REMOVE);
+ oldFile.setValue(drift.getOldDriftFile().getHashId());
+ oldFileLink = spacer;
+ newFile.setValue(MSG.common_label_none());
+ newFileLink = spacer;
+ break;
+ }
+
+ driftForm.setItems(id, spacer, path, spacer, category, spacer, timestamp, spacer, oldFile, oldFileLink,
+ newFile, newFileLink);
+
+ return driftForm;
+ }
+ private DynamicForm createDriftFormForTextFile(Drift drift, DriftChangeSet previousVersion) {
DynamicForm driftForm = new LocatableDynamicForm(extendLocatorId("form"));
driftForm.setIsGroup(true);
driftForm.setGroupTitle(MSG.view_drift());
@@ -232,7 +319,7 @@ public class DriftDetailsView extends LocatableVLayout {
newFile, newFileLink);
}
- addMember(driftForm);
+ return driftForm;
}
private LinkItem createViewFileLink(final String hash, final String path, final int version) {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java
index f8e2b20..9b96231 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java
@@ -111,6 +111,8 @@ public interface DriftGWTService extends RemoteService {
String getDriftFileBits(String hash) throws RuntimeException;
- FileDiffReport generateUnifiedDiff(Drift drift);
+ FileDiffReport generateUnifiedDiff(Drift drift) throws RuntimeException;
+
+ boolean isBinaryFile(Drift drift) throws RuntimeException;
}
\ No newline at end of file
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
index a71bba2..e8531be 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
@@ -151,11 +151,20 @@ public class DriftGWTServiceImpl extends AbstractGWTServiceImpl implements Drift
}
@Override
- public FileDiffReport generateUnifiedDiff(Drift drift) {
+ public FileDiffReport generateUnifiedDiff(Drift drift) throws RuntimeException {
try {
return driftManager.generateUnifiedDiff(drift);
} catch (Throwable t) {
throw getExceptionToThrowToClient(t);
}
}
+
+ @Override
+ public boolean isBinaryFile(Drift drift) throws RuntimeException {
+ try {
+ return driftManager.isBinaryFile(drift);
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
index 3f8ffa7..b1a7415 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
@@ -20,7 +20,9 @@ package org.rhq.enterprise.server.drift;
import java.io.File;
import java.io.InputStream;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
import javax.ejb.EJB;
import javax.ejb.Stateless;
@@ -92,6 +94,47 @@ import static javax.ejb.TransactionAttributeType.REQUIRES_NEW;
@Stateless
public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
+ private static Set<String> binaryFileTypes = new HashSet<String>();
+
+ static {
+ binaryFileTypes.add("jar");
+ binaryFileTypes.add("war");
+ binaryFileTypes.add("ear");
+ binaryFileTypes.add("sar"); // jboss service
+ binaryFileTypes.add("har"); // hibernate archive
+ binaryFileTypes.add("rar"); // resource adapter
+ binaryFileTypes.add("wsr"); // jboss web service archive
+ binaryFileTypes.add("zip");
+ binaryFileTypes.add("tar");
+ binaryFileTypes.add("bz2");
+ binaryFileTypes.add("gz");
+ binaryFileTypes.add("rpm");
+ binaryFileTypes.add("so");
+ binaryFileTypes.add("dll");
+ binaryFileTypes.add("exe");
+ binaryFileTypes.add("jpg");
+ binaryFileTypes.add("png");
+ binaryFileTypes.add("jpeg");
+ binaryFileTypes.add("pdf");
+ binaryFileTypes.add("swf");
+ binaryFileTypes.add("bpm");
+ binaryFileTypes.add("tiff");
+ binaryFileTypes.add("svg");
+ binaryFileTypes.add("doc");
+ binaryFileTypes.add("mp3");
+ binaryFileTypes.add("wav");
+ binaryFileTypes.add("m4a");
+ binaryFileTypes.add("mov");
+ binaryFileTypes.add("mpeg");
+ binaryFileTypes.add("avi");
+ binaryFileTypes.add("mp4");
+ binaryFileTypes.add("wmv");
+ binaryFileTypes.add("deb");
+ binaryFileTypes.add("sit");
+ binaryFileTypes.add("iso");
+ binaryFileTypes.add("dmg");
+ }
+
// TODO Should security checks be handled here instead of delegating to the drift plugin?
// Currently any security checks that need to be performed are delegated to the plugin.
// This is fine *so far* since the only plugin is the default which is our existing SLSB
@@ -440,6 +483,18 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
}
}
+ @Override
+ public boolean isBinaryFile(Drift drift) {
+ String path = drift.getPath();
+ int index = path.lastIndexOf('.');
+
+ if (index == -1 || index == path.length() - 1) {
+ return false;
+ }
+
+ return binaryFileTypes.contains(path.substring(index + 1, path.length()));
+ }
+
private DriftServerPluginFacet getServerPlugin() {
MasterServerPluginContainer masterPC = LookupUtil.getServerPluginService().getMasterPluginContainer();
if (masterPC == null) {
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
index c6fc043..663b626 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
@@ -129,4 +129,6 @@ public interface DriftManagerLocal extends DriftServerPluginFacet, DriftManagerR
* referenced by drift
*/
FileDiffReport generateUnifiedDiff(Drift drift);
+
+ boolean isBinaryFile(Drift drift);
}
commit 36aaee12edf28b926240b28a0153cbc3296e04e5
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Fri Aug 26 18:52:13 2011 -0400
disabling mongodb server side plugin for a)cause problematic brew
build dependencies b)not complete for release.
diff --git a/modules/enterprise/server/plugins/pom.xml b/modules/enterprise/server/plugins/pom.xml
index abf3f43..3fa05d3 100644
--- a/modules/enterprise/server/plugins/pom.xml
+++ b/modules/enterprise/server/plugins/pom.xml
@@ -83,8 +83,12 @@
<module>alert-cli</module>
<module>alert-log4j</module>
<module>cobbler</module>
- <module>drift-rhq</module>
+ <module>drift-rhq</module>
+ <!-- spinder,jsanda 8/26/11: Disabled from list of server plugins as
+ i)not ready for release
+ ii)causes plugin dependency issues with brew.
<module>drift-mongodb</module>
+ -->
<module>filetemplate-bundle</module>
<module>ant-bundle</module>
<module>validate-all-serverplugins</module>
commit 66085d0afba8abd80f7288924ec1b34c2b7f7043
Author: John Sanda <jsanda(a)redhat.com>
Date: Fri Aug 26 13:53:47 2011 -0400
Updating clean up code in DriftManager to not delete files until streams are closed
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftInputStream.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftInputStream.java
new file mode 100644
index 0000000..126ab58
--- /dev/null
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftInputStream.java
@@ -0,0 +1,93 @@
+/*
+ * 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 as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+package org.rhq.core.pc.drift;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * DriftInputStream is a simple wrapper the delegates to another input stream and executes
+ * a task after the underlying stream is closed. {@link DriftManager} uses this class to perform
+ * clean up after streaming change set reports and change set content to the server.
+ */
+// TODO come up with a better, more intuitive class name
+public class DriftInputStream extends InputStream {
+
+ private InputStream stream;
+
+ private Runnable cleanupTask;
+
+ /**
+ * Createa a new DriftInputStream.
+ *
+ * @param stream The stream to which this object delegates all calls
+ * @param cleanupTask A task to execute immediately after the stream is closed
+ */
+ public DriftInputStream(InputStream stream, Runnable cleanupTask) {
+ this.stream = stream;
+ this.cleanupTask = cleanupTask;
+ }
+
+ @Override
+ public int read() throws IOException {
+ return stream.read();
+ }
+
+ @Override
+ public int read(byte[] b) throws IOException {
+ return stream.read(b);
+ }
+
+ @Override
+ public int read(byte[] b, int off, int len) throws IOException {
+ return stream.read(b, off, len);
+ }
+
+ @Override
+ public long skip(long n) throws IOException {
+ return stream.skip(n);
+ }
+
+ @Override
+ public int available() throws IOException {
+ return stream.available();
+ }
+
+ @Override
+ public void close() throws IOException {
+ stream.close();
+ cleanupTask.run();
+ }
+
+ @Override
+ public void mark(int readlimit) {
+ stream.mark(readlimit);
+ }
+
+ @Override
+ public void reset() throws IOException {
+ stream.reset();
+ }
+
+ @Override
+ public boolean markSupported() {
+ return stream.markSupported();
+ }
+}
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
index a3512dc..4bffe9e 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
@@ -24,7 +24,6 @@ import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
-import java.io.FilenameFilter;
import java.io.IOException;
import java.util.List;
import java.util.Set;
@@ -52,7 +51,6 @@ import org.rhq.core.pc.inventory.ResourceContainer;
import org.rhq.core.pc.measurement.MeasurementManager;
import org.rhq.core.util.stream.StreamUtil;
-import static org.rhq.core.util.ZipUtil.zipFileOrDirectory;
import static org.rhq.core.util.file.FileUtil.purge;
public class DriftManager extends AgentService implements DriftAgentService, DriftClient, ContainerService {
@@ -130,6 +128,15 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
/**
* This method is provided as a test hook.
+ *
+ * @param changeSetMgr
+ */
+ void setChangeSetMgr(ChangeSetManager changeSetMgr) {
+ this.changeSetMgr = changeSetMgr;
+ }
+
+ /**
+ * This method is provided as a test hook.
* @return The schedule queue
*/
ScheduleQueue getSchedulesQueue() {
@@ -165,12 +172,29 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
DriftServerService driftServer = pluginContainerConfiguration.getServerServices().getDriftServerService();
// TODO Include the version in the change set file name to ensure the file name is unique
- File zipFile = new File(pluginContainerConfiguration.getTemporaryDirectory(), "changeset-" + resourceId
- + driftConfiguration.getName() + ".zip");
- zipFileOrDirectory(changeSetFile, zipFile);
+ String fileName = "changeset_" + System.currentTimeMillis() + ".zip";
+ final File zipFile = new File(changeSetFile.getParentFile(), fileName);
+ ZipOutputStream stream = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(zipFile)));
+
+ FileInputStream fis = new FileInputStream(changeSetFile);
+ stream.putNextEntry(new ZipEntry(changeSetFile.getName()));
+ StreamUtil.copy(fis, stream, false);
+ fis.close();
+ stream.close();
+
+ // We want to clean up after we send the zip file to the server. We do this by
+ // deleting the files in the content directory and the content zip itself. They
+ // are no longer needed after being sent to the server. We cannot immediately
+ // delete the content zip file though because it is sent asynchronously, and we
+ // wind up deleting it before it is sent. The following approach allows us to
+ // safely delete it when the comm layer closes the remote input stream.
+ //
+ // jsanda
+ DriftInputStream inputStream = new DriftInputStream(new BufferedInputStream(new FileInputStream(zipFile)),
+ new DeleteFile(zipFile));
+
+ driftServer.sendChangesetZip(resourceId, zipFile.length(), remoteInputStream(inputStream));
- driftServer.sendChangesetZip(resourceId, zipFile.length(), remoteInputStream(new BufferedInputStream(
- new FileInputStream(zipFile))));
} catch (IOException e) {
log.error("An error occurred while trying to send changeset[resourceId: " + resourceId
+ ", driftConfiguration: " + driftConfiguration.getName() + "]", e);
@@ -180,17 +204,11 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
@Override
public void sendChangeSetContentToServer(int resourceId, String driftConfigurationName, final File contentDir) {
try {
- File zipFile = new File(contentDir, "content.zip");
+ String contentFileName = "content_" + System.currentTimeMillis() + ".zip";
+ final File zipFile = new File(contentDir.getParentFile(), contentFileName);
ZipOutputStream stream = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(zipFile)));
- FilenameFilter contentZipFilter = new FilenameFilter() {
- @Override
- public boolean accept(File dir, String name) {
- return dir.equals(contentDir) && !name.equals("content.zip");
- }
- };
-
- for (File file : contentDir.listFiles(contentZipFilter)) {
+ for (File file : contentDir.listFiles()) {
FileInputStream fis = new FileInputStream(file);
stream.putNextEntry(new ZipEntry(file.getName()));
StreamUtil.copy(fis, stream, false);
@@ -198,9 +216,19 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
}
stream.close();
+ // We want to clean up after we send the zip file to the server. We do this by
+ // deleting the files in the content directory and the content zip itself. They
+ // are no longer needed after being sent to the server. We cannot immediately
+ // delete the content zip file though because it is sent asynchronously, and we
+ // wind up deleting it before it is sent. The following approach allows us to
+ // safely delete it when the comm layer closes the remote input stream.
+ //
+ // jsanda
+ DriftInputStream inputStream = new DriftInputStream(new BufferedInputStream(new FileInputStream(zipFile)),
+ new DeleteFile(zipFile));
+
DriftServerService driftServer = pluginContainerConfiguration.getServerServices().getDriftServerService();
- driftServer.sendFilesZip(resourceId, zipFile.length(), remoteInputStream(new BufferedInputStream(
- new FileInputStream(zipFile))));
+ driftServer.sendFilesZip(resourceId, zipFile.length(), remoteInputStream(inputStream));
} catch (IOException e) {
log.error("An error occurred while trying to send content for changeset[resourceId: " + resourceId
+ ", driftConfiguration: " + driftConfigurationName + "]", e);
@@ -381,4 +409,18 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
protected MeasurementManager getMeasurementManager() {
return PluginContainer.getInstance().getMeasurementManager();
}
+
+ private static class DeleteFile implements Runnable {
+
+ private File file;
+
+ public DeleteFile(File file) {
+ this.file = file;
+ }
+
+ @Override
+ public void run() {
+ file.delete();
+ }
+ }
}
diff --git a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftManagerTest.java b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftManagerTest.java
index 5a53ee6..226e84b 100644
--- a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftManagerTest.java
+++ b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftManagerTest.java
@@ -20,6 +20,7 @@
package org.rhq.core.pc.drift;
import java.io.File;
+import java.io.FilenameFilter;
import java.io.IOException;
import java.io.InputStream;
@@ -31,6 +32,8 @@ import org.rhq.core.domain.drift.DriftConfiguration;
import org.rhq.core.pc.PluginContainerConfiguration;
import org.rhq.core.pc.ServerServices;
+import static org.apache.commons.io.FileUtils.deleteDirectory;
+import static org.rhq.core.domain.drift.DriftChangeSetCategory.COVERAGE;
import static org.rhq.core.util.ZipUtil.unzipFile;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
@@ -64,15 +67,72 @@ public class DriftManagerTest extends DriftTest {
driftMgr.setConfiguration(pcConfig);
}
-// @AfterMethod
-// public void shutDownDriftManager() {
-// driftMgr.shutdown();
-// }
+ @Test
+ public void writeChangeSetZipFileToChangeSetDirectory() throws Exception {
+ final DriftConfiguration config = driftConfiguration("write-changeset-file", resourceDir.getAbsolutePath());
+ final File changeSetDir = changeSetDir(config.getName());
+ createRandomFile(changeSetDir, "changeset.txt");
+
+ setDriftServiceCallback(new DriftServiceCallback() {
+ @Override
+ public void execute() {
+ assertThatZipFileExists(changeSetDir, "changeset_",
+ "Expected to find change set zip file " +
+ "in " + changeSetDir.getPath() + ". The file name should follow the pattern " +
+ "changeset_<integer_timestamp>.zip");
+ }
+ });
+
+ driftMgr.setChangeSetMgr(changeSetMgr);
+ driftMgr.getSchedulesQueue().addSchedule(new DriftDetectionSchedule(resourceId(), config));
+ driftMgr.sendChangeSetToServer(resourceId(), config, COVERAGE);
+ }
+
+ @Test
+ public void sendChangeSetReportInZipFile() throws Exception {
+ final DriftConfiguration config = driftConfiguration("send-changeset-in-zip", resourceDir.getAbsolutePath());
+ final File changeSetDir = changeSetDir(config.getName());
+ final File changeSetFile = createRandomFile(changeSetDir, "changeset.txt");
+
+ setDriftServiceCallback(new DriftServiceCallback() {
+ @Override
+ public void execute() {
+ assertZipFileMatches(driftServerService.inputStream, changeSetFile);
+ }
+ });
+
+ driftMgr.setChangeSetMgr(changeSetMgr);
+ driftMgr.getSchedulesQueue().addSchedule(new DriftDetectionSchedule(resourceId(), config));
+ driftMgr.sendChangeSetToServer(resourceId(), config, COVERAGE);
+ }
+
+ @Test
+ public void cleanUpAfterSendingChangeSetToServer() throws Exception {
+ final DriftConfiguration config = driftConfiguration("send-changeset-in-zip", resourceDir.getAbsolutePath());
+ final File changeSetDir = changeSetDir(config.getName());
+ createRandomFile(changeSetDir, "changeset.txt");
+
+ driftMgr.setChangeSetMgr(changeSetMgr);
+ driftMgr.getSchedulesQueue().addSchedule(new DriftDetectionSchedule(resourceId(), config));
+ driftMgr.sendChangeSetToServer(resourceId(), config, COVERAGE);
+
+ // clean up should not happen until after the input stream is closed. The remote
+ // input stream is consumed asynchronously; so, we have to wait until the stream
+ // is closed. We could otherwise disrupt the transmission of bits.
+
+ File changeSetZip = assertThatZipFileExists(changeSetDir, "changeset_", "Expected to find change set zip " +
+ "zip file in " + changeSetDir.getPath() + ". The file name should follow the pattern " +
+ "changeset_<integer_timestamp>.zip");
+
+ driftServerService.inputStream.close();
+
+ assertFalse(changeSetZip.exists(), "The change set zip should be deleted when the remote input stream is closed.");
+ }
@Test
public void writeContentZipFileToChangeSetContentDirectory() throws Exception {
String configName = "send-content-in-zip";
- File changeSetDir = changeSetDir(configName);
+ final File changeSetDir = changeSetDir(configName);
final File contentDir = mkdir(changeSetDir, "content");
createRandomFile(contentDir, "content-1");
@@ -81,9 +141,9 @@ public class DriftManagerTest extends DriftTest {
setDriftServiceCallback(new DriftServiceCallback() {
@Override
public void execute() {
- File contentZip = new File(contentDir, "content.zip");
- assertTrue(contentZip.exists(), "Expected content zip file to be written to the change set content " +
- "directory: " + contentDir.getPath());
+ assertThatZipFileExists(changeSetDir, "content_", "Expected to find content zip file in " +
+ changeSetDir.getPath() + ". The file name should follow the pattern " +
+ "content_<integer_timestamp>.zip");
}
});
@@ -102,7 +162,7 @@ public class DriftManagerTest extends DriftTest {
setDriftServiceCallback(new DriftServiceCallback() {
@Override
public void execute() {
- assertZipFileMatches(driftServerService.filesZipStream, content1, content2);
+ assertZipFileMatches(driftServerService.inputStream, content1, content2);
}
});
@@ -120,6 +180,16 @@ public class DriftManagerTest extends DriftTest {
driftMgr.sendChangeSetContentToServer(resourceId(), configName, contentDir);
+ // clean up should not happen until after the input stream is closed. The remote
+ // input stream is consumed asynchronously; so, we have to wait until the stream
+ // is closed. We could otherwise disrupt the transmission of bits.
+ File contentZipFile = assertThatZipFileExists(changeSetDir, "content_",
+ "Expected to find content zip file in " +
+ changeSetDir.getPath() + ". The file name should have a pattern of content_integer_timestamp>.zip");
+
+ driftServerService.inputStream.close();
+
+ assertFalse(contentZipFile.exists(), "The content zip should be deleted when the remote input stream is closed");
assertThatDirectoryIsEmpty(contentDir);
}
@@ -183,9 +253,11 @@ public class DriftManagerTest extends DriftTest {
private void assertZipFileMatches(InputStream zipStream, File... expectedFiles) {
File zipDir = new File(tmpDir, "output");
try {
+ deleteDirectory(zipDir);
+ zipDir.mkdirs();
unzipFile(zipStream, zipDir);
} catch (IOException e) {
- fail("Failed to unzip zip file from intput stream into " + zipDir.getPath(), e);
+ fail("An error occurred while trying to unzip " + zipDir.getPath(), e);
}
assertEquals(zipDir.listFiles().length, expectedFiles.length, "The zip file has the wrong number of files");
@@ -217,6 +289,28 @@ public class DriftManagerTest extends DriftTest {
}
/**
+ * This method searches the specified directory for a zip file with the specified
+ * prefix. The file name must start with the prefix and end with an extension of .zip.
+ * This method assumes that there should be one and only one match. If there is not
+ * exactly one match, it will fail the test.
+ *
+ * @param dir The directory to search (sub directories are not searched)
+ * @param fileNamePrefix The zip file name prefix
+ * @param msg An error message
+ * @return The matching zip file
+ */
+ private File assertThatZipFileExists(final File dir, final String fileNamePrefix, String msg) {
+ File[] files = dir.listFiles(new FilenameFilter() {
+ @Override
+ public boolean accept(File dir, String name) {
+ return name.startsWith(fileNamePrefix) && name.endsWith(".zip");
+ }
+ });
+ assertEquals(files.length, 1, msg);
+ return files[0];
+ }
+
+ /**
* Sets a callback that will be invoked immediately after DriftManager calls
* {@link DriftServerService#sendChangesetZip(int, long, java.io.InputStream)} or
* {@link DriftServerService#sendFilesZip(int, long, java.io.InputStream)}. The callback
@@ -231,21 +325,28 @@ public class DriftManagerTest extends DriftTest {
private static class TestDriftServerService implements DriftServerService {
- public int filesZipResourceId;
- public long filesZipSize;
- public InputStream filesZipStream;
+ public int resourceId;
+ public long fileSize;
+ public InputStream inputStream;
public DriftServiceCallback callback;
@Override
public void sendChangesetZip(int resourceId, long zipSize, InputStream zipStream) {
+ this.resourceId = resourceId;
+ fileSize = zipSize;
+ inputStream = zipStream;
+
+ if (callback != null) {
+ callback.execute();
+ }
}
@Override
public void sendFilesZip(int resourceId, long zipSize, InputStream zipStream) {
- filesZipResourceId = resourceId;
- filesZipSize = zipSize;
- filesZipStream = zipStream;
+ this.resourceId = resourceId;
+ fileSize = zipSize;
+ inputStream = zipStream;
if (callback != null) {
callback.execute();
commit 300308759921d5cc2315dbb85b49a29e9f0983c3
Merge: 5956151 8db63e0
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Aug 25 18:29:29 2011 -0500
Merge branch 'mod_cluster_plugin'
commit 8db63e00ec03b5c0257925becda0b984351b6664
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Aug 25 18:27:05 2011 -0500
Refactoring configuration file classes to accept files in the constructor to allow testing. Also, added basic configuration files for testing.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java
index dee2f81..d49ce88 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java
@@ -39,11 +39,16 @@ import org.xml.sax.SAXException;
* @author Stefan Negrea
*/
public abstract class AbstractConfigurationFile {
- private String fileName;
+ private File configurationFile;
private Document document;
public AbstractConfigurationFile(String fileName) throws ParserConfigurationException, SAXException, IOException {
- this.fileName = fileName;
+ this(new File(fileName));
+ }
+
+ public AbstractConfigurationFile(File configurationFile) throws ParserConfigurationException, SAXException,
+ IOException {
+ this.configurationFile = configurationFile;
loadConfiguratonFile();
}
@@ -53,13 +58,6 @@ public abstract class AbstractConfigurationFile {
abstract String getPropertyValue(String propertyName);
/**
- * @return the fileName
- */
- public String getFileName() {
- return fileName;
- }
-
- /**
* @return the doc
*/
public Document getDocument() {
@@ -67,8 +65,7 @@ public abstract class AbstractConfigurationFile {
}
public void saveConfigurationFile() throws Exception {
- File file = new File(this.getFileName());
- StreamResult result = new StreamResult(file);
+ StreamResult result = new StreamResult(this.configurationFile);
Source source = new DOMSource(this.getDocument());
Transformer transformer = TransformerFactory.newInstance().newTransformer();
@@ -79,6 +76,6 @@ public abstract class AbstractConfigurationFile {
private void loadConfiguratonFile() throws ParserConfigurationException, SAXException, IOException {
DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
- this.document = docBuilder.parse(this.getFileName());
+ this.document = docBuilder.parse(this.configurationFile);
}
}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java
index 45204e1..01f992e 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java
@@ -19,6 +19,7 @@
package org.rhq.plugins.modcluster.config;
+import java.io.File;
import java.io.IOException;
import javax.xml.parsers.ParserConfigurationException;
@@ -47,6 +48,12 @@ public class JBossWebServerFile extends AbstractConfigurationFile {
listenerNode = this.getListenerNode();
}
+ public JBossWebServerFile(File configurationFile) throws ParserConfigurationException, SAXException, IOException {
+ super(configurationFile);
+
+ listenerNode = this.getListenerNode();
+ }
+
@Override
public void setPropertyValue(String propertyName, String value) {
NamedNodeMap attributeList = listenerNode.getAttributes();
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
index c2cf3a8..9ff7752 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
@@ -18,6 +18,7 @@
*/
package org.rhq.plugins.modcluster.config;
+import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@@ -44,7 +45,19 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
* @throws SAXException
* @throws IOException
*/
- public ModClusterBeanFile(String className, String configurationFile) throws ParserConfigurationException,
+ public ModClusterBeanFile(String className, String configurationFileName) throws ParserConfigurationException,
+ SAXException, IOException {
+ this(className, new File(configurationFileName));
+ }
+
+ /**
+ * @param className
+ * @param configurationFile
+ * @throws ParserConfigurationException
+ * @throws SAXException
+ * @throws IOException
+ */
+ public ModClusterBeanFile(String className, File configurationFile) throws ParserConfigurationException,
SAXException, IOException {
super(configurationFile);
@@ -59,7 +72,20 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
* @throws SAXException
* @throws IOException
*/
- public ModClusterBeanFile(String className, String constructorArgumentClassName, String configurationFile)
+ public ModClusterBeanFile(String className, String constructorArgumentClassName, String configurationFileName)
+ throws ParserConfigurationException, SAXException, IOException {
+ this(className, constructorArgumentClassName, new File(configurationFileName));
+ }
+
+ /**
+ * @param className
+ * @param constructorArgumentClassName
+ * @param configurationFile
+ * @throws ParserConfigurationException
+ * @throws SAXException
+ * @throws IOException
+ */
+ public ModClusterBeanFile(String className, String constructorArgumentClassName, File configurationFile)
throws ParserConfigurationException, SAXException, IOException {
super(configurationFile);
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java
index b8fca4c..871b082 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java
@@ -18,6 +18,9 @@
*/
package org.rhq.plugins.modcluster.test;
+import java.io.File;
+import java.net.URL;
+
import org.testng.annotations.Test;
import org.rhq.plugins.modcluster.config.JBossWebServerFile;
@@ -26,12 +29,12 @@ import org.rhq.plugins.modcluster.config.ModClusterBeanFile;
public class ServerConfigTest {
@Test
- public void TestModClusterConfig() {
-
+ public void TestSimpleBeanModClusterConfig() {
try {
- //Test simple bean configuration
- ModClusterBeanFile config = new ModClusterBeanFile("org.jboss.modcluster.ha.HAModClusterService",
- "/home/snegrea/Downloads/jboss51eap/jboss-as/server/all/deploy/mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml");
+ URL testConfigURL = getClass().getResource("/xml_config/mod_cluster-jboss-beans.xml");
+ File testFile = new File(testConfigURL.toURI());
+
+ ModClusterBeanFile config = new ModClusterBeanFile("org.jboss.modcluster.ha.HAModClusterService", testFile);
config.setPropertyValue("processStatusFrequency", "4");
config.setPropertyValue("test", "5");
config.setPropertyValue("test", "123");
@@ -40,11 +43,19 @@ public class ServerConfigTest {
config.setPropertyValue("processStatusFrequency", null);
config.saveConfigurationFile();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ public void TestBeanWithDependenciesModClusterConfig() {
+ try {
+ URL testConfigURL = getClass().getResource("/xml_config/mod_cluster-jboss-beans.xml");
+ File testFile = new File(testConfigURL.toURI());
- //Test bean configuration with constructor dependency
- config = new ModClusterBeanFile("org.jboss.modcluster.ha.HAModClusterService",
- "org.jboss.modcluster.config.ha.HAModClusterConfig",
- "/home/snegrea/Downloads/jboss51eap/jboss-as/server/all/deploy/mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml");
+ ModClusterBeanFile config = new ModClusterBeanFile("org.jboss.modcluster.ha.HAModClusterService",
+ "org.jboss.modcluster.config.ha.HAModClusterConfig", testFile);
config.setPropertyValue("processStatusFrequency", "4");
config.setPropertyValue("test", "5");
config.setPropertyValue("test", "123");
@@ -53,18 +64,17 @@ public class ServerConfigTest {
config.setPropertyValue("processStatusFrequency", null);
config.saveConfigurationFile();
} catch (Exception e) {
- // TODO Auto-generated catch block
e.printStackTrace();
}
}
@Test
public void TestJBossWebConfig() {
-
try {
- //Test simple bean configuration
- JBossWebServerFile config = new JBossWebServerFile(
- "/home/snegrea/Downloads/jboss42/server/all/deploy/jboss-web.deployer/server.xml");
+ URL testConfigURL = getClass().getResource("/xml_config/server.xml");
+ File testFile = new File(testConfigURL.toURI());
+
+ JBossWebServerFile config = new JBossWebServerFile(testFile);
config.setPropertyValue("processStatusFrequency", "4");
config.setPropertyValue("test", "5");
config.setPropertyValue("test", "123");
@@ -74,7 +84,6 @@ public class ServerConfigTest {
config.saveConfigurationFile();
} catch (Exception e) {
- // TODO Auto-generated catch block
e.printStackTrace();
}
}
diff --git a/modules/plugins/mod-cluster/src/test/resources/xml_config/mod_cluster-jboss-beans.xml b/modules/plugins/mod-cluster/src/test/resources/xml_config/mod_cluster-jboss-beans.xml
new file mode 100644
index 0000000..1ef344b
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/test/resources/xml_config/mod_cluster-jboss-beans.xml
@@ -0,0 +1,337 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ Beans that provide JBoss AS-side functionality for mod_cluster. These
+ beans are all "On Demand", i.e. that are not installed unless requested.
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!-- Entry point: catalina lifecycle listener -->
+ <bean class="org.jboss.modcluster.catalina.CatalinaEventHandlerAdapter" name="ModClusterListener">
+ <constructor>
+ <parameter class="org.jboss.modcluster.ContainerEventHandler">
+<inject bean="HAModClusterService"/>
+</parameter>
+ <parameter class="javax.management.MBeanServer">
+<inject bean="JMXKernel" property="mbeanServer"/>
+</parameter>
+ </constructor>
+ <depends>WebServer</depends>
+ </bean>
+
+ <!-- The core mod_cluster service -->
+ <bean class="org.jboss.modcluster.ModClusterService" mode="On Demand" name="ModClusterService">
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster",exposedInterface=org.jboss.modcluster.ModClusterServiceMBean.class)</annotation>
+ <constructor>
+ <parameter class="org.jboss.modcluster.config.ModClusterConfig">
+<inject bean="ModClusterConfig"/>
+</parameter>
+ <parameter class="org.jboss.modcluster.load.LoadBalanceFactorProvider">
+<inject bean="DynamicLoadBalanceFactorProvider"/>
+</parameter>
+ </constructor>
+ </bean>
+
+ <!-- The core mod_cluster service, implemented as an HA singleton -->
+ <bean class="org.jboss.modcluster.ha.HAModClusterService" mode="On Demand" name="HAModClusterService">
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster",exposedInterface=org.jboss.modcluster.ha.HAModClusterServiceMBean.class)</annotation>
+ <constructor>
+ <parameter class="org.jboss.modcluster.config.ha.HAModClusterConfig">
+<inject bean="ModClusterConfig"/>
+</parameter>
+ <parameter class="org.jboss.modcluster.load.LoadBalanceFactorProvider">
+<inject bean="DynamicLoadBalanceFactorProvider"/>
+</parameter>
+ <parameter class="org.jboss.ha.framework.interfaces.HAPartition">
+<inject bean="HAPartition"/>
+</parameter>
+ <parameter class="org.jboss.ha.framework.interfaces.HASingletonElectionPolicy">
+<bean class="org.jboss.ha.singleton.HASingletonElectionPolicySimple"/>
+</parameter>
+ </constructor>
+
+</bean>
+
+ <!-- Configure this node's communication with the load balancer -->
+ <bean class="org.jboss.modcluster.config.ha.HAModClusterConfig" mode="On Demand" name="ModClusterConfig">
+
+ <!-- Comma separated list of address:port listing the httpd servers
+ where mod_cluster is running. -->
+ <property name="proxyList">${jboss.mod_cluster.proxyList,jboss.modcluster.proxyList:}</property>
+ <!-- URL prefix to send with commands to mod_cluster. Default is no prefix. -->
+ <!--property name="proxyURL"></property-->
+
+ <!-- mod_advertise is a small httpd module that advertises the
+ availability of httpd servers via multicast, allowing
+ ModClusterService to discover the httpd front-end instead of/in
+ addition to having them defined in proxyList. -->
+ <!-- Whether to listen for advertise messages -->
+ <property name="advertise">${jboss.mod_cluster.advertise:true}</property>
+ <!-- Multicast address on which to listen for advertisements -->
+ <property name="advertiseGroupAddress">${jboss.mod_cluster.advertise.address,jboss.modcluster.advertise.address,jboss.partition.udpGroup:224.0.1.105}</property>
+ <!-- Port to listen to for advertisements -->
+ <property name="advertisePort">${jboss.mod_cluster.advertise.port,jboss.modcluster.advertise.port:23364}</property>
+
+ <!-- Comma delimited list of contexts that should *not* be auto-registered with httpd. -->
+ <!-- ROOT indicates the root context. -->
+ <!-- Context may be qualified by host using a colon, e.g. host1:context1 -->
+ <!-- If no host is defined, localhost is assumed. -->
+ <property name="excludedContexts">${jboss.mod_cluster.excludedContexts,jboss.modcluster.excludedContexts:ROOT,admin-console,invoker,jbossws,jmx-console}</property>
+ <property name="autoEnableContexts">${jboss.mod_cluster.autoEnableContexts:true}</property>
+
+ <!-- Security key the proxy is going to send with advertise messages.
+ Default is none. -->
+ <!--property name="advertiseSecurityKey"></property-->
+
+ <!-- Whether to use SSL to communicate with mod_cluster. Note this
+ has nothing to do with handling of https requests by JBoss Web -->
+ <property name="ssl">false</property>
+
+ <!-- Configuration values for the load balancer itself (must be the
+ same on all nodes in the cluster). These will be passed to the
+ load balancer. -->
+ <property name="stickySession">true</property>
+ <property name="stickySessionForce">false</property>
+ <property name="stickySessionRemove">false</property>
+ <property name="maxAttempts">1</property>
+ <property name="workerTimeout">-1</property>
+ </bean>
+
+ <!-- Provides information to ModClusterService informing it how much load
+ this server should take. This impl calculates load factor from a
+ number of metrics and adjusts the value periodically based on runtime
+ conditions, using to the JBossWeb engine's backgroundProcessorDelay. -->
+ <bean class="org.jboss.modcluster.load.impl.DynamicLoadBalanceFactorProvider" mode="On Demand" name="DynamicLoadBalanceFactorProvider">
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster,provider=LoadBalanceFactor",exposedInterface=org.jboss.modcluster.load.impl.DynamicLoadBalanceFactorProviderMBean.class)</annotation>
+ <constructor>
+ <parameter>
+ <!-- Define the load metrics to use in your load balance factor calculation here -->
+ <set elementClass="org.jboss.modcluster.load.metric.LoadMetric">
+ <inject bean="BusyConnectorsLoadMetric"/>
+ <inject bean="HeapMemoryUsageLoadMetric"/>
+ </set>
+ </parameter>
+ </constructor>
+ <!-- The number of historical load values used to determine load factor -->
+ <!--property name="history">9</property-->
+ <!-- The exponential decay factor for historical load values -->
+ <!--property name="decayFactor">2</property-->
+ </bean>
+
+ <!-- Default load metrics/sources -->
+ <!-- The JBossWeb connector thread pool usage as a ratio of busy threads to max thread pool size -->
+ <!-- Analogous to method=B in mod_jk -->
+ <bean class="org.jboss.modcluster.load.metric.impl.BusyConnectorsLoadMetric" mode="On Demand" name="BusyConnectorsLoadMetric">
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster,provider=LoadBalanceFactor,metric=BusyConnectors",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
+ <constructor>
+ <parameter>
+<inject bean="ThreadPoolLoadMetricSource"/>
+</parameter>
+ </constructor>
+ <!-- The weight determines the significance of this metric with respect
+ to others in the overall load balance factor calculation -->
+ <property name="weight">2</property>
+ </bean>
+ <!-- Queries all JBossWeb ThreadPool mbeans -->
+ <bean class="org.jboss.modcluster.load.metric.impl.ThreadPoolLoadMetricSource" mode="On Demand" name="ThreadPoolLoadMetricSource">
+ <constructor>
+ <parameter class="javax.management.MBeanServer">
+<inject bean="JMXKernel" property="mbeanServer"/>
+</parameter>
+ <!-- Object name pattern for connector thread pools -->
+ <!--parameter>jboss.web:type=ThreadPool,*</parameter-->
+ </constructor>
+ </bean>
+
+ <!-- The heap memory usage as a ratio of used heap to max heap size -->
+ <!-- N.B. This load metric is its own source -->
+ <bean class="org.jboss.modcluster.load.metric.impl.HeapMemoryUsageLoadMetric" mode="On Demand" name="HeapMemoryUsageLoadMetric">
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster,provider=LoadBalanceFactor,metric=HeapMemoryUsage",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
+ <!--property name="weight">1</property-->
+ </bean>
+
+
+ <!-- Alternative load balance factor providers -->
+
+ <!-- Basic impl that returns a static load balance factor.
+ This would replace the DynamicLoadBalanceFactorProvider
+ used above.
+ -->
+ <bean class="org.jboss.modcluster.load.impl.SimpleLoadBalanceFactorProvider" mode="On Demand" name="SimpleLoadBalanceFactorProvider">
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster,provider=LoadBalanceFactor",exposedInterface=org.jboss.modcluster.load.impl.SimpleLoadBalanceFactorProviderMBean.class)</annotation>
+ <property name="loadBalanceFactor">1</property>
+ </bean>
+
+ <!--
+ Alternative load metrics, grouped by source.
+ To use these, inject them into the set passed to the
+ DynamicLoadBalanceFactorProvider bean's constructor above.
+ -->
+
+ <!-- CPU usage -->
+ <!-- Perhaps the best metric for determining system load - but only available on Java 1.6 or later -->
+ <bean class="org.jboss.modcluster.load.metric.impl.AverageSystemLoadMetric" mode="On Demand" name="AverageSystemLoadMetric">
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster,provider=LoadBalanceFactor,metric=AverageSystemLoad",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
+ <constructor>
+ <parameter>
+<inject bean="OperatingSystemLoadMetricSource"/>
+</parameter>
+ </constructor>
+ </bean>
+ <!-- The system memory usage as ratio of used memory to total memory size -->
+ <!-- Requires com.sun.management.OperatingSystemMXBean, i.e. Sun or OpenJDK JVM -->
+ <bean class="org.jboss.modcluster.load.metric.impl.SystemMemoryUsageLoadMetric" mode="On Demand" name="SystemMemoryUsageLoadMetric">
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster,provider=LoadBalanceFactor,metric=SystemMemoryUsage",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
+ <constructor>
+ <parameter>
+<inject bean="OperatingSystemLoadMetricSource"/>
+</parameter>
+ </constructor>
+ </bean>
+ <!-- Uses the platform's OperatingSystemMXBean -->
+ <bean class="org.jboss.modcluster.load.metric.impl.OperatingSystemLoadMetricSource" mode="On Demand" name="OperatingSystemLoadMetricSource">
+ </bean>
+
+
+ <!-- The number of requests/sec processed by the JBossWeb connectors, with respect to the defined capacity -->
+ <!-- Analogous to method=R in mod_jk -->
+ <bean class="org.jboss.modcluster.load.metric.impl.RequestCountLoadMetric" mode="On Demand" name="RequestCountLoadMetric">
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster,provider=LoadBalanceFactor,metric=RequestCount",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
+ <constructor>
+ <parameter class="org.jboss.modcluster.load.metric.impl.RequestProcessorLoadMetricSource">
+<inject bean="RequestProcessorLoadMetricSource"/>
+</parameter>
+ <!--parameter>requestCount</parameter-->
+ </constructor>
+ <!-- This metric requires an explicit capacity, e.g. maximum capacity of 1000 requests/sec -->
+ <property name="capacity">1000</property>
+ </bean>
+ <!-- The incoming traffic received by JBossWeb connectors in KB/sec, with respect to the defined capacity -->
+ <!-- Analogous to method=T in mod_jk -->
+ <bean class="org.jboss.modcluster.load.metric.impl.ReceiveTrafficLoadMetric" mode="On Demand" name="ReceiveTrafficLoadMetric">
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster,provider=LoadBalanceFactor,metric=ReceiveTraffic",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
+ <constructor>
+ <parameter class="org.jboss.modcluster.load.metric.impl.RequestProcessorLoadMetricSource">
+<inject bean="RequestProcessorLoadMetricSource"/>
+</parameter>
+ <!--parameter>bytesReceived</parameter-->
+ </constructor>
+ <!-- This metric requires an explicit capacity, e.g. max capacity of 1024 KB/s -->
+ <property name="capacity">1024</property>
+ </bean>
+ <!-- The outgoing traffic sent by JBossWeb connectors in KB/sec, with respect to the defined capacity -->
+ <bean class="org.jboss.modcluster.load.metric.impl.SendTrafficLoadMetric" mode="On Demand" name="SendTrafficLoadMetric">
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster,provider=LoadBalanceFactor,metric=SendTraffic",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
+ <constructor>
+ <parameter class="org.jboss.modcluster.load.metric.impl.RequestProcessorLoadMetricSource">
+<inject bean="RequestProcessorLoadMetricSource"/>
+</parameter>
+ <!--parameter>bytesSent</parameter-->
+ </constructor>
+ <!-- This metric requires an explicit capacity, e.g. max capacity of 512 KB/s -->
+ <property name="capacity">512</property>
+ </bean>
+ <!-- Queries all JBossWeb GlobalRequestProcessor mbeans -->
+ <bean class="org.jboss.modcluster.load.metric.impl.RequestProcessorLoadMetricSource" mode="On Demand" name="RequestProcessorLoadMetricSource">
+ <constructor>
+ <parameter class="javax.management.MBeanServer">
+<inject bean="JMXKernel" property="mbeanServer"/>
+</parameter>
+ <!-- Object name pattern for request processors -->
+ <!--parameter>jboss.web:type=GlobalRequestProcessor,*</parameter-->
+ </constructor>
+ </bean>
+
+
+ <!-- The number of active sessions, with respect to the defined capacity -->
+ <!-- Analogous to method=S in mod_jk -->
+ <bean class="org.jboss.modcluster.load.metric.impl.ActiveSessionsLoadMetric" mode="On Demand" name="ActiveSessionsLoadMetric">
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster,provider=LoadBalanceFactor,metric=ActiveSessions",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
+ <constructor>
+ <parameter>
+<inject bean="SessionLoadMetricSource"/>
+</parameter>
+ <!--parameter>activeSessions</parameter-->
+ </constructor>
+ <!-- This metric requires an explicit capacity, e.g. max capacity of 1000 active sessions -->
+ <property name="capacity">1000</property>
+ </bean>
+ <!-- Queries all JBossWeb session manager mbeans -->
+ <bean class="org.jboss.modcluster.load.metric.impl.SessionLoadMetricSource" mode="On Demand" name="SessionLoadMetricSource">
+ <constructor>
+ <parameter class="javax.management.MBeanServer">
+<inject bean="JMXKernel" property="mbeanServer"/>
+</parameter>
+ <!-- Object name pattern for session managers -->
+ <!--parameter>jboss.web:type=Manager,*</parameter-->
+ </constructor>
+ </bean>
+
+
+ <!-- Returns the connection pool usage as a ratio of used to max pool size -->
+ <bean class="org.jboss.modcluster.load.metric.impl.ConnectionPoolUsageLoadMetric" mode="On Demand" name="ConnectionPoolUsageMetric">
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster,provider=LoadBalanceFactor,metric=ConnectionPoolUsage",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
+ <constructor>
+ <parameter>
+<inject bean="ConnectionPoolLoadMetricSource"/>
+</parameter>
+ <!--parameter>InUseConnectionCount</parameter-->
+ <!--parameter>MaxSize</parameter-->
+ </constructor>
+ </bean>
+ <!-- Queries all JCA connection pools -->
+ <bean class="org.jboss.modcluster.load.metric.impl.ConnectionPoolLoadMetricSource" mode="On Demand" name="ConnectionPoolLoadMetricSource">
+ <constructor>
+ <parameter class="javax.management.MBeanServer">
+<inject bean="JMXKernel" property="mbeanServer"/>
+</parameter>
+ <!-- Object name pattern for connector thread pools -->
+ <!--parameter>jboss.jca:service=ManagedConnectionPool,*</parameter-->
+ </constructor>
+ </bean>
+
+ <!-- Generic load metrics/sources -->
+
+ <!-- Uses the sum of the values of the specified attribute for each
+ mbean matching the query, with respect to a defined capacity. -->
+ <bean class="org.jboss.modcluster.load.metric.impl.MBeanAttributeLoadMetric" mode="On Demand" name="MBeanAttributeLoadMetric">
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster,provider=LoadBalanceFactor,metric=MBeanAttribute",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
+ <constructor>
+ <parameter>
+<inject bean="MBeanQueryLoadMetricSource"/>
+</parameter>
+ <parameter>
+<!-- mbean attribute -->
+</parameter>
+ </constructor>
+ <property name="capacity">1</property>
+ </bean>
+ <!-- Uses the ratio of the sum of the values of the specified dividend attribute,
+ to the sum of the values of the specified divisor attribute for each mbean
+ matching the query. -->
+ <bean class="org.jboss.modcluster.load.metric.impl.MBeanAttributeRatioLoadMetric" mode="On Demand" name="MBeanAttributeRatioLoadMetric">
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster,provider=LoadBalanceFactor,metric=MBeanAttributeRatio",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
+ <constructor>
+ <parameter>
+<inject bean="MBeanQueryLoadMetricSource"/>
+</parameter>
+ <parameter>
+<!-- dividend attribute -->
+</parameter>
+ <parameter>
+<!-- divisor attribute -->
+</parameter>
+ </constructor>
+ </bean>
+ <!-- Queries for mbeans matching the specified pattern -->
+ <bean class="org.jboss.modcluster.load.metric.impl.MBeanQueryLoadMetricSource" mode="On Demand" name="MBeanQueryLoadMetricSource">
+ <constructor>
+ <parameter>
+<!-- ObjectName pattern -->
+</parameter>
+ <parameter>
+<inject bean="JMXKernel" property="mbeanServer"/>
+</parameter>
+ </constructor>
+ </bean>
+
+</deployment>
diff --git a/modules/plugins/mod-cluster/src/test/resources/xml_config/server.xml b/modules/plugins/mod-cluster/src/test/resources/xml_config/server.xml
new file mode 100644
index 0000000..51fb479
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/test/resources/xml_config/server.xml
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<Server>
+
+ <Listener advertise="true" className="org.jboss.modcluster.catalina.ModClusterListener" smax="124"/>
+
+ <!--APR library loader. Documentation at /docs/apr.html -->
+ <Listener SSLEngine="on" className="org.apache.catalina.core.AprLifecycleListener"/>
+ <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
+ <Listener className="org.apache.catalina.core.JasperListener"/>
+
+ <!-- Use a custom version of StandardService that allows the
+ connectors to be started independent of the normal lifecycle
+ start to allow web apps to be deployed before starting the
+ connectors.
+ -->
+ <Service name="jboss.web">
+
+ <!-- A "Connector" represents an endpoint by which requests are received
+ and responses are returned. Documentation at :
+ Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
+ Java AJP Connector: /docs/config/ajp.html
+ APR (HTTP/AJP) Connector: /docs/apr.html
+ Define a non-SSL HTTP/1.1 Connector on port 8080
+ -->
+ <Connector acceptCount="100" address="${jboss.bind.address}" connectionTimeout="20000" disableUploadTimeout="true" emptySessionPath="true" enableLookups="false" maxHttpHeaderSize="8192" maxThreads="250" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
+
+ <!-- Define a SSL HTTP/1.1 Connector on port 8443
+ This connector uses the JSSE configuration, when using APR, the
+ connector should be using the OpenSSL style configuration
+ described in the APR documentation -->
+ <!--
+ <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
+ maxThreads="150" scheme="https" secure="true"
+ clientAuth="false" sslProtocol="TLS" />
+ -->
+
+ <!-- Define an AJP 1.3 Connector on port 8009 -->
+ <Connector address="${jboss.bind.address}" emptySessionPath="true" enableLookups="false" port="8009" protocol="AJP/1.3" redirectPort="8443"/>
+
+ <Engine defaultHost="localhost" name="jboss.web">
+
+ <!-- The JAAS based authentication and authorization realm implementation
+ that is compatible with the jboss 3.2.x realm implementation.
+ - certificatePrincipal : the class name of the
+ org.jboss.security.auth.certs.CertificatePrincipal impl
+ used for mapping X509[] cert chains to a Princpal.
+ - allRolesMode : how to handle an auth-constraint with a role-name=*,
+ one of strict, authOnly, strictAuthOnly
+ + strict = Use the strict servlet spec interpretation which requires
+ that the user have one of the web-app/security-role/role-name
+ + authOnly = Allow any authenticated user
+ + strictAuthOnly = Allow any authenticated user only if there are no
+ web-app/security-roles
+ -->
+ <Realm allRolesMode="authOnly" certificatePrincipal="org.jboss.security.auth.certs.SubjectDNMapping" className="org.jboss.web.tomcat.security.JBossSecurityMgrRealm"/>
+ <!-- A subclass of JBossSecurityMgrRealm that uses the authentication
+ behavior of JBossSecurityMgrRealm, but overrides the authorization
+ checks to use JACC permissions with the current java.security.Policy
+ to determine authorized access.
+ - allRolesMode : how to handle an auth-constraint with a role-name=*,
+ one of strict, authOnly, strictAuthOnly
+ + strict = Use the strict servlet spec interpretation which requires
+ that the user have one of the web-app/security-role/role-name
+ + authOnly = Allow any authenticated user
+ + strictAuthOnly = Allow any authenticated user only if there are no
+ web-app/security-roles
+ <Realm className="org.jboss.web.tomcat.security.JaccAuthorizationRealm"
+ certificatePrincipal="org.jboss.security.auth.certs.SubjectDNMapping"
+ allRolesMode="authOnly"
+ />
+ -->
+
+ <Host autoDeploy="false" configClass="org.jboss.web.tomcat.security.config.JBossContextConfig" deployOnStartup="false" deployXML="false" name="localhost">
+
+ <!-- Uncomment to enable request dumper. This Valve "logs interesting
+ contents from the specified Request (before processing) and the
+ corresponding Response (after processing). It is especially useful
+ in debugging problems related to headers and cookies."
+ -->
+ <!--
+ <Valve className="org.apache.catalina.valves.RequestDumperValve" />
+ -->
+
+ <!-- Access logger -->
+ <!--
+ <Valve className="org.apache.catalina.valves.AccessLogValve"
+ prefix="localhost_access_log." suffix=".log"
+ pattern="common" directory="${jboss.server.log.dir}"
+ resolveHosts="false" />
+ -->
+
+ <!-- Uncomment to enable single sign-on across web apps
+ deployed to this host. Does not provide SSO across a cluster.
+
+ If this valve is used, do not use the JBoss ClusteredSingleSignOn
+ valve shown below.
+
+ A new configuration attribute is available beginning with
+ release 4.0.4:
+
+ cookieDomain configures the domain to which the SSO cookie
+ will be scoped (i.e. the set of hosts to
+ which the cookie will be presented). By default
+ the cookie is scoped to "/", meaning the host
+ that presented it. Set cookieDomain to a
+ wider domain (e.g. "xyz.com") to allow an SSO
+ to span more than one hostname.
+ -->
+ <!--
+ <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
+ -->
+
+ <!-- Uncomment to enable single sign-on across web apps
+ deployed to this host AND to all other hosts in the cluster.
+
+ If this valve is used, do not use the standard Tomcat SingleSignOn
+ valve shown above.
+
+ Valve uses a JBossCache instance to support SSO credential
+ caching and replication across the cluster. The JBossCache
+ instance must be configured separately. By default, the valve
+ shares a JBossCache with the service that supports HttpSession
+ replication. See the "jboss-web-cluster-service.xml" file in the
+ server/all/deploy directory for cache configuration details.
+
+ Besides the attributes supported by the standard Tomcat
+ SingleSignOn valve (see the Tomcat docs), this version also
+ supports the following attributes:
+
+ cookieDomain see above
+
+ treeCacheName JMX ObjectName of the JBossCache MBean used to
+ support credential caching and replication across
+ the cluster. If not set, the default value is
+ "jboss.cache:service=TomcatClusteringCache", the
+ standard ObjectName of the JBossCache MBean used
+ to support session replication.
+ -->
+ <!--
+ <Valve className="org.jboss.web.tomcat.service.sso.ClusteredSingleSignOn" />
+ -->
+
+ <!-- Check for unclosed connections and transaction terminated checks
+ in servlets/jsps.
+
+ Important: The dependency on the CachedConnectionManager
+ in META-INF/jboss-service.xml must be uncommented, too
+ -->
+ <Valve cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager" className="org.jboss.web.tomcat.service.jca.CachedConnectionValve" transactionManagerObjectName="jboss:service=TransactionManager"/>
+
+ </Host>
+
+ </Engine>
+
+ </Service>
+
+</Server>
commit dc131685f088d8915bf2516e25a37cf916cf07e3
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Aug 25 17:50:23 2011 -0500
All the node lists are zero based index. Fixing for the incorrect indexing of lists.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
index 8cff302..c2cf3a8 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
@@ -75,9 +75,10 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
*/
public void setPropertyValue(String propertyName, String value) {
boolean propertyFound = false;
+ NodeList nodeList = beanNode.getChildNodes();
- for (int i = 0; i < beanNode.getChildNodes().getLength(); i++) {
- Node currentNode = beanNode.getChildNodes().item(i);
+ for (int i = 0; i < nodeList.getLength(); i++) {
+ Node currentNode = nodeList.item(i);
if (currentNode.getNodeName().equals("property")
&& currentNode.getAttributes().getNamedItem("name") != null
@@ -131,7 +132,7 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
private Node getBeanNodeByClass(String className) {
NodeList nodeList = this.getDocument().getElementsByTagName("bean");
- for (int i = 1; i < nodeList.getLength(); i++) {
+ for (int i = 0; i < nodeList.getLength(); i++) {
Node node = nodeList.item(i);
if (node.getAttributes().getNamedItem("class") != null
@@ -150,7 +151,7 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
private Node getBeanNodeByName(String beanName) {
NodeList nodeList = this.getDocument().getElementsByTagName("bean");
- for (int i = 1; i < nodeList.getLength(); i++) {
+ for (int i = 0; i < nodeList.getLength(); i++) {
Node node = nodeList.item(i);
if (node.getAttributes().getNamedItem("name") != null
commit d1e6d46e89fb5876446fcfe42c04cf4c48a11bce
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Aug 25 17:43:08 2011 -0500
Add property persistance functionality to catalina JMX listener for mod_cluster by saving the configuration directly into the server.xml file.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/CatalinaServiceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/CatalinaServiceComponent.java
new file mode 100644
index 0000000..1b390c5
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/CatalinaServiceComponent.java
@@ -0,0 +1,93 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.plugins.modcluster;
+
+import org.rhq.core.domain.configuration.ConfigurationUpdateStatus;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
+import org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple;
+import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
+import org.rhq.core.util.exception.ThrowableUtil;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+import org.rhq.plugins.modcluster.config.JBossWebServerFile;
+
+@SuppressWarnings({ "rawtypes", "deprecation" })
+public class CatalinaServiceComponent extends MBeanResourceComponent {
+ private static final String SERVER_HOME_DIR = "serverHomeDir";
+ private static final String CONFIGURATION_FILE_RELATIVE_PATH = "/deploy/jboss-web.deployer/server.xml";
+
+ @Override
+ public void updateResourceConfiguration(ConfigurationUpdateReport report) {
+ super.updateResourceConfiguration(report);
+
+ try {
+ saveResouceConfigurationToFile(report, true);
+ } catch (Exception e) {
+ }
+ }
+
+ private void saveResouceConfigurationToFile(ConfigurationUpdateReport report, boolean ignoreReadOnly) {
+ ConfigurationDefinition configurationDefinition = this.getResourceContext().getResourceType()
+ .getResourceConfigurationDefinition();
+
+ // assume we succeed - we'll set to failure if we can't set all properties
+ report.setStatus(ConfigurationUpdateStatus.SUCCESS);
+
+ try {
+ JBossWebServerFile jbossWebServerFile = getJBossWebServerFileInstance();
+
+ for (String key : report.getConfiguration().getSimpleProperties().keySet()) {
+ PropertySimple property = report.getConfiguration().getSimple(key);
+ if (property != null) {
+ try {
+ PropertyDefinitionSimple def = configurationDefinition.getPropertyDefinitionSimple(property
+ .getName());
+ if (!(ignoreReadOnly && def.isReadOnly())) {
+ jbossWebServerFile.setPropertyValue(property.getName(), property.getStringValue());
+ }
+ } catch (Exception e) {
+ property.setErrorMessage(ThrowableUtil.getStackAsString(e));
+ report
+ .setErrorMessage("Failed setting resource configuration - see property error messages for details");
+ log.info("Failure setting MBean Resource configuration value for " + key, e);
+ }
+ }
+ }
+
+ jbossWebServerFile.saveConfigurationFile();
+ } catch (Exception e) {
+ log.debug("Unable to save mod_cluster configuration file.", e);
+ }
+ }
+
+ private JBossWebServerFile getJBossWebServerFileInstance() throws Exception {
+ ModClusterServerComponent modClusterComponent = (ModClusterServerComponent) this.resourceContext
+ .getParentResourceComponent();
+
+ PropertySimple property = modClusterComponent.getResourceContext().getPluginConfiguration()
+ .getSimple(SERVER_HOME_DIR);
+
+ if (property != null) {
+ String fileName = property.getStringValue() + CONFIGURATION_FILE_RELATIVE_PATH;
+ return new JBossWebServerFile(fileName);
+ }
+
+ return null;
+ }
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java
index 354fa99..45204e1 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java
@@ -23,6 +23,11 @@ import java.io.IOException;
import javax.xml.parsers.ParserConfigurationException;
+import org.apache.commons.lang.NotImplementedException;
+import org.w3c.dom.Attr;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
/**
@@ -31,20 +36,52 @@ import org.xml.sax.SAXException;
*/
public class JBossWebServerFile extends AbstractConfigurationFile {
- public JBossWebServerFile(String fileName) throws ParserConfigurationException, SAXException, IOException {
- super(fileName);
- // TODO Auto-generated constructor stub
+ private static final String CATALINA_LISTENER_CLASS_NAME = "org.jboss.modcluster.catalina.ModClusterListener";
+
+ private Node listenerNode;
+
+ public JBossWebServerFile(String configurationFileName) throws ParserConfigurationException, SAXException,
+ IOException {
+ super(configurationFileName);
+
+ listenerNode = this.getListenerNode();
}
@Override
- void setPropertyValue(String propertyName, String value) {
- // TODO Auto-generated method stub
+ public void setPropertyValue(String propertyName, String value) {
+ NamedNodeMap attributeList = listenerNode.getAttributes();
+ if (attributeList.getNamedItem(propertyName) != null && value != null) {
+ Node attributeNode = attributeList.getNamedItem(propertyName);
+ attributeNode.setTextContent(value);
+ } else if (attributeList.getNamedItem(propertyName) != null && value == null) {
+ attributeList.removeNamedItem(propertyName);
+ } else if (attributeList.getNamedItem(propertyName) == null && value != null) {
+ Attr property = this.getDocument().createAttribute(propertyName);
+ property.setValue(propertyName);
+ property.setTextContent(value);
+ attributeList.setNamedItem(property);
+ }
}
@Override
- String getPropertyValue(String propertyName) {
- // TODO Auto-generated method stub
+ public String getPropertyValue(String propertyName) {
+ throw new NotImplementedException(
+ "Property values should be retrieved from the JMX interface not from the configuration file.");
+ }
+
+ private Node getListenerNode() {
+ NodeList nodeList = this.getDocument().getElementsByTagName("Listener");
+
+ for (int i = 0; i < nodeList.getLength(); i++) {
+ Node node = nodeList.item(i);
+
+ if (node.getAttributes().getNamedItem("className") != null
+ && CATALINA_LISTENER_CLASS_NAME.equals(node.getAttributes().getNamedItem("className").getTextContent())) {
+ return node;
+ }
+ }
+
return null;
}
}
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 3e523f7..dafb18f 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -325,7 +325,7 @@
</service>
<!-- End - Configuration for ModClusterService -->
- <service name="Catalina Service" discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent" class="ModclusterServerComponent" supportsManualAdd="true" description="Catalina Service Listener" singleton="true">
+ <service name="Catalina Service" discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent" class="CatalinaServiceComponent" supportsManualAdd="true" description="Catalina Service Listener" singleton="true">
<plugin-configuration>
<c:simple-property name="objectName" readOnly="true" default="Catalina:type=ModClusterListener,*" />
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java
index cba5672..b8fca4c 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java
@@ -20,12 +20,13 @@ package org.rhq.plugins.modcluster.test;
import org.testng.annotations.Test;
+import org.rhq.plugins.modcluster.config.JBossWebServerFile;
import org.rhq.plugins.modcluster.config.ModClusterBeanFile;
public class ServerConfigTest {
@Test
- public void TestConfig() {
+ public void TestModClusterConfig() {
try {
//Test simple bean configuration
@@ -57,4 +58,25 @@ public class ServerConfigTest {
}
}
+ @Test
+ public void TestJBossWebConfig() {
+
+ try {
+ //Test simple bean configuration
+ JBossWebServerFile config = new JBossWebServerFile(
+ "/home/snegrea/Downloads/jboss42/server/all/deploy/jboss-web.deployer/server.xml");
+ config.setPropertyValue("processStatusFrequency", "4");
+ config.setPropertyValue("test", "5");
+ config.setPropertyValue("test", "123");
+
+ config.setPropertyValue("test", null);
+ config.setPropertyValue("processStatusFrequency", null);
+
+ config.saveConfigurationFile();
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
}
commit 616b14c59c03a04144e887c73e2c290a149c202d
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Aug 25 17:35:02 2011 -0500
Moved private method at the bottom fo the file to follow standard java file structure.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java
index 3eb7cbe..31530d7 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java
@@ -57,18 +57,6 @@ public class LoadMetricDiscoveryComponent extends MBeanResourceDiscoveryComponen
}
/**
- * @param context
- * @param objectName
- * @return
- */
- public String getBeanConfiguredClassName(ResourceDiscoveryContext<JMXComponent> context, String objectName) {
- EmsConnection connection = context.getParentResourceComponent().getEmsConnection();
- EmsBean emsBean = loadBean(connection, objectName);
-
- return emsBean.getClassTypeName();
- }
-
- /**
* Loads the bean with the given object name.
*
* Subclasses are free to override this method in order to load the bean.
@@ -89,4 +77,16 @@ public class LoadMetricDiscoveryComponent extends MBeanResourceDiscoveryComponen
}
return bean;
}
+
+ /**
+ * @param context
+ * @param objectName
+ * @return
+ */
+ private String getBeanConfiguredClassName(ResourceDiscoveryContext<JMXComponent> context, String objectName) {
+ EmsConnection connection = context.getParentResourceComponent().getEmsConnection();
+ EmsBean emsBean = loadBean(connection, objectName);
+
+ return emsBean.getClassTypeName();
+ }
}
commit 78c2fcbf3b43d14a158d21c704e80bd6b6cc67f5
Author: Simeon Pinder <simeonpinder(a)gmail.com>
Date: Thu Aug 25 18:06:07 2011 -0400
[maven-release-plugin] prepare for next development iteration
diff --git a/modules/common/ant-bundle/pom.xml b/modules/common/ant-bundle/pom.xml
index 1ac06bf..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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/common/drift/pom.xml b/modules/common/drift/pom.xml
index a3e379e..73ab33a 100644
--- a/modules/common/drift/pom.xml
+++ b/modules/common/drift/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-common-parent</artifactId>
- <version>3.0.0-BETA1</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 735d079..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>3.0.0-BETA1</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 b659f5a..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>3.0.0-BETA1</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 9270b30..bd88fa0 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>3.0.0-BETA1</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 2e8829e..9f5f66a 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>3.0.0-BETA1</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 1a9cfcd..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>3.0.0-BETA1</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 cd4f833..aa20853 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -3,7 +3,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-parent</artifactId>
- <version>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-dbutils</artifactId>
diff --git a/modules/core/domain/pom.xml b/modules/core/domain/pom.xml
index 025c215..42d28e1 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>3.0.0-BETA1</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 3a01fd9..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>3.0.0-BETA1</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 c2f75ae..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>3.0.0-BETA1</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 780224a..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>3.0.0-BETA1</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 3d9116c..1d12869 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>3.0.0-BETA1</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 a9f52b5..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>3.0.0-BETA1</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 afc2578..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>3.0.0-BETA1</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 2ae4d8f..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>3.0.0-BETA1</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 2ced23e..dfa5bb8 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>3.0.0-BETA1</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 895969a..f12c1a1 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>3.0.0-BETA1</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 0edd383..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>3.0.0-BETA1</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 c2ced3e..d96cf83 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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-script-bindings</artifactId>
- <version>3.0.0-BETA1</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 58bc8f7..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>3.0.0-BETA1</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 ddd277b..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>3.0.0-BETA1</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 93e8ad7..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>3.0.0-BETA1</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 d69b6db..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>3.0.0-BETA1</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 4e204dc..de77f3f 100644
--- a/modules/enterprise/gui/coregui/pom.xml
+++ b/modules/enterprise/gui/coregui/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>3.0.0-BETA1</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 c19c071..900d476 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>3.0.0-BETA1</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 708bedd..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>3.0.0-BETA1</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 a670bbb..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>3.0.0-BETA1</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 e40a14f..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>3.0.0-BETA1</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 01c579e..24fbb60 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>3.0.0-BETA1</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 1e3ae32..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>3.0.0-BETA1</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 6abd765..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>3.0.0-BETA1</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 257910a..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>3.0.0-BETA1</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 2a563f8..dee43bc 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>3.0.0-BETA1</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 0ea68f2..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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-server-client-api</artifactId>
- <version>3.0.0-BETA1</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 312403a..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>3.0.0-BETA1</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 53b9266..d27c157 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>3.0.0-BETA1</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 b16de7a..8cdaf8b 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>3.0.0-BETA1</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 e34d2bc..d2f2bc5 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>3.0.0-BETA1</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 af345dd..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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>alert-cli</artifactId>
- <version>3.0.0-BETA1</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 97fc979..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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq.server</groupId>
<artifactId>alert-email</artifactId>
- <version>3.0.0-BETA1</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 899fc56..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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-irc</artifactId>
- <version>3.0.0-BETA1</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 ce4b5ba..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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-log4j</artifactId>
- <version>3.0.0-BETA1</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 1f7f9ab..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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-microblog</artifactId>
- <version>3.0.0-BETA1</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 3483ff0..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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-mobicents</artifactId>
- <version>3.0.0-BETA1</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 03c0d0d..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>3.0.0-BETA1</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>3.0.0-BETA1</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 925bb4c..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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-roles</artifactId>
- <version>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
<name>RHQ Enterprise Server Roles Alert Plugin</name>
diff --git a/modules/enterprise/server/plugins/alert-snmp/pom.xml b/modules/enterprise/server/plugins/alert-snmp/pom.xml
index 8f4e072..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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-snmp</artifactId>
- <version>3.0.0-BETA1</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 52892f3..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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-subject</artifactId>
- <version>3.0.0-BETA1</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 8e51ebb..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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/cobbler/pom.xml b/modules/enterprise/server/plugins/cobbler/pom.xml
index 35cfcdf..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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>rhq-serverplugin-cobbler</artifactId>
- <version>3.0.0-BETA1</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 212b5ba..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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/drift-mongodb/pom.xml b/modules/enterprise/server/plugins/drift-mongodb/pom.xml
index 1d01aa0..2cb4bbf 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/pom.xml
+++ b/modules/enterprise/server/plugins/drift-mongodb/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
- <version>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/drift-rhq/pom.xml b/modules/enterprise/server/plugins/drift-rhq/pom.xml
index f882eb4..9c9d3b6 100644
--- a/modules/enterprise/server/plugins/drift-rhq/pom.xml
+++ b/modules/enterprise/server/plugins/drift-rhq/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
- <version>3.0.0-BETA1</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 b055a42..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>3.0.0-BETA1</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 6c12a49..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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>groovy-script-server-plugin</artifactId>
- <version>3.0.0-BETA1</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 9f37001..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>3.0.0-BETA1</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 a0e0427..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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>packagetype-cli</artifactId>
- <version>3.0.0-BETA1</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 f44ea12..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>3.0.0-BETA1</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 0f25c16..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>3.0.0-BETA1</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 9841dd9..abf3f43 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>3.0.0-BETA1</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 484f937..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>3.0.0-BETA1</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 bc71f7b..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>3.0.0-BETA1</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 f0390aa..9e221a0 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>3.0.0-BETA1</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 9bb157e..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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/safe-invoker/pom.xml b/modules/enterprise/server/safe-invoker/pom.xml
index ff9a022..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>3.0.0-BETA1</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 455ee28..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>3.0.0-BETA1</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 79b2c9c..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>3.0.0-BETA1</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 cc4fd74..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>3.0.0-BETA1</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 8c97fa6..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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq.helpers</groupId>
<artifactId>bundleGen</artifactId>
- <version>3.0.0-BETA1</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 531177c..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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq.helpers</groupId>
<artifactId>perftest-support</artifactId>
- <version>3.0.0-BETA1</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 c67926a..0c73fd3 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>3.0.0-BETA1</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 3af5885..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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/aliases/pom.xml b/modules/plugins/aliases/pom.xml
index 979119e..959fa3c 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>3.0.0-BETA1</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 a4acb82..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>3.0.0-BETA1</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 1730ce9..0694d78 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>3.0.0-BETA1</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 265a19e..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>3.0.0-BETA1</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 94a7d1b..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>3.0.0-BETA1</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 0167579..9a45599 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>3.0.0-BETA1</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 6e9beed..e42d480 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>3.0.0-BETA1</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 c05fb70..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>3.0.0-BETA1</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 4663b94..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>3.0.0-BETA1</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 613fe42..93b5dd3 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>3.0.0-BETA1</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 4f3cef9..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>3.0.0-BETA1</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 30bc95f..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>3.0.0-BETA1</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 ec9bc50..31af33b 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>3.0.0-BETA1</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 7e06fff..b097071 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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-hudson-plugin</artifactId>
- <version>3.0.0-BETA1</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 800f427..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>3.0.0-BETA1</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 ad29033..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>3.0.0-BETA1</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 50195e4..6ec0096 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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jboss-as-7/pom.xml b/modules/plugins/jboss-as-7/pom.xml
index c23a441..ca63c5e 100644
--- a/modules/plugins/jboss-as-7/pom.xml
+++ b/modules/plugins/jboss-as-7/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/jboss-as/pom.xml b/modules/plugins/jboss-as/pom.xml
index d8c5045..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>3.0.0-BETA1</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 33ce865..1a3a1df 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>3.0.0-BETA1</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 3473824..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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jmx/pom.xml b/modules/plugins/jmx/pom.xml
index ab3477c..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>3.0.0-BETA1</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 beee5a9..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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index 7579f5b..ab52e84 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>3.0.0-BETA1</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 b9743dc..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>3.0.0-BETA1</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 0e6e969..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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/oracle/pom.xml b/modules/plugins/oracle/pom.xml
index d9d67ff..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>3.0.0-BETA1</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 31648ab..6b0791d 100644
--- a/modules/plugins/pattern-generator/pom.xml
+++ b/modules/plugins/pattern-generator/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/perftest/pom.xml b/modules/plugins/perftest/pom.xml
index a6ec953..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>3.0.0-BETA1</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 f76db2d..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>3.0.0-BETA1</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 28a0399..f32159e 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>3.0.0-BETA1</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 d0d5c1c..5ef7252 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>3.0.0-BETA1</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 9eacc08..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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/rhq-agent/pom.xml b/modules/plugins/rhq-agent/pom.xml
index 5f3a34e..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>3.0.0-BETA1</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 a1fe6b7..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>3.0.0-BETA1</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 26111aa..84fc9b7 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>3.0.0-BETA1</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 441379c..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>3.0.0-BETA1</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 f99726d..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>3.0.0-BETA1</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 1a6d334..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>3.0.0-BETA1</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 513edeb..83da74a 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>3.0.0-BETA1</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 cd15c95..1b69180 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>3.0.0-BETA1</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 bfcdf08..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>3.0.0-BETA1</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 cfa914c..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>3.0.0-BETA1</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 f83207c..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>3.0.0-BETA1</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 257623e..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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/pom.xml b/modules/pom.xml
index ee870ac..2b45c62 100644
--- a/modules/pom.xml
+++ b/modules/pom.xml
@@ -6,7 +6,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>3.0.0-BETA1</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 fe7bfe9..5c6e85c 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>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
</parent>
<artifactId>test-utils</artifactId>
diff --git a/pom.xml b/pom.xml
index 28a08b0..1be70d1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>3.0.0-BETA1</version>
+ <version>4.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>RHQ</name>
commit a9d727b6d1bbd3b2a97485ed8108bab9edc0866b
Author: Simeon Pinder <simeonpinder(a)gmail.com>
Date: Thu Aug 25 18:05:54 2011 -0400
[maven-release-plugin] prepare release RHQ_3_0_0-BETA1
diff --git a/modules/common/ant-bundle/pom.xml b/modules/common/ant-bundle/pom.xml
index 1eb86ef..1ac06bf 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/common/drift/pom.xml b/modules/common/drift/pom.xml
index 73ab33a..a3e379e 100644
--- a/modules/common/drift/pom.xml
+++ b/modules/common/drift/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-common-parent</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/common/filetemplate-bundle/pom.xml b/modules/common/filetemplate-bundle/pom.xml
index 352de33..735d079 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/common/jboss-as/pom.xml b/modules/common/jboss-as/pom.xml
index 184c5ad..b659f5a 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/common/pom.xml b/modules/common/pom.xml
index bd88fa0..9270b30 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/core/client-api/pom.xml b/modules/core/client-api/pom.xml
index 9f5f66a..2e8829e 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/comm-api/pom.xml b/modules/core/comm-api/pom.xml
index 5a8b356..1a9cfcd 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index aa20853..cd4f833 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -3,7 +3,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-parent</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-dbutils</artifactId>
diff --git a/modules/core/domain/pom.xml b/modules/core/domain/pom.xml
index 42d28e1..025c215 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/gui/pom.xml b/modules/core/gui/pom.xml
index bb4dc2c..3a01fd9 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/native-system/pom.xml b/modules/core/native-system/pom.xml
index 7d83f3d..c2f75ae 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
diff --git a/modules/core/plugin-api/pom.xml b/modules/core/plugin-api/pom.xml
index fc78701..780224a 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/plugin-container/pom.xml b/modules/core/plugin-container/pom.xml
index 1d12869..3d9116c 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/plugin-validator/pom.xml b/modules/core/plugin-validator/pom.xml
index f2953a6..a9f52b5 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/plugindoc/pom.xml b/modules/core/plugindoc/pom.xml
index 24243e3..afc2578 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index bc41a9b..2ae4d8f 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/core/util/pom.xml b/modules/core/util/pom.xml
index dfa5bb8..2ced23e 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/agent/pom.xml b/modules/enterprise/agent/pom.xml
index f12c1a1..895969a 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/agentupdate/pom.xml b/modules/enterprise/agentupdate/pom.xml
index 8b7ffe8..0edd383 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/binding/pom.xml b/modules/enterprise/binding/pom.xml
index d96cf83..c2ced3e 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-script-bindings</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 f424704..58bc8f7 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 cebd439..ddd277b 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 b66da2c..93e8ad7 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 db7d757..d69b6db 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/gui/coregui/pom.xml b/modules/enterprise/gui/coregui/pom.xml
index de77f3f..4e204dc 100644
--- a/modules/enterprise/gui/coregui/pom.xml
+++ b/modules/enterprise/gui/coregui/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 900d476..c19c071 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/gui/pom.xml b/modules/enterprise/gui/pom.xml
index 8e8cf66..708bedd 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 4e2ac9f..a670bbb 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/pom.xml b/modules/enterprise/pom.xml
index 01fb7f6..e40a14f 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/remoting/cli/pom.xml b/modules/enterprise/remoting/cli/pom.xml
index 24fbb60..01c579e 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 1a1c88c..1e3ae32 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 3fe07b7..6abd765 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/remoting/pom.xml b/modules/enterprise/remoting/pom.xml
index f4b1866..257910a 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/remoting/webservices/pom.xml b/modules/enterprise/remoting/webservices/pom.xml
index dee43bc..2a563f8 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 c57eaba..0ea68f2 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-server-client-api</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 1aebae1..312403a 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/container/pom.xml b/modules/enterprise/server/container/pom.xml
index d27c157..53b9266 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/ear/pom.xml b/modules/enterprise/server/ear/pom.xml
index 8cdaf8b..b16de7a 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/jar/pom.xml b/modules/enterprise/server/jar/pom.xml
index d2f2bc5..e34d2bc 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 b380393..af345dd 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>alert-cli</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 e1e1890..97fc979 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq.server</groupId>
<artifactId>alert-email</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 1b609e1..899fc56 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-irc</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 1a27831..ce4b5ba 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-log4j</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 ab68d6b..1f7f9ab 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-microblog</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 0adccaf..3483ff0 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-mobicents</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 2c9bcfa..03c0d0d 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-operations</artifactId>
<packaging>jar</packaging>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 06bab65..925bb4c 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-roles</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
<name>RHQ Enterprise Server Roles Alert Plugin</name>
diff --git a/modules/enterprise/server/plugins/alert-snmp/pom.xml b/modules/enterprise/server/plugins/alert-snmp/pom.xml
index 3763c54..8f4e072 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-snmp</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 bb595b5..52892f3 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>alert-subject</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 c4e59b2..8e51ebb 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/cobbler/pom.xml b/modules/enterprise/server/plugins/cobbler/pom.xml
index 381f64c..35cfcdf 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>rhq-serverplugin-cobbler</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 403ef41..212b5ba 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/drift-mongodb/pom.xml b/modules/enterprise/server/plugins/drift-mongodb/pom.xml
index 2cb4bbf..1d01aa0 100644
--- a/modules/enterprise/server/plugins/drift-mongodb/pom.xml
+++ b/modules/enterprise/server/plugins/drift-mongodb/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/plugins/drift-rhq/pom.xml b/modules/enterprise/server/plugins/drift-rhq/pom.xml
index 9c9d3b6..f882eb4 100644
--- a/modules/enterprise/server/plugins/drift-rhq/pom.xml
+++ b/modules/enterprise/server/plugins/drift-rhq/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-enterprise-server-plugins-parent</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 ad1c570..b055a42 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 0d2bf4b..6c12a49 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>groovy-script-server-plugin</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 dacaec2..9f37001 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 9a51242..a0e0427 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq</groupId>
<artifactId>packagetype-cli</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 f73ecb8..f44ea12 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 c2d5c7e..0f25c16 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
<relativePath>../../../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/enterprise/server/plugins/pom.xml b/modules/enterprise/server/plugins/pom.xml
index abf3f43..9841dd9 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 04df0b8..484f937 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 79ccf2b..bc71f7b 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 9e221a0..f0390aa 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 ce8468c..9bb157e 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/safe-invoker/pom.xml b/modules/enterprise/server/safe-invoker/pom.xml
index 05cb339..ff9a022 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 00344d4..455ee28 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/enterprise/server/sars/pom.xml b/modules/enterprise/server/sars/pom.xml
index 2377858..79b2c9c 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 90c0da6..cc4fd74 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>
diff --git a/modules/helpers/bundleGen/pom.xml b/modules/helpers/bundleGen/pom.xml
index 9e80f1f..8c97fa6 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.rhq.helpers</groupId>
<artifactId>bundleGen</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
<build>
<plugins>
diff --git a/modules/helpers/perftest-support/pom.xml b/modules/helpers/perftest-support/pom.xml
index e488bb0..531177c 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq.helpers</groupId>
<artifactId>perftest-support</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 0c73fd3..c67926a 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/helpers/rtfilter/pom.xml b/modules/helpers/rtfilter/pom.xml
index 417a3df..3af5885 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/aliases/pom.xml b/modules/plugins/aliases/pom.xml
index 959fa3c..979119e 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/ant-bundle/pom.xml b/modules/plugins/ant-bundle/pom.xml
index ff8c753..a4acb82 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/apache/pom.xml b/modules/plugins/apache/pom.xml
index 0694d78..1730ce9 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/augeas/pom.xml b/modules/plugins/augeas/pom.xml
index 66d35d1..265a19e 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/byteman/pom.xml b/modules/plugins/byteman/pom.xml
index 46bcb55..94a7d1b 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/cobbler/pom.xml b/modules/plugins/cobbler/pom.xml
index 9a45599..0167579 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/cron/pom.xml b/modules/plugins/cron/pom.xml
index e42d480..6e9beed 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/database/pom.xml b/modules/plugins/database/pom.xml
index 6c1812b..c05fb70 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/filetemplate-bundle/pom.xml b/modules/plugins/filetemplate-bundle/pom.xml
index c1e0a3d..4663b94 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/grub/pom.xml b/modules/plugins/grub/pom.xml
index 93b5dd3..613fe42 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/hadoop/pom.xml b/modules/plugins/hadoop/pom.xml
index 840e619..4f3cef9 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/hibernate/pom.xml b/modules/plugins/hibernate/pom.xml
index e482d30..30bc95f 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/hosts/pom.xml b/modules/plugins/hosts/pom.xml
index 31af33b..ec9bc50 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/hudson/pom.xml b/modules/plugins/hudson/pom.xml
index b097071..7e06fff 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-hudson-plugin</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
<packaging>jar</packaging>
<name>RHQ Hudson Plugin</name>
diff --git a/modules/plugins/iis/pom.xml b/modules/plugins/iis/pom.xml
index 2cdc32a..800f427 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/irc/pom.xml b/modules/plugins/irc/pom.xml
index edf12ea..ad29033 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 6ec0096..50195e4 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jboss-as-7/pom.xml b/modules/plugins/jboss-as-7/pom.xml
index ca63c5e..c23a441 100644
--- a/modules/plugins/jboss-as-7/pom.xml
+++ b/modules/plugins/jboss-as-7/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/jboss-as/pom.xml b/modules/plugins/jboss-as/pom.xml
index 57c8bb3..d8c5045 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 1a3a1df..33ce865 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jboss-cache/pom.xml b/modules/plugins/jboss-cache/pom.xml
index ae06793..3473824 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/jmx/pom.xml b/modules/plugins/jmx/pom.xml
index 1daf86d..ab3477c 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/kickstart/pom.xml b/modules/plugins/kickstart/pom.xml
index dc87ed7..beee5a9 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index ab52e84..7579f5b 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/mysql/pom.xml b/modules/plugins/mysql/pom.xml
index d8ebb5d..b9743dc 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/netservices/pom.xml b/modules/plugins/netservices/pom.xml
index f1675e4..0e6e969 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/oracle/pom.xml b/modules/plugins/oracle/pom.xml
index 8a3b3c0..d9d67ff 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/pattern-generator/pom.xml b/modules/plugins/pattern-generator/pom.xml
index 6b0791d..31648ab 100644
--- a/modules/plugins/pattern-generator/pom.xml
+++ b/modules/plugins/pattern-generator/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/perftest/pom.xml b/modules/plugins/perftest/pom.xml
index 843fe3d..a6ec953 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/platform/pom.xml b/modules/plugins/platform/pom.xml
index 99f36d0..f76db2d 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/pom.xml b/modules/plugins/pom.xml
index f32159e..28a0399 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/modules/plugins/postfix/pom.xml b/modules/plugins/postfix/pom.xml
index 5ef7252..d0d5c1c 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/postgres/pom.xml b/modules/plugins/postgres/pom.xml
index 365f6c4..9eacc08 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/rhq-agent/pom.xml b/modules/plugins/rhq-agent/pom.xml
index 60471c2..5f3a34e 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/rhq-server/pom.xml b/modules/plugins/rhq-server/pom.xml
index e88b97f..a1fe6b7 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/samba/pom.xml b/modules/plugins/samba/pom.xml
index 84fc9b7..26111aa 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/script/pom.xml b/modules/plugins/script/pom.xml
index d31afb9..441379c 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/script2/pom.xml b/modules/plugins/script2/pom.xml
index 2cf689c..f99726d 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/snmptrapd/pom.xml b/modules/plugins/snmptrapd/pom.xml
index 05ed401..1a6d334 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/modules/plugins/sshd/pom.xml b/modules/plugins/sshd/pom.xml
index 83da74a..513edeb 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/sudoers/pom.xml b/modules/plugins/sudoers/pom.xml
index 1b69180..cd15c95 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/tomcat/pom.xml b/modules/plugins/tomcat/pom.xml
index f6dfebd..bfcdf08 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.jboss.on</groupId>
diff --git a/modules/plugins/twitter/pom.xml b/modules/plugins/twitter/pom.xml
index 50ff9b6..cfa914c 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</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 6565a7b..f83207c 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/plugins/virt/pom.xml b/modules/plugins/virt/pom.xml
index 8700a19..257623e 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/pom.xml b/modules/pom.xml
index 2b45c62..ee870ac 100644
--- a/modules/pom.xml
+++ b/modules/pom.xml
@@ -6,7 +6,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<groupId>org.rhq</groupId>
diff --git a/modules/test-utils/pom.xml b/modules/test-utils/pom.xml
index 5c6e85c..fe7bfe9 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.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
</parent>
<artifactId>test-utils</artifactId>
diff --git a/pom.xml b/pom.xml
index 1be70d1..28a08b0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>4.1.0-SNAPSHOT</version>
+ <version>3.0.0-BETA1</version>
<packaging>pom</packaging>
<name>RHQ</name>
commit 59561513dd5e014a4ae70b0abfff9ad0ef046f65
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Aug 25 15:57:38 2011 -0400
clean up some of the timeline
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventAlertJSON.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventAlertJSON.jsp
index 978c62e..40aeac8 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventAlertJSON.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventAlertJSON.jsp
@@ -57,8 +57,8 @@
String icon = FunctionTagLibrary.getAlertPriorityURL(alert.getAlertDefinition().getPriority());
StringBuilder buf = new StringBuilder();
for (AlertConditionLog log : alert.getConditionLogs()) {
- buf.append("<b>Condition:</b>" + log.getCondition().getName() + "<br/>");
- buf.append("<b>Value:</b>" + log.getValue() + "</b>");
+ buf.append("<b>Condition:</b> " + log.getCondition().getName() + "<br/>");
+ buf.append("<b>Value:</b> " + log.getValue());
}
String link = "/coregui/CoreGUI.html#Resource/" + resourceId + "/Alerts/History/" + alert.getId();
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventCreateDeleteChildJSON.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventCreateDeleteChildJSON.jsp
index c1d3df5..114baf0 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventCreateDeleteChildJSON.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventCreateDeleteChildJSON.jsp
@@ -59,13 +59,14 @@
}
String link = "/coregui/CoreGUI.html#Resource/" + resourceId + "/Inventory/ChildHistory";
-
+ String username = entry.getSubjectName();
+ String resourceName = entry.getCreatedResourceName();
%>
{ "start" : "<%=sdf.format(entry.getCreatedTime())%>",
- "title" : "Child resource created",
+ "title" : "Child Resource Created",
"link" : "<%=link%>",
- "description" : "<b>User:</b> <%=(""+entry.getSubjectName()).replaceAll("[\"']","").trim()%><br/><b>Status:</b> <%=(""+entry.getStatus()).replaceAll("[\"']","").trim()%>",
+ "description" : "<b>Resource Name:</b> <%=(""+resourceName).replaceAll("[\"']","").trim()%><br/><b>User:</b> <%=(""+username).replaceAll("[\"']","").trim()%><br/><b>Status:</b> <%=(""+entry.getStatus())%>",
"icon" : "<%=icon%>",
"color" : "<%=(entry.getStatus() != CreateResourceStatus.FAILURE ? "#4EB84E" : "#DD5656")%>"
}
@@ -96,12 +97,16 @@
}
String link = "/coregui/CoreGUI.html#Resource/" + resourceId + "/Inventory/ChildHistory";
-
+ String username = entry.getSubjectName();
+ String description = "<b>User:</b> "+ username.replaceAll("[\"']","").trim() + "<br/><b>Status:</b> " + entry.getStatus();
+ if (entry.getResource() != null) {
+ description = "<b>Resource Name:</b> " + entry.getResource().getName().replaceAll("[\"']","").trim() + "<br/>" + description;
+ }
%>
{ "start" : "<%=sdf.format(entry.getCreatedTime())%>",
- "title" : "Child resource deleted",
+ "title" : "Child Resource Deleted",
"link" : "<%=link%>",
- "description" : "<b>User:</b> <%=(""+entry.getSubjectName()).replaceAll("[\"']","").trim()%><br/><b>Status:</b> <%=(""+entry.getStatus()).replaceAll("[\"']","").trim()%>",
+ "description" : "<%= description %>",
"icon" : "<%=icon%>",
"color" : "<%=(entry.getStatus() != DeleteResourceStatus.FAILURE ? "#4EB84E" : "#DD5656")%>"
}
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventEventsJSON.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventEventsJSON.jsp
index bb6ced8..d14ab93 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventEventsJSON.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventEventsJSON.jsp
@@ -33,15 +33,8 @@
boolean tooManyEvents = false;
PageList<EventComposite> list =
- eventManager.findEventComposites(subject, EntityContext.forResource(resourceId), begin, end, null,
- null, null, new PageControl(0,10000, new OrderingField("timestamp", PageOrdering.ASC)));
-
- /* TODO GH: Add alert to screen
- if (list.getTotalSize() != list.size()) {
- tooManyEvents = true;
- }*/
-
-
+ eventManager.findEventComposites(subject, EntityContext.forResource(resourceId), begin, end, null,
+ null, null, new PageControl(0,10000, new OrderingField("timestamp", PageOrdering.ASC)));
%>
<%! public String trimLength(String string, int length) {
@@ -51,16 +44,16 @@
public String eventColor(EventSeverity severity) {
switch (severity) {
case DEBUG:
- return "green";
+ return "#00FF00";
case INFO:
- return "blue";
+ return "#0000FF";
case WARN:
- return "olive";
+ return "#FFA500";
case ERROR:
- return "orange";
+ return "#FF0000";
case FATAL:
default:
- return "red";
+ return "#FF0000";
}
}
@@ -81,7 +74,7 @@
return events.get(0).getTimestamp();
}
public String getEventDetail() {
- return events.size() + " events";
+ return events.size() + " Events";
}
public EventSeverity getSeverity() {
EventSeverity highestSeverity = events.get(0).getSeverity();
@@ -157,19 +150,25 @@
String color = eventColor(event.getSeverity());
String icon = FunctionTagLibrary.getEventSeverityURL(event.getSeverity(), grouped);
- String link = "/coregui/CoreGUI.html#Resource/" + resourceId + "/Events/History/" + event.getEventId();
+ String link;
+ if (grouped) {
+ link = "/coregui/CoreGUI.html#Resource/" + resourceId + "/Events/History";
+ } else {
+ link = "/coregui/CoreGUI.html#Resource/" + resourceId + "/Events/History/" + event.getEventId();
+ }
String detail = null;
if (grouped) {
StringBuilder buf = new StringBuilder();
for (EventComposite childEvent : ((GroupedEventComposite)event).events) {
+ String childColor = eventColor(childEvent.getSeverity());
buf.append("<a href='/coregui/CoreGUI.html#Resource/" + resourceId + "/Events/History/" + childEvent.getEventId() + "'>");
- buf.append("<font size=\"-1\" color=\"" + color + "\">" + escapeBackslashes(trimLength(childEvent.getEventDetail(),80)) + "</font></a><br />");
+ buf.append("<font color=\"" + childColor + "\">" + escapeBackslashes(trimLength(childEvent.getEventDetail(),80)) + "</font></a><br />");
}
detail = buf.toString();
} else {
detail = escapeBackslashes(event.getEventDetail());
- detail = "<b>Source:</b>" + escapeBackslashes(event.getSourceLocation()) + "<br/><b>Detail:</b>" + detail;
+ detail = "<b>Source:</b> " + escapeBackslashes(event.getSourceLocation()) + "<br/><b>Detail:</b> " + detail;
}
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventOperationsJSON.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventOperationsJSON.jsp
index 5e28985..49fd1cb 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventOperationsJSON.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventOperationsJSON.jsp
@@ -44,17 +44,7 @@
first = false;
String icon = FunctionTagLibrary.getOperationStatusURL(operation.getStatus());
-
String link = "/coregui/CoreGUI.html#Resource/" + resourceId + "/Operations/History/" + operation.getId();
-
-// out.write(
-// " <event start=\"" + sdf.format(new Date(operation.getCreatedTime())) + "\" " +
-// "title=\"Operation: " + operation.getOperationDefinition().getDisplayName() + "\" \n" +
-// "link=\"/rhq/resource/operation/resourceOperationHistoryDetails.xhtml?id=" + resourceId + "&opId=" + operation.getId() + "\" " +
-// "icon=\"" + icon + "\" >\n" +
-// "<b>User:</b> " + operation.getSubjectName() + "<br/>" +
-// "<b>Status:</b> " + operation.getStatus() +
-// " </event>\n\n");
%>
{ "start" : "<%=sdf.format(new Date(operation.getCreatedTime()))%>",
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventPluginConfigJSON.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventPluginConfigJSON.jsp
index ed75a07..17683c7 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventPluginConfigJSON.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventPluginConfigJSON.jsp
@@ -58,7 +58,7 @@
%>
{ "start" : "<%=sdf.format(configUpdate.getCreatedTime())%>",
- "title" : "Plugin Configuration Change",
+ "title" : "Connection Settings Change",
"link" : "<%=link%>",
"description" : "<b>User:</b> <%=(""+configUpdate.getSubjectName()).replaceAll("[\"']","").trim()%><br/><b>Status:</b> <%=(""+configUpdate.getStatus()).replaceAll("[\"']","").trim()%>",
"icon" : "<%=icon%>",
commit 4a043396e8ef668b1daddc0f00cf7e1331552685
Merge: 0540bcd 1810577
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Aug 25 13:54:43 2011 -0500
Merge branch 'mod_cluster_plugin'
commit 18105773312c888d884f71541f6ed778408aee6e
Merge: fbcf5fd 0b63dbe
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Aug 25 13:42:57 2011 -0500
Merge branch 'mod_cluster_plugin' of ssh://git.fedorahosted.org/git/rhq/rhq into mod_cluster_plugin
commit fbcf5fd1fe8ef454578d00c2617bde54f353ecd7
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Aug 25 00:14:01 2011 -0500
Small refactoring and code formating change to make the class easier to read and understand.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
index 6abf955..8cff302 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
@@ -75,6 +75,7 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
*/
public void setPropertyValue(String propertyName, String value) {
boolean propertyFound = false;
+
for (int i = 0; i < beanNode.getChildNodes().getLength(); i++) {
Node currentNode = beanNode.getChildNodes().item(i);
@@ -107,8 +108,10 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
* @return
*/
public String getPropertyValue(String propertyName) {
- for (int i = 0; i < beanNode.getChildNodes().getLength(); i++) {
- Node currentNode = beanNode.getChildNodes().item(i);
+ NodeList nodeList = beanNode.getChildNodes();
+
+ for (int i = 0; i < nodeList.getLength(); i++) {
+ Node currentNode = nodeList.item(i);
if (currentNode.getNodeName().equals("property")
&& currentNode.getAttributes().getNamedItem("name") != null
@@ -126,10 +129,11 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
* @return
*/
private Node getBeanNodeByClass(String className) {
- NodeList result = this.getDocument().getElementsByTagName("bean");
+ NodeList nodeList = this.getDocument().getElementsByTagName("bean");
+
+ for (int i = 1; i < nodeList.getLength(); i++) {
+ Node node = nodeList.item(i);
- for (int i = 1; i < result.getLength(); i++) {
- Node node = result.item(i);
if (node.getAttributes().getNamedItem("class") != null
&& className.equals(node.getAttributes().getNamedItem("class").getTextContent())) {
return node;
@@ -144,10 +148,11 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
* @return
*/
private Node getBeanNodeByName(String beanName) {
- NodeList result = this.getDocument().getElementsByTagName("bean");
+ NodeList nodeList = this.getDocument().getElementsByTagName("bean");
+
+ for (int i = 1; i < nodeList.getLength(); i++) {
+ Node node = nodeList.item(i);
- for (int i = 1; i < result.getLength(); i++) {
- Node node = result.item(i);
if (node.getAttributes().getNamedItem("name") != null
&& beanName.equals(node.getAttributes().getNamedItem("name").getTextContent())) {
return node;
@@ -163,17 +168,17 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
* @return
*/
private String getBeanFromConstructorArgument(Node beanNode, String constructorArgumentClassName) {
- List<Node> tempNodeList = this.getChildNodesByName(beanNode, "constructor");
+ List<Node> nodeList = this.getChildrenNodesByName(beanNode, "constructor");
- if (tempNodeList.size() > 0) {
- Node constructorNode = tempNodeList.get(0);
+ if (nodeList.size() > 0) {
+ Node constructorNode = nodeList.get(0);
- tempNodeList = this.getChildNodesByName(constructorNode, "parameter");
+ nodeList = this.getChildrenNodesByName(constructorNode, "parameter");
- if (tempNodeList.size() > 0) {
+ if (nodeList.size() > 0) {
Node parameterNode = null;
- for (Node currentNode : tempNodeList) {
+ for (Node currentNode : nodeList) {
if (currentNode.getAttributes().getNamedItem("class") != null
&& constructorArgumentClassName.equals(currentNode.getAttributes().getNamedItem("class")
.getTextContent())) {
@@ -183,10 +188,10 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
}
if (parameterNode != null) {
- tempNodeList = this.getChildNodesByName(parameterNode, "inject");
+ nodeList = this.getChildrenNodesByName(parameterNode, "inject");
- if (tempNodeList.size() > 0) {
- Node injectNode = tempNodeList.get(0);
+ if (nodeList.size() > 0) {
+ Node injectNode = nodeList.get(0);
Node beanAttribute = injectNode.getAttributes().getNamedItem("bean");
if (beanAttribute != null) {
@@ -205,17 +210,17 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
* @param nodeName
* @return
*/
- private List<Node> getChildNodesByName(Node node, String nodeName) {
- List<Node> listOfNodes = new ArrayList<Node>();
+ private List<Node> getChildrenNodesByName(Node node, String nodeName) {
+ List<Node> nodeList = new ArrayList<Node>();
for (int i = 0; i < node.getChildNodes().getLength(); i++) {
Node currentNode = node.getChildNodes().item(i);
if (nodeName.equals(currentNode.getNodeName())) {
- listOfNodes.add(currentNode);
+ nodeList.add(currentNode);
}
}
- return listOfNodes;
+ return nodeList;
}
}
commit 0967165a89cef5268c8dcf6834b71cdefbb31032
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Aug 25 00:12:49 2011 -0500
Added the proxyInfo metric back to Catalina service context since it is readly available.
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 6f46849..3e523f7 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -374,6 +374,7 @@
</operation>
<metric property="proxyConfiguration" displayName="Proxy Configuration" displayType="summary" dataType="trait" />
+ <metric property="proxyInfo" displayName="Proxy Info" displayType="summary" dataType="trait" />
<metric property="modelerType" displayName="Type of the modeled resource" displayType="summary" dataType="trait" />
<metric property="className" displayName="Fully qualified class name of the managed object" displayType="summary" dataType="trait" />
<metric property="advertise" displayName="Enable autodiscovery of httpd servers." displayType="summary" dataType="trait" />
commit 0a99815d01e6cf0d5554cc4c86bcac3b63d3bce6
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Wed Aug 24 11:18:01 2011 -0500
More updates to the naming of each plugin component to match the intent and purpose. Also updated the integration tests to test each resource type.
diff --git a/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModClusterPluginIntegrationTest.java b/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModClusterPluginIntegrationTest.java
new file mode 100644
index 0000000..625163b
--- /dev/null
+++ b/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModClusterPluginIntegrationTest.java
@@ -0,0 +1,229 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.plugins.modcluster.test;
+
+import java.io.File;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.Queue;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.testng.annotations.AfterSuite;
+import org.testng.annotations.BeforeSuite;
+import org.testng.annotations.Test;
+
+import org.rhq.core.clientapi.server.discovery.InventoryReport;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.domain.measurement.MeasurementData;
+import org.rhq.core.domain.measurement.MeasurementDefinition;
+import org.rhq.core.domain.measurement.MeasurementReport;
+import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
+import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.pc.PluginContainer;
+import org.rhq.core.pc.PluginContainerConfiguration;
+import org.rhq.core.pc.plugin.FileSystemPluginFinder;
+import org.rhq.core.pc.plugin.PluginEnvironment;
+import org.rhq.core.pc.plugin.PluginManager;
+import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+import org.rhq.core.pluginapi.measurement.MeasurementFacet;
+import org.rhq.core.pluginapi.operation.OperationFacet;
+import org.rhq.core.pluginapi.operation.OperationResult;
+
+/**
+ * @author Stefan Negrea
+ */
+@SuppressWarnings("rawtypes")
+@Test(groups = "modcluster-plugin")
+public class ModClusterPluginIntegrationTest {
+ private Log log = LogFactory.getLog(this.getClass());
+ private static final String PLUGIN_NAME = "mod_cluster";
+
+ @BeforeSuite
+ public void start() {
+ try {
+ File pluginDir = new File("target/testsetup/plugins");
+ PluginContainerConfiguration pcConfig = new PluginContainerConfiguration();
+ pcConfig.setPluginFinder(new FileSystemPluginFinder(pluginDir));
+ pcConfig.setPluginDirectory(pluginDir);
+
+ pcConfig.setInsideAgent(false);
+ PluginContainer.getInstance().setConfiguration(pcConfig);
+ PluginContainer.getInstance().initialize();
+ log.info("PC started.");
+ for (String plugin : PluginContainer.getInstance().getPluginManager().getMetadataManager().getPluginNames()) {
+ log.info("...Loaded plugin: " + plugin);
+ }
+ } catch (Exception e) {
+ log.info("Error initializing the context", e);
+ }
+ }
+
+ @AfterSuite
+ public void stop() {
+ PluginContainer.getInstance().shutdown();
+ }
+
+ @Test
+ public void testPluginLoad() {
+ PluginManager pluginManager = PluginContainer.getInstance().getPluginManager();
+ PluginEnvironment pluginEnvironment = pluginManager.getPlugin(PLUGIN_NAME);
+ assert (pluginEnvironment != null) : "Null environment, plugin not loaded";
+ assert (pluginEnvironment.getPluginName().equals(PLUGIN_NAME));
+ }
+
+ @Test(dependsOnMethods = "testPluginLoad")
+ public void testDiscovery() throws Exception {
+ InventoryReport report = PluginContainer.getInstance().getInventoryManager().executeServerScanImmediately();
+ assert report != null;
+ log.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
+
+ Thread.sleep(1000);
+
+ report = PluginContainer.getInstance().getInventoryManager().executeServiceScanImmediately();
+ assert report != null;
+ log.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
+
+ Set<Resource> resources = findResource(PluginContainer.getInstance().getInventoryManager().getPlatform());
+ log.info("Found " + resources.size() + " mod_cluster and mod_cluster_context instance(s).");
+
+ assert (resources.size() != 0) : "No mod_cluster or related instances found.";
+
+ if (resources.size() != 0) {
+ for (Object objectResource : resources.toArray()) {
+ Resource resource = (Resource) objectResource;
+ if (resource.getResourceType().getName().equals("mod_cluster")) {
+ testMainResource(resource);
+ } else if (resource.getResourceType().getName().equals("Webapp Context")) {
+ testWebappContext(resource);
+ } else if (resource.getResourceType().getName().equals("HA Service Configuration")) {
+ testLoadServiceConfiguration(resource);
+ } else if (resource.getResourceType().getName().equals("HA Service")) {
+ testServiceMeasurement(resource);
+ testServiceMethodInvocation(resource);
+ }
+ }
+ }
+ }
+
+ private void testServiceMethodInvocation(Resource resource) throws InterruptedException, Exception {
+ ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
+ .getResourceComponent(resource);
+
+ Configuration config = new Configuration();
+ config.put(new PropertySimple("p1", "1"));
+ config.put(new PropertySimple("p2", java.util.concurrent.TimeUnit.SECONDS));
+ OperationResult result = ((OperationFacet) resourceComponent).invokeOperation("stop", config);
+ log.info("Result of operation stopContext was: " + result.getSimpleResult());
+ }
+
+ private void testLoadServiceConfiguration(Resource resource) throws Exception {
+ ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
+ .getResourceComponent(resource);
+ ((ConfigurationFacet) resourceComponent).loadResourceConfiguration();
+ }
+
+ private void testServiceMeasurement(Resource resource) throws Exception {
+ ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
+ .getResourceComponent(resource);
+
+ if (resourceComponent instanceof MeasurementFacet) {
+ for (MeasurementDefinition def : resource.getResourceType().getMetricDefinitions()) {
+ Set<MeasurementScheduleRequest> metricList = new HashSet<MeasurementScheduleRequest>();
+ metricList.add(new MeasurementScheduleRequest(1, def.getName(), 1000, true, def.getDataType(), null));
+ MeasurementReport report = new MeasurementReport();
+ ((MeasurementFacet) resourceComponent).getValues(report, metricList);
+
+ MeasurementData data = report.getTraitData().iterator().next();
+ assert data != null : "Unable to collect trait [" + def.getName() + "] on " + resource;
+ log.info("Measurement: " + def.getName() + "=" + data.getValue());
+ }
+ }
+ }
+
+ private void testMainResource(Resource resource) throws Exception {
+ ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
+ .getResourceComponent(resource);
+
+ if (resourceComponent instanceof OperationFacet) {
+ OperationResult result = null;
+
+ result = ((OperationFacet) resourceComponent).invokeOperation("reset", new Configuration());
+ log.info("Result of operation test was: " + result);
+
+ result = ((OperationFacet) resourceComponent).invokeOperation("refresh", new Configuration());
+ log.info("Result of operation test was: " + result);
+ }
+ }
+
+ private void testWebappContext(Resource resource) throws Exception {
+ ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
+ .getResourceComponent(resource);
+
+ if (resourceComponent instanceof OperationFacet) {
+ try {
+ OperationResult result = ((OperationFacet) resourceComponent).invokeOperation("enableContext", null);
+ log.info("Result of operation " + "enableContext" + " was: " + result.getSimpleResult());
+
+ Configuration config = new Configuration();
+ config.put(new PropertySimple("timeout", "1"));
+ config.put(new PropertySimple("unit", java.util.concurrent.TimeUnit.SECONDS));
+ result = ((OperationFacet) resourceComponent).invokeOperation("stopContext", config);
+ log.info("Result of operation stopContext was: " + result.getSimpleResult());
+
+ result = ((OperationFacet) resourceComponent).invokeOperation("enableContext", null);
+ log.info("Result of operation enableContext was: " + result.getSimpleResult());
+
+ result = ((OperationFacet) resourceComponent).invokeOperation("disableContext", null);
+ log.info("Result of operation disableContext was: " + result.getSimpleResult());
+
+ } catch (Exception e) {
+ log.info("Operation failed. ", e);
+ }
+
+ }
+ }
+
+ private Set<Resource> findResource(Resource parent) {
+ Set<Resource> found = new HashSet<Resource>();
+
+ Queue<Resource> discoveryQueue = new LinkedList<Resource>();
+ discoveryQueue.add(parent);
+
+ while (!discoveryQueue.isEmpty()) {
+ Resource currentResource = discoveryQueue.poll();
+
+ log.info("Discovered resource of type: " + currentResource.getResourceType().getName());
+ if (currentResource.getResourceType().getPlugin().equals(PLUGIN_NAME)) {
+ found.add(currentResource);
+ }
+
+ if (currentResource.getChildResources() != null) {
+ for (Resource child : currentResource.getChildResources()) {
+ discoveryQueue.add(child);
+ }
+ }
+ }
+
+ return found;
+ }
+}
diff --git a/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
deleted file mode 100644
index f27b153..0000000
--- a/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.plugins.modcluster.test;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Queue;
-import java.util.Set;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.testng.annotations.AfterSuite;
-import org.testng.annotations.BeforeSuite;
-import org.testng.annotations.Test;
-
-import org.rhq.core.clientapi.server.discovery.InventoryReport;
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.domain.measurement.MeasurementData;
-import org.rhq.core.domain.measurement.MeasurementDefinition;
-import org.rhq.core.domain.measurement.MeasurementReport;
-import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
-import org.rhq.core.domain.resource.Resource;
-import org.rhq.core.pc.PluginContainer;
-import org.rhq.core.pc.PluginContainerConfiguration;
-import org.rhq.core.pc.plugin.FileSystemPluginFinder;
-import org.rhq.core.pc.plugin.PluginEnvironment;
-import org.rhq.core.pc.plugin.PluginManager;
-import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
-import org.rhq.core.pluginapi.inventory.ResourceComponent;
-import org.rhq.core.pluginapi.measurement.MeasurementFacet;
-import org.rhq.core.pluginapi.operation.OperationFacet;
-import org.rhq.core.pluginapi.operation.OperationResult;
-
-/**
- * @author Stefan Negrea
- */
-@SuppressWarnings("rawtypes")
-@Test(groups = "modcluster-plugin")
-public class ModclusterPluginTest {
- private Log log = LogFactory.getLog(this.getClass());
- private static final String PLUGIN_NAME = "mod_cluster";
-
- @BeforeSuite
- public void start() {
- try {
- File pluginDir = new File("target/testsetup/plugins");
- PluginContainerConfiguration pcConfig = new PluginContainerConfiguration();
- pcConfig.setPluginFinder(new FileSystemPluginFinder(pluginDir));
- pcConfig.setPluginDirectory(pluginDir);
-
- pcConfig.setInsideAgent(false);
- PluginContainer.getInstance().setConfiguration(pcConfig);
- PluginContainer.getInstance().initialize();
- log.info("PC started.");
- for (String plugin : PluginContainer.getInstance().getPluginManager().getMetadataManager().getPluginNames()) {
- log.info("...Loaded plugin: " + plugin);
- }
- } catch (Exception e) {
- log.info("Error initializing the context", e);
- }
- }
-
- @AfterSuite
- public void stop() {
- PluginContainer.getInstance().shutdown();
- }
-
- @Test
- public void testPluginLoad() {
- PluginManager pluginManager = PluginContainer.getInstance().getPluginManager();
- PluginEnvironment pluginEnvironment = pluginManager.getPlugin(PLUGIN_NAME);
- assert (pluginEnvironment != null) : "Null environment, plugin not loaded";
- assert (pluginEnvironment.getPluginName().equals(PLUGIN_NAME));
- }
-
- @Test(dependsOnMethods = "testPluginLoad")
- public void testDiscovery() throws Exception {
- InventoryReport report = PluginContainer.getInstance().getInventoryManager().executeServerScanImmediately();
- assert report != null;
- log.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
-
- Thread.sleep(1000);
-
- report = PluginContainer.getInstance().getInventoryManager().executeServiceScanImmediately();
- assert report != null;
- log.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
-
- List<String> typeNames = new ArrayList<String>() {
- private static final long serialVersionUID = 1L;
-
- {
- add(PLUGIN_NAME);
- add("Webapp Context");
- add("HA Service Configuration");
- add("HA Service");
- }
- };
-
- Set<Resource> resources = findResource(PluginContainer.getInstance().getInventoryManager().getPlatform(),
- typeNames);
- log.info("Found " + resources.size() + " mod_cluster and mod_cluster_context instance(s).");
-
- assert (resources.size() != 0) : "No mod_cluster or related instances found.";
-
- if (resources.size() != 0) {
- for (Object objectResource : resources.toArray()) {
- Resource resource = (Resource) objectResource;
- if (resource.getResourceType().getName().equals("mod_cluster")) {
- testResourceMeasurement(resource);
- } else if (resource.getResourceType().getName().equals("Webapp Context")) {
- testContextOperations(resource);
- } else if (resource.getResourceType().getName().equals("HA Service Configuration")) {
- ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
- .getResourceComponent(resource);
- ((ConfigurationFacet) resourceComponent).loadResourceConfiguration();
- } else if (resource.getResourceType().getName().equals("HA Service")) {
- ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
- .getResourceComponent(resource);
-
- Configuration config = new Configuration();
- config.put(new PropertySimple("p1", "1"));
- config.put(new PropertySimple("p2", java.util.concurrent.TimeUnit.SECONDS));
- OperationResult result = ((OperationFacet) resourceComponent).invokeOperation("stop", config);
- log.info("Result of operation stopContext was: " + result.getSimpleResult());
- }
- }
- }
- }
-
- private void testResourceMeasurement(Resource resource) throws Exception {
- ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
- .getResourceComponent(resource);
- if (resourceComponent instanceof MeasurementFacet) {
- for (MeasurementDefinition def : resource.getResourceType().getMetricDefinitions()) {
- Set<MeasurementScheduleRequest> metricList = new HashSet<MeasurementScheduleRequest>();
- metricList.add(new MeasurementScheduleRequest(1, def.getName(), 1000, true, def.getDataType(), null));
- MeasurementReport report = new MeasurementReport();
- ((MeasurementFacet) resourceComponent).getValues(report, metricList);
-
- MeasurementData data = report.getTraitData().iterator().next();
- assert data != null : "Unable to collect trait [" + def.getName() + "] on " + resource;
- log.info("Measurement: " + def.getName() + "=" + data.getValue());
- }
- }
-
- if (resourceComponent instanceof OperationFacet) {
- OperationResult result = null;
-
- result = ((OperationFacet) resourceComponent).invokeOperation("reset", new Configuration());
- log.info("Result of operation test was: " + result);
-
- result = ((OperationFacet) resourceComponent).invokeOperation("disable", new Configuration());
- log.info("Result of operation test was: " + result.getSimpleResult());
- }
- }
-
- private void testContextOperations(Resource resource) throws Exception {
- ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
- .getResourceComponent(resource);
-
- if (resourceComponent instanceof OperationFacet) {
- try {
- OperationResult result = ((OperationFacet) resourceComponent).invokeOperation("enableContext", null);
- log.info("Result of operation " + "enableContext" + " was: " + result.getSimpleResult());
-
- Configuration config = new Configuration();
- config.put(new PropertySimple("timeout", "1"));
- config.put(new PropertySimple("unit", java.util.concurrent.TimeUnit.SECONDS));
- result = ((OperationFacet) resourceComponent).invokeOperation("stopContext", config);
- log.info("Result of operation stopContext was: " + result.getSimpleResult());
-
- result = ((OperationFacet) resourceComponent).invokeOperation("enableContext", null);
- log.info("Result of operation enableContext was: " + result.getSimpleResult());
-
- result = ((OperationFacet) resourceComponent).invokeOperation("disableContext", null);
- log.info("Result of operation disableContext was: " + result.getSimpleResult());
-
- } catch (Exception e) {
- log.info("Operation failed. ", e);
- }
-
- }
- }
-
- private Set<Resource> findResource(Resource parent, List<String> typeNames) {
- Set<Resource> found = new HashSet<Resource>();
-
- Queue<Resource> discoveryQueue = new LinkedList<Resource>();
- discoveryQueue.add(parent);
-
- while (!discoveryQueue.isEmpty()) {
- Resource currentResource = discoveryQueue.poll();
-
- log.info("Discovered resource of type: " + currentResource.getResourceType().getName());
- if (typeNames.contains(currentResource.getResourceType().getName())) {
- found.add(currentResource);
- }
-
- if (currentResource.getChildResources() != null) {
- for (Resource child : currentResource.getChildResources()) {
- discoveryQueue.add(child);
- }
- }
- }
-
- return found;
- }
-}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ClassNameMBeanDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ClassNameMBeanDiscoveryComponent.java
index b9ce25e..b854398 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ClassNameMBeanDiscoveryComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ClassNameMBeanDiscoveryComponent.java
@@ -89,7 +89,7 @@ public class ClassNameMBeanDiscoveryComponent<T extends JMXComponent> extends MB
emsConnection.queryBeans(objectName);
bean = emsConnection.getBean(objectName);
}
+
return bean;
}
-
-}
\ No newline at end of file
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
deleted file mode 100644
index 4c8b437..0000000
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.plugins.modcluster;
-
-import java.util.concurrent.TimeUnit;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.mc4j.ems.connection.bean.EmsBean;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.measurement.AvailabilityType;
-import org.rhq.core.pluginapi.operation.OperationResult;
-import org.rhq.plugins.jmx.MBeanResourceComponent;
-import org.rhq.plugins.modcluster.helper.JBossHelper;
-
-/**
- * Manages a mod_cluster context entity.
- *
- * @author Stefan Negrea
- */
-@SuppressWarnings({ "rawtypes", "deprecation" })
-public class ContextComponent extends MBeanResourceComponent<MBeanResourceComponent> {
-
- private static final Log log = LogFactory.getLog(ContextComponent.class);
-
- @Override
- protected EmsBean loadBean() {
- return getResourceContext().getParentResourceComponent().getEmsBean();
- }
-
- @Override
- public AvailabilityType getAvailability() {
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- try {
- Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
- String rawProxyInfo = JBossHelper.getRawProxyInfo(getEmsBean());
-
- ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
-
- ProxyInfo.Context context = ProxyInfo.Context.fromString(resourceContext.getResourceKey());
-
- int indexOfCurrentContext = proxyInfo.getAvailableContexts().indexOf(context);
-
- if (indexOfCurrentContext != -1) {
- ProxyInfo.Context currentContext = proxyInfo.getAvailableContexts().get(indexOfCurrentContext);
-
- if (currentContext.isEnabled()) {
- return AvailabilityType.UP;
- }
- }
-
- return AvailabilityType.DOWN;
- } catch (Exception e) {
- log.info(e);
- return AvailabilityType.DOWN;
- } finally {
- Thread.currentThread().setContextClassLoader(cl);
- }
- }
-
- @Override
- public OperationResult invokeOperation(String name, Configuration parameters) throws Exception {
- if ("enableContext".equals(name) || "disableContext".equals(name) || "stopContext".equals(name)) {
-
- ProxyInfo.Context context = ProxyInfo.Context.fromString(resourceContext.getResourceKey());
-
- Object[] configuration = null;
- if ("stopContext".equals(name)) {
- configuration = new Object[] { context.getHost(), context.getPath(),
- parameters.getSimple("timeout").getLongValue(),
- TimeUnit.valueOf(parameters.getSimple("unit").getStringValue()) };
- } else {
- configuration = new Object[] { context.getHost(), context.getPath() };
- }
-
- if (context.getPath().equals("/")) {
- configuration[1] = "ROOT";
- }
-
- log.info(name + " - " + context.getHost() + " " + context.getPath());
-
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- try {
- Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
- Object resultObject = getEmsBean().getOperation(name).invoke(configuration);
-
- if (resultObject instanceof OperationResult) {
- return (OperationResult) resultObject;
- } else {
- return new OperationResult(String.valueOf(resultObject));
- }
- } finally {
- Thread.currentThread().setContextClassLoader(cl);
- }
- }
-
- throw new Exception("Operation " + name + " not available mod_cluster WebApp service.");
- }
-}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
deleted file mode 100644
index 788cbce..0000000
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.plugins.modcluster;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.mc4j.ems.connection.EmsConnection;
-import org.mc4j.ems.connection.bean.EmsBean;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
-import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
-import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
-import org.rhq.plugins.jmx.MBeanResourceComponent;
-import org.rhq.plugins.modcluster.helper.JBossHelper;
-
-/**
- * Discovers mod_cluster contexts from the proxyInfo mbean property.
- *
- * @author Stefan Negrea
- */
-@SuppressWarnings("rawtypes")
-public class ContextDiscoveryComponent implements ResourceDiscoveryComponent<MBeanResourceComponent> {
-
- private static final String JVM_ROUTE_PROPERTY = "jvmRoute";
- private static final String ENGINE_OBJECT_NAME = "engineObjectName";
-
- /* (non-Javadoc)
- * @see org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent#discoverResources(org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext)
- */
- public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<MBeanResourceComponent> context) {
- String jvmRoute = this.getJvmRoute(context);
-
- EmsBean configBean = context.getParentResourceComponent().getEmsBean();
- String rawProxyInfo = JBossHelper.getRawProxyInfo(configBean);
-
- ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
- Set<DiscoveredResourceDetails> entities = new HashSet<DiscoveredResourceDetails>();
-
- for (ProxyInfo.Context availableContext : proxyInfo.getAvailableContexts()) {
- if (availableContext.getJvmRoute().equals(jvmRoute)) {
- DiscoveredResourceDetails detail = new DiscoveredResourceDetails(context.getResourceType(),
- availableContext.createKey(), availableContext.createName(), null, "Webapp Context", null, null);
- entities.add(detail);
- }
- }
-
- return entities;
- }
-
- /**
- * Retrieves the jvm route for the node from the parent context.
- *
- * @param context the discovery context
- * @return node's jvm route
- */
- private String getJvmRoute(ResourceDiscoveryContext<MBeanResourceComponent> context) {
- Configuration pluginConfig = context.getParentResourceComponent().getResourceContext().getPluginConfiguration();
- String engineObjectName = pluginConfig.getSimple(ENGINE_OBJECT_NAME).getStringValue();
- EmsBean engineBean = this.loadBean(engineObjectName, context.getParentResourceComponent());
-
- return (String) engineBean.getAttribute(JVM_ROUTE_PROPERTY).refresh().toString();
- }
-
- /**
- * Loads the bean with the given object name.
- *
- * Subclasses are free to override this method in order to load the bean.
- *
- * @param objectName the name of the bean to load
- * @return the bean that is loaded
- */
- protected EmsBean loadBean(String objectName, MBeanResourceComponent context) {
- EmsConnection emsConnection = context.getEmsConnection();
- EmsBean bean = emsConnection.getBean(objectName);
- if (bean == null) {
- // In some cases, this resource component may have been discovered by some means other than querying its
- // parent's EMSConnection (e.g. ApplicationDiscoveryComponent uses a filesystem to discover EARs and
- // WARs that are not yet deployed). In such cases, getBean() will return null, since EMS won't have the
- // bean in its cache. To cover such cases, make an attempt to query the underlying MBeanServer for the
- // bean before giving up.
- emsConnection.queryBeans(objectName);
- bean = emsConnection.getBean(objectName);
- }
- return bean;
- }
-}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServerComponent.java
index 7d5f0dc..0db722e 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServerComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServerComponent.java
@@ -21,6 +21,7 @@ package org.rhq.plugins.modcluster;
import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.plugins.jmx.MBeanResourceComponent;
import org.rhq.plugins.modcluster.helper.JBossHelper;
+import org.rhq.plugins.modcluster.model.ProxyInfo;
/**
* @author Stefan Negrea
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
deleted file mode 100644
index 8614402..0000000
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
+++ /dev/null
@@ -1,310 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.plugins.modcluster;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * Simple parser for the raw proxy information provided by mod_cluster.
- *
- * @author Stefan Negrea
- */
-public class ProxyInfo {
-
- private Map<String, Node> availableNodes = new HashMap<String, Node>();
- private Map<String, Vhost> availableVhosts = new HashMap<String, Vhost>();
- private List<Context> availableContexts = new ArrayList<ProxyInfo.Context>();
-
- public ProxyInfo(String rawProxyInfo) {
- parseNodes(rawProxyInfo);
- parseVhosts(rawProxyInfo);
- parseContexts(rawProxyInfo);
- }
-
- private void parseNodes(String rawProxyInfo) {
- Pattern nodePattern = Pattern.compile("Node:.*\n");
- Matcher nodeMatcher = nodePattern.matcher(rawProxyInfo);
- while (nodeMatcher.find()) {
- String rawNode = nodeMatcher.group();
- String[] nodePieces = rawNode.split(",");
-
- String identifier = nodePieces[0];
- identifier = identifier.substring(identifier.indexOf("[") + 1, identifier.indexOf("]"));
-
- String jvmRoute = nodePieces[1];
- jvmRoute = jvmRoute.substring(jvmRoute.indexOf(':') + 1).trim();
-
- availableNodes.put(identifier, new Node(jvmRoute, identifier));
- }
- }
-
- private void parseVhosts(String rawProxyInfo) {
- Pattern vhostPattern = Pattern.compile("Vhost:.*\n");
- Matcher vhostMatcher = vhostPattern.matcher(rawProxyInfo);
- while (vhostMatcher.find()) {
- String rawVhost = vhostMatcher.group();
- String[] vhostPieces = rawVhost.split(",");
-
- String identifier = vhostPieces[0].trim();
- identifier = identifier.substring(identifier.indexOf("[") + 1, identifier.indexOf("]"));
- identifier = identifier.substring(0, identifier.lastIndexOf(":"));
-
- String host = vhostPieces[1].trim();
- host = host.substring(host.indexOf(":") + 1).trim();
-
- availableVhosts.put(identifier, new Vhost(identifier, host));
- }
- }
-
- private void parseContexts(String rawProxyInfo) {
- Pattern contextPattern = Pattern.compile("Context:.*[\n|}]");
- Matcher contextMatcher = contextPattern.matcher(rawProxyInfo);
- while (contextMatcher.find()) {
- String rawContext = contextMatcher.group();
- String[] contextPieces = rawContext.split(",");
- String actualContext = contextPieces[1].substring(contextPieces[1].indexOf("/")).trim();
-
- String identifier = contextPieces[0];
- identifier = identifier.substring(identifier.indexOf("[") + 1, identifier.indexOf("]"));
- identifier = identifier.substring(0, identifier.lastIndexOf(":"));
-
- String nodeIdentifier = contextPieces[0];
- nodeIdentifier = nodeIdentifier.substring(nodeIdentifier.indexOf("[") + 1, nodeIdentifier.indexOf("]"));
- nodeIdentifier = nodeIdentifier.substring(0, nodeIdentifier.indexOf(":"));
- String jvmRoute = availableNodes.get(nodeIdentifier).getJvmRoute();
-
- String rawIsEnabled = contextPieces[2];
- rawIsEnabled = rawIsEnabled.substring(rawIsEnabled.indexOf(':') + 1).trim();
- boolean isEnabled = rawIsEnabled.equals("ENABLED") ? true : false;
-
- Vhost relatedVhost = availableVhosts.get(identifier);
-
- availableContexts.add(new Context(jvmRoute, relatedVhost.getHost(), actualContext, isEnabled));
- }
- }
-
- public List<Context> getAvailableContexts() {
- return Collections.unmodifiableList(availableContexts);
- }
-
- public List<Vhost> getAvailableVhosts() {
- return Collections.unmodifiableList(new ArrayList<Vhost>(availableVhosts.values()));
- }
-
- public List<Node> getAvailableNodes() {
- return Collections.unmodifiableList(new ArrayList<Node>(availableNodes.values()));
- }
-
- public static class Node {
- private String jvmRoute;
- private String nodeId;
-
- public Node(String jvmRoute, String nodeId) {
- this.jvmRoute = jvmRoute;
- this.nodeId = nodeId;
- }
-
- public String getNodeId() {
- return nodeId;
- }
-
- public String getJvmRoute() {
- return jvmRoute;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((jvmRoute == null) ? 0 : jvmRoute.hashCode());
- result = prime * result + ((nodeId == null) ? 0 : nodeId.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- Node other = (Node) obj;
- if (jvmRoute == null) {
- if (other.jvmRoute != null)
- return false;
- } else if (!jvmRoute.equals(other.jvmRoute))
- return false;
- if (nodeId == null) {
- if (other.nodeId != null)
- return false;
- } else if (!nodeId.equals(other.nodeId))
- return false;
- return true;
- }
- }
-
- public static class Vhost {
- private String identifier;
- private String host;
-
- public Vhost(String identifier, String host) {
- this.identifier = identifier;
- this.host = host;
- }
-
- public String getIdentifier() {
- return identifier;
- }
-
- public String getHost() {
- return host;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((host == null) ? 0 : host.hashCode());
- result = prime * result + ((identifier == null) ? 0 : identifier.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- Vhost other = (Vhost) obj;
- if (host == null) {
- if (other.host != null)
- return false;
- } else if (!host.equals(other.host))
- return false;
- if (identifier == null) {
- if (other.identifier != null)
- return false;
- } else if (!identifier.equals(other.identifier))
- return false;
- return true;
- }
- }
-
- public static class Context {
- private String path;
- private String host;
- private String jvmRoute;
- private boolean isEnabled;
-
- public Context(String jvmRoute, String host, String path) {
- this(jvmRoute, host, path, false);
- }
-
- public Context(String jvmRoute, String host, String path, boolean isEnabled) {
- this.jvmRoute = jvmRoute;
- this.host = host;
- this.path = path;
- this.isEnabled = isEnabled;
- }
-
- public String getPath() {
- return path;
- }
-
- public String getHost() {
- return host;
- }
-
- public String getJvmRoute() {
- return jvmRoute;
- }
-
- public boolean isEnabled() {
- return isEnabled;
- }
-
- public String createKey() {
- return jvmRoute + ":" + host + ":" + path;
- }
-
- public String createName() {
- return host + ":" + path;
- }
-
- @Override
- public String toString() {
- return createKey();
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((host == null) ? 0 : host.hashCode());
- result = prime * result + ((jvmRoute == null) ? 0 : jvmRoute.hashCode());
- result = prime * result + ((path == null) ? 0 : path.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- Context other = (Context) obj;
- if (host == null) {
- if (other.host != null)
- return false;
- } else if (!host.equals(other.host))
- return false;
- if (jvmRoute == null) {
- if (other.jvmRoute != null)
- return false;
- } else if (!jvmRoute.equals(other.jvmRoute))
- return false;
- if (path == null) {
- if (other.path != null)
- return false;
- } else if (!path.equals(other.path))
- return false;
- return true;
- }
-
- public static Context fromString(String stringRepresentation) throws Exception {
- String parts[] = stringRepresentation.trim().split(":");
- if (parts.length < 3) {
- throw new Exception("Parsing error. Not enough information to create a context.");
- }
-
- return new Context(parts[0], parts[1], parts[2]);
- }
- }
-}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/WebappContextComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/WebappContextComponent.java
new file mode 100644
index 0000000..6131578
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/WebappContextComponent.java
@@ -0,0 +1,117 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.plugins.modcluster;
+
+import java.util.concurrent.TimeUnit;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.mc4j.ems.connection.bean.EmsBean;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.pluginapi.operation.OperationResult;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+import org.rhq.plugins.modcluster.helper.JBossHelper;
+import org.rhq.plugins.modcluster.model.ProxyInfo;
+
+/**
+ * Manages a mod_cluster context entity.
+ *
+ * @author Stefan Negrea
+ */
+@SuppressWarnings({ "rawtypes", "deprecation" })
+public class WebappContextComponent extends MBeanResourceComponent<MBeanResourceComponent> {
+
+ private static final Log log = LogFactory.getLog(WebappContextComponent.class);
+
+ @Override
+ protected EmsBean loadBean() {
+ return getResourceContext().getParentResourceComponent().getEmsBean();
+ }
+
+ @Override
+ public AvailabilityType getAvailability() {
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ try {
+ Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
+ String rawProxyInfo = JBossHelper.getRawProxyInfo(getEmsBean());
+
+ ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
+
+ ProxyInfo.Context context = ProxyInfo.Context.fromString(resourceContext.getResourceKey());
+
+ int indexOfCurrentContext = proxyInfo.getAvailableContexts().indexOf(context);
+
+ if (indexOfCurrentContext != -1) {
+ ProxyInfo.Context currentContext = proxyInfo.getAvailableContexts().get(indexOfCurrentContext);
+
+ if (currentContext.isEnabled()) {
+ return AvailabilityType.UP;
+ }
+ }
+
+ return AvailabilityType.DOWN;
+ } catch (Exception e) {
+ log.info(e);
+ return AvailabilityType.DOWN;
+ } finally {
+ Thread.currentThread().setContextClassLoader(cl);
+ }
+ }
+
+ @Override
+ public OperationResult invokeOperation(String name, Configuration parameters) throws Exception {
+ if ("enableContext".equals(name) || "disableContext".equals(name) || "stopContext".equals(name)) {
+
+ ProxyInfo.Context context = ProxyInfo.Context.fromString(resourceContext.getResourceKey());
+
+ Object[] configuration = null;
+ if ("stopContext".equals(name)) {
+ configuration = new Object[] { context.getHost(), context.getPath(),
+ parameters.getSimple("timeout").getLongValue(),
+ TimeUnit.valueOf(parameters.getSimple("unit").getStringValue()) };
+ } else {
+ configuration = new Object[] { context.getHost(), context.getPath() };
+ }
+
+ if (context.getPath().equals("/")) {
+ configuration[1] = "ROOT";
+ }
+
+ log.info(name + " - " + context.getHost() + " " + context.getPath());
+
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ try {
+ Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
+ Object resultObject = getEmsBean().getOperation(name).invoke(configuration);
+
+ if (resultObject instanceof OperationResult) {
+ return (OperationResult) resultObject;
+ } else {
+ return new OperationResult(String.valueOf(resultObject));
+ }
+ } finally {
+ Thread.currentThread().setContextClassLoader(cl);
+ }
+ }
+
+ throw new Exception("Operation " + name + " not available mod_cluster WebApp service.");
+ }
+}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/WebappContextDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/WebappContextDiscoveryComponent.java
new file mode 100644
index 0000000..559e1b6
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/WebappContextDiscoveryComponent.java
@@ -0,0 +1,105 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.plugins.modcluster;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.mc4j.ems.connection.EmsConnection;
+import org.mc4j.ems.connection.bean.EmsBean;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+import org.rhq.plugins.modcluster.helper.JBossHelper;
+import org.rhq.plugins.modcluster.model.ProxyInfo;
+
+/**
+ * Discovers mod_cluster contexts from the proxyInfo mbean property.
+ *
+ * @author Stefan Negrea
+ */
+@SuppressWarnings("rawtypes")
+public class WebappContextDiscoveryComponent implements ResourceDiscoveryComponent<MBeanResourceComponent> {
+
+ private static final String JVM_ROUTE_PROPERTY = "jvmRoute";
+ private static final String ENGINE_OBJECT_NAME = "engineObjectName";
+
+ /* (non-Javadoc)
+ * @see org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent#discoverResources(org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext)
+ */
+ public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<MBeanResourceComponent> context) {
+ String jvmRoute = this.getJvmRoute(context);
+
+ EmsBean configBean = context.getParentResourceComponent().getEmsBean();
+ String rawProxyInfo = JBossHelper.getRawProxyInfo(configBean);
+
+ ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
+ Set<DiscoveredResourceDetails> entities = new HashSet<DiscoveredResourceDetails>();
+
+ for (ProxyInfo.Context availableContext : proxyInfo.getAvailableContexts()) {
+ if (availableContext.getJvmRoute().equals(jvmRoute)) {
+ DiscoveredResourceDetails detail = new DiscoveredResourceDetails(context.getResourceType(),
+ availableContext.createKey(), availableContext.createName(), null, "Webapp Context", null, null);
+ entities.add(detail);
+ }
+ }
+
+ return entities;
+ }
+
+ /**
+ * Retrieves the jvm route for the node from the parent context.
+ *
+ * @param context the discovery context
+ * @return node's jvm route
+ */
+ private String getJvmRoute(ResourceDiscoveryContext<MBeanResourceComponent> context) {
+ Configuration pluginConfig = context.getParentResourceComponent().getResourceContext().getPluginConfiguration();
+ String engineObjectName = pluginConfig.getSimple(ENGINE_OBJECT_NAME).getStringValue();
+ EmsBean engineBean = this.loadBean(engineObjectName, context.getParentResourceComponent());
+
+ return (String) engineBean.getAttribute(JVM_ROUTE_PROPERTY).refresh().toString();
+ }
+
+ /**
+ * Loads the bean with the given object name.
+ *
+ * Subclasses are free to override this method in order to load the bean.
+ *
+ * @param objectName the name of the bean to load
+ * @return the bean that is loaded
+ */
+ protected EmsBean loadBean(String objectName, MBeanResourceComponent context) {
+ EmsConnection emsConnection = context.getEmsConnection();
+ EmsBean bean = emsConnection.getBean(objectName);
+ if (bean == null) {
+ // In some cases, this resource component may have been discovered by some means other than querying its
+ // parent's EMSConnection (e.g. ApplicationDiscoveryComponent uses a filesystem to discover EARs and
+ // WARs that are not yet deployed). In such cases, getBean() will return null, since EMS won't have the
+ // bean in its cache. To cover such cases, make an attempt to query the underlying MBeanServer for the
+ // bean before giving up.
+ emsConnection.queryBeans(objectName);
+ bean = emsConnection.getBean(objectName);
+ }
+ return bean;
+ }
+}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/model/ProxyInfo.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/model/ProxyInfo.java
new file mode 100644
index 0000000..9cedad5
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/model/ProxyInfo.java
@@ -0,0 +1,310 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.plugins.modcluster.model;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Simple parser for the raw proxy information provided by mod_cluster.
+ *
+ * @author Stefan Negrea
+ */
+public class ProxyInfo {
+
+ private Map<String, Node> availableNodes = new HashMap<String, Node>();
+ private Map<String, Vhost> availableVhosts = new HashMap<String, Vhost>();
+ private List<Context> availableContexts = new ArrayList<ProxyInfo.Context>();
+
+ public ProxyInfo(String rawProxyInfo) {
+ parseNodes(rawProxyInfo);
+ parseVhosts(rawProxyInfo);
+ parseContexts(rawProxyInfo);
+ }
+
+ private void parseNodes(String rawProxyInfo) {
+ Pattern nodePattern = Pattern.compile("Node:.*\n");
+ Matcher nodeMatcher = nodePattern.matcher(rawProxyInfo);
+ while (nodeMatcher.find()) {
+ String rawNode = nodeMatcher.group();
+ String[] nodePieces = rawNode.split(",");
+
+ String identifier = nodePieces[0];
+ identifier = identifier.substring(identifier.indexOf("[") + 1, identifier.indexOf("]"));
+
+ String jvmRoute = nodePieces[1];
+ jvmRoute = jvmRoute.substring(jvmRoute.indexOf(':') + 1).trim();
+
+ availableNodes.put(identifier, new Node(jvmRoute, identifier));
+ }
+ }
+
+ private void parseVhosts(String rawProxyInfo) {
+ Pattern vhostPattern = Pattern.compile("Vhost:.*\n");
+ Matcher vhostMatcher = vhostPattern.matcher(rawProxyInfo);
+ while (vhostMatcher.find()) {
+ String rawVhost = vhostMatcher.group();
+ String[] vhostPieces = rawVhost.split(",");
+
+ String identifier = vhostPieces[0].trim();
+ identifier = identifier.substring(identifier.indexOf("[") + 1, identifier.indexOf("]"));
+ identifier = identifier.substring(0, identifier.lastIndexOf(":"));
+
+ String host = vhostPieces[1].trim();
+ host = host.substring(host.indexOf(":") + 1).trim();
+
+ availableVhosts.put(identifier, new Vhost(identifier, host));
+ }
+ }
+
+ private void parseContexts(String rawProxyInfo) {
+ Pattern contextPattern = Pattern.compile("Context:.*[\n|}]");
+ Matcher contextMatcher = contextPattern.matcher(rawProxyInfo);
+ while (contextMatcher.find()) {
+ String rawContext = contextMatcher.group();
+ String[] contextPieces = rawContext.split(",");
+ String actualContext = contextPieces[1].substring(contextPieces[1].indexOf("/")).trim();
+
+ String identifier = contextPieces[0];
+ identifier = identifier.substring(identifier.indexOf("[") + 1, identifier.indexOf("]"));
+ identifier = identifier.substring(0, identifier.lastIndexOf(":"));
+
+ String nodeIdentifier = contextPieces[0];
+ nodeIdentifier = nodeIdentifier.substring(nodeIdentifier.indexOf("[") + 1, nodeIdentifier.indexOf("]"));
+ nodeIdentifier = nodeIdentifier.substring(0, nodeIdentifier.indexOf(":"));
+ String jvmRoute = availableNodes.get(nodeIdentifier).getJvmRoute();
+
+ String rawIsEnabled = contextPieces[2];
+ rawIsEnabled = rawIsEnabled.substring(rawIsEnabled.indexOf(':') + 1).trim();
+ boolean isEnabled = rawIsEnabled.equals("ENABLED") ? true : false;
+
+ Vhost relatedVhost = availableVhosts.get(identifier);
+
+ availableContexts.add(new Context(jvmRoute, relatedVhost.getHost(), actualContext, isEnabled));
+ }
+ }
+
+ public List<Context> getAvailableContexts() {
+ return Collections.unmodifiableList(availableContexts);
+ }
+
+ public List<Vhost> getAvailableVhosts() {
+ return Collections.unmodifiableList(new ArrayList<Vhost>(availableVhosts.values()));
+ }
+
+ public List<Node> getAvailableNodes() {
+ return Collections.unmodifiableList(new ArrayList<Node>(availableNodes.values()));
+ }
+
+ public static class Node {
+ private String jvmRoute;
+ private String nodeId;
+
+ public Node(String jvmRoute, String nodeId) {
+ this.jvmRoute = jvmRoute;
+ this.nodeId = nodeId;
+ }
+
+ public String getNodeId() {
+ return nodeId;
+ }
+
+ public String getJvmRoute() {
+ return jvmRoute;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((jvmRoute == null) ? 0 : jvmRoute.hashCode());
+ result = prime * result + ((nodeId == null) ? 0 : nodeId.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Node other = (Node) obj;
+ if (jvmRoute == null) {
+ if (other.jvmRoute != null)
+ return false;
+ } else if (!jvmRoute.equals(other.jvmRoute))
+ return false;
+ if (nodeId == null) {
+ if (other.nodeId != null)
+ return false;
+ } else if (!nodeId.equals(other.nodeId))
+ return false;
+ return true;
+ }
+ }
+
+ public static class Vhost {
+ private String identifier;
+ private String host;
+
+ public Vhost(String identifier, String host) {
+ this.identifier = identifier;
+ this.host = host;
+ }
+
+ public String getIdentifier() {
+ return identifier;
+ }
+
+ public String getHost() {
+ return host;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((host == null) ? 0 : host.hashCode());
+ result = prime * result + ((identifier == null) ? 0 : identifier.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Vhost other = (Vhost) obj;
+ if (host == null) {
+ if (other.host != null)
+ return false;
+ } else if (!host.equals(other.host))
+ return false;
+ if (identifier == null) {
+ if (other.identifier != null)
+ return false;
+ } else if (!identifier.equals(other.identifier))
+ return false;
+ return true;
+ }
+ }
+
+ public static class Context {
+ private String path;
+ private String host;
+ private String jvmRoute;
+ private boolean isEnabled;
+
+ public Context(String jvmRoute, String host, String path) {
+ this(jvmRoute, host, path, false);
+ }
+
+ public Context(String jvmRoute, String host, String path, boolean isEnabled) {
+ this.jvmRoute = jvmRoute;
+ this.host = host;
+ this.path = path;
+ this.isEnabled = isEnabled;
+ }
+
+ public String getPath() {
+ return path;
+ }
+
+ public String getHost() {
+ return host;
+ }
+
+ public String getJvmRoute() {
+ return jvmRoute;
+ }
+
+ public boolean isEnabled() {
+ return isEnabled;
+ }
+
+ public String createKey() {
+ return jvmRoute + ":" + host + ":" + path;
+ }
+
+ public String createName() {
+ return host + ":" + path;
+ }
+
+ @Override
+ public String toString() {
+ return createKey();
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((host == null) ? 0 : host.hashCode());
+ result = prime * result + ((jvmRoute == null) ? 0 : jvmRoute.hashCode());
+ result = prime * result + ((path == null) ? 0 : path.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Context other = (Context) obj;
+ if (host == null) {
+ if (other.host != null)
+ return false;
+ } else if (!host.equals(other.host))
+ return false;
+ if (jvmRoute == null) {
+ if (other.jvmRoute != null)
+ return false;
+ } else if (!jvmRoute.equals(other.jvmRoute))
+ return false;
+ if (path == null) {
+ if (other.path != null)
+ return false;
+ } else if (!path.equals(other.path))
+ return false;
+ return true;
+ }
+
+ public static Context fromString(String stringRepresentation) throws Exception {
+ String parts[] = stringRepresentation.trim().split(":");
+ if (parts.length < 3) {
+ throw new Exception("Parsing error. Not enough information to create a context.");
+ }
+
+ return new Context(parts[0], parts[1], parts[2]);
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 7e1a79f..6f46849 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -440,7 +440,7 @@
</resource-configuration>
</service>
- <service name="Webapp Context" discovery="ContextDiscoveryComponent" class="ContextComponent" description="Webapp Context">
+ <service name="Webapp Context" discovery="WebappContextDiscoveryComponent" class="WebappContextComponent" description="Webapp Context">
<operation name="disableContext" displayName="Disable webapp" description="Disable this webapp.">
<results>
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
index 625d8d4..ebadd86 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
@@ -23,7 +23,7 @@ import java.io.InputStream;
import org.testng.annotations.Test;
-import org.rhq.plugins.modcluster.ProxyInfo;
+import org.rhq.plugins.modcluster.model.ProxyInfo;
/**
* @author Stefan Negrea
commit bf99abb7942ffafbd7aad728698105f8f0fc3a63
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Aug 23 16:12:11 2011 -0500
Renaming mod_cluster components to match their explicit purpose.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
index 0a0a570..b87bfcd 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
@@ -30,14 +30,16 @@ import org.rhq.core.domain.configuration.definition.PropertyDefinition;
import org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple;
import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
import org.rhq.core.util.exception.ThrowableUtil;
+import org.rhq.plugins.jmx.JMXComponent;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
import org.rhq.plugins.modcluster.config.ModClusterBeanFile;
/**
* @author Stefan Negrea
*
*/
-@SuppressWarnings({ "deprecation" })
-public class FileConfiguredMBeanResourceComponent extends TimeUnitParamResourceComponent {
+@SuppressWarnings({ "deprecation", "rawtypes" })
+public class FileConfiguredMBeanResourceComponent extends MBeanResourceComponent<JMXComponent> {
private static final Log log = LogFactory.getLog(FileConfiguredMBeanResourceComponent.class);
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServiceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServiceComponent.java
new file mode 100644
index 0000000..d9da81c
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServiceComponent.java
@@ -0,0 +1,52 @@
+package org.rhq.plugins.modcluster;
+
+import java.util.concurrent.TimeUnit;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.pluginapi.operation.OperationResult;
+
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.
+ */
+
+/**
+ *
+ * @author Stefan Negrea
+ */
+public class ModClusterServiceComponent extends FileConfiguredMBeanResourceComponent {
+
+ @Override
+ public OperationResult invokeOperation(String name, Configuration parameters) throws Exception {
+ if (name.toLowerCase().startsWith("ping")) {
+ name = "ping";
+ }
+
+ return super.invokeOperation(name, parameters);
+ }
+
+ @Override
+ protected Object getPropertyValueAsType(PropertySimple propSimple, String typeName) {
+ System.out.println(typeName);
+ if (typeName.equals(TimeUnit.class.getName())) {
+ return TimeUnit.valueOf(propSimple.getStringValue());
+ }
+
+ return super.getPropertyValueAsType(propSimple, typeName);
+ }
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java
deleted file mode 100644
index c67bf61..0000000
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.rhq.plugins.modcluster;
-
-import java.util.concurrent.TimeUnit;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.pluginapi.operation.OperationResult;
-
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2009 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.
- */
-
-/**
- *
- * @author Stefan Negrea
- */
-public class PolyPingMBeanResourceComponent extends FileConfiguredMBeanResourceComponent {
-
- @Override
- public OperationResult invokeOperation(String name, Configuration parameters) throws Exception {
- if (name.toLowerCase().startsWith("ping")) {
- name = "ping";
- }
-
- return super.invokeOperation(name, parameters);
- }
-
- @Override
- protected Object getPropertyValueAsType(PropertySimple propSimple, String typeName) {
- System.out.println(typeName);
- if (typeName.equals(TimeUnit.class.getName())) {
- return TimeUnit.valueOf(propSimple.getStringValue());
- }
-
- return super.getPropertyValueAsType(propSimple, typeName);
- }
-}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/TimeUnitParamResourceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/TimeUnitParamResourceComponent.java
deleted file mode 100644
index 0296eaf..0000000
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/TimeUnitParamResourceComponent.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2009 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.modcluster;
-
-import java.util.concurrent.TimeUnit;
-
-import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.plugins.jmx.MBeanResourceComponent;
-
-/**
- * @author Stefan Negrea
- *
- */
-@SuppressWarnings("rawtypes")
-public class TimeUnitParamResourceComponent extends MBeanResourceComponent {
-
- @Override
- protected Object getPropertyValueAsType(PropertySimple propSimple, String typeName) {
- System.out.println(typeName);
- if (typeName.equals(TimeUnit.class.getName())) {
- return TimeUnit.valueOf(propSimple.getStringValue());
- }
-
- return super.getPropertyValueAsType(propSimple, typeName);
- }
-}
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index ed82f7c..7e1a79f 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -27,7 +27,7 @@
<!-- Start - Configuration for HAModClusterService -->
<service name="HA Service" discovery="ClassNameMBeanDiscoveryComponent"
- class="PolyPingMBeanResourceComponent"
+ class="ModClusterServiceComponent"
supportsManualAdd="true"
description="HA Service Listener" singleton="true">
@@ -199,7 +199,7 @@
<!-- End - Configuration for HAModClusterService -->
<!-- Start - Configuration for ModClusterService -->
- <service name="Service" discovery="ClassNameMBeanDiscoveryComponent" class="PolyPingMBeanResourceComponent" supportsManualAdd="true" description="HA Service Listener" singleton="true">
+ <service name="Service" discovery="ClassNameMBeanDiscoveryComponent" class="ModClusterServiceComponent" supportsManualAdd="true" description="HA Service Listener" singleton="true">
<plugin-configuration>
<c:simple-property name="objectName" readOnly="true" default="jboss.web:service=ModCluster" />
commit 0218f0b41bfb7e1ae6e6ddb12565c396c7ef813d
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Aug 23 15:39:58 2011 -0500
Updates to support integration with JBoss' mod_cluster module for AS6 and EAP5.1.x
diff --git a/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index b642573..f27b153 100644
--- a/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -112,6 +112,7 @@ public class ModclusterPluginTest {
add(PLUGIN_NAME);
add("Webapp Context");
add("HA Service Configuration");
+ add("HA Service");
}
};
@@ -132,6 +133,15 @@ public class ModclusterPluginTest {
ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
.getResourceComponent(resource);
((ConfigurationFacet) resourceComponent).loadResourceConfiguration();
+ } else if (resource.getResourceType().getName().equals("HA Service")) {
+ ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
+ .getResourceComponent(resource);
+
+ Configuration config = new Configuration();
+ config.put(new PropertySimple("p1", "1"));
+ config.put(new PropertySimple("p2", java.util.concurrent.TimeUnit.SECONDS));
+ OperationResult result = ((OperationFacet) resourceComponent).invokeOperation("stop", config);
+ log.info("Result of operation stopContext was: " + result.getSimpleResult());
}
}
}
diff --git a/modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/MBeanResourceComponent.java b/modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/MBeanResourceComponent.java
index 6a60a93..8da6a2d 100644
--- a/modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/MBeanResourceComponent.java
+++ b/modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/MBeanResourceComponent.java
@@ -561,15 +561,15 @@ public class MBeanResourceComponent<T extends JMXComponent> implements Measureme
paramIndex = Integer.valueOf(propName.substring(propName.indexOf('[') + 1, propName.indexOf(']')));
if (paramIndex < 0 || paramIndex >= emsParams.size()) {
throw new IllegalStateException("Index [" + paramIndex + "] specified for parameter of operation ["
- + name + "] on MBean [" + emsBean.getBeanName() + "] is invalid. The MBean operation takes "
- + emsParams.size() + " parameters.");
+ + name + "] on MBean [" + emsBean.getBeanName() + "] is invalid. The MBean operation takes "
+ + emsParams.size() + " parameters.");
}
} else {
paramIndex = emsParamIndexesByName.get(propName);
if (paramIndex == null) {
throw new IllegalStateException("Name [" + propName + "] specified for parameter of operation ["
- + name + "] on MBean [" + emsBean.getBeanName()
- + "] is invalid. The MBean operation does not take a parameter by that name.");
+ + name + "] on MBean [" + emsBean.getBeanName()
+ + "] is invalid. The MBean operation does not take a parameter by that name.");
}
}
EmsParameter emsParam = emsParams.get(paramIndex);
@@ -611,7 +611,7 @@ public class MBeanResourceComponent<T extends JMXComponent> implements Measureme
return resultToReturn;
}
- private Object getPropertyValueAsType(PropertySimple propSimple, String typeName) {
+ protected Object getPropertyValueAsType(PropertySimple propSimple, String typeName) {
Object value;
if (typeName.equals(String.class.getName())) {
value = (propSimple == null) ? null : propSimple.getStringValue();
@@ -626,7 +626,8 @@ public class MBeanResourceComponent<T extends JMXComponent> implements Measureme
} else if (typeName.equals(Double.class.getName()) || typeName.equals(double.class.getName())) {
value = (propSimple == null) ? null : propSimple.getDoubleValue();
} else {
- throw new IllegalStateException("Operation parameter maps to MBean parameter with an unsupported type (" + typeName + ").");
+ throw new IllegalStateException("Operation parameter maps to MBean parameter with an unsupported type ("
+ + typeName + ").");
}
// TODO GH: Handle rest of types. (I think i have a mapper for this in mc4j
return value;
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index 35c5b28..3a6deaa 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -31,6 +31,11 @@
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.jboss.on</groupId>
+ <artifactId>jopr-jboss-as-plugin</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>log4j</groupId>
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
index c5343d0..4c8b437 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
@@ -90,6 +90,10 @@ public class ContextComponent extends MBeanResourceComponent<MBeanResourceCompon
configuration = new Object[] { context.getHost(), context.getPath() };
}
+ if (context.getPath().equals("/")) {
+ configuration[1] = "ROOT";
+ }
+
log.info(name + " - " + context.getHost() + " " + context.getPath());
ClassLoader cl = Thread.currentThread().getContextClassLoader();
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
index ee0369c..0a0a570 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
@@ -30,21 +30,20 @@ import org.rhq.core.domain.configuration.definition.PropertyDefinition;
import org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple;
import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
import org.rhq.core.util.exception.ThrowableUtil;
-import org.rhq.plugins.jmx.MBeanResourceComponent;
import org.rhq.plugins.modcluster.config.ModClusterBeanFile;
/**
* @author Stefan Negrea
*
*/
-@SuppressWarnings({ "rawtypes", "deprecation" })
-public class FileConfiguredMBeanResourceComponent extends MBeanResourceComponent {
+@SuppressWarnings({ "deprecation" })
+public class FileConfiguredMBeanResourceComponent extends TimeUnitParamResourceComponent {
private static final Log log = LogFactory.getLog(FileConfiguredMBeanResourceComponent.class);
private static final String BEAN_CLASS_NAME_PROPERTY = "className";
private static final String DEPENDENCY_BEAN_CLASS_NAME_PROPERTY = "dependencyClassName";
- private static final String SERVER_HOME_DIR = "jboss.server.home.dir";
+ private static final String SERVER_HOME_DIR = "serverHomeDir";
private static final String CONFIGURATION_FILE_RELATIVE_PATH = "/deploy/mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml";
/**
@@ -105,7 +104,7 @@ public class FileConfiguredMBeanResourceComponent extends MBeanResourceComponent
}
private String getServerHomeDirectory() {
- ModclusterServerComponent modClusterComponent = (ModclusterServerComponent) this.resourceContext
+ ModClusterServerComponent modClusterComponent = (ModClusterServerComponent) this.resourceContext
.getParentResourceComponent();
PropertySimple property = modClusterComponent.getResourceContext().getPluginConfiguration()
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java
index 496068c..3eb7cbe 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java
@@ -36,9 +36,6 @@ import org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent;
@SuppressWarnings("rawtypes")
public class LoadMetricDiscoveryComponent extends MBeanResourceDiscoveryComponent<JMXComponent> {
- /* (non-Javadoc)
- * @see org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent#discoverResources(org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext, boolean)
- */
@Override
public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<JMXComponent> context,
boolean skipUnknownProps) {
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterDiscoveryComponent.java
new file mode 100644
index 0000000..b9a73b5
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterDiscoveryComponent.java
@@ -0,0 +1,70 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.modcluster;
+
+import java.util.Set;
+
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+import org.rhq.plugins.jbossas.JBossASServerComponent;
+import org.rhq.plugins.jbossas5.ApplicationServerComponent;
+import org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent;
+
+/**
+ * @author Stefan Negrea
+ *
+ */
+@SuppressWarnings({ "rawtypes", "unchecked" })
+public class ModClusterDiscoveryComponent extends MBeanResourceDiscoveryComponent {
+
+ private final static String JBOSS_SERVER_HOME_DIR = "serverHomeDir";
+
+ @Override
+ public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext context) {
+ Set<DiscoveredResourceDetails> tempSet = super.discoverResources(context);
+
+ for (DiscoveredResourceDetails detail : tempSet) {
+ String serverHomeDirectory = findServerHomeDirectory(context.getParentResourceComponent());
+ detail.getPluginConfiguration().put(new PropertySimple(JBOSS_SERVER_HOME_DIR, serverHomeDirectory));
+ }
+
+ return tempSet;
+ }
+
+ @SuppressWarnings("static-access")
+ public String findServerHomeDirectory(ResourceComponent parentResourceComponent) {
+ if (parentResourceComponent instanceof ApplicationServerComponent) {
+ ApplicationServerComponent parentComponent = (ApplicationServerComponent) parentResourceComponent;
+
+ return parentComponent.getResourceContext().getPluginConfiguration().getSimple("serverHomeDir")
+ .getStringValue();
+
+ } else if (parentResourceComponent instanceof JBossASServerComponent) {
+ JBossASServerComponent parentComponent = (JBossASServerComponent) parentResourceComponent;
+
+ return parentComponent.getPluginConfiguration().getSimple(parentComponent.JBOSS_HOME_DIR_CONFIG_PROP)
+ .getStringValue();
+ }
+
+ return null;
+ }
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServerComponent.java
new file mode 100644
index 0000000..7d5f0dc
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServerComponent.java
@@ -0,0 +1,47 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.modcluster;
+
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+import org.rhq.plugins.modcluster.helper.JBossHelper;
+
+/**
+ * @author Stefan Negrea
+ *
+ */
+@SuppressWarnings({ "rawtypes" })
+public class ModClusterServerComponent extends MBeanResourceComponent {
+
+ @Override
+ public AvailabilityType getAvailability() {
+ String rawProxyInfo = JBossHelper.getRawProxyInfo(getEmsBean());
+
+ if (rawProxyInfo == null) {
+ return AvailabilityType.DOWN;
+ }
+
+ ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
+ if (proxyInfo.getAvailableNodes().size() == 0) {
+ return AvailabilityType.DOWN;
+ }
+
+ return super.getAvailability();
+ }
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
deleted file mode 100644
index 03598e9..0000000
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2009 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.modcluster;
-
-import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.domain.measurement.AvailabilityType;
-import org.rhq.core.pluginapi.inventory.ResourceContext;
-import org.rhq.plugins.jbossas.JBossASServerComponent;
-import org.rhq.plugins.jbossas5.ApplicationServerComponent;
-import org.rhq.plugins.jmx.MBeanResourceComponent;
-import org.rhq.plugins.modcluster.helper.JBossHelper;
-
-/**
- * @author Stefan Negrea
- *
- */
-@SuppressWarnings({ "rawtypes" })
-public class ModclusterServerComponent extends MBeanResourceComponent {
-
- private final static String JBOSS_SERVER_HOME_DIR = "jboss.server.home.dir";
-
- @SuppressWarnings({ "unchecked", "deprecation", "static-access" })
- @Override
- public void start(ResourceContext context) {
- super.start(context);
-
- String serverHomeDirectory = null;
- if (this.resourceContext.getParentResourceComponent() instanceof ApplicationServerComponent) {
- ApplicationServerComponent parentComponent = (ApplicationServerComponent) this.resourceContext
- .getParentResourceComponent();
-
- serverHomeDirectory = parentComponent.getResourceContext().getPluginConfiguration()
- .getSimple("serverHomeDir").getStringValue();
-
- } else if (this.resourceContext.getParentResourceComponent() instanceof JBossASServerComponent) {
- JBossASServerComponent parentComponent = (JBossASServerComponent) this.resourceContext
- .getParentResourceComponent();
-
- serverHomeDirectory = parentComponent.getPluginConfiguration()
- .getSimple(parentComponent.JBOSS_HOME_DIR_CONFIG_PROP).getStringValue();
- }
-
- if (serverHomeDirectory != null) {
- PropertySimple serverHomeDirectoryProperty = null;
- serverHomeDirectoryProperty = new PropertySimple();
- serverHomeDirectoryProperty.setName(JBOSS_SERVER_HOME_DIR);
- serverHomeDirectoryProperty.setStringValue(serverHomeDirectory);
- this.resourceContext.getPluginConfiguration().put(serverHomeDirectoryProperty);
- }
- };
-
- //private final static String PROXY_INFO_PROPERTY_NAME
-
- /* (non-Javadoc)
- * @see org.rhq.plugins.jmx.MBeanResourceComponent#getAvailability()
- */
- @Override
- public AvailabilityType getAvailability() {
- String rawProxyInfo = JBossHelper.getRawProxyInfo(getEmsBean());
-
- if (rawProxyInfo == null) {
- return AvailabilityType.DOWN;
- }
-
- ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
- if (proxyInfo.getAvailableNodes().size() == 0) {
- return AvailabilityType.DOWN;
- }
-
- return super.getAvailability();
- }
-}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java
index bc54267..c67bf61 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java
@@ -1,6 +1,9 @@
package org.rhq.plugins.modcluster;
+import java.util.concurrent.TimeUnit;
+
import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.pluginapi.operation.OperationResult;
/*
@@ -36,4 +39,14 @@ public class PolyPingMBeanResourceComponent extends FileConfiguredMBeanResourceC
return super.invokeOperation(name, parameters);
}
+
+ @Override
+ protected Object getPropertyValueAsType(PropertySimple propSimple, String typeName) {
+ System.out.println(typeName);
+ if (typeName.equals(TimeUnit.class.getName())) {
+ return TimeUnit.valueOf(propSimple.getStringValue());
+ }
+
+ return super.getPropertyValueAsType(propSimple, typeName);
+ }
}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/TimeUnitParamResourceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/TimeUnitParamResourceComponent.java
new file mode 100644
index 0000000..0296eaf
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/TimeUnitParamResourceComponent.java
@@ -0,0 +1,42 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.modcluster;
+
+import java.util.concurrent.TimeUnit;
+
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+
+/**
+ * @author Stefan Negrea
+ *
+ */
+@SuppressWarnings("rawtypes")
+public class TimeUnitParamResourceComponent extends MBeanResourceComponent {
+
+ @Override
+ protected Object getPropertyValueAsType(PropertySimple propSimple, String typeName) {
+ System.out.println(typeName);
+ if (typeName.equals(TimeUnit.class.getName())) {
+ return TimeUnit.valueOf(propSimple.getStringValue());
+ }
+
+ return super.getPropertyValueAsType(propSimple, typeName);
+ }
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java
index 6c00130..dee2f81 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java
@@ -18,11 +18,18 @@
*/
package org.rhq.plugins.modcluster.config;
+import java.io.File;
import java.io.IOException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
@@ -38,11 +45,13 @@ public abstract class AbstractConfigurationFile {
public AbstractConfigurationFile(String fileName) throws ParserConfigurationException, SAXException, IOException {
this.fileName = fileName;
- DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
- DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
- this.document = docBuilder.parse(this.getFileName());
+ loadConfiguratonFile();
}
+ abstract void setPropertyValue(String propertyName, String value);
+
+ abstract String getPropertyValue(String propertyName);
+
/**
* @return the fileName
*/
@@ -57,9 +66,19 @@ public abstract class AbstractConfigurationFile {
return document;
}
- abstract void setPropertyValue(String propertyName, String value);
+ public void saveConfigurationFile() throws Exception {
+ File file = new File(this.getFileName());
+ StreamResult result = new StreamResult(file);
+ Source source = new DOMSource(this.getDocument());
- abstract String getPropertyValue(String propertyName);
+ Transformer transformer = TransformerFactory.newInstance().newTransformer();
+ transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+ transformer.transform(source, result);
+ }
- abstract void saveConfigurationFile() throws Exception;
+ private void loadConfiguratonFile() throws ParserConfigurationException, SAXException, IOException {
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
+ this.document = docBuilder.parse(this.getFileName());
+ }
}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java
index 1d008ee..354fa99 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java
@@ -47,11 +47,4 @@ public class JBossWebServerFile extends AbstractConfigurationFile {
// TODO Auto-generated method stub
return null;
}
-
- @Override
- void saveConfigurationFile() throws Exception {
- // TODO Auto-generated method stub
-
- }
-
}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
index 45053f7..6abf955 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
@@ -19,17 +19,10 @@
package org.rhq.plugins.modcluster.config;
import java.io.IOException;
-import java.io.StringWriter;
import java.util.ArrayList;
import java.util.List;
import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Attr;
import org.w3c.dom.Node;
@@ -129,22 +122,6 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
}
/**
- * @throws TransformerException
- */
- public void saveConfigurationFile() throws TransformerException {
- Transformer transformer = TransformerFactory.newInstance().newTransformer();
- transformer.setOutputProperty(OutputKeys.INDENT, "no");
-
- //initialize StreamResult with File object to save to file
- StreamResult result = new StreamResult(new StringWriter());
- DOMSource source = new DOMSource(this.getDocument());
- transformer.transform(source, result);
-
- String xmlString = result.getWriter().toString();
- System.out.println(xmlString);
- }
-
- /**
* @param className
* @return
*/
@@ -155,7 +132,6 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
Node node = result.item(i);
if (node.getAttributes().getNamedItem("class") != null
&& className.equals(node.getAttributes().getNamedItem("class").getTextContent())) {
- System.out.println(node.getAttributes().getNamedItem("class").getTextContent());
return node;
}
}
@@ -174,7 +150,6 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
Node node = result.item(i);
if (node.getAttributes().getNamedItem("name") != null
&& beanName.equals(node.getAttributes().getNamedItem("name").getTextContent())) {
- System.out.println(node.getAttributes().getNamedItem("name").getTextContent());
return node;
}
}
@@ -243,5 +218,4 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
return listOfNodes;
}
-
}
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 4f3010f..ed82f7c 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -6,7 +6,9 @@
<depends plugin="JMX" />
<service name="mod_cluster"
- discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent" class="ModclusterServerComponent" supportsManualAdd="true" description="mod_cluster plugin" singleton="true">
+ discovery="ModClusterDiscoveryComponent"
+ class="ModClusterServerComponent"
+ supportsManualAdd="true" description="mod_cluster plugin" singleton="true">
<runs-inside>
<parent-resource-type name="JBossAS Server" plugin="JBossAS" />
@@ -17,13 +19,17 @@
<c:simple-property name="objectName" readOnly="true" default="Catalina:type=ModClusterListener,*|jboss.web:service=ModCluster" />
<c:simple-property name="engineObjectName" readOnly="true" default="jboss.web:type=Engine" />
<c:simple-property name="nameTemplate" default="mod_cluster" />
+ <c:simple-property name="serverHomeDir"/>
</plugin-configuration>
<operation name="reset" displayName="Reset the node" description="Move this application server out of an error state." />
<operation name="refresh" displayName="Refresh configuration" description="Refresh configuration for this application server." />
<!-- Start - Configuration for HAModClusterService -->
- <service name="HA Service" discovery="ClassNameMBeanDiscoveryComponent" class="PolyPingMBeanResourceComponent" supportsManualAdd="true" description="HA Service Listener" singleton="true">
+ <service name="HA Service" discovery="ClassNameMBeanDiscoveryComponent"
+ class="PolyPingMBeanResourceComponent"
+ supportsManualAdd="true"
+ description="HA Service Listener" singleton="true">
<plugin-configuration>
<c:simple-property name="objectName" readOnly="true" default="jboss.web:service=ModCluster" />
@@ -35,18 +41,18 @@
<!-- HA Operations -->
<operation name="disableDomain" displayName="Disable domain" description="Disables all contexts on each node within the current domain. If the current domain is null, then all nodes are stopped.">
<results>
- <c:simple-property name="result" description="The result of the operation" />
+ <c:simple-property name="operationResult" description="The result of the operation" />
</results>
</operation>
<operation name="enableDomain" displayName="Enable domain" description="Enable all contexts on each node within the current domain. If the current domain is null, then all nodes are stopped.">
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ <c:simple-property name="operationResult" type="boolean" description="The result of the operation" />
</results>
</operation>
<operation name="stopDomain" displayName="Stop domain" description="Gracefully stops all contexts on each node within the current domain. If the current domain is null, then all nodes are stopped.">
<parameters>
- <c:simple-property required="true" name="timeout" type="string" displayName="The number of units of time for which to wait for all sessions to drain on a given node." />
- <c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
+ <c:simple-property required="true" name="p1" type="string" displayName="The number of units of time for which to wait for all sessions to drain on a given node." />
+ <c:simple-property required="true" name="p2" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
<c:property-options allowCustomValue="false">
<c:option value="MICROSECONDS" name="MICROSECONDS" />
<c:option value="MILLISECONDS" name="MILLISECONDS" />
@@ -58,7 +64,7 @@
</c:simple-property>
</parameters>
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ <c:simple-property name="operationResult" type="boolean" description="The result of the operation" />
</results>
</operation>
@@ -66,59 +72,60 @@
<operation name="pingHTTPD" displayName="Ping httpd" description="Ping httpd and determine whether each proxy is accessible and healthy. Returns the PING_RSP grouped by proxy address.">
<results>
- <c:simple-property name="result" description="Map of PING_RPS response, grouped by proxy.">
+ <c:simple-property name="operationResult" description="Map of PING_RPS response, grouped by proxy.">
</c:simple-property>
</results>
</operation>
<operation name="pingNodeByJVMRoute" displayName="Ping node by JVM Route"
description="Ping a node from httpd and returns the PING_RSP grouped by proxy address. Dtermines whether the node configured with the specified jvm route is accessible from each proxy returning the PING_RSP grouped by proxy address.">
<parameters>
- <c:simple-property required="true" name="jvmRoute" type="string" displayName="JVM Route of node to ping." />
+ <c:simple-property required="true" name="p1" type="string" displayName="JVM Route of node to ping." />
</parameters>
<results>
- <c:simple-property name="result" type="string" description="Map of PING_RPS response, grouped by proxy." />
+ <c:simple-property name="operationResult" type="string" description="Map of PING_RPS response, grouped by proxy." />
</results>
</operation>
<operation name="pingNodeByAddress" displayName="Ping node by address"
description="Ping a node from httpd and returns the PING_RSP grouped by proxy address. Determines whether the node configured with the specified jvm route is accessible from each proxy returning the PING_RSP grouped by proxy address.">
<parameters>
- <c:simple-property required="true" name="scheme" type="string" displayName="Scheme (ajp, http, https)" />
- <c:simple-property required="true" name="hostname" type="string" displayName="Name or ip address of a node." />
- <c:simple-property required="true" name="port" type="string" displayName="Port" />
+ <c:simple-property required="true" name="p1" type="string" displayName="Scheme (ajp, http, https)" />
+ <c:simple-property required="true" name="p2" type="string" displayName="Name or ip address of a node." />
+ <c:simple-property required="true" name="p3" type="integer" displayName="Port" />
</parameters>
<results>
- <c:simple-property name="result" type="string" description="Map of PING_RPS response, grouped by proxy." />
+ <c:simple-property name="operationResult" type="string" description="Map of PING_RPS response, grouped by proxy." />
</results>
</operation>
<operation name="addProxy" displayName="Add a proxy" description="Add a proxy.">
<parameters>
- <c:simple-property required="true" name="host" type="string" displayName="Proxy address" />
- <c:simple-property required="true" name="port" type="string" displayName="Proxy port" />
+ <c:simple-property required="true" name="p1" type="string" displayName="Proxy address" />
+ <c:simple-property required="true" name="p2" type="integer" displayName="Proxy port" />
</parameters>
</operation>
<operation name="removeProxy" displayName="Remove a proxy" description="Remove a proxy.">
<parameters>
- <c:simple-property required="true" name="host" type="string" displayName="Proxy address" />
- <c:simple-property required="true" name="port" type="string" displayName="Proxy port" />
+ <c:simple-property required="true" name="p1" type="string" displayName="Proxy address" />
+ <c:simple-property required="true" name="p2" type="integer" displayName="Proxy port" />
</parameters>
</operation>
+
<operation name="disable" displayName="Disable all webpapps" description="Disable all webapps for all virtual hosts of this application server.">
<results>
- <c:simple-property name="result" description="The result of the operation">
+ <c:simple-property name="operationResult" description="The result of the operation">
</c:simple-property>
</results>
</operation>
<operation name="enable" displayName="Enable all webapps" description="Enable all webapps for all virtual hosts of this application server.">
<results>
- <c:simple-property name="result" description="The result of the operation">
+ <c:simple-property name="operationResult" description="The result of the operation">
</c:simple-property>
</results>
</operation>
<operation name="stop" displayName="Stop all webapps" description="Gracefully stops all webapps for all virtual hosts of this application server.">
<parameters>
- <c:simple-property required="true" name="timeout" type="string" displayName="Session draining timeout" />
- <c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
+ <c:simple-property required="true" name="p1" type="string" displayName="Session draining timeout" />
+ <c:simple-property required="true" name="p2" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
<c:property-options allowCustomValue="false">
<c:option value="MICROSECONDS" name="MICROSECONDS" />
<c:option value="MILLISECONDS" name="MILLISECONDS" />
@@ -130,7 +137,7 @@
</c:simple-property>
</parameters>
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ <c:simple-property name="operationResult" type="boolean" description="The result of the operation" />
</results>
</operation>
@@ -139,7 +146,7 @@
<metric property="ProxyInfo" displayName="Proxy Info" displayType="summary" dataType="trait" />
<resource-configuration>
- <c:simple-property name="processStatusFrequency" type="integer" description="Process status frequency." />
+ <c:simple-property name="processStatusFrequency" type="integer" required="false" description="Process status frequency." />
</resource-configuration>
</service>
@@ -203,56 +210,57 @@
<operation name="pingHTTPD" displayName="Ping httpd" description="Ping httpd and determine whether each proxy is accessible and healthy. Returns the PING_RSP grouped by proxy address.">
<results>
- <c:simple-property name="result" type="string" description="Map of PING_RPS response, grouped by proxy." />
+ <c:simple-property name="operationResult" type="string" description="Map of PING_RPS response, grouped by proxy." />
</results>
</operation>
<operation name="pingNodeByJVMRoute" displayName="Ping node by JVM Route"
description="Ping a node from httpd and returns the PING_RSP grouped by proxy address. Dtermines whether the node configured with the specified jvm route is accessible from each proxy returning the PING_RSP grouped by proxy address.">
<parameters>
- <c:simple-property required="true" name="jvmRoute" type="string" displayName="JVM Route of node to ping." />
+ <c:simple-property required="true" name="p1" type="string" displayName="JVM Route of node to ping." />
</parameters>
<results>
- <c:simple-property name="result" type="string" description="Map of PING_RPS response, grouped by proxy." />
+ <c:simple-property name="operationResult" type="string" description="Map of PING_RPS response, grouped by proxy." />
</results>
</operation>
<operation name="pingNodeByAddress" displayName="Ping node by address"
description="Ping a node from httpd and returns the PING_RSP grouped by proxy address. Determines whether the node configured with the specified jvm route is accessible from each proxy returning the PING_RSP grouped by proxy address.">
<parameters>
- <c:simple-property required="true" name="scheme" type="string" displayName="Scheme (ajp, http, https)" />
- <c:simple-property required="true" name="hostname" type="string" displayName="Name or ip address of a node." />
- <c:simple-property required="true" name="port" type="string" displayName="Port" />
+ <c:simple-property required="true" name="p1" type="string" displayName="Scheme (ajp, http, https)" />
+ <c:simple-property required="true" name="p2" type="string" displayName="Name or ip address of a node." />
+ <c:simple-property required="true" name="p3" type="integer" displayName="Port" />
</parameters>
<results>
- <c:simple-property name="result" type="string" description="Map of PING_RPS response, grouped by proxy." />
+ <c:simple-property name="operationResult" type="string" description="Map of PING_RPS response, grouped by proxy." />
</results>
</operation>
<operation name="addProxy" displayName="Add a proxy" description="Add a proxy.">
<parameters>
- <c:simple-property required="true" name="host" type="string" displayName="Proxy address" />
- <c:simple-property required="true" name="port" type="string" displayName="Proxy port" />
+ <c:simple-property required="true" name="p1" type="string" displayName="Proxy address" />
+ <c:simple-property required="true" name="p2" type="integer" displayName="Proxy port" />
</parameters>
</operation>
<operation name="removeProxy" displayName="Remove a proxy" description="Remove a proxy.">
<parameters>
- <c:simple-property required="true" name="host" type="string" displayName="Proxy address" />
- <c:simple-property required="true" name="port" type="string" displayName="Proxy port" />
+ <c:simple-property required="true" name="p1" type="string" displayName="Proxy address" />
+ <c:simple-property required="true" name="p2" type="integer" displayName="Proxy port" />
</parameters>
</operation>
+
<operation name="disable" displayName="Disable all webpapps" description="Disable all webapps for all virtual hosts of this application server.">
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ <c:simple-property name="operationResult" type="boolean" description="The result of the operation" />
</results>
</operation>
<operation name="enable" displayName="Enable all webapps" description="Enable all webapps for all virtual hosts of this application server.">
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ <c:simple-property name="operationResult" type="boolean" description="The result of the operation" />
</results>
</operation>
<operation name="stop" displayName="Stop all webapps" description="Gracefully stops all webapps for all virtual hosts of this application server.">
<parameters>
- <c:simple-property required="true" name="timeout" type="string" displayName="Session draining timeout" />
- <c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
+ <c:simple-property required="true" name="p1" type="string" displayName="Session draining timeout" />
+ <c:simple-property required="true" name="p2" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
<c:property-options allowCustomValue="false">
<c:option value="MICROSECONDS" name="MICROSECONDS" />
<c:option value="MILLISECONDS" name="MILLISECONDS" />
@@ -264,7 +272,7 @@
</c:simple-property>
</parameters>
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ <c:simple-property name="operationResult" type="boolean" description="The result of the operation" />
</results>
</operation>
@@ -338,12 +346,12 @@
</operation>
<operation name="disable" displayName="Disable all webpapps" description="Disable all webapps for all virtual hosts of this application server.">
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ <c:simple-property name="operationResult" type="boolean" description="The result of the operation" />
</results>
</operation>
<operation name="enable" displayName="Enable all webapps" description="Enable all webapps for all virtual hosts of this application server.">
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ <c:simple-property name="operationResult" type="boolean" description="The result of the operation" />
</results>
</operation>
<operation name="stop" displayName="Stop all webapps" description="Gracefully stops all webapps for all virtual hosts of this application server.">
@@ -361,7 +369,7 @@
</c:simple-property>
</parameters>
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ <c:simple-property name="operationResult" type="boolean" description="The result of the operation" />
</results>
</operation>
@@ -396,11 +404,9 @@
<c:simple-property name="nameTemplate" default="Dynamic Load Balancer Factor" />
</plugin-configuration>
- <metric property="Metrics" displayName="Collected Metrics" displayType="summary" dataType="trait" />
-
<resource-configuration>
- <c:simple-property name="DecayFactor" type="integer" description="The number of historical load values used to determine load factor." />
- <c:simple-property name="History" type="integer" description="The exponential decay factor for historical load values." />
+ <c:simple-property name="decayFactor" type="integer" required="false" description="The number of historical load values used to determine load factor." />
+ <c:simple-property name="history" type="integer" required="false" description="The exponential decay factor for historical load values." />
</resource-configuration>
</service>
@@ -424,11 +430,13 @@
<c:simple-property name="nameTemplate" default="Load Metric" />
</plugin-configuration>
- <metric property="Load" displayName="Load" category="utilization" description="The current load of this metric as a percent of the metric's capacity." dataType="measurement" />
+ <metric property="Load" displayName="Load" category="utilization"
+ description="The current load of this metric as a percent of the metric's capacity." dataType="measurement"
+ defaultOn="true" displayType="summary"/>
<resource-configuration>
- <c:simple-property name="Weight" type="integer" description="The significance of this load metric compared to the other metrics." />
- <c:simple-property name="Capacity" type="double" description="Used to normalize the value returned by load expressed as a percentage of the capacity, such that: 0 < (load/capacity) < 1" />
+ <c:simple-property name="weight" type="integer" description="The significance of this load metric compared to the other metrics." />
+ <c:simple-property name="capacity" type="double" description="Used to normalize the value returned by load expressed as a percentage of the capacity, such that: 0 < (load/capacity) < 1" />
</resource-configuration>
</service>
@@ -436,7 +444,7 @@
<operation name="disableContext" displayName="Disable webapp" description="Disable this webapp.">
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation." />
+ <c:simple-property name="operationResult" type="boolean" description="The result of the operation." />
</results>
</operation>
<operation name="stopContext" displayName="Stop webapp" description="Gracefully stops this webapp.">
@@ -454,12 +462,12 @@
</c:simple-property>
</parameters>
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ <c:simple-property name="operationResult" type="boolean" description="The result of the operation" />
</results>
</operation>
<operation name="enableContext" displayName="Enable webapp" description="Enable this webapp.">
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ <c:simple-property name="operationResult" type="boolean" description="The result of the operation" />
</results>
</operation>
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java
index c50b0e6..cba5672 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java
@@ -28,16 +28,19 @@ public class ServerConfigTest {
public void TestConfig() {
try {
+ //Test simple bean configuration
ModClusterBeanFile config = new ModClusterBeanFile("org.jboss.modcluster.ha.HAModClusterService",
"/home/snegrea/Downloads/jboss51eap/jboss-as/server/all/deploy/mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml");
config.setPropertyValue("processStatusFrequency", "4");
config.setPropertyValue("test", "5");
config.setPropertyValue("test", "123");
- System.out.println(config.getPropertyValue("test"));
+ config.setPropertyValue("test", null);
+ config.setPropertyValue("processStatusFrequency", null);
config.saveConfigurationFile();
+ //Test bean configuration with constructor dependency
config = new ModClusterBeanFile("org.jboss.modcluster.ha.HAModClusterService",
"org.jboss.modcluster.config.ha.HAModClusterConfig",
"/home/snegrea/Downloads/jboss51eap/jboss-as/server/all/deploy/mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml");
@@ -45,11 +48,8 @@ public class ServerConfigTest {
config.setPropertyValue("test", "5");
config.setPropertyValue("test", "123");
- System.out.println(config.getPropertyValue("test"));
-
- config.saveConfigurationFile();
-
config.setPropertyValue("test", null);
+ config.setPropertyValue("processStatusFrequency", null);
config.saveConfigurationFile();
} catch (Exception e) {
// TODO Auto-generated catch block
commit 8a35caa7f9b3d2093e7cdd495cf65f4572bca065
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Mon Aug 15 14:59:16 2011 -0500
The JBoss server home directory is now correctly retrieved from the parent resource component. Included some other minor code tweaks and refactorings.
diff --git a/modules/integration-tests/mod_cluster-plugin-test/pom.xml b/modules/integration-tests/mod_cluster-plugin-test/pom.xml
index 77a81b2..ba94746 100644
--- a/modules/integration-tests/mod_cluster-plugin-test/pom.xml
+++ b/modules/integration-tests/mod_cluster-plugin-test/pom.xml
@@ -42,7 +42,13 @@
</dependencyManagement>
<dependencies>
-
+ <dependency>
+ <groupId>org.jboss.on</groupId>
+ <artifactId>jopr-jboss-as-5-plugin</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
<dependency>
<groupId>org.jboss.integration</groupId>
<artifactId>jboss-profileservice-spi</artifactId>
diff --git a/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index 0a39eab..b642573 100644
--- a/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -45,6 +45,7 @@ import org.rhq.core.pc.PluginContainerConfiguration;
import org.rhq.core.pc.plugin.FileSystemPluginFinder;
import org.rhq.core.pc.plugin.PluginEnvironment;
import org.rhq.core.pc.plugin.PluginManager;
+import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
import org.rhq.core.pluginapi.inventory.ResourceComponent;
import org.rhq.core.pluginapi.measurement.MeasurementFacet;
import org.rhq.core.pluginapi.operation.OperationFacet;
@@ -109,7 +110,8 @@ public class ModclusterPluginTest {
{
add(PLUGIN_NAME);
- add(PLUGIN_NAME + " Webapp Context");
+ add("Webapp Context");
+ add("HA Service Configuration");
}
};
@@ -124,8 +126,12 @@ public class ModclusterPluginTest {
Resource resource = (Resource) objectResource;
if (resource.getResourceType().getName().equals("mod_cluster")) {
testResourceMeasurement(resource);
- } else {
+ } else if (resource.getResourceType().getName().equals("Webapp Context")) {
testContextOperations(resource);
+ } else if (resource.getResourceType().getName().equals("HA Service Configuration")) {
+ ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
+ .getResourceComponent(resource);
+ ((ConfigurationFacet) resourceComponent).loadResourceConfiguration();
}
}
}
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index fdc4f37..35c5b28 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -23,6 +23,14 @@
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.jboss.on</groupId>
+ <artifactId>jopr-jboss-as-5-plugin</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
<dependency>
<groupId>log4j</groupId>
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
index 8e14f9b..c5343d0 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
@@ -20,6 +20,8 @@ package org.rhq.plugins.modcluster;
import java.util.concurrent.TimeUnit;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.mc4j.ems.connection.bean.EmsBean;
import org.rhq.core.domain.configuration.Configuration;
@@ -35,6 +37,9 @@ import org.rhq.plugins.modcluster.helper.JBossHelper;
*/
@SuppressWarnings({ "rawtypes", "deprecation" })
public class ContextComponent extends MBeanResourceComponent<MBeanResourceComponent> {
+
+ private static final Log log = LogFactory.getLog(ContextComponent.class);
+
@Override
protected EmsBean loadBean() {
return getResourceContext().getParentResourceComponent().getEmsBean();
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
index 9b511b3..ee0369c 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
@@ -19,6 +19,9 @@
package org.rhq.plugins.modcluster;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.ConfigurationUpdateStatus;
import org.rhq.core.domain.configuration.PropertySimple;
@@ -34,11 +37,15 @@ import org.rhq.plugins.modcluster.config.ModClusterBeanFile;
* @author Stefan Negrea
*
*/
-@SuppressWarnings("rawtypes")
+@SuppressWarnings({ "rawtypes", "deprecation" })
public class FileConfiguredMBeanResourceComponent extends MBeanResourceComponent {
+ private static final Log log = LogFactory.getLog(FileConfiguredMBeanResourceComponent.class);
+
private static final String BEAN_CLASS_NAME_PROPERTY = "className";
private static final String DEPENDENCY_BEAN_CLASS_NAME_PROPERTY = "dependencyClassName";
+ private static final String SERVER_HOME_DIR = "jboss.server.home.dir";
+ private static final String CONFIGURATION_FILE_RELATIVE_PATH = "/deploy/mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml";
/**
* This default setup of configuration properties can map to mbean attributes
@@ -46,15 +53,14 @@ public class FileConfiguredMBeanResourceComponent extends MBeanResourceComponent
* @return the configuration of the component
*/
@Override
- @SuppressWarnings("deprecation")
public Configuration loadResourceConfiguration() {
+
Configuration configuration = new Configuration();
ConfigurationDefinition configurationDefinition = this.resourceContext.getResourceType()
.getResourceConfigurationDefinition();
try {
- ModClusterBeanFile modClusterBeanFile = this.getModClusterBeanFileInstance(this.resourceContext
- .getPluginConfiguration());
+ ModClusterBeanFile modClusterBeanFile = this.getModClusterBeanFileInstance();
for (PropertyDefinition property : configurationDefinition.getPropertyDefinitions().values()) {
if (property instanceof PropertyDefinitionSimple) {
@@ -69,8 +75,7 @@ public class FileConfiguredMBeanResourceComponent extends MBeanResourceComponent
}
}
} catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.debug("Unable to load mod_cluster configuration file.", e);
}
return configuration;
@@ -84,19 +89,35 @@ public class FileConfiguredMBeanResourceComponent extends MBeanResourceComponent
updateResourceConfiguration(report, false);
}
- private ModClusterBeanFile getModClusterBeanFileInstance(Configuration pluginConfig) throws Exception {
+ private ModClusterBeanFile getModClusterBeanFileInstance() throws Exception {
+ Configuration pluginConfig = this.resourceContext.getPluginConfiguration();
String beanClassName = pluginConfig.getSimple(BEAN_CLASS_NAME_PROPERTY).getStringValue();
+ String fileName = this.getServerHomeDirectory() + CONFIGURATION_FILE_RELATIVE_PATH;
+
if (pluginConfig.getSimple(DEPENDENCY_BEAN_CLASS_NAME_PROPERTY) != null) {
String dependencyBeanClassName = pluginConfig.getSimple(DEPENDENCY_BEAN_CLASS_NAME_PROPERTY)
.getStringValue();
- return new ModClusterBeanFile(dependencyBeanClassName);
+ return new ModClusterBeanFile(beanClassName, dependencyBeanClassName, fileName);
+ }
+
+ return new ModClusterBeanFile(beanClassName, fileName);
+ }
+
+ private String getServerHomeDirectory() {
+ ModclusterServerComponent modClusterComponent = (ModclusterServerComponent) this.resourceContext
+ .getParentResourceComponent();
+
+ PropertySimple property = modClusterComponent.getResourceContext().getPluginConfiguration()
+ .getSimple(SERVER_HOME_DIR);
+
+ if (property != null) {
+ return property.getStringValue();
}
- return new ModClusterBeanFile(beanClassName);
+ return null;
}
- @SuppressWarnings("deprecation")
@Override
public void updateResourceConfiguration(ConfigurationUpdateReport report, boolean ignoreReadOnly) {
ConfigurationDefinition configurationDefinition = this.getResourceContext().getResourceType()
@@ -106,8 +127,7 @@ public class FileConfiguredMBeanResourceComponent extends MBeanResourceComponent
report.setStatus(ConfigurationUpdateStatus.SUCCESS);
try {
- ModClusterBeanFile modClusterBeanFile = this.getModClusterBeanFileInstance(this.resourceContext
- .getPluginConfiguration());
+ ModClusterBeanFile modClusterBeanFile = this.getModClusterBeanFileInstance();
for (String key : report.getConfiguration().getSimpleProperties().keySet()) {
PropertySimple property = report.getConfiguration().getSimple(key);
@@ -127,10 +147,9 @@ public class FileConfiguredMBeanResourceComponent extends MBeanResourceComponent
}
}
- modClusterBeanFile.saveConfigFile();
+ modClusterBeanFile.saveConfigurationFile();
} catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.debug("Unable to save mod_cluster configuration file.", e);
}
}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java
index fb944c8..496068c 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java
@@ -30,7 +30,7 @@ import org.rhq.plugins.jmx.JMXComponent;
import org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent;
/**
- * @author snegrea
+ * @author Stefan Negrea
*
*/
@SuppressWarnings("rawtypes")
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
index 2c964c0..03598e9 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
@@ -18,7 +18,11 @@
*/
package org.rhq.plugins.modcluster;
+import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
+import org.rhq.plugins.jbossas.JBossASServerComponent;
+import org.rhq.plugins.jbossas5.ApplicationServerComponent;
import org.rhq.plugins.jmx.MBeanResourceComponent;
import org.rhq.plugins.modcluster.helper.JBossHelper;
@@ -29,6 +33,38 @@ import org.rhq.plugins.modcluster.helper.JBossHelper;
@SuppressWarnings({ "rawtypes" })
public class ModclusterServerComponent extends MBeanResourceComponent {
+ private final static String JBOSS_SERVER_HOME_DIR = "jboss.server.home.dir";
+
+ @SuppressWarnings({ "unchecked", "deprecation", "static-access" })
+ @Override
+ public void start(ResourceContext context) {
+ super.start(context);
+
+ String serverHomeDirectory = null;
+ if (this.resourceContext.getParentResourceComponent() instanceof ApplicationServerComponent) {
+ ApplicationServerComponent parentComponent = (ApplicationServerComponent) this.resourceContext
+ .getParentResourceComponent();
+
+ serverHomeDirectory = parentComponent.getResourceContext().getPluginConfiguration()
+ .getSimple("serverHomeDir").getStringValue();
+
+ } else if (this.resourceContext.getParentResourceComponent() instanceof JBossASServerComponent) {
+ JBossASServerComponent parentComponent = (JBossASServerComponent) this.resourceContext
+ .getParentResourceComponent();
+
+ serverHomeDirectory = parentComponent.getPluginConfiguration()
+ .getSimple(parentComponent.JBOSS_HOME_DIR_CONFIG_PROP).getStringValue();
+ }
+
+ if (serverHomeDirectory != null) {
+ PropertySimple serverHomeDirectoryProperty = null;
+ serverHomeDirectoryProperty = new PropertySimple();
+ serverHomeDirectoryProperty.setName(JBOSS_SERVER_HOME_DIR);
+ serverHomeDirectoryProperty.setStringValue(serverHomeDirectory);
+ this.resourceContext.getPluginConfiguration().put(serverHomeDirectoryProperty);
+ }
+ };
+
//private final static String PROXY_INFO_PROPERTY_NAME
/* (non-Javadoc)
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java
index 8f5d08b..bc54267 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java
@@ -22,6 +22,10 @@ import org.rhq.core.pluginapi.operation.OperationResult;
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+/**
+ *
+ * @author Stefan Negrea
+ */
public class PolyPingMBeanResourceComponent extends FileConfiguredMBeanResourceComponent {
@Override
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java
index 4fe5788..6c00130 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java
@@ -32,9 +32,6 @@ import org.xml.sax.SAXException;
* @author Stefan Negrea
*/
public abstract class AbstractConfigurationFile {
-
- public static final String SERVER_HOME_DIR = "jboss.server.home.dir";
-
private String fileName;
private Document document;
@@ -60,4 +57,9 @@ public abstract class AbstractConfigurationFile {
return document;
}
+ abstract void setPropertyValue(String propertyName, String value);
+
+ abstract String getPropertyValue(String propertyName);
+
+ abstract void saveConfigurationFile() throws Exception;
}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java
index 602e52b..1d008ee 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java
@@ -36,4 +36,22 @@ public class JBossWebServerFile extends AbstractConfigurationFile {
// TODO Auto-generated constructor stub
}
+ @Override
+ void setPropertyValue(String propertyName, String value) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ String getPropertyValue(String propertyName) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ void saveConfigurationFile() throws Exception {
+ // TODO Auto-generated method stub
+
+ }
+
}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
index 0e25f26..45053f7 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
@@ -16,7 +16,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
package org.rhq.plugins.modcluster.config;
import java.io.IOException;
@@ -38,24 +37,38 @@ import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
/**
- * @author snegrea
+ * @author Stefan Negrea
*
*/
public class ModClusterBeanFile extends AbstractConfigurationFile {
private Node beanNode;
- public ModClusterBeanFile(String className) throws ParserConfigurationException, SAXException, IOException {
- super(
- "/home/snegrea/Downloads/jboss51eap/jboss-as/server/all/deploy/mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml");
+ /**
+ * @param className
+ * @param configurationFile
+ * @throws ParserConfigurationException
+ * @throws SAXException
+ * @throws IOException
+ */
+ public ModClusterBeanFile(String className, String configurationFile) throws ParserConfigurationException,
+ SAXException, IOException {
+ super(configurationFile);
beanNode = this.getBeanNodeByClass(className);
}
- public ModClusterBeanFile(String className, String constructorArgumentClassName)
+ /**
+ * @param className
+ * @param constructorArgumentClassName
+ * @param configurationFile
+ * @throws ParserConfigurationException
+ * @throws SAXException
+ * @throws IOException
+ */
+ public ModClusterBeanFile(String className, String constructorArgumentClassName, String configurationFile)
throws ParserConfigurationException, SAXException, IOException {
- super(
- "/home/snegrea/Downloads/jboss51eap/jboss-as/server/all/deploy/mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml");
+ super(configurationFile);
Node primaryBeanNode = this.getBeanNodeByClass(className);
String dependencyName = this.getBeanFromConstructorArgument(primaryBeanNode, constructorArgumentClassName);
@@ -63,58 +76,10 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
beanNode = this.getBeanNodeByName(dependencyName);
}
- private String getBeanFromConstructorArgument(Node beanNode, String constructorArgumentClassName) {
- List<Node> tempNodeList = this.getChildNodesByName(beanNode, "constructor");
-
- if (tempNodeList.size() > 0) {
- Node constructorNode = tempNodeList.get(0);
-
- tempNodeList = this.getChildNodesByName(constructorNode, "parameter");
-
- if (tempNodeList.size() > 0) {
- Node parameterNode = null;
-
- for (Node currentNode : tempNodeList) {
- if (currentNode.getAttributes().getNamedItem("class") != null
- && constructorArgumentClassName.equals(currentNode.getAttributes().getNamedItem("class")
- .getTextContent())) {
- parameterNode = currentNode;
- break;
- }
- }
-
- if (parameterNode != null) {
- tempNodeList = this.getChildNodesByName(parameterNode, "inject");
-
- if (tempNodeList.size() > 0) {
- Node injectNode = tempNodeList.get(0);
- Node beanAttribute = injectNode.getAttributes().getNamedItem("bean");
-
- if (beanAttribute != null) {
- return beanAttribute.getTextContent();
- }
- }
- }
- }
- }
-
- return null;
- }
-
- private List<Node> getChildNodesByName(Node node, String nodeName) {
- List<Node> listOfNodes = new ArrayList<Node>();
-
- for (int i = 0; i < node.getChildNodes().getLength(); i++) {
- Node currentNode = node.getChildNodes().item(i);
-
- if (nodeName.equals(currentNode.getNodeName())) {
- listOfNodes.add(currentNode);
- }
- }
-
- return listOfNodes;
- }
-
+ /**
+ * @param propertyName
+ * @param value
+ */
public void setPropertyValue(String propertyName, String value) {
boolean propertyFound = false;
for (int i = 0; i < beanNode.getChildNodes().getLength(); i++) {
@@ -144,6 +109,10 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
}
}
+ /**
+ * @param propertyName
+ * @return
+ */
public String getPropertyValue(String propertyName) {
for (int i = 0; i < beanNode.getChildNodes().getLength(); i++) {
Node currentNode = beanNode.getChildNodes().item(i);
@@ -159,7 +128,10 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
return null;
}
- public void saveConfigFile() throws TransformerException {
+ /**
+ * @throws TransformerException
+ */
+ public void saveConfigurationFile() throws TransformerException {
Transformer transformer = TransformerFactory.newInstance().newTransformer();
transformer.setOutputProperty(OutputKeys.INDENT, "no");
@@ -172,7 +144,11 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
System.out.println(xmlString);
}
- public Node getBeanNodeByClass(String className) {
+ /**
+ * @param className
+ * @return
+ */
+ private Node getBeanNodeByClass(String className) {
NodeList result = this.getDocument().getElementsByTagName("bean");
for (int i = 1; i < result.getLength(); i++) {
@@ -187,7 +163,11 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
return null;
}
- public Node getBeanNodeByName(String beanName) {
+ /**
+ * @param beanName
+ * @return
+ */
+ private Node getBeanNodeByName(String beanName) {
NodeList result = this.getDocument().getElementsByTagName("bean");
for (int i = 1; i < result.getLength(); i++) {
@@ -202,4 +182,66 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
return null;
}
+ /**
+ * @param beanNode
+ * @param constructorArgumentClassName
+ * @return
+ */
+ private String getBeanFromConstructorArgument(Node beanNode, String constructorArgumentClassName) {
+ List<Node> tempNodeList = this.getChildNodesByName(beanNode, "constructor");
+
+ if (tempNodeList.size() > 0) {
+ Node constructorNode = tempNodeList.get(0);
+
+ tempNodeList = this.getChildNodesByName(constructorNode, "parameter");
+
+ if (tempNodeList.size() > 0) {
+ Node parameterNode = null;
+
+ for (Node currentNode : tempNodeList) {
+ if (currentNode.getAttributes().getNamedItem("class") != null
+ && constructorArgumentClassName.equals(currentNode.getAttributes().getNamedItem("class")
+ .getTextContent())) {
+ parameterNode = currentNode;
+ break;
+ }
+ }
+
+ if (parameterNode != null) {
+ tempNodeList = this.getChildNodesByName(parameterNode, "inject");
+
+ if (tempNodeList.size() > 0) {
+ Node injectNode = tempNodeList.get(0);
+ Node beanAttribute = injectNode.getAttributes().getNamedItem("bean");
+
+ if (beanAttribute != null) {
+ return beanAttribute.getTextContent();
+ }
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * @param node
+ * @param nodeName
+ * @return
+ */
+ private List<Node> getChildNodesByName(Node node, String nodeName) {
+ List<Node> listOfNodes = new ArrayList<Node>();
+
+ for (int i = 0; i < node.getChildNodes().getLength(); i++) {
+ Node currentNode = node.getChildNodes().item(i);
+
+ if (nodeName.equals(currentNode.getNodeName())) {
+ listOfNodes.add(currentNode);
+ }
+ }
+
+ return listOfNodes;
+ }
+
}
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index fe4ac7d..4f3010f 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -5,7 +5,8 @@
<depends plugin="JMX" />
- <service name="mod_cluster" discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent" class="ModclusterServerComponent" supportsManualAdd="true" description="mod_cluster plugin" singleton="true">
+ <service name="mod_cluster"
+ discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent" class="ModclusterServerComponent" supportsManualAdd="true" description="mod_cluster plugin" singleton="true">
<runs-inside>
<parent-resource-type name="JBossAS Server" plugin="JBossAS" />
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java
index 4e4aac1..c50b0e6 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java
@@ -28,27 +28,29 @@ public class ServerConfigTest {
public void TestConfig() {
try {
- ModClusterBeanFile config = new ModClusterBeanFile("org.jboss.modcluster.ha.HAModClusterService");
+ ModClusterBeanFile config = new ModClusterBeanFile("org.jboss.modcluster.ha.HAModClusterService",
+ "/home/snegrea/Downloads/jboss51eap/jboss-as/server/all/deploy/mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml");
config.setPropertyValue("processStatusFrequency", "4");
config.setPropertyValue("test", "5");
config.setPropertyValue("test", "123");
System.out.println(config.getPropertyValue("test"));
- config.saveConfigFile();
+ config.saveConfigurationFile();
config = new ModClusterBeanFile("org.jboss.modcluster.ha.HAModClusterService",
- "org.jboss.modcluster.config.ha.HAModClusterConfig");
+ "org.jboss.modcluster.config.ha.HAModClusterConfig",
+ "/home/snegrea/Downloads/jboss51eap/jboss-as/server/all/deploy/mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml");
config.setPropertyValue("processStatusFrequency", "4");
config.setPropertyValue("test", "5");
config.setPropertyValue("test", "123");
System.out.println(config.getPropertyValue("test"));
- config.saveConfigFile();
+ config.saveConfigurationFile();
config.setPropertyValue("test", null);
- config.saveConfigFile();
+ config.saveConfigurationFile();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
commit eb9e67e2c2115a941044fe5e03782ac524d60550
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Sun Aug 14 12:06:26 2011 -0500
Enable mod_cluster support for JBoss 5&6 with simple and HA configuration listeners. Also, added metric collections and configuration save to bean file.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ClassNameMBeanDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ClassNameMBeanDiscoveryComponent.java
new file mode 100644
index 0000000..b9ce25e
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ClassNameMBeanDiscoveryComponent.java
@@ -0,0 +1,95 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.plugins.modcluster;
+
+import java.util.Set;
+
+import org.mc4j.ems.connection.EmsConnection;
+import org.mc4j.ems.connection.bean.EmsBean;
+
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+import org.rhq.plugins.jmx.JMXComponent;
+import org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent;
+
+/**
+ * Discovers mod_cluster contexts from the proxyInfo mbean property.
+ *
+ * @author Stefan Negrea
+ */
+@SuppressWarnings("rawtypes")
+public class ClassNameMBeanDiscoveryComponent<T extends JMXComponent> extends MBeanResourceDiscoveryComponent<T> {
+
+ private static final String CLASS_NAME = "className";
+
+ /* (non-Javadoc)
+ * @see org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent#discoverResources(org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext, boolean)
+ */
+ @Override
+ public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<T> context,
+ boolean skipUnknownProps) {
+
+ Set<DiscoveredResourceDetails> results = super.discoverResources(context, skipUnknownProps);
+
+ for (DiscoveredResourceDetails discoveredResource : results) {
+ if (!isBeanConfiguredClassName(context, discoveredResource.getResourceKey())) {
+ results.remove(discoveredResource);
+ }
+ }
+
+ return results;
+ }
+
+ /**
+ * @param context
+ * @param objectName
+ * @return
+ */
+ public boolean isBeanConfiguredClassName(ResourceDiscoveryContext<T> context, String objectName) {
+ String className = context.getDefaultPluginConfiguration().getSimple(CLASS_NAME).getStringValue();
+
+ EmsConnection connection = context.getParentResourceComponent().getEmsConnection();
+ EmsBean emsBean = loadBean(connection, objectName);
+
+ return className.equals(emsBean.getClassTypeName());
+ }
+
+ /**
+ * Loads the bean with the given object name.
+ *
+ * Subclasses are free to override this method in order to load the bean.
+ *
+ * @param objectName the name of the bean to load
+ * @return the bean that is loaded
+ */
+ protected EmsBean loadBean(EmsConnection emsConnection, String objectName) {
+ EmsBean bean = emsConnection.getBean(objectName);
+ if (bean == null) {
+ // In some cases, this resource component may have been discovered by some means other than querying its
+ // parent's EMSConnection (e.g. ApplicationDiscoveryComponent uses a filesystem to discover EARs and
+ // WARs that are not yet deployed). In such cases, getBean() will return null, since EMS won't have the
+ // bean in its cache. To cover such cases, make an attempt to query the underlying MBeanServer for the
+ // bean before giving up.
+ emsConnection.queryBeans(objectName);
+ bean = emsConnection.getBean(objectName);
+ }
+ return bean;
+ }
+
+}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
index 3545fa5..8e14f9b 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
@@ -26,6 +26,7 @@ import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.core.pluginapi.operation.OperationResult;
import org.rhq.plugins.jmx.MBeanResourceComponent;
+import org.rhq.plugins.modcluster.helper.JBossHelper;
/**
* Manages a mod_cluster context entity.
@@ -44,7 +45,7 @@ public class ContextComponent extends MBeanResourceComponent<MBeanResourceCompon
ClassLoader cl = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
- String rawProxyInfo = (String) getEmsBean().getAttribute("proxyInfo").refresh().toString();
+ String rawProxyInfo = JBossHelper.getRawProxyInfo(getEmsBean());
ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
@@ -91,12 +92,16 @@ public class ContextComponent extends MBeanResourceComponent<MBeanResourceCompon
Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
Object resultObject = getEmsBean().getOperation(name).invoke(configuration);
- return new OperationResult(String.valueOf(resultObject));
+ if (resultObject instanceof OperationResult) {
+ return (OperationResult) resultObject;
+ } else {
+ return new OperationResult(String.valueOf(resultObject));
+ }
} finally {
Thread.currentThread().setContextClassLoader(cl);
}
}
- throw new Exception("Operation " + name + " not available mod_cluster_context service");
+ throw new Exception("Operation " + name + " not available mod_cluster WebApp service.");
}
}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
index 3d03715..788cbce 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
@@ -1,24 +1,20 @@
/*
- * Jopr Management Platform
+ * RHQ Management Platform
* Copyright (C) 2005-2008 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, 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.
+ * 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 and the GNU Lesser General Public License
- * for more details.
+ * GNU 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.
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package org.rhq.plugins.modcluster;
@@ -33,6 +29,7 @@ import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
import org.rhq.plugins.jmx.MBeanResourceComponent;
+import org.rhq.plugins.modcluster.helper.JBossHelper;
/**
* Discovers mod_cluster contexts from the proxyInfo mbean property.
@@ -43,7 +40,6 @@ import org.rhq.plugins.jmx.MBeanResourceComponent;
public class ContextDiscoveryComponent implements ResourceDiscoveryComponent<MBeanResourceComponent> {
private static final String JVM_ROUTE_PROPERTY = "jvmRoute";
- private static final String PROXY_INFO_PROPERTY = "proxyInfo";
private static final String ENGINE_OBJECT_NAME = "engineObjectName";
/* (non-Javadoc)
@@ -51,7 +47,9 @@ public class ContextDiscoveryComponent implements ResourceDiscoveryComponent<MBe
*/
public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<MBeanResourceComponent> context) {
String jvmRoute = this.getJvmRoute(context);
- String rawProxyInfo = this.getRawProxyInfo(context);
+
+ EmsBean configBean = context.getParentResourceComponent().getEmsBean();
+ String rawProxyInfo = JBossHelper.getRawProxyInfo(configBean);
ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
Set<DiscoveredResourceDetails> entities = new HashSet<DiscoveredResourceDetails>();
@@ -59,8 +57,7 @@ public class ContextDiscoveryComponent implements ResourceDiscoveryComponent<MBe
for (ProxyInfo.Context availableContext : proxyInfo.getAvailableContexts()) {
if (availableContext.getJvmRoute().equals(jvmRoute)) {
DiscoveredResourceDetails detail = new DiscoveredResourceDetails(context.getResourceType(),
- availableContext.createKey(), availableContext.createName(), null, "mod_cluster Webapp Context",
- null, null);
+ availableContext.createKey(), availableContext.createName(), null, "Webapp Context", null, null);
entities.add(detail);
}
}
@@ -83,17 +80,6 @@ public class ContextDiscoveryComponent implements ResourceDiscoveryComponent<MBe
}
/**
- * Retrieves raw proxy configuration from the parent context.
- *
- * @param context the discovery context
- * @return raw proxy configuration
- */
- private String getRawProxyInfo(ResourceDiscoveryContext<MBeanResourceComponent> context) {
- EmsBean statsBean = context.getParentResourceComponent().getEmsBean();
- return (String) statsBean.getAttribute(PROXY_INFO_PROPERTY).refresh().toString();
- }
-
- /**
* Loads the bean with the given object name.
*
* Subclasses are free to override this method in order to load the bean.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
new file mode 100644
index 0000000..9b511b3
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
@@ -0,0 +1,137 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.modcluster;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.ConfigurationUpdateStatus;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
+import org.rhq.core.domain.configuration.definition.PropertyDefinition;
+import org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple;
+import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
+import org.rhq.core.util.exception.ThrowableUtil;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+import org.rhq.plugins.modcluster.config.ModClusterBeanFile;
+
+/**
+ * @author Stefan Negrea
+ *
+ */
+@SuppressWarnings("rawtypes")
+public class FileConfiguredMBeanResourceComponent extends MBeanResourceComponent {
+
+ private static final String BEAN_CLASS_NAME_PROPERTY = "className";
+ private static final String DEPENDENCY_BEAN_CLASS_NAME_PROPERTY = "dependencyClassName";
+
+ /**
+ * This default setup of configuration properties can map to mbean attributes
+ *
+ * @return the configuration of the component
+ */
+ @Override
+ @SuppressWarnings("deprecation")
+ public Configuration loadResourceConfiguration() {
+ Configuration configuration = new Configuration();
+ ConfigurationDefinition configurationDefinition = this.resourceContext.getResourceType()
+ .getResourceConfigurationDefinition();
+
+ try {
+ ModClusterBeanFile modClusterBeanFile = this.getModClusterBeanFileInstance(this.resourceContext
+ .getPluginConfiguration());
+
+ for (PropertyDefinition property : configurationDefinition.getPropertyDefinitions().values()) {
+ if (property instanceof PropertyDefinitionSimple) {
+ String value = modClusterBeanFile.getPropertyValue(property.getName());
+ if (value != null) {
+ configuration.put(new PropertySimple(property.getName(), value));
+ } else {
+ PropertyDefinitionSimple propertyDefinitionSimple = (PropertyDefinitionSimple) property;
+ configuration.put(new PropertySimple(property.getName(), propertyDefinitionSimple
+ .getDefaultValue()));
+ }
+ }
+ }
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ return configuration;
+ }
+
+ /**
+ * Equivalent to updateResourceConfiguration(report, false);
+ */
+ @Override
+ public void updateResourceConfiguration(ConfigurationUpdateReport report) {
+ updateResourceConfiguration(report, false);
+ }
+
+ private ModClusterBeanFile getModClusterBeanFileInstance(Configuration pluginConfig) throws Exception {
+ String beanClassName = pluginConfig.getSimple(BEAN_CLASS_NAME_PROPERTY).getStringValue();
+
+ if (pluginConfig.getSimple(DEPENDENCY_BEAN_CLASS_NAME_PROPERTY) != null) {
+ String dependencyBeanClassName = pluginConfig.getSimple(DEPENDENCY_BEAN_CLASS_NAME_PROPERTY)
+ .getStringValue();
+ return new ModClusterBeanFile(dependencyBeanClassName);
+ }
+
+ return new ModClusterBeanFile(beanClassName);
+ }
+
+ @SuppressWarnings("deprecation")
+ @Override
+ public void updateResourceConfiguration(ConfigurationUpdateReport report, boolean ignoreReadOnly) {
+ ConfigurationDefinition configurationDefinition = this.getResourceContext().getResourceType()
+ .getResourceConfigurationDefinition();
+
+ // assume we succeed - we'll set to failure if we can't set all properties
+ report.setStatus(ConfigurationUpdateStatus.SUCCESS);
+
+ try {
+ ModClusterBeanFile modClusterBeanFile = this.getModClusterBeanFileInstance(this.resourceContext
+ .getPluginConfiguration());
+
+ for (String key : report.getConfiguration().getSimpleProperties().keySet()) {
+ PropertySimple property = report.getConfiguration().getSimple(key);
+ if (property != null) {
+ try {
+ PropertyDefinitionSimple def = configurationDefinition.getPropertyDefinitionSimple(property
+ .getName());
+ if (!(ignoreReadOnly && def.isReadOnly())) {
+ modClusterBeanFile.setPropertyValue(property.getName(), property.getStringValue());
+ }
+ } catch (Exception e) {
+ property.setErrorMessage(ThrowableUtil.getStackAsString(e));
+ report
+ .setErrorMessage("Failed setting resource configuration - see property error messages for details");
+ log.info("Failure setting MBean Resource configuration value for " + key, e);
+ }
+ }
+ }
+
+ modClusterBeanFile.saveConfigFile();
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java
new file mode 100644
index 0000000..fb944c8
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java
@@ -0,0 +1,95 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.modcluster;
+
+import java.util.Set;
+
+import org.mc4j.ems.connection.EmsConnection;
+import org.mc4j.ems.connection.bean.EmsBean;
+
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+import org.rhq.plugins.jmx.JMXComponent;
+import org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent;
+
+/**
+ * @author snegrea
+ *
+ */
+@SuppressWarnings("rawtypes")
+public class LoadMetricDiscoveryComponent extends MBeanResourceDiscoveryComponent<JMXComponent> {
+
+ /* (non-Javadoc)
+ * @see org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent#discoverResources(org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext, boolean)
+ */
+ @Override
+ public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<JMXComponent> context,
+ boolean skipUnknownProps) {
+
+ Set<DiscoveredResourceDetails> results = super.discoverResources(context, skipUnknownProps);
+
+ for (DiscoveredResourceDetails discoveredResource : results) {
+
+ String name = getBeanConfiguredClassName(context, discoveredResource.getResourceKey());
+
+ name = name.substring(name.lastIndexOf(".") + 1);
+ name = name.substring(0, name.lastIndexOf("LoadMetric"));
+
+ discoveredResource.setResourceName(name);
+ discoveredResource.setResourceDescription("Load Metric");
+ }
+
+ return results;
+ }
+
+ /**
+ * @param context
+ * @param objectName
+ * @return
+ */
+ public String getBeanConfiguredClassName(ResourceDiscoveryContext<JMXComponent> context, String objectName) {
+ EmsConnection connection = context.getParentResourceComponent().getEmsConnection();
+ EmsBean emsBean = loadBean(connection, objectName);
+
+ return emsBean.getClassTypeName();
+ }
+
+ /**
+ * Loads the bean with the given object name.
+ *
+ * Subclasses are free to override this method in order to load the bean.
+ *
+ * @param objectName the name of the bean to load
+ * @return the bean that is loaded
+ */
+ protected EmsBean loadBean(EmsConnection emsConnection, String objectName) {
+ EmsBean bean = emsConnection.getBean(objectName);
+ if (bean == null) {
+ // In some cases, this resource component may have been discovered by some means other than querying its
+ // parent's EMSConnection (e.g. ApplicationDiscoveryComponent uses a filesystem to discover EARs and
+ // WARs that are not yet deployed). In such cases, getBean() will return null, since EMS won't have the
+ // bean in its cache. To cover such cases, make an attempt to query the underlying MBeanServer for the
+ // bean before giving up.
+ emsConnection.queryBeans(objectName);
+ bean = emsConnection.getBean(objectName);
+ }
+ return bean;
+ }
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
index 70898ef..2c964c0 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
@@ -20,6 +20,7 @@ package org.rhq.plugins.modcluster;
import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.plugins.jmx.MBeanResourceComponent;
+import org.rhq.plugins.modcluster.helper.JBossHelper;
/**
* @author Stefan Negrea
@@ -28,15 +29,21 @@ import org.rhq.plugins.jmx.MBeanResourceComponent;
@SuppressWarnings({ "rawtypes" })
public class ModclusterServerComponent extends MBeanResourceComponent {
+ //private final static String PROXY_INFO_PROPERTY_NAME
+
/* (non-Javadoc)
* @see org.rhq.plugins.jmx.MBeanResourceComponent#getAvailability()
*/
@Override
public AvailabilityType getAvailability() {
- String rawProxyInfo = (String) getEmsBean().getAttribute("proxyInfo").refresh().toString();
- ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
+ String rawProxyInfo = JBossHelper.getRawProxyInfo(getEmsBean());
+
+ if (rawProxyInfo == null) {
+ return AvailabilityType.DOWN;
+ }
- if (proxyInfo.getAvailableContexts().size() == 0) {
+ ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
+ if (proxyInfo.getAvailableNodes().size() == 0) {
return AvailabilityType.DOWN;
}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java
new file mode 100644
index 0000000..8f5d08b
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java
@@ -0,0 +1,35 @@
+package org.rhq.plugins.modcluster;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.pluginapi.operation.OperationResult;
+
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.
+ */
+
+public class PolyPingMBeanResourceComponent extends FileConfiguredMBeanResourceComponent {
+
+ @Override
+ public OperationResult invokeOperation(String name, Configuration parameters) throws Exception {
+ if (name.toLowerCase().startsWith("ping")) {
+ name = "ping";
+ }
+
+ return super.invokeOperation(name, parameters);
+ }
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java
new file mode 100644
index 0000000..4fe5788
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java
@@ -0,0 +1,63 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.plugins.modcluster.config;
+
+import java.io.IOException;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
+
+/**
+ *
+ * @author Stefan Negrea
+ */
+public abstract class AbstractConfigurationFile {
+
+ public static final String SERVER_HOME_DIR = "jboss.server.home.dir";
+
+ private String fileName;
+ private Document document;
+
+ public AbstractConfigurationFile(String fileName) throws ParserConfigurationException, SAXException, IOException {
+ this.fileName = fileName;
+
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
+ this.document = docBuilder.parse(this.getFileName());
+ }
+
+ /**
+ * @return the fileName
+ */
+ public String getFileName() {
+ return fileName;
+ }
+
+ /**
+ * @return the doc
+ */
+ public Document getDocument() {
+ return document;
+ }
+
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java
new file mode 100644
index 0000000..602e52b
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java
@@ -0,0 +1,39 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.modcluster.config;
+
+import java.io.IOException;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.xml.sax.SAXException;
+
+/**
+ * @author Stefan Negrea
+ *
+ */
+public class JBossWebServerFile extends AbstractConfigurationFile {
+
+ public JBossWebServerFile(String fileName) throws ParserConfigurationException, SAXException, IOException {
+ super(fileName);
+ // TODO Auto-generated constructor stub
+ }
+
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
new file mode 100644
index 0000000..0e25f26
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
@@ -0,0 +1,205 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.modcluster.config;
+
+import java.io.IOException;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+/**
+ * @author snegrea
+ *
+ */
+public class ModClusterBeanFile extends AbstractConfigurationFile {
+
+ private Node beanNode;
+
+ public ModClusterBeanFile(String className) throws ParserConfigurationException, SAXException, IOException {
+ super(
+ "/home/snegrea/Downloads/jboss51eap/jboss-as/server/all/deploy/mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml");
+
+ beanNode = this.getBeanNodeByClass(className);
+ }
+
+ public ModClusterBeanFile(String className, String constructorArgumentClassName)
+ throws ParserConfigurationException, SAXException, IOException {
+ super(
+ "/home/snegrea/Downloads/jboss51eap/jboss-as/server/all/deploy/mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml");
+
+ Node primaryBeanNode = this.getBeanNodeByClass(className);
+ String dependencyName = this.getBeanFromConstructorArgument(primaryBeanNode, constructorArgumentClassName);
+
+ beanNode = this.getBeanNodeByName(dependencyName);
+ }
+
+ private String getBeanFromConstructorArgument(Node beanNode, String constructorArgumentClassName) {
+ List<Node> tempNodeList = this.getChildNodesByName(beanNode, "constructor");
+
+ if (tempNodeList.size() > 0) {
+ Node constructorNode = tempNodeList.get(0);
+
+ tempNodeList = this.getChildNodesByName(constructorNode, "parameter");
+
+ if (tempNodeList.size() > 0) {
+ Node parameterNode = null;
+
+ for (Node currentNode : tempNodeList) {
+ if (currentNode.getAttributes().getNamedItem("class") != null
+ && constructorArgumentClassName.equals(currentNode.getAttributes().getNamedItem("class")
+ .getTextContent())) {
+ parameterNode = currentNode;
+ break;
+ }
+ }
+
+ if (parameterNode != null) {
+ tempNodeList = this.getChildNodesByName(parameterNode, "inject");
+
+ if (tempNodeList.size() > 0) {
+ Node injectNode = tempNodeList.get(0);
+ Node beanAttribute = injectNode.getAttributes().getNamedItem("bean");
+
+ if (beanAttribute != null) {
+ return beanAttribute.getTextContent();
+ }
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+
+ private List<Node> getChildNodesByName(Node node, String nodeName) {
+ List<Node> listOfNodes = new ArrayList<Node>();
+
+ for (int i = 0; i < node.getChildNodes().getLength(); i++) {
+ Node currentNode = node.getChildNodes().item(i);
+
+ if (nodeName.equals(currentNode.getNodeName())) {
+ listOfNodes.add(currentNode);
+ }
+ }
+
+ return listOfNodes;
+ }
+
+ public void setPropertyValue(String propertyName, String value) {
+ boolean propertyFound = false;
+ for (int i = 0; i < beanNode.getChildNodes().getLength(); i++) {
+ Node currentNode = beanNode.getChildNodes().item(i);
+
+ if (currentNode.getNodeName().equals("property")
+ && currentNode.getAttributes().getNamedItem("name") != null
+ && propertyName.equals(currentNode.getAttributes().getNamedItem("name").getTextContent())) {
+
+ if (value != null) {
+ currentNode.setTextContent(value);
+ } else {
+ beanNode.removeChild(currentNode);
+ }
+
+ propertyFound = true;
+ }
+ }
+
+ if (value != null && !propertyFound) {
+ Node propertyChild = this.getDocument().createElement("property");
+ Attr nameProperty = this.getDocument().createAttribute("name");
+ nameProperty.setValue(propertyName);
+ propertyChild.setTextContent(value);
+ propertyChild.getAttributes().setNamedItem(nameProperty);
+ beanNode.appendChild(propertyChild);
+ }
+ }
+
+ public String getPropertyValue(String propertyName) {
+ for (int i = 0; i < beanNode.getChildNodes().getLength(); i++) {
+ Node currentNode = beanNode.getChildNodes().item(i);
+
+ if (currentNode.getNodeName().equals("property")
+ && currentNode.getAttributes().getNamedItem("name") != null
+ && propertyName.equals(currentNode.getAttributes().getNamedItem("name").getTextContent())) {
+
+ return currentNode.getTextContent();
+ }
+ }
+
+ return null;
+ }
+
+ public void saveConfigFile() throws TransformerException {
+ Transformer transformer = TransformerFactory.newInstance().newTransformer();
+ transformer.setOutputProperty(OutputKeys.INDENT, "no");
+
+ //initialize StreamResult with File object to save to file
+ StreamResult result = new StreamResult(new StringWriter());
+ DOMSource source = new DOMSource(this.getDocument());
+ transformer.transform(source, result);
+
+ String xmlString = result.getWriter().toString();
+ System.out.println(xmlString);
+ }
+
+ public Node getBeanNodeByClass(String className) {
+ NodeList result = this.getDocument().getElementsByTagName("bean");
+
+ for (int i = 1; i < result.getLength(); i++) {
+ Node node = result.item(i);
+ if (node.getAttributes().getNamedItem("class") != null
+ && className.equals(node.getAttributes().getNamedItem("class").getTextContent())) {
+ System.out.println(node.getAttributes().getNamedItem("class").getTextContent());
+ return node;
+ }
+ }
+
+ return null;
+ }
+
+ public Node getBeanNodeByName(String beanName) {
+ NodeList result = this.getDocument().getElementsByTagName("bean");
+
+ for (int i = 1; i < result.getLength(); i++) {
+ Node node = result.item(i);
+ if (node.getAttributes().getNamedItem("name") != null
+ && beanName.equals(node.getAttributes().getNamedItem("name").getTextContent())) {
+ System.out.println(node.getAttributes().getNamedItem("name").getTextContent());
+ return node;
+ }
+ }
+
+ return null;
+ }
+
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/helper/JBossHelper.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/helper/JBossHelper.java
new file mode 100644
index 0000000..364f3ef
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/helper/JBossHelper.java
@@ -0,0 +1,49 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.modcluster.helper;
+
+import org.mc4j.ems.connection.bean.EmsBean;
+
+/**
+ * @author Stefan Negrea
+ *
+ */
+public class JBossHelper {
+
+ public static String getRawProxyInfo(EmsBean emsBean) {
+ String rawProxyInfo = null;
+
+ //try first to get the value for JBoss EAP5.x or AS6
+ try {
+ rawProxyInfo = (String) emsBean.getAttribute("ProxyInfo").refresh().toString();
+ } catch (Exception e) {
+ }
+
+ //if not able to get the value after the first attempt try to get the value for JBoss 4.2/4.3
+ if (rawProxyInfo == null) {
+ try {
+ rawProxyInfo = (String) emsBean.getAttribute("proxyInfo").refresh().toString();
+ } catch (Exception e) {
+ }
+ }
+
+ return rawProxyInfo;
+ }
+}
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 4846490..fe4ac7d 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -1,132 +1,466 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<plugin name="mod_cluster"
- displayName="mod_cluster"
- description="Monitoring and management of mod_cluster plugin."
- version="1.0"
- package="org.rhq.plugins.modcluster"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
+<plugin name="mod_cluster" displayName="mod_cluster" description="Monitoring and management of mod_cluster plugin." version="1.0" package="org.rhq.plugins.modcluster" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
<depends plugin="JMX" />
- <service name="mod_cluster"
- discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
- class="ModclusterServerComponent"
- supportsManualAdd="true"
- description="mod_cluster plugin"
- singleton="true">
-
+ <service name="mod_cluster" discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent" class="ModclusterServerComponent" supportsManualAdd="true" description="mod_cluster plugin" singleton="true">
+
<runs-inside>
- <parent-resource-type name="JBossAS Server" plugin="JBossAS"/>
- <parent-resource-type name="JBossAS5 Server" plugin="JBossAS5"/>
+ <parent-resource-type name="JBossAS Server" plugin="JBossAS" />
+ <parent-resource-type name="JBossAS Server" plugin="JBossAS5" />
</runs-inside>
-
+
<plugin-configuration>
- <c:simple-property name="objectName" readOnly="true" default="Catalina:type=ModClusterListener,*"/>
- <c:simple-property name="engineObjectName" readOnly="true" default="jboss.web:type=Engine"/>
- <c:simple-property name="nameTemplate" default="mod_cluster"/>
+ <c:simple-property name="objectName" readOnly="true" default="Catalina:type=ModClusterListener,*|jboss.web:service=ModCluster" />
+ <c:simple-property name="engineObjectName" readOnly="true" default="jboss.web:type=Engine" />
+ <c:simple-property name="nameTemplate" default="mod_cluster" />
</plugin-configuration>
-
- <operation name="stop" displayName="Stop all webapps" description="Gracefully stops all webapps for all virtual hosts of this application server.">
- <parameters>
- <c:simple-property required="true" name="timeout" type="string" displayName="Session draining timeout"/>
- <c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
- <c:property-options allowCustomValue="false">
- <c:option value="MICROSECONDS" name="MICROSECONDS"/>
- <c:option value="MILLISECONDS" name="MILLISECONDS"/>
- <c:option value="NANOSECONDS" name="NANOSECONDS"/>
- <c:option value="SECONDS" name="SECONDS"/>
- <c:option value="HOURS" name="HOURS"/>
- <c:option value="DAYS" name="DAYS"/>
- </c:property-options>
- </c:simple-property>
- </parameters>
- <results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
- </results>
- </operation>
- <operation name="addProxy" displayName="Add a proxy" description="Add a proxy.">
- <parameters>
- <c:simple-property required="true" name="host" type="string" displayName="Proxy address"/>
- <c:simple-property required="true" name="port" type="string" displayName="Proxy port"/>
- </parameters>
- </operation>
- <operation name="enable" displayName="Enable all webapps" description="Enable all webapps for all virtual hosts of this application server.">
- <results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
- </results>
- </operation>
+
<operation name="reset" displayName="Reset the node" description="Move this application server out of an error state." />
- <operation name="disable" displayName="Disable all webpapps" description="Disable all webapps for all virtual hosts of this application server.">
- <results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
- </results>
- </operation>
- <operation name="removeProxy" displayName="Remove a proxy" description="Remove a proxy.">
- <parameters>
- <c:simple-property required="true" name="host" type="string" displayName="Proxy address"/>
- <c:simple-property required="true" name="port" type="string" displayName="Proxy port"/>
- </parameters>
- </operation>
<operation name="refresh" displayName="Refresh configuration" description="Refresh configuration for this application server." />
-
- <metric property="proxyConfiguration" displayName="Proxy Configuration" displayType="summary" dataType="trait" />
- <metric property="modelerType" displayName="Type of the modeled resource" displayType="summary" dataType="trait" />
- <metric property="className" displayName="Fully qualified class name of the managed object" displayType="summary" dataType="trait" />
- <metric property="advertise" displayName="Enable autodiscovery of httpd servers." displayType="summary" dataType="trait" />
-
- <resource-configuration>
- <c:simple-property name="workerTimeout" type="integer" description="Timeout to wait for an available worker (default is no wait)." />
- <c:simple-property name="stickySession" type="boolean" description="Enables sticky session for the cluster."/>
- <c:simple-property name="stickySessionRemove" type="boolean" description="Remove session when the request cannot be routed to the right node for this cluster."/>
- <c:simple-property name="smax" type="integer" description="Maximum time on seconds for idle connections above smax."/>
- <c:simple-property name="maxAttempts" type="integer" description="Maximum number of attempts to send the request to the backend server."/>
- <c:simple-property name="advertiseSecurityKey" type="string" required="false" description="Security key for discovery."/>
- <c:simple-property name="stickySessionForce" type="boolean" description="Return an error when the request cannot be routed to the right node."/>
- <c:simple-property name="balancer" type="string" required="false" description="Name of the balancer."/>
- <c:simple-property name="flushPackets" type="boolean" description="Allows controlling flusing of packets."/>
- <c:simple-property name="socketTimeout" type="integer" description="Connection timeout for communication with the proxy." />
- <c:simple-property name="advertisePort" type="integer" required="false" description="Multicast port for discovery" />
- <c:simple-property name="advertiseGroupAddress" type="string" required="false" description="Multicast address for discovery."/>
- <c:simple-property name="flushWait" type="integer" description="Time in ms to wait before flushing packets."/>
- <c:simple-property name="ping" type="integer" description="Time in s to wait for a pong answer to a ping."/>
- </resource-configuration>
-
- <service name="mod_cluster Webapp Context"
- discovery="ContextDiscoveryComponent"
- class="ContextComponent"
- description="mod_cluster webapp context">
-
- <operation name="disableContext" displayName="Disable webapp" description="Disable this webapp.">
- <results>
- <c:simple-property name="result" type="boolean" description="The result of the operation."/>
- </results>
- </operation>
- <operation name="stopContext" displayName="Stop webapp" description="Gracefully stops this webapp.">
+
+ <!-- Start - Configuration for HAModClusterService -->
+ <service name="HA Service" discovery="ClassNameMBeanDiscoveryComponent" class="PolyPingMBeanResourceComponent" supportsManualAdd="true" description="HA Service Listener" singleton="true">
+
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true" default="jboss.web:service=ModCluster" />
+ <c:simple-property name="nameTemplate" default="HA Service" />
+ <c:simple-property name="className" readOnly="true" default="org.jboss.modcluster.ha.HAModClusterService" />
+ <c:simple-property name="proxyInfoProperty" readOnly="true" default="ProxyInfo" />
+ </plugin-configuration>
+
+ <!-- HA Operations -->
+ <operation name="disableDomain" displayName="Disable domain" description="Disables all contexts on each node within the current domain. If the current domain is null, then all nodes are stopped.">
+ <results>
+ <c:simple-property name="result" description="The result of the operation" />
+ </results>
+ </operation>
+ <operation name="enableDomain" displayName="Enable domain" description="Enable all contexts on each node within the current domain. If the current domain is null, then all nodes are stopped.">
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+ <operation name="stopDomain" displayName="Stop domain" description="Gracefully stops all contexts on each node within the current domain. If the current domain is null, then all nodes are stopped.">
+ <parameters>
+ <c:simple-property required="true" name="timeout" type="string" displayName="The number of units of time for which to wait for all sessions to drain on a given node." />
+ <c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
+ <c:property-options allowCustomValue="false">
+ <c:option value="MICROSECONDS" name="MICROSECONDS" />
+ <c:option value="MILLISECONDS" name="MILLISECONDS" />
+ <c:option value="NANOSECONDS" name="NANOSECONDS" />
+ <c:option value="SECONDS" name="SECONDS" />
+ <c:option value="HOURS" name="HOURS" />
+ <c:option value="DAYS" name="DAYS" />
+ </c:property-options>
+ </c:simple-property>
+ </parameters>
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+
+ <!-- Regular Operations -->
+
+ <operation name="pingHTTPD" displayName="Ping httpd" description="Ping httpd and determine whether each proxy is accessible and healthy. Returns the PING_RSP grouped by proxy address.">
+ <results>
+ <c:simple-property name="result" description="Map of PING_RPS response, grouped by proxy.">
+ </c:simple-property>
+ </results>
+ </operation>
+ <operation name="pingNodeByJVMRoute" displayName="Ping node by JVM Route"
+ description="Ping a node from httpd and returns the PING_RSP grouped by proxy address. Dtermines whether the node configured with the specified jvm route is accessible from each proxy returning the PING_RSP grouped by proxy address.">
+ <parameters>
+ <c:simple-property required="true" name="jvmRoute" type="string" displayName="JVM Route of node to ping." />
+ </parameters>
+ <results>
+ <c:simple-property name="result" type="string" description="Map of PING_RPS response, grouped by proxy." />
+ </results>
+ </operation>
+ <operation name="pingNodeByAddress" displayName="Ping node by address"
+ description="Ping a node from httpd and returns the PING_RSP grouped by proxy address. Determines whether the node configured with the specified jvm route is accessible from each proxy returning the PING_RSP grouped by proxy address.">
+ <parameters>
+ <c:simple-property required="true" name="scheme" type="string" displayName="Scheme (ajp, http, https)" />
+ <c:simple-property required="true" name="hostname" type="string" displayName="Name or ip address of a node." />
+ <c:simple-property required="true" name="port" type="string" displayName="Port" />
+ </parameters>
+ <results>
+ <c:simple-property name="result" type="string" description="Map of PING_RPS response, grouped by proxy." />
+ </results>
+ </operation>
+
+ <operation name="addProxy" displayName="Add a proxy" description="Add a proxy.">
+ <parameters>
+ <c:simple-property required="true" name="host" type="string" displayName="Proxy address" />
+ <c:simple-property required="true" name="port" type="string" displayName="Proxy port" />
+ </parameters>
+ </operation>
+ <operation name="removeProxy" displayName="Remove a proxy" description="Remove a proxy.">
+ <parameters>
+ <c:simple-property required="true" name="host" type="string" displayName="Proxy address" />
+ <c:simple-property required="true" name="port" type="string" displayName="Proxy port" />
+ </parameters>
+ </operation>
+ <operation name="disable" displayName="Disable all webpapps" description="Disable all webapps for all virtual hosts of this application server.">
+ <results>
+ <c:simple-property name="result" description="The result of the operation">
+ </c:simple-property>
+ </results>
+ </operation>
+ <operation name="enable" displayName="Enable all webapps" description="Enable all webapps for all virtual hosts of this application server.">
+ <results>
+ <c:simple-property name="result" description="The result of the operation">
+ </c:simple-property>
+ </results>
+ </operation>
+ <operation name="stop" displayName="Stop all webapps" description="Gracefully stops all webapps for all virtual hosts of this application server.">
+ <parameters>
+ <c:simple-property required="true" name="timeout" type="string" displayName="Session draining timeout" />
+ <c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
+ <c:property-options allowCustomValue="false">
+ <c:option value="MICROSECONDS" name="MICROSECONDS" />
+ <c:option value="MILLISECONDS" name="MILLISECONDS" />
+ <c:option value="NANOSECONDS" name="NANOSECONDS" />
+ <c:option value="SECONDS" name="SECONDS" />
+ <c:option value="HOURS" name="HOURS" />
+ <c:option value="DAYS" name="DAYS" />
+ </c:property-options>
+ </c:simple-property>
+ </parameters>
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+
+ <metric property="MasterNode" displayName="Master Node" displayType="summary" dataType="trait" />
+ <metric property="ProxyConfiguration" displayName="Proxy Configuration" displayType="summary" dataType="trait" />
+ <metric property="ProxyInfo" displayName="Proxy Info" displayType="summary" dataType="trait" />
+
+ <resource-configuration>
+ <c:simple-property name="processStatusFrequency" type="integer" description="Process status frequency." />
+ </resource-configuration>
+ </service>
+
+ <service name="HA Service Configuration" discovery="ClassNameMBeanDiscoveryComponent" class="FileConfiguredMBeanResourceComponent" supportsManualAdd="true" description="HA Service Configuration" singleton="true">
+
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true" default="jboss.web:service=ModCluster" />
+ <c:simple-property name="nameTemplate" default="HA Service Configuration" />
+ <c:simple-property name="className" readOnly="true" default="org.jboss.modcluster.ha.HAModClusterService" />
+ <c:simple-property name="dependencyClassName" readOnly="true" default="org.jboss.modcluster.config.ha.HAModClusterConfig" />
+ <c:simple-property name="proxyInfoProperty" readOnly="true" default="ProxyInfo" />
+ </plugin-configuration>
+
+ <resource-configuration>
+
+ <!-- HA Configuration -->
+ <c:simple-property name="masterPerLoadBalancingGroup" type="boolean" required="false" description="Enable current node to be master in the load balancing group." />
+
+ <!-- Handler Configuration -->
+ <c:simple-property name="advertise" type="boolean" required="false" default="false" description="Enable autodiscovery of httpd servers." />
+ <c:simple-property name="advertiseGroupAddress" type="string" description="Multicast address on which to listen for advertisements." />
+ <c:simple-property name="advertisePort" type="string" required="false" description="Multicast port for discovery" />
+ <c:simple-property name="advertiseInterface" type="string" required="false" description="Multicast interface for discovery" />
+ <c:simple-property name="advertiseSecurityKey" type="string" required="false" description="Security key for discovery." />
+ <c:simple-property name="proxyList" type="string" required="false" description="Comma separated list of address:port listing the httpd servers where mod_cluster is running." />
+ <c:simple-property name="proxyURL" type="string" required="false" description="URL prefix to send with commands to mod_cluster. Default is no prefix." />
+ <c:simple-property name="socketTimeout" type="integer" required="false" description="Connection timeout for communication with the proxy." />
+ <c:simple-property name="ssl" type="boolean" description="Whether to use SSL to communicate with mod_cluster. Note this has nothing to do with handling of https requests by JBoss Web" />
+ <c:simple-property name="excludedContexts" type="string" required="false" description="Comma delimited list of contexts that should *not* be auto-registered with httpd. Contexts may be qualified by host using a colon, e.g. host1:context1. If no host is defined, localhost is assumed." />
+ <c:simple-property name="autoEnableContexts" type="boolean" required="false" default="true" description="Toggle for context auto-enable during mod_cluster startup." />
+
+ <!-- Node Configuration -->
+ <c:simple-property name="loadBalancingGroup" type="string" required="false" description="Load balancing group." />
+ <c:simple-property name="flushPackets" type="boolean" required="false" description="Allows controlling flusing of packets." />
+ <c:simple-property name="flushWait" type="integer" required="false" description="Time in ms to wait before flushing packets." />
+ <c:simple-property name="ping" type="integer" required="false" description="Time in s to wait for a pong answer to a ping." />
+ <c:simple-property name="smax" type="integer" required="false" description="Maximum time on seconds for idle connections above smax." />
+ <c:simple-property name="ttl" type="integer" required="false" description="TTL" />
+ <c:simple-property name="nodeTimeout" type="integer" required="false" description="Node timeout" />
+ <c:simple-property name="balancer" type="string" required="false" description="Name of the balancer" />
+
+ <!-- Balancer Configuration -->
+ <c:simple-property name="stickySession" type="boolean" description="Enables sticky session for the node." />
+ <c:simple-property name="stickySessionRemove" type="boolean" description="Remove session when the request cannot be routed to the right node for this cluster." />
+ <c:simple-property name="stickySessionForce" type="boolean" description="Return an error when the request cannot be routed to the right node." />
+ <c:simple-property name="workerTimeout" type="integer" description="Timeout to wait for an available worker (default is no wait)." />
+ <c:simple-property name="maxAttempts" type="integer" description="Maximum number of attempts to send the request to the backend server." />
+ </resource-configuration>
+ </service>
+ <!-- End - Configuration for HAModClusterService -->
+
+ <!-- Start - Configuration for ModClusterService -->
+ <service name="Service" discovery="ClassNameMBeanDiscoveryComponent" class="PolyPingMBeanResourceComponent" supportsManualAdd="true" description="HA Service Listener" singleton="true">
+
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true" default="jboss.web:service=ModCluster" />
+ <c:simple-property name="nameTemplate" default="HA Service" />
+ <c:simple-property name="className" readOnly="true" default="org.jboss.modcluster.ModClusterService" />
+ <c:simple-property name="proxyInfoProperty" readOnly="true" default="ProxyInfo" />
+ </plugin-configuration>
+
+ <operation name="pingHTTPD" displayName="Ping httpd" description="Ping httpd and determine whether each proxy is accessible and healthy. Returns the PING_RSP grouped by proxy address.">
+ <results>
+ <c:simple-property name="result" type="string" description="Map of PING_RPS response, grouped by proxy." />
+ </results>
+ </operation>
+ <operation name="pingNodeByJVMRoute" displayName="Ping node by JVM Route"
+ description="Ping a node from httpd and returns the PING_RSP grouped by proxy address. Dtermines whether the node configured with the specified jvm route is accessible from each proxy returning the PING_RSP grouped by proxy address.">
+ <parameters>
+ <c:simple-property required="true" name="jvmRoute" type="string" displayName="JVM Route of node to ping." />
+ </parameters>
+ <results>
+ <c:simple-property name="result" type="string" description="Map of PING_RPS response, grouped by proxy." />
+ </results>
+ </operation>
+ <operation name="pingNodeByAddress" displayName="Ping node by address"
+ description="Ping a node from httpd and returns the PING_RSP grouped by proxy address. Determines whether the node configured with the specified jvm route is accessible from each proxy returning the PING_RSP grouped by proxy address.">
+ <parameters>
+ <c:simple-property required="true" name="scheme" type="string" displayName="Scheme (ajp, http, https)" />
+ <c:simple-property required="true" name="hostname" type="string" displayName="Name or ip address of a node." />
+ <c:simple-property required="true" name="port" type="string" displayName="Port" />
+ </parameters>
+ <results>
+ <c:simple-property name="result" type="string" description="Map of PING_RPS response, grouped by proxy." />
+ </results>
+ </operation>
+
+ <operation name="addProxy" displayName="Add a proxy" description="Add a proxy.">
+ <parameters>
+ <c:simple-property required="true" name="host" type="string" displayName="Proxy address" />
+ <c:simple-property required="true" name="port" type="string" displayName="Proxy port" />
+ </parameters>
+ </operation>
+ <operation name="removeProxy" displayName="Remove a proxy" description="Remove a proxy.">
+ <parameters>
+ <c:simple-property required="true" name="host" type="string" displayName="Proxy address" />
+ <c:simple-property required="true" name="port" type="string" displayName="Proxy port" />
+ </parameters>
+ </operation>
+ <operation name="disable" displayName="Disable all webpapps" description="Disable all webapps for all virtual hosts of this application server.">
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+ <operation name="enable" displayName="Enable all webapps" description="Enable all webapps for all virtual hosts of this application server.">
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+ <operation name="stop" displayName="Stop all webapps" description="Gracefully stops all webapps for all virtual hosts of this application server.">
+ <parameters>
+ <c:simple-property required="true" name="timeout" type="string" displayName="Session draining timeout" />
+ <c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
+ <c:property-options allowCustomValue="false">
+ <c:option value="MICROSECONDS" name="MICROSECONDS" />
+ <c:option value="MILLISECONDS" name="MILLISECONDS" />
+ <c:option value="NANOSECONDS" name="NANOSECONDS" />
+ <c:option value="SECONDS" name="SECONDS" />
+ <c:option value="HOURS" name="HOURS" />
+ <c:option value="DAYS" name="DAYS" />
+ </c:property-options>
+ </c:simple-property>
+ </parameters>
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+
+ <metric property="ProxyConfiguration" displayName="Proxy Configuration" displayType="summary" dataType="trait" />
+ <metric property="ProxyInfo" displayName="Proxy Info" displayType="summary" dataType="trait" />
+ </service>
+
+ <service name="Service Configuration" discovery="ClassNameMBeanDiscoveryComponent" class="FileConfiguredMBeanResourceComponent" supportsManualAdd="true" description="HA Service Configuration" singleton="true">
+
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true" default="jboss.web:service=ModCluster" />
+ <c:simple-property name="nameTemplate" default="HA Service Configuration" />
+ <c:simple-property name="className" readOnly="true" default="org.jboss.modcluster.ModClusterService" />
+ <c:simple-property name="dependencyClassName" readOnly="true" default="org.jboss.modcluster.config.ModClusterConfig" />
+ <c:simple-property name="proxyInfoProperty" readOnly="true" default="ProxyInfo" />
+ </plugin-configuration>
+
+ <resource-configuration>
+ <!-- Handler Configuration -->
+ <c:simple-property name="advertise" type="boolean" required="false" default="false" description="Enable autodiscovery of httpd servers." />
+ <c:simple-property name="advertiseGroupAddress" type="string" description="Multicast address on which to listen for advertisements." />
+ <c:simple-property name="advertisePort" type="string" required="false" description="Multicast port for discovery" />
+ <c:simple-property name="advertiseInterface" type="string" required="false" description="Multicast interface for discovery" />
+ <c:simple-property name="advertiseSecurityKey" type="string" required="false" description="Security key for discovery." />
+ <c:simple-property name="proxyList" type="string" required="false" description="Comma separated list of address:port listing the httpd servers where mod_cluster is running." />
+ <c:simple-property name="proxyURL" type="string" required="false" description="URL prefix to send with commands to mod_cluster. Default is no prefix." />
+ <c:simple-property name="socketTimeout" type="integer" required="false" description="Connection timeout for communication with the proxy." />
+ <c:simple-property name="ssl" type="boolean" description="Whether to use SSL to communicate with mod_cluster. Note this has nothing to do with handling of https requests by JBoss Web" />
+ <c:simple-property name="excludedContexts" type="string" required="false"
+ description="Comma delimited list of contexts that should *not* be auto-registered with httpd. Contexts may be qualified by host using a colon, e.g. host1:context1. If no host is defined, localhost is assumed." />
+ <c:simple-property name="autoEnableContexts" type="boolean" required="false" default="true" description="Toggle for context auto-enable during mod_cluster startup." />
+
+ <!-- Node Configuration -->
+ <c:simple-property name="loadBalancingGroup" type="string" required="false" description="Load balancing group." />
+ <c:simple-property name="flushPackets" type="boolean" required="false" description="Allows controlling flusing of packets." />
+ <c:simple-property name="flushWait" type="integer" required="false" description="Time in ms to wait before flushing packets." />
+ <c:simple-property name="ping" type="integer" required="false" description="Time in s to wait for a pong answer to a ping." />
+ <c:simple-property name="smax" type="integer" required="false" description="Maximum time on seconds for idle connections above smax." />
+ <c:simple-property name="ttl" type="integer" required="false" description="TTL" />
+ <c:simple-property name="nodeTimeout" type="integer" required="false" description="Node timeout" />
+ <c:simple-property name="balancer" type="string" required="false" description="Name of the balancer" />
+
+ <!-- Balancer Configuration -->
+ <c:simple-property name="stickySession" type="boolean" description="Enables sticky session for the node." />
+ <c:simple-property name="stickySessionRemove" type="boolean" description="Remove session when the request cannot be routed to the right node for this cluster." />
+ <c:simple-property name="stickySessionForce" type="boolean" description="Return an error when the request cannot be routed to the right node." />
+ <c:simple-property name="workerTimeout" type="integer" description="Timeout to wait for an available worker (default is no wait)." />
+ <c:simple-property name="maxAttempts" type="integer" description="Maximum number of attempts to send the request to the backend server." />
+ </resource-configuration>
+ </service>
+ <!-- End - Configuration for ModClusterService -->
+
+ <service name="Catalina Service" discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent" class="ModclusterServerComponent" supportsManualAdd="true" description="Catalina Service Listener" singleton="true">
+
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true" default="Catalina:type=ModClusterListener,*" />
+ <c:simple-property name="nameTemplate" default="mod_cluster Catalina Listener" />
+ </plugin-configuration>
+
+ <operation name="addProxy" displayName="Add a proxy" description="Add a proxy.">
+ <parameters>
+ <c:simple-property required="true" name="host" type="string" displayName="Proxy address" />
+ <c:simple-property required="true" name="port" type="string" displayName="Proxy port" />
+ </parameters>
+ </operation>
+ <operation name="removeProxy" displayName="Remove a proxy" description="Remove a proxy.">
+ <parameters>
+ <c:simple-property required="true" name="host" type="string" displayName="Proxy address" />
+ <c:simple-property required="true" name="port" type="string" displayName="Proxy port" />
+ </parameters>
+ </operation>
+ <operation name="disable" displayName="Disable all webpapps" description="Disable all webapps for all virtual hosts of this application server.">
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+ <operation name="enable" displayName="Enable all webapps" description="Enable all webapps for all virtual hosts of this application server.">
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+ <operation name="stop" displayName="Stop all webapps" description="Gracefully stops all webapps for all virtual hosts of this application server.">
+ <parameters>
+ <c:simple-property required="true" name="timeout" type="string" displayName="Session draining timeout" />
+ <c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
+ <c:property-options allowCustomValue="false">
+ <c:option value="MICROSECONDS" name="MICROSECONDS" />
+ <c:option value="MILLISECONDS" name="MILLISECONDS" />
+ <c:option value="NANOSECONDS" name="NANOSECONDS" />
+ <c:option value="SECONDS" name="SECONDS" />
+ <c:option value="HOURS" name="HOURS" />
+ <c:option value="DAYS" name="DAYS" />
+ </c:property-options>
+ </c:simple-property>
+ </parameters>
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+
+ <metric property="proxyConfiguration" displayName="Proxy Configuration" displayType="summary" dataType="trait" />
+ <metric property="modelerType" displayName="Type of the modeled resource" displayType="summary" dataType="trait" />
+ <metric property="className" displayName="Fully qualified class name of the managed object" displayType="summary" dataType="trait" />
+ <metric property="advertise" displayName="Enable autodiscovery of httpd servers." displayType="summary" dataType="trait" />
+
+ <resource-configuration>
+ <c:simple-property name="workerTimeout" type="integer" description="Timeout to wait for an available worker (default is no wait)." />
+ <c:simple-property name="stickySession" type="boolean" description="Enables sticky session for the cluster." />
+ <c:simple-property name="stickySessionRemove" type="boolean" description="Remove session when the request cannot be routed to the right node for this cluster." />
+ <c:simple-property name="smax" type="integer" description="Maximum time on seconds for idle connections above smax." />
+ <c:simple-property name="maxAttempts" type="integer" description="Maximum number of attempts to send the request to the backend server." />
+ <c:simple-property name="advertiseSecurityKey" type="string" required="false" description="Security key for discovery." />
+ <c:simple-property name="stickySessionForce" type="boolean" description="Return an error when the request cannot be routed to the right node." />
+ <c:simple-property name="balancer" type="string" required="false" description="Name of the balancer." />
+ <c:simple-property name="flushPackets" type="boolean" description="Allows controlling flusing of packets." />
+ <c:simple-property name="socketTimeout" type="integer" description="Connection timeout for communication with the proxy." />
+ <c:simple-property name="advertisePort" type="integer" required="false" description="Multicast port for discovery" />
+ <c:simple-property name="advertiseGroupAddress" type="string" required="false" description="Multicast address for discovery." />
+ <c:simple-property name="flushWait" type="integer" description="Time in ms to wait before flushing packets." />
+ <c:simple-property name="ping" type="integer" description="Time in s to wait for a pong answer to a ping." />
+ </resource-configuration>
+ </service>
+
+ <service name="Dynamic Load Balancer Factor" discovery="ClassNameMBeanDiscoveryComponent" class="FileConfiguredMBeanResourceComponent" supportsManualAdd="true" description="Dynamic Load balancer factor for mod_cluster" singleton="true">
+
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true" default="jboss.web:provider=LoadBalanceFactor,service=ModCluster,*" />
+ <c:simple-property name="className" readOnly="true" default="org.jboss.modcluster.load.impl.DynamicLoadBalanceFactorProvider" />
+ <c:simple-property name="nameTemplate" default="Dynamic Load Balancer Factor" />
+ </plugin-configuration>
+
+ <metric property="Metrics" displayName="Collected Metrics" displayType="summary" dataType="trait" />
+
+ <resource-configuration>
+ <c:simple-property name="DecayFactor" type="integer" description="The number of historical load values used to determine load factor." />
+ <c:simple-property name="History" type="integer" description="The exponential decay factor for historical load values." />
+ </resource-configuration>
+ </service>
+
+ <service name="Simple Load Balancer Factor" discovery="ClassNameMBeanDiscoveryComponent" class="FileConfiguredMBeanResourceComponent" supportsManualAdd="true" description="Simple load balancer factor for mod_cluster" singleton="true">
+
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true" default="jboss.web:provider=LoadBalanceFactor,service=ModCluster,*" />
+ <c:simple-property name="className" readOnly="true" default="org.jboss.modcluster.load.impl.SimpleLoadBalanceFactorProvider" />
+ <c:simple-property name="nameTemplate" default="Simple Load Balancer Factor" />
+ </plugin-configuration>
+
+ <resource-configuration>
+ <c:simple-property name="loadBalanceFactor" type="integer" description="The load balance factor." />
+ </resource-configuration>
+ </service>
+
+ <service name="Load Metric" discovery="LoadMetricDiscoveryComponent" class="org.rhq.plugins.jmx.MBeanResourceComponent" description="Load Metric">
+
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true" default="jboss.web:provider=LoadBalanceFactor,service=ModCluster,metric=*,*" />
+ <c:simple-property name="nameTemplate" default="Load Metric" />
+ </plugin-configuration>
+
+ <metric property="Load" displayName="Load" category="utilization" description="The current load of this metric as a percent of the metric's capacity." dataType="measurement" />
+
+ <resource-configuration>
+ <c:simple-property name="Weight" type="integer" description="The significance of this load metric compared to the other metrics." />
+ <c:simple-property name="Capacity" type="double" description="Used to normalize the value returned by load expressed as a percentage of the capacity, such that: 0 < (load/capacity) < 1" />
+ </resource-configuration>
+ </service>
+
+ <service name="Webapp Context" discovery="ContextDiscoveryComponent" class="ContextComponent" description="Webapp Context">
+
+ <operation name="disableContext" displayName="Disable webapp" description="Disable this webapp.">
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation." />
+ </results>
+ </operation>
+ <operation name="stopContext" displayName="Stop webapp" description="Gracefully stops this webapp.">
<parameters>
- <c:simple-property required="true" name="timeout" type="integer" displayName="Session draining timeout"/>
- <c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
- <c:property-options allowCustomValue="false">
- <c:option value="MICROSECONDS" name="MICROSECONDS"/>
- <c:option value="MILLISECONDS" name="MILLISECONDS"/>
- <c:option value="NANOSECONDS" name="NANOSECONDS"/>
- <c:option value="SECONDS" name="SECONDS"/>
- <c:option value="HOURS" name="HOURS"/>
- <c:option value="DAYS" name="DAYS"/>
- </c:property-options>
- </c:simple-property>
+ <c:simple-property required="true" name="timeout" type="integer" displayName="Session draining timeout" />
+ <c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
+ <c:property-options allowCustomValue="false">
+ <c:option value="MICROSECONDS" name="MICROSECONDS" />
+ <c:option value="MILLISECONDS" name="MILLISECONDS" />
+ <c:option value="NANOSECONDS" name="NANOSECONDS" />
+ <c:option value="SECONDS" name="SECONDS" />
+ <c:option value="HOURS" name="HOURS" />
+ <c:option value="DAYS" name="DAYS" />
+ </c:property-options>
+ </c:simple-property>
</parameters>
- <results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
- </results>
- </operation>
- <operation name="enableContext" displayName="Enable webapp" description="Enable this webapp.">
- <results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
- </results>
- </operation>
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+ <operation name="enableContext" displayName="Enable webapp" description="Enable this webapp.">
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
</service>
</service>
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java
new file mode 100644
index 0000000..4e4aac1
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java
@@ -0,0 +1,58 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.plugins.modcluster.test;
+
+import org.testng.annotations.Test;
+
+import org.rhq.plugins.modcluster.config.ModClusterBeanFile;
+
+public class ServerConfigTest {
+
+ @Test
+ public void TestConfig() {
+
+ try {
+ ModClusterBeanFile config = new ModClusterBeanFile("org.jboss.modcluster.ha.HAModClusterService");
+ config.setPropertyValue("processStatusFrequency", "4");
+ config.setPropertyValue("test", "5");
+ config.setPropertyValue("test", "123");
+
+ System.out.println(config.getPropertyValue("test"));
+
+ config.saveConfigFile();
+
+ config = new ModClusterBeanFile("org.jboss.modcluster.ha.HAModClusterService",
+ "org.jboss.modcluster.config.ha.HAModClusterConfig");
+ config.setPropertyValue("processStatusFrequency", "4");
+ config.setPropertyValue("test", "5");
+ config.setPropertyValue("test", "123");
+
+ System.out.println(config.getPropertyValue("test"));
+
+ config.saveConfigFile();
+
+ config.setPropertyValue("test", null);
+ config.saveConfigFile();
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+}
commit 9b57c3ef1e1bc0ee5f88968f4ee32693be048eb3
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Sun Aug 14 12:03:44 2011 -0500
With JBoss 5, the timeout is blocking the operation call for the period set. Reduce this period for these integration tests.
diff --git a/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index dc98d78..0a39eab 100644
--- a/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -168,7 +168,7 @@ public class ModclusterPluginTest {
log.info("Result of operation " + "enableContext" + " was: " + result.getSimpleResult());
Configuration config = new Configuration();
- config.put(new PropertySimple("timeout", "1000"));
+ config.put(new PropertySimple("timeout", "1"));
config.put(new PropertySimple("unit", java.util.concurrent.TimeUnit.SECONDS));
result = ((OperationFacet) resourceComponent).invokeOperation("stopContext", config);
log.info("Result of operation stopContext was: " + result.getSimpleResult());
commit 273a8701e0e62f907a3c92fbf9bc47aa5d02c51d
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Sun Aug 14 12:02:34 2011 -0500
Add jar dependencies for testing with JBoss 5&6.
diff --git a/modules/integration-tests/mod_cluster-plugin-test/pom.xml b/modules/integration-tests/mod_cluster-plugin-test/pom.xml
index 0cc3f4f..77a81b2 100644
--- a/modules/integration-tests/mod_cluster-plugin-test/pom.xml
+++ b/modules/integration-tests/mod_cluster-plugin-test/pom.xml
@@ -17,9 +17,37 @@
<properties>
<scm.module.path>modules/integration-tests/mod_cluster-plugin-test</scm.module.path>
+ <!-- jbossas.version>6.0.0.20100429-M3</jbossas.version-->
+ <jbossas.version>6.0.0.M1</jbossas.version>
+
</properties>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-parent</artifactId>
+ <version>${jbossas.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-component-matrix</artifactId>
+ <version>${jbossas.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
<dependencies>
+
+ <dependency>
+ <groupId>org.jboss.integration</groupId>
+ <artifactId>jboss-profileservice-spi</artifactId>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<groupId>${rhq.groupId}</groupId>
@@ -41,6 +69,213 @@
<version>1.2.14</version>
<scope>provided</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.jboss.naming</groupId>
+ <artifactId>jnp-client</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-aspects</artifactId>
+ <version>5.1.0.CR1</version>
+ <classifier>jboss-aspect-jdk50-client</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>trove</groupId>
+ <artifactId>trove</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-security-spi</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-javaee</artifactId>
+ <scope>test</scope>
+ </dependency-->
+
+ <dependency>
+ <groupId>oswego-concurrent</groupId>
+ <artifactId>concurrent</artifactId>
+ <version>1.3.4-jboss</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-server</artifactId>
+ <classifier>client</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-mdr</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ <scope>test</scope>
+ </dependency-->
+
+ <!-- dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-log4j</artifactId>
+ <scope>test</scope>
+ </dependency-->
+
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-security</artifactId>
+ <version>5.1.0.CR1</version>
+ <classifier>client</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.integration</groupId>
+ <artifactId>jboss-transaction-spi</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-common</artifactId>
+ <classifier>client</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-core</artifactId>
+ <classifier>client</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-ext-api</artifactId>
+ <version>1.0.0</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-proxy-spi</artifactId>
+ <classifier>client</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-proxy-impl</artifactId>
+ <classifier>client</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-security</artifactId>
+ <classifier>client</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-dependency</artifactId>
+ <scope>test</scope>
+ </dependency-->
+
+ <!-- dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jbosssx-client</artifactId>
+ <scope>test</scope>
+ </dependency-->
+
+ <dependency>
+ <groupId>org.jboss.aspects</groupId>
+ <artifactId>jboss-security-aspects</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.aop</groupId>
+ <artifactId>jboss-aop</artifactId>
+ <classifier>client</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-common-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-reflect</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-serialization</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-core-spi</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-client-spi</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-profileservice</artifactId>
+ <classifier>client</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-server</artifactId>
+ <classifier>jmx-invoker-adaptor-client</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- dependency>
+ <groupId>jboss.messaging</groupId>
+ <artifactId>jboss-messaging-client</artifactId>
+ <scope>test</scope>
+ </dependency-->
</dependencies>
commit 324454e90750968aeaee52480f10cef156ac3178
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Wed Aug 10 18:04:02 2011 -0500
Get the integration tests to compile and run again by creating the maven module and deploying the correct resources to target folder.
diff --git a/.classpath b/.classpath
index cb9d57f..93a80cc 100644
--- a/.classpath
+++ b/.classpath
@@ -282,5 +282,6 @@
<classpathentry kind="src" path="modules/plugins/jboss-as-7/src/main/java"/>
<classpathentry kind="src" path="modules/plugins/jboss-as-7/src/test/java"/>
<classpathentry kind="src" path="modules/integration-tests/jboss-as-7-plugin-test/src/test/java"/>
+ <classpathentry kind="src" path="modules/integration-tests/mod_cluster-plugin-test/src/test/java"/>
<classpathentry kind="output" path="eclipse-classes"/>
</classpath>
diff --git a/modules/integration-tests/mod_cluster-plugin-test/pom.xml b/modules/integration-tests/mod_cluster-plugin-test/pom.xml
new file mode 100644
index 0000000..0cc3f4f
--- /dev/null
+++ b/modules/integration-tests/mod_cluster-plugin-test/pom.xml
@@ -0,0 +1,155 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.rhq</groupId>
+ <artifactId>rhq-plugins-parent</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.rhq</groupId>
+ <artifactId>modcluster-plugin-test</artifactId>
+ <packaging>jar</packaging>
+
+ <name>RHQ mod_cluster Plugin Integration Test</name>
+ <description>Integration tests for mod_cluster RHQ Agent plugin</description>
+
+ <properties>
+ <scm.module.path>modules/integration-tests/mod_cluster-plugin-test</scm.module.path>
+ </properties>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>${rhq.groupId}</groupId>
+ <artifactId>rhq-jmx-plugin</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>${rhq.groupId}</groupId>
+ <artifactId>modcluster-plugin</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ <scope>provided</scope>
+ </dependency>
+
+ </dependencies>
+
+ <profiles>
+
+ <profile>
+ <id>integration-tests</id>
+ <activation>
+ <property>
+ <name>maven.test.skip</name>
+ <value>!true</value>
+ </property>
+ </activation>
+
+ <properties>
+ <rhq.rootDir>../../..</rhq.rootDir>
+ <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
+ <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+ </properties>
+
+ <build>
+ <plugins>
+
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>process-test-resources</phase>
+ <configuration>
+ <tasks>
+ <echo>Setting up plugin dependencies...</echo>
+ <property name="settings.localRepository" location="${user.home}/.m2/repository" />
+ <mkdir dir="target/testsetup" />
+
+ <mkdir dir="target/testsetup/plugins" />
+ <copy toDir="target/testsetup/plugins" flatten="true">
+ <fileset dir="${settings.localRepository}/">
+ <include name="org/rhq/rhq-platform-plugin/${project.version}/rhq-platform-plugin-${project.version}.jar" />
+ <include name="org/rhq/rhq-jmx-plugin/${project.version}/rhq-jmx-plugin-${project.version}.jar" />
+ <include name="org/jboss/on/jopr-jboss-as-plugin/${project.version}/jopr-jboss-as-plugin-${project.version}.jar" />
+ <include name="org/jboss/on/jopr-jboss-as-5-plugin/${project.version}/jopr-jboss-as-5-plugin-${project.version}.jar" />
+ <include name="org/rhq/modcluster-plugin/${project.version}/modcluster-plugin-${project.version}.jar" />
+ </fileset>
+ <fileset dir="${rhq.deploymentDir}">
+ <include name="${project.artifactId}-${project.version}.jar" />
+ </fileset>
+ </copy>
+
+ <mkdir dir="target/testsetup/lib" />
+ <unzip dest="target/testsetup/lib">
+ <fileset dir="${settings.localRepository}/org/hyperic/sigar-dist/${sigar.version}" includes="*.zip" />
+ <patternset>
+ <include name="**/lib/sigar.jar" />
+ <include name="**/lib/bcel*.jar" />
+ <include name="**/lib/*.so" />
+ <include name="**/lib/*.sl" />
+ <include name="**/lib/*.dll" />
+ <include name="**/lib/*.dylib" />
+ </patternset>
+ </unzip>
+ <move todir="target/testsetup/lib" flatten="true">
+ <fileset dir="target/testsetup/lib">
+ <include name="**/lib/*" />
+ </fileset>
+ </move>
+ <delete dir="target/testsetup/lib/hyperic-sigar-${sigar.version}" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ <executions>
+ <execution>
+ <id>surefire-it</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>${maven.test.skip}</skip>
+ <excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
+ <useSystemClassLoader>false</useSystemClassLoader>
+ <argLine>-Dorg.hyperic.sigar.path=${basedir}/target/testsetup/lib</argLine>
+ <systemProperties>
+ <property>
+ <name>project.artifactId</name>
+ <value>${project.artifactId}</value>
+ </property>
+ <property>
+ <name>project.version</name>
+ <value>${project.version}</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
diff --git a/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index 0f644fc..dc98d78 100644
--- a/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -148,10 +148,12 @@ public class ModclusterPluginTest {
}
if (resourceComponent instanceof OperationFacet) {
- OperationResult result = ((OperationFacet) resourceComponent).invokeOperation("reset", null);
+ OperationResult result = null;
+
+ result = ((OperationFacet) resourceComponent).invokeOperation("reset", new Configuration());
log.info("Result of operation test was: " + result);
- result = ((OperationFacet) resourceComponent).invokeOperation("disable", null);
+ result = ((OperationFacet) resourceComponent).invokeOperation("disable", new Configuration());
log.info("Result of operation test was: " + result.getSimpleResult());
}
}
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index ab52e84..fdc4f37 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -56,51 +56,6 @@
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
- <execution>
- <phase>process-test-resources</phase>
- <configuration>
- <tasks>
- <echo>Setting up plugin dependencies...</echo>
- <property name="settings.localRepository" location="${user.home}/.m2/repository" />
- <mkdir dir="target/testsetup" />
-
- <mkdir dir="target/testsetup/plugins" />
- <copy toDir="target/testsetup/plugins" flatten="true">
- <fileset dir="${settings.localRepository}/">
- <include name="org/rhq/rhq-platform-plugin/${project.version}/rhq-platform-plugin-${project.version}.jar" />
- <include name="org/rhq/rhq-jmx-plugin/${project.version}/rhq-jmx-plugin-${project.version}.jar" />
- <include name="org/jboss/on/jopr-jboss-as-plugin/${project.version}/jopr-jboss-as-plugin-${project.version}.jar" />
- <include name="org/jboss/on/jopr-jboss-as-5-plugin/${project.version}/jopr-jboss-as-5-plugin-${project.version}.jar" />
- </fileset>
- <fileset dir="${rhq.deploymentDir}">
- <include name="${project.artifactId}-${project.version}.jar" />
- </fileset>
- </copy>
-
- <mkdir dir="target/testsetup/lib" />
- <unzip dest="target/testsetup/lib">
- <fileset dir="${settings.localRepository}/org/hyperic/sigar-dist/${sigar.version}" includes="*.zip" />
- <patternset>
- <include name="**/lib/sigar.jar" />
- <include name="**/lib/bcel*.jar" />
- <include name="**/lib/*.so" />
- <include name="**/lib/*.sl" />
- <include name="**/lib/*.dll" />
- <include name="**/lib/*.dylib" />
- </patternset>
- </unzip>
- <move todir="target/testsetup/lib" flatten="true">
- <fileset dir="target/testsetup/lib">
- <include name="**/lib/*" />
- </fileset>
- </move>
- <delete dir="target/testsetup/lib/hyperic-sigar-${sigar.version}" />
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
<execution>
<id>deploy</id>
@@ -203,12 +158,10 @@
<build>
<plugins>
-
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.1</version>
<executions>
-
<execution>
<id>deploy</id>
<phase>compile</phase>
@@ -258,14 +211,10 @@
<goal>run</goal>
</goals>
</execution>
-
</executions>
</plugin>
-
</plugins>
</build>
</profile>
-
</profiles>
-
</project>
commit 0540bcd236373f420235c9e30a6ac3ae285728b7
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Thu Aug 25 14:31:21 2011 -0400
[BZ 695889 - Search Bar Saved Search issues]
More SearchBar/SavedSearch Work, done for now.
- simplify behavior of saved search name/update such that it requires a
return to get applied. Change onBlur to just close the edit box, thus
avoiding duplicate storage/update of the saved search.
- remove some odd time-delay stuff joe had in there, it seeme to only
confuse things and with the change to onBlur I don't think it's necessary.
- More I18N, missing properties and migration of some messaging
from server-side to client-side.
- Change look of saved search entries, different colors/fonts/indent
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java
index 12df81d..1a99b85 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java
@@ -90,7 +90,6 @@ public class FlexSearchBar extends AbstractSearchBar {
private SavedSearchGrid savedSearchesGrid;
private Integer currentSearchId = 0;
- private long lastNameFieldBlurTime = 0;
private SearchSubsystem searchSubsystem;
private String defaultSearchText;
@@ -384,8 +383,16 @@ public class FlexSearchBar extends AbstractSearchBar {
}
public void onBlur(BlurEvent event) {
- lastNameFieldBlurTime = System.currentTimeMillis();
- turnNameFieldIntoLabel(true);
+ // If this is a name change update (star on) then return to displaying the unchanged label.
+ // otherwise, abort the creation of the new saved search.
+ if (starImage.getUrl().endsWith(STAR_ON_URL)) {
+ patternNameField.setVisible(false);
+ patternNameLabel.setVisible(true);
+
+ } else {
+ patternNameField.setVisible(false);
+ patternNameLabel.setVisible(false);
+ }
}
}
@@ -397,20 +404,6 @@ public class FlexSearchBar extends AbstractSearchBar {
class StarImageEventHandler implements ClickHandler, MouseOverHandler, MouseOutHandler {
public void onClick(ClickEvent event) {
- long diff = System.currentTimeMillis() - lastNameFieldBlurTime;
- if (Math.abs(diff) < 750) {
- /*
- * This event propagation is annoying. If the threshold is set too low, then both
- * the name field blur event and this star image click event fire...but the blur
- * event fires first, which turns the star white. Then a click on a white star
- * triggers edit mode, re-enabling the name field. However, setting the threshold
- * too high will prevent the click event from being handled when the user naturally
- * wants to click on the star in rapid succession within the threshold time frame.
- * It is hoped that 750ms will strike a nice balance, and that most users will never
- * experienced any oddities from this trade-off.
- */
- return;
- }
// note - since hover changes off to active, we never have the star off case here
if (starImage.getUrl().endsWith(STAR_ACTIVE_URL)) {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/favorites/SavedSearchGrid.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/favorites/SavedSearchGrid.java
index f0e72c3..8965900 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/favorites/SavedSearchGrid.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/favorites/SavedSearchGrid.java
@@ -167,7 +167,8 @@ public class SavedSearchGrid extends Grid {
@Override
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Could not load saved searches", caught);
+ CoreGUI.getErrorHandler().handleError(
+ CoreGUI.getMessages().view_searchBar_savedSearch_failFind("*"), caught);
callback.onFailure(caught);
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java
index a2e2d5d..ee170a1 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java
@@ -30,7 +30,6 @@ import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.FocusHandler;
import com.google.gwt.event.dom.client.HandlesAllKeyEvents;
import com.google.gwt.event.dom.client.HasAllFocusHandlers;
-import com.google.gwt.event.dom.client.KeyCodes;
import com.google.gwt.event.dom.client.KeyDownEvent;
import com.google.gwt.event.dom.client.KeyDownHandler;
import com.google.gwt.event.dom.client.KeyPressEvent;
@@ -62,6 +61,8 @@ import com.google.gwt.user.client.ui.SuggestOracle.Suggestion;
import org.rhq.core.domain.search.SearchSuggestion;
import org.rhq.core.domain.search.SearchSuggestion.Kind;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.Messages;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.gwt.SearchGWTServiceAsync;
import org.rhq.enterprise.gui.coregui.client.search.AbstractSearchBar;
@@ -69,6 +70,8 @@ import org.rhq.enterprise.gui.coregui.client.search.AbstractSearchBar;
public class SuggestTextBox_v3 extends Composite implements HasText, HasAllFocusHandlers, HasValue<String>,
HasSelectionHandlers<Suggestion> {
+ private static final Messages MSG = CoreGUI.getMessages();
+
private final AbstractSearchBar searchBar;
private final SearchSuggestOracle oracle;
@@ -199,53 +202,33 @@ public class SuggestTextBox_v3 extends Composite implements HasText, HasAllFocus
class TextBoxEvents extends HandlesAllKeyEvents implements ValueChangeHandler<String>, ClickHandler {
private boolean isInstructionalCommentSelected() {
+ if (!suggestionPopup.isAttached() || suggestionMenu.getSelectedItemIndex() < 0) {
+ return false;
+ }
+
SearchSuggestion searchSuggestion = suggestionMenu.getSearchSuggestion();
Kind kind = searchSuggestion.getKind();
return kind == Kind.InstructionalTextComment;
}
+ // We used to allow clicking and keypress to select from the suggestion list. But this
+ // could be confusing because we keep focus in the text box. A return would likely mean
+ // the user wants to submit the current pattern in the text box for search. But if the mouse
+ // was hovering over a suggest menu item, which could be accidental as the menu can be large and
+ // pops up automatically, his pattern would get replaced by a random suggestion entry and then
+ // that would get submitted. So, we now only accept clicking to select from the suggest menu
+ // and we assume a return means the user wants to submit the current text box pattern.
public void onClick(ClickEvent event) {
+
+ // if the user clicked on one of our helpful little messages then just ignore it
+ if (isInstructionalCommentSelected()) {
+ return;
+ }
+
handleSuggestions();
}
public void onKeyDown(KeyDownEvent event) {
- /*
- * Make sure that the menu is actually showing. These
- * keystrokes are only relevant when choosing a suggestion.
- */
- if (suggestionPopup.isAttached()) {
- switch (event.getNativeKeyCode()) {
- case KeyCodes.KEY_DOWN:
- suggestionMenu.moveSelectionDown();
- if (isInstructionalCommentSelected()) {
- if (suggestionMenu.getNumItems() == 1) {
- suggestionMenu.selectItem(null);
- } else {
- suggestionMenu.moveSelectionDown();
- }
- }
- event.preventDefault();
- break;
- case KeyCodes.KEY_UP:
- suggestionMenu.moveSelectionUp();
- if (isInstructionalCommentSelected()) {
- if (suggestionMenu.getNumItems() == 1) {
- suggestionMenu.selectItem(null);
- } else {
- suggestionMenu.moveSelectionUp();
- }
- }
- event.preventDefault();
- break;
- case KeyCodes.KEY_ENTER:
- if (suggestionMenu.getSelectedItemIndex() < 0) {
- suggestionPopup.hide();
- } else {
- suggestionMenu.doSelectedItemAction();
- }
- break;
- }
- }
delegateEvent(SuggestTextBox_v3.this, event);
}
@@ -402,6 +385,7 @@ public class SuggestTextBox_v3 extends Composite implements HasText, HasAllFocus
setStyleName("");
}
+ @SuppressWarnings("unused")
public void doSelectedItemAction() {
// In order to perform the action of the item that is currently
// selected, the menu must be showing.
@@ -684,8 +668,8 @@ public class SuggestTextBox_v3 extends Composite implements HasText, HasAllFocus
}
public void onFailure(Throwable caught) {
- SearchSuggestion errorInform = new SearchSuggestion(Kind.InstructionalTextComment, caught
- .getMessage());
+ SearchSuggestion errorInform = new SearchSuggestion(Kind.InstructionalTextComment, MSG
+ .view_searchBar_instructional_failSuggest());
adaptAndHandle(errorInform);
}
@@ -694,6 +678,10 @@ public class SuggestTextBox_v3 extends Composite implements HasText, HasAllFocus
for (SearchSuggestion next : searchSuggestionResults) {
adaptedResults.add(new SearchSuggestionOracleAdapter(next));
}
+ if (adaptedResults.isEmpty()) {
+ adaptedResults.add(new SearchSuggestionOracleAdapter(new SearchSuggestion(
+ Kind.InstructionalTextComment, MSG.view_searchBar_instructional_noSuggest())));
+ }
SuggestOracle.Response response = new SuggestOracle.Response(adaptedResults);
callback.onSuggestionsReady(request, response);
}
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 4362b8f..beb105b 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
@@ -1623,6 +1623,9 @@ view_resource_monitor_table_min = Minimum
view_resource_title_component_errors_tooltip = Shows managed component errors. Click for details
view_resource_title_tagUpdateFailed = Failed to update resource tags
view_searchBar_defaultPattern = name your pattern
+view_searchBar_instructional_failSuggest = Failed to generate suggestions, see server log for possible errors
+view_searchBar_instructional_noSuggest = No matches, enter a different pattern
+view_searchBar_instructional_refresh = Failed to retrieve saved searches, please refresh page
view_searchBar_savedSearch_delete = Successfully deleted saved search [{0}]
view_searchBar_savedSearch_failDelete = Failed to delete saved search with name [{0}]
view_searchBar_savedSearch_failFind = Failed to find saved search with name [{0}]
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
index 581c8cb..5bb5a98 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
@@ -1349,6 +1349,9 @@ view_resource_monitor_table_min = Minimum
view_resource_title_component_errors_tooltip = Zeigt Fehler der gemanagten Ressource. Klicken für Details
view_resource_title_tagUpdateFailed = Fehler beim Aktualisieren der Ressourcen-Tags
view_searchBar_defaultPattern = name your pattern~
+##view_searchBar_instructional_failSuggest = Failed to generate suggestions, see server log for possible errors
+view_searchBar_instructional_noSuggest = No matches, enter a different pattern
+##view_searchBar_instructional_refresh = Failed to retrieve saved searches, please refresh page
##view_searchBar_savedSearch_delete = Successfully deleted saved search [{0}]
##view_searchBar_savedSearch_failDelete = Failed to delete saved search with name [{0}]
##view_searchBar_savedSearch_failFind = Failed to find saved search with name [{0}]
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
index 67762d3..98a20a4 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
@@ -1590,6 +1590,9 @@ view_resource_monitor_table_min = 最小
view_resource_title_component_errors_tooltip = 管理コンポーネントエラーの表示。詳細はクリックしてください
view_resource_title_tagUpdateFailed = リソースタグの更新に失敗しました
view_searchBar_defaultPattern = パターンを名前を付けてください
+##view_searchBar_instructional_failSuggest = Failed to generate suggestions, see server log for possible errors
+view_searchBar_instructional_noSuggest = No matches, enter a different pattern
+##view_searchBar_instructional_refresh = Failed to retrieve saved searches, please refresh page
##view_searchBar_savedSearch_delete = Successfully deleted saved search [{0}]
##view_searchBar_savedSearch_failDelete = Failed to delete saved search with name [{0}]
##view_searchBar_savedSearch_failFind = Failed to find saved search with name [{0}]
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
index 27312f7..48cae04 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
@@ -1728,6 +1728,9 @@ view_resource_monitor_table_min = Minimum
view_resource_title_component_errors_tooltip = Shows managed component errors. Click for details
view_resource_title_tagUpdateFailed = Failed to update resource tags
view_searchBar_defaultPattern = definir nome para o padr\u00E3o
+##view_searchBar_instructional_failSuggest = Failed to generate suggestions, see server log for possible errors
+view_searchBar_instructional_noSuggest = No matches, enter a different pattern
+##view_searchBar_instructional_refresh = Failed to retrieve saved searches, please refresh page
##view_searchBar_savedSearch_delete = Successfully deleted saved search [{0}]
##view_searchBar_savedSearch_failDelete = Failed to delete saved search with name [{0}]
##view_searchBar_savedSearch_failFind = Failed to find saved search with name [{0}]
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
index 9b9fab0..77d3749 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
@@ -1598,6 +1598,9 @@ view_resource_monitor_table_min = \u6700\u5c0f
view_resource_title_component_errors_tooltip = \u663e\u793a\u88ab\u7ba1\u7ec4\u4ef6\u9519\u8bef.\u5355\u51fb\u67e5\u770b\u8be6\u60c5
view_resource_title_tagUpdateFailed = \u66f4\u65b0\u8d44\u6e90\u6807\u7b7e\u5931\u8d25
view_searchBar_defaultPattern = \u5b9a\u4e49\u81ea\u5df1\u7684\u6837\u5f0f
+##view_searchBar_instructional_failSuggest = Failed to generate suggestions, see server log for possible errors
+view_searchBar_instructional_noSuggest = No matches, enter a different pattern
+##view_searchBar_instructional_refresh = Failed to retrieve saved searches, please refresh page
##view_searchBar_savedSearch_delete = Successfully deleted saved search [{0}]
##view_searchBar_savedSearch_failDelete = Failed to delete saved search with name [{0}]
##view_searchBar_savedSearch_failFind = Failed to find saved search with name [{0}]
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/css/search.css b/modules/enterprise/gui/coregui/src/main/webapp/css/search.css
index f4c8390..81a6967 100644
--- a/modules/enterprise/gui/coregui/src/main/webapp/css/search.css
+++ b/modules/enterprise/gui/coregui/src/main/webapp/css/search.css
@@ -153,7 +153,8 @@ div {
}
.savedSearchesPanel-top {
- font-size: 12px;
+ color: green;
+ font-size: 12px;
position: relative;
padding: 0;
margin: 0;
@@ -161,10 +162,10 @@ div {
}
.savedSearchesPanel-bottom {
- color: green;
+ font-size: 10px;
position: relative;
padding: 0;
- margin: 0;
+ margin: 3px;
bottom: 1px;
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/execution/SearchAssistManager.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/execution/SearchAssistManager.java
index 8d723d9..bfc2164 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/execution/SearchAssistManager.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/execution/SearchAssistManager.java
@@ -387,55 +387,34 @@ public class SearchAssistManager {
public List<SearchSuggestion> getTabAwareSuggestions(String expression, int caretPos, String tab) {
List<SearchSuggestion> results = new ArrayList<SearchSuggestion>();
- if (subject == null) {
- // likely a client's misuse of the API, but gracefully return no saved searches if the user is not found
- SearchSuggestion footerMessage = new SearchSuggestion(Kind.InstructionalTextComment,
- "Error retrieving saved searches, please refresh page");
- results.add(footerMessage);
- return results;
+ if (expression == null) {
+ expression = "";
}
- try {
- if (expression == null) {
- expression = "";
- }
-
- // make sure caretPos is at a valid index prior to parsing it for suggestions
- if (caretPos > expression.length()) {
- caretPos = expression.length();
- }
+ // make sure caretPos is at a valid index prior to parsing it for suggestions
+ if (caretPos > expression.length()) {
+ caretPos = expression.length();
+ }
- List<SearchSuggestion> simple = getSimpleSuggestions(expression, caretPos, tab);
- List<SearchSuggestion> advanced = getAdvancedSuggestions(expression, caretPos, tab);
- List<SearchSuggestion> userSavedSearches = getUserSavedSearchSuggestions(expression);
- //List<SearchSuggestion> globalSavedSearches = getGlobalSavedSearchSuggestions(expression);
+ List<SearchSuggestion> simple = getSimpleSuggestions(expression, caretPos, tab);
+ List<SearchSuggestion> advanced = getAdvancedSuggestions(expression, caretPos, tab);
+ List<SearchSuggestion> userSavedSearches = getUserSavedSearchSuggestions(expression);
+ //List<SearchSuggestion> globalSavedSearches = getGlobalSavedSearchSuggestions(expression);
- results.addAll(simple);
- results.addAll(advanced);
- results.addAll(userSavedSearches);
- //results.addAll(globalSavedSearches);
+ results.addAll(simple);
+ results.addAll(advanced);
+ results.addAll(userSavedSearches);
+ //results.addAll(globalSavedSearches);
- if (results.isEmpty()) {
- SearchSuggestion footerMessage = new SearchSuggestion(Kind.InstructionalTextComment,
- "Start typing for more simple text matches");
- results.add(footerMessage);
- } else {
- Collections.sort(results);
- }
+ Collections.sort(results);
- } catch (Throwable t) {
- SearchSuggestion footerMessage = new SearchSuggestion(Kind.InstructionalTextComment,
- "Error retrieving suggestions: " + t.getMessage() + ", see server log for more details");
- results.add(footerMessage);
- LOG.info("Error retrieving suggestions", t);
- }
return results;
}
public List<SearchSuggestion> getSimpleSuggestions(String expression, int caretPos, String tab) {
SearchAssistant completor = getTabAwareSearchAssistant(tab);
- debug("getSimpleSuggestions: START");
+ LOG.debug("getSimpleSuggestions: START");
SearchTermAssistant assistant = new SearchTermAssistant(expression, caretPos);
String beforeCaret = assistant.getFragmentBeforeCaret();
@@ -451,7 +430,11 @@ public class SearchAssistManager {
*/
String parsedTerm = parsed.context;
String primarySimpleContext = completor.getPrimarySimpleContext();
- debug("getSimpleSuggestions: suggesting value completions for a simple context [" + primarySimpleContext + "]");
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("getSimpleSuggestions: suggesting value completions for a simple context ["
+ + primarySimpleContext + "]");
+ }
List<String> valueSuggestions = padWithQuotes(beforeCaret, completor.getValues(primarySimpleContext, null,
parsedTerm));
@@ -461,33 +444,47 @@ public class SearchAssistManager {
public List<SearchSuggestion> getAdvancedSuggestions(String expression, int caretPos, String tab) {
SearchAssistant completor = getTabAwareSearchAssistant(tab);
+ boolean isDebugEnabled = LOG.isDebugEnabled();
- debug("getAdvancedSuggestions: START");
+ LOG.debug("getAdvancedSuggestions: START");
SearchTermAssistant assistant = new SearchTermAssistant(expression, caretPos);
String[] tokens = assistant.getTerms().toArray(new String[0]);
- debug("" + tokens.length + " tokens are " + Arrays.asList(tokens));
+
+ if (isDebugEnabled) {
+ LOG.debug("" + tokens.length + " tokens are " + Arrays.asList(tokens));
+ }
if (tokens.length == 0 || caretPos == 0) {
- debug("getAdvancedSuggestions: no terms");
+ LOG.debug("getAdvancedSuggestions: no terms");
return convert(getAllContexts()); // no terms yet defined
}
String beforeCaret = assistant.getFragmentBeforeCaret();
- debug("getAdvancedSuggestions: beforeCaret is '" + beforeCaret + "'");
+
+ if (isDebugEnabled) {
+ LOG.debug("getAdvancedSuggestions: beforeCaret is '" + beforeCaret + "'");
+ }
String pad = getQuotePadding(beforeCaret);
- debug("getAdvancedSuggestions: padding is ~" + pad + "~");
+
+ if (isDebugEnabled) {
+ LOG.debug("getAdvancedSuggestions: padding is ~" + pad + "~");
+ }
if (beforeCaret.startsWith("'") || beforeCaret.startsWith("\"")) {
return Collections.emptyList();
}
ParsedContext parsed = ParsedContext.get(beforeCaret);
- debug("getAdvancedSuggestions: parsed is " + parsed);
+
+ if (isDebugEnabled) {
+ LOG.debug("getAdvancedSuggestions: parsed is " + parsed);
+ }
+
switch (parsed.state) {
case CONTEXT:
if (parsed.context.equals("")) {
- debug("getAdvancedSuggestions: empty term, suggesting all contexts");
+ LOG.debug("getAdvancedSuggestions: empty term, suggesting all contexts");
return convert(getAllContexts());
/*
if (tokens.length == 1) {
@@ -502,22 +499,22 @@ public class SearchAssistManager {
}
*/
} else if (isBooleanTerm(parsed.context)) {
- debug("getAdvancedSuggestions: beforeCaret is whole boolean operator");
+ LOG.debug("getAdvancedSuggestions: beforeCaret is whole boolean operator");
return convert(getAllContexts()); // TODO: should we tell user to type a space first?
} else {
// check if this context is complete or not
if (completor.getSimpleContexts().contains(parsed.context)) {
- debug("getAdvancedSuggestions: search term is simple context, wants operator");
+ LOG.debug("getAdvancedSuggestions: search term is simple context, wants operator");
List<String> contextComparisonOperators = getComparisonOperatorsForContext(parsed.context,
completor);
return convert(pad(parsed.context, contextComparisonOperators, ""), parsed, parsed.context);
}
if (completor.getParameterizedContexts().contains(parsed.context)) {
- debug("getAdvancedSuggestions: search term is parameterized context, wants open bracket");
+ LOG.debug("getAdvancedSuggestions: search term is parameterized context, wants open bracket");
return convert(Arrays.asList(parsed.context + "["), parsed, parsed.context);
}
- debug("getAdvancedSuggestions: search term wants context completion");
+ LOG.debug("getAdvancedSuggestions: search term wants context completion");
List<String> startsWithContexts = new ArrayList<String>();
String lowerCaseParsedContext = parsed.context.toLowerCase(); // contexts should already be lower-cased
for (String context : completor.getSimpleContexts()) {
@@ -533,20 +530,20 @@ public class SearchAssistManager {
return convert(startsWithContexts, parsed, parsed.context);
}
case PARAM:
- debug("getAdvancedSuggestions: param state");
+ LOG.debug("getAdvancedSuggestions: param state");
return convert(pad(parsed.context + "[", completor.getParameters(parsed.context, parsed.param), "]"),
parsed, parsed.param);
case OPERATOR:
- debug("getAdvancedSuggestions: operator state");
+ LOG.debug("getAdvancedSuggestions: operator state");
if (allComparisonOperators.contains(parsed.operator)) {
- debug("search term is complete operator, suggesting values instead");
+ LOG.debug("search term is complete operator, suggesting values instead");
List<String> valueSuggestions = padWithQuotes(beforeCaret, completor.getValues(parsed.context,
parsed.param, ""));
if (completor.getSimpleContexts().contains(parsed.context)) {
- debug("getAdvancedSuggestions: suggesting value completions for a simple context");
+ LOG.debug("getAdvancedSuggestions: suggesting value completions for a simple context");
return convert(pad(parsed.context + parsed.operator, valueSuggestions, ""));
} else {
- debug("getAdvancedSuggestions: suggesting value completions for a parameterized context");
+ LOG.debug("getAdvancedSuggestions: suggesting value completions for a parameterized context");
return convert(pad(parsed.context + "[" + parsed.param + "]" + parsed.operator, valueSuggestions,
""));
}
@@ -560,21 +557,21 @@ public class SearchAssistManager {
}
}
- debug("getAdvancedSuggestions: providing suggestions for comparison operators");
+ LOG.debug("getAdvancedSuggestions: providing suggestions for comparison operators");
if (completor.getSimpleContexts().contains(parsed.context)) {
return convert(pad(parsed.context, operatorSuggestions, ""));
} else {
return convert(pad(parsed.context + "[" + parsed.param + "]", operatorSuggestions, ""));
}
case VALUE:
- debug("getAdvancedSuggestions: value state");
+ LOG.debug("getAdvancedSuggestions: value state");
List<String> valueSuggestions = padWithQuotes(beforeCaret, completor.getValues(parsed.context,
parsed.param, parsed.value));
if (completor.getSimpleContexts().contains(parsed.context)) {
- debug("getAdvancedSuggestions: suggesting value completions for a simple context");
+ LOG.debug("getAdvancedSuggestions: suggesting value completions for a simple context");
return convert(pad(parsed.context + parsed.operator, valueSuggestions, ""), parsed, parsed.value);
} else {
- debug("getAdvancedSuggestions: suggesting value completions for a parameterized context");
+ LOG.debug("getAdvancedSuggestions: suggesting value completions for a parameterized context");
return convert(pad(parsed.context + "[" + parsed.param + "]" + parsed.operator, valueSuggestions, ""),
parsed, parsed.value);
}
@@ -594,6 +591,10 @@ public class SearchAssistManager {
}
public List<SearchSuggestion> getUserSavedSearchSuggestions(String expression) {
+ if (null == subject) {
+ return new ArrayList<SearchSuggestion>();
+ }
+
expression = expression.trim().toLowerCase().replaceAll("\\s+", " ");
SavedSearchCriteria criteria = new SavedSearchCriteria();
@@ -772,8 +773,4 @@ public class SearchAssistManager {
return "\"";
}
}
-
- private void debug(String message) {
- LOG.debug(message);
- }
}
commit 867eb2edccefc24d4730fdf4e0494dc1dddc94aa
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Aug 25 13:51:35 2011 -0400
add drift to timeline
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventDriftJSON.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventDriftJSON.jsp
new file mode 100644
index 0000000..b2f42fb
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventDriftJSON.jsp
@@ -0,0 +1,59 @@
+<%@ page import="java.text.SimpleDateFormat" %>
+<%@ page import="java.util.Locale" %>
+<%@ page import="org.rhq.core.domain.auth.Subject" %>
+<%@ page import="org.rhq.core.domain.util.PageControl" %>
+<%@ page import="org.rhq.core.domain.util.PageList" %>
+<%@ page import="org.rhq.enterprise.gui.legacy.ParamConstants" %>
+<%@ page import="org.rhq.enterprise.gui.legacy.WebUser" %>
+<%@ page import="org.rhq.enterprise.gui.legacy.util.SessionUtils" %>
+<%@ page import="org.rhq.enterprise.gui.util.WebUtility" %>
+<%@ page import="org.rhq.enterprise.server.util.LookupUtil" %>
+<%@ page import="org.rhq.core.domain.resource.Resource" %>
+<%@ page import="org.rhq.enterprise.server.drift.DriftManagerLocal"%>
+<%@ page import="org.rhq.core.domain.criteria.GenericDriftChangeSetCriteria"%>
+<%@ page import="org.rhq.core.domain.drift.DriftChangeSet"%>
+
+<%
+ int resourceId = WebUtility.getOptionalIntRequestParameter(request, ParamConstants.RESOURCE_ID_PARAM, -1);
+
+ WebUser user = SessionUtils.getWebUser(request.getSession());
+ Subject subject = user.getSubject();
+
+ long end = Long.parseLong(WebUtility.getRequiredRequestParameter(request, "end"));
+ long begin = Long.parseLong(WebUtility.getRequiredRequestParameter(request, "begin"));
+
+ DriftManagerLocal driftManager = LookupUtil.getDriftManager();
+ GenericDriftChangeSetCriteria criteria = new GenericDriftChangeSetCriteria();
+ criteria.addFilterResourceId(resourceId);
+ criteria.addFilterCreatedAfter(begin);
+ criteria.addFilterCreatedBefore(end);
+ PageList<? extends DriftChangeSet<?>> results = driftManager.findDriftChangeSetsByCriteria(subject, criteria);
+%>
+
+{ "events": [
+
+<%
+ SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd yyyy HH:mm:ss Z", Locale.US);
+ String link = "/coregui/CoreGUI.html#Resource/" + resourceId + "/Drift/ChangeSets";
+ String icon = "/images/icons/Drift_16.png";
+ boolean first = true;
+ for (DriftChangeSet entry : results) {
+ if (!first) {
+ out.write(",\n");
+ }
+ first = false;
+%>
+
+{ "start" : "<%=sdf.format(entry.getCtime())%>",
+ "title" : "Drift Detected",
+ "link" : "<%=link%>",
+ "description" : "Drift was detected! A change set was created to document the changes.",
+ "icon" : "<%=icon%>",
+ "color" : "#3333FF"
+}
+
+<%
+ }
+%>
+
+]}
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventsView.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventsView.jsp
index 1bbdb2f..1ac93c7 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventsView.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventsView.jsp
@@ -236,6 +236,15 @@ function onLoad() {
});
}
+ if (document.forms['show'].drift.checked) {
+ link = "/resource/common/monitor/events/EventDriftJSON.jsp?id=" + resourceId + "&begin=" + begin + "&end=" + end;
+ Timeline.loadJSON(link, function(json, url) {
+ eventSource.loadJSON(json, url);
+ document.getElementById("event-count").innerHTML = eventSource.getCount();
+ done();
+ });
+ }
+
if (document.forms['show']['content'].checked) {
link = "/resource/common/monitor/events/EventContentJSON.jsp?id=" + resourceId + "&begin=" + begin + "&end=" + end;
Timeline.loadJSON(link, function(json, url) {
commit 4ed859a59e6cb20d417ae7bc4940169bf0194f7c
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Aug 25 13:11:51 2011 -0400
add inventory data to timeline (when resource was discovered and when it was inventoried)
clean up the content json jsp a bit
get ready for the drift timeline data (still need to create the json jsp)
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Drift_16.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Drift_16.png
new file mode 100644
index 0000000..a368ad4
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Drift_16.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventContentJSON.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventContentJSON.jsp
index 673d08e..8edeebe 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventContentJSON.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventContentJSON.jsp
@@ -26,7 +26,7 @@
ContentUIManagerLocal contentManager = LookupUtil.getContentUIManager();
- PageList<InstalledPackageHistory> history = contentManager.getInstalledPackageHistoryForResource(resourceId, new PageControl(0,100, new OrderingField("iph.timestamp",PageOrdering.DESC)));
+ PageList<InstalledPackageHistory> history = contentManager.getInstalledPackageHistoryForResource(resourceId, new PageControl(0,20, new OrderingField("iph.timestamp",PageOrdering.DESC)));
%>
@@ -65,13 +65,18 @@
String link = "#Resource/" + resourceId + "/Content/Deployed";
// "/rhq/resource/content/installed_package_details.xhtml?id=" + resourceId + "¤tPackageId=" + installedPackage.getId();
+ String version = installedPackage.getPackageVersion().getDisplayVersion();
+ String username = "-Autodetected-";
+ if (installedPackage.getContentServiceRequest() != null) {
+ username = installedPackage.getContentServiceRequest().getSubjectName();
+ }
%>
{ "start" : "<%=sdf.format(new Date(installedPackage.getTimestamp()))%>",
"title" : "<% out.write(
(installedPackage.getPackageVersion().getDisplayName()==null ? null : installedPackage.getPackageVersion().getDisplayName().replaceAll("[\"']","")) + " " +
(installedPackage.getPackageVersion().getDisplayVersion() ==null ? null : installedPackage.getPackageVersion().getDisplayVersion().replaceAll("[\"']","")));%>",
"link" : "<%=link%>",
- "description" : "<b>User:</b> <% out.write((installedPackage.getContentServiceRequest() == null ? "-Detected- " : installedPackage.getContentServiceRequest().getSubjectName().replaceAll("[\"']","").trim())+"<br/> <b>Version: "+(installedPackage.getPackageVersion().getDisplayVersion() ==null ? null :installedPackage.getPackageVersion().getDisplayVersion().replaceAll("[\"']","").trim())+" </b> <br/><b>Status:</b> "+installedPackage.getStatus());%>",
+ "description" : "<b>User:</b> <% out.write(username.replaceAll("[\"']","").trim()+"<br/> <b>Version:</b> "+(version.replaceAll("[\"']","").trim())+"<br/><b>Status:</b> "+installedPackage.getStatus());%>",
"icon" : "<%=icon%>",
"color" : "<%=(installedPackage.getStatus() != InstalledPackageHistoryStatus.FAILED ? "#4EB84E" : "#DD5656")%>"
}
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventInventoryJSON.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventInventoryJSON.jsp
new file mode 100644
index 0000000..9a3fa9c
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventInventoryJSON.jsp
@@ -0,0 +1,52 @@
+<%@ page import="java.text.SimpleDateFormat" %>
+<%@ page import="java.util.Locale" %>
+<%@ page import="org.rhq.core.domain.auth.Subject" %>
+<%@ page import="org.rhq.core.domain.util.PageControl" %>
+<%@ page import="org.rhq.core.domain.util.PageList" %>
+<%@ page import="org.rhq.enterprise.gui.legacy.ParamConstants" %>
+<%@ page import="org.rhq.enterprise.gui.legacy.WebUser" %>
+<%@ page import="org.rhq.enterprise.gui.legacy.util.SessionUtils" %>
+<%@ page import="org.rhq.enterprise.gui.util.WebUtility" %>
+<%@ page import="org.rhq.enterprise.server.resource.ResourceManagerLocal" %>
+<%@ page import="org.rhq.enterprise.server.util.LookupUtil" %>
+<%@ page import="org.rhq.core.domain.resource.Resource" %>
+
+<%
+ int resourceId = WebUtility.getOptionalIntRequestParameter(request, ParamConstants.RESOURCE_ID_PARAM, -1);
+
+ WebUser user = SessionUtils.getWebUser(request.getSession());
+ Subject subject = user.getSubject();
+
+ long end = Long.parseLong(WebUtility.getRequiredRequestParameter(request, "end"));
+ long begin = Long.parseLong(WebUtility.getRequiredRequestParameter(request, "begin"));
+
+ ResourceManagerLocal resourceManager = LookupUtil.getResourceManager();
+ Resource resource = resourceManager.getResource(subject, resourceId);
+%>
+
+{ "events": [
+
+ <%
+ SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd yyyy HH:mm:ss Z", Locale.US);
+ String link = "/coregui/CoreGUI.html#Resource/" + resourceId;
+ String iconDiscovered = "/images/icons/Inventory_grey_16.png";
+ String iconCommitted = "/images/icons/Inventory_16.png";
+ %>
+
+{ "start" : "<%=sdf.format(resource.getCtime())%>",
+ "title" : "Initial Discovery",
+ "link" : "<%=link%>",
+ "description" : "Time when the resource was initially discovered by its managing agent.",
+ "icon" : "<%=iconDiscovered%>",
+ "color" : "#A0A0A0"
+},
+
+{ "start" : "<%=sdf.format(resource.getItime())%>",
+ "title" : "Committed to Inventory",
+ "link" : "<%=link%>",
+ "description" : "Time when the resource was committed to inventory.",
+ "icon" : "<%=iconCommitted%>",
+ "color" : "#3333FF"
+}
+
+]}
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventsView.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventsView.jsp
index 6ed2510..1bbdb2f 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventsView.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventsView.jsp
@@ -200,6 +200,15 @@ function onLoad() {
});
}
+ if (document.forms['show'].inventory.checked) {
+ link = "/resource/common/monitor/events/EventInventoryJSON.jsp?id=" + resourceId + "&begin=" + begin + "&end=" + end;
+ Timeline.loadJSON(link, function(json, url) {
+ eventSource.loadJSON(json, url);
+ document.getElementById("event-count").innerHTML = eventSource.getCount();
+ done();
+ });
+ }
+
if (document.forms['show'].alerts.checked) {
link = "/resource/common/monitor/events/EventAlertJSON.jsp?id=" + resourceId + "&begin=" + begin + "&end=" + end;
Timeline.loadJSON(link, function(json, url) {
@@ -254,23 +263,30 @@ function onResize() {
<span id="event-count" style="display:none;"></span>
<div class="controls" id="controls"></div>
<form action="#" onsubmit="onLoad()" name="show">
+<table><tr>
+<td>
<input type="checkbox" name="inventory" checked="checked" onchange="onLoad()" id="inventoryField"/>
<label for="inventoryField"><img src="/images/icons/Inventory_grey_16.png"/> Inventory Changes</label>
-
+</td><td>
<input type="checkbox" name="alerts" checked="checked" onchange="onLoad()" id="alertsField"/>
<label for="alertsField"><img src="/images/icons/Alert_grey_16.png"/> Alerts</label>
-
+</td><td>
<input type="checkbox" name="events" checked="checked" onchange="onLoad()" id="eventsField"/>
<label for="eventsField"><img src="/images/icons/Events_grey_16.png"/> Events</label>
-
+</td><td>
<input type="checkbox" name="configurations" checked="checked" onchange="onLoad()" id="configurationsField"/>
<label for="configurationsField"><img src="/images/icons/Configure_grey_16.png"/> Configuration Changes</label>
-
+</td></tr><tr><td>
<input type="checkbox" name="operations" checked="checked" onchange="onLoad()" id="operationsField"/>
<label for="operationsField"><img src="/images/icons/Operation_grey_16.png"/> Operations</label>
-
+</td><td>
+ <input type="checkbox" name="drift" checked="checked" onchange="onLoad()" id="driftField"/>
+ <label for="driftField"><img src="/images/icons/Drift_16.png"/> Drift</label>
+</td><td>
<input type="checkbox" name="content" checked="checked" onchange="onLoad()" id="contentField"/>
<label for="contentField"><img src="/images/icons/Content_grey_16.png"/> Content Changes</label>
+</td>
+</tr></table>
</form>
-<div id="t1" style='height: 475px; border: 1px solid #aaa'></div>
+<div id="t1" style='height: 450px; border: 1px solid #aaa'></div>
</body></html>
\ No newline at end of file
commit 8c87bf63686df822bec93ad2fdf6183571392412
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Aug 25 12:20:11 2011 -0400
create/delete child history has its own inventory filter - will add more timeline markers for inventory shortly
make the timeline icons match the rest of the ui
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/ImageManager.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/ImageManager.java
index 4c1c429..5c7a385 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/ImageManager.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/ImageManager.java
@@ -8,6 +8,8 @@ import org.rhq.core.domain.event.EventSeverity;
import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.core.domain.measurement.ResourceAvailability;
import org.rhq.core.domain.operation.OperationRequestStatus;
+import org.rhq.core.domain.resource.CreateResourceStatus;
+import org.rhq.core.domain.resource.DeleteResourceStatus;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceCategory;
import org.rhq.core.domain.resource.ResourceType;
@@ -527,4 +529,50 @@ public class ImageManager {
public static String getConfigureIcon() {
return "subsystems/configure/Configure_16.png";
}
+
+ public static String getChildCreateIcon() {
+ return "subsystems/inventory/CreateChild_16.png";
+ }
+
+ public static String getChildCreateIcon(CreateResourceStatus createStatus) {
+ if (createStatus == null) {
+ return getChildCreateIcon();
+ } else {
+ switch (createStatus) {
+ case SUCCESS: {
+ return "subsystems/inventory/CreateChild_success_16.png";
+ }
+ case IN_PROGRESS: {
+ return getChildCreateIcon();
+ }
+ default: {
+ // all others will use the failure icon
+ return "subsystems/inventory/CreateChild_failed_16.png";
+ }
+ }
+ }
+ }
+
+ public static String getChildDeleteIcon() {
+ return "subsystems/inventory/DeleteChild_16.png";
+ }
+
+ public static String getChildDeleteIcon(DeleteResourceStatus deleteStatus) {
+ if (deleteStatus == null) {
+ return getChildDeleteIcon();
+ } else {
+ switch (deleteStatus) {
+ case SUCCESS: {
+ return "subsystems/inventory/DeleteChild_success_16.png";
+ }
+ case IN_PROGRESS: {
+ return getChildDeleteIcon();
+ }
+ default: {
+ // all others will use the failure icon
+ return "subsystems/inventory/DeleteChild_failed_16.png";
+ }
+ }
+ }
+ }
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ChildHistoryView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ChildHistoryView.java
index d5c1ec4..dc835fa 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ChildHistoryView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ChildHistoryView.java
@@ -52,6 +52,7 @@ import org.rhq.core.domain.resource.composite.ResourceComposite;
import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.ImageManager;
import org.rhq.enterprise.gui.coregui.client.components.table.Table;
import org.rhq.enterprise.gui.coregui.client.components.table.TimestampCellFormatter;
import org.rhq.enterprise.gui.coregui.client.components.view.ViewName;
@@ -65,8 +66,8 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableWindow;
public class ChildHistoryView extends Table<ChildHistoryView.DataSource> {
public static final ViewName VIEW_ID = new ViewName("ChildHistory", MSG.view_tabs_common_child_history());
- public static final String CHILD_CREATED_ICON = "[skin]/images/MultiUploadItem/icon_add_files.png";
- public static final String CHILD_DELETED_ICON = "[skin]/images/MultiUploadItem/icon_remove_files.png";
+ public static final String CHILD_CREATED_ICON = ImageManager.getChildCreateIcon();
+ public static final String CHILD_DELETED_ICON = ImageManager.getChildDeleteIcon();
private final ResourceComposite resourceComposite;
private FormItem dateRangeItem;
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/inventory/CreateChild_16.png b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/inventory/CreateChild_16.png
new file mode 100644
index 0000000..6db0919
Binary files /dev/null and b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/inventory/CreateChild_16.png differ
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/inventory/CreateChild_failed_16.png b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/inventory/CreateChild_failed_16.png
new file mode 100644
index 0000000..5db8573
Binary files /dev/null and b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/inventory/CreateChild_failed_16.png differ
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/inventory/CreateChild_success_16.png b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/inventory/CreateChild_success_16.png
new file mode 100644
index 0000000..d9eb649
Binary files /dev/null and b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/inventory/CreateChild_success_16.png differ
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/inventory/DeleteChild_16.png b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/inventory/DeleteChild_16.png
new file mode 100644
index 0000000..bd45928
Binary files /dev/null and b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/inventory/DeleteChild_16.png differ
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/inventory/DeleteChild_failed_16.png b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/inventory/DeleteChild_failed_16.png
new file mode 100644
index 0000000..33770d2
Binary files /dev/null and b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/inventory/DeleteChild_failed_16.png differ
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/inventory/DeleteChild_success_16.png b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/inventory/DeleteChild_success_16.png
new file mode 100644
index 0000000..9948df0
Binary files /dev/null and b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/inventory/DeleteChild_success_16.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icn_create_child.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icn_create_child.png
index 5403358..6db0919 100644
Binary files a/modules/enterprise/gui/portal-war/src/main/webapp/images/icn_create_child.png and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icn_create_child.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icn_create_child_failed.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icn_create_child_failed.png
index 7807270..5db8573 100644
Binary files a/modules/enterprise/gui/portal-war/src/main/webapp/images/icn_create_child_failed.png and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icn_create_child_failed.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icn_create_child_success.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icn_create_child_success.png
index 2b475f1..d9eb649 100644
Binary files a/modules/enterprise/gui/portal-war/src/main/webapp/images/icn_create_child_success.png and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icn_create_child_success.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icn_delete_child.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icn_delete_child.png
index 49333cd..bd45928 100644
Binary files a/modules/enterprise/gui/portal-war/src/main/webapp/images/icn_delete_child.png and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icn_delete_child.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icn_delete_child_failed.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icn_delete_child_failed.png
index 570b905..33770d2 100644
Binary files a/modules/enterprise/gui/portal-war/src/main/webapp/images/icn_delete_child_failed.png and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icn_delete_child_failed.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icn_delete_child_success.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icn_delete_child_success.png
index 7e60281..9948df0 100644
Binary files a/modules/enterprise/gui/portal-war/src/main/webapp/images/icn_delete_child_success.png and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icn_delete_child_success.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventsView.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventsView.jsp
index e33abdf..6ed2510 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventsView.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventsView.jsp
@@ -191,7 +191,7 @@ function onLoad() {
});
}
- if (document.forms['show'].configurations.checked) {
+ if (document.forms['show'].inventory.checked) {
link = "/resource/common/monitor/events/EventCreateDeleteChildJSON.jsp?id=" + resourceId + "&begin=" + begin + "&end=" + end;
Timeline.loadJSON(link, function(json, url) {
eventSource.loadJSON(json, url);
@@ -254,6 +254,9 @@ function onResize() {
<span id="event-count" style="display:none;"></span>
<div class="controls" id="controls"></div>
<form action="#" onsubmit="onLoad()" name="show">
+ <input type="checkbox" name="inventory" checked="checked" onchange="onLoad()" id="inventoryField"/>
+ <label for="inventoryField"><img src="/images/icons/Inventory_grey_16.png"/> Inventory Changes</label>
+
<input type="checkbox" name="alerts" checked="checked" onchange="onLoad()" id="alertsField"/>
<label for="alertsField"><img src="/images/icons/Alert_grey_16.png"/> Alerts</label>
commit 5a7a6db825281058eefc65bb3daa2bc3cc1314b5
Author: Simeon Pinder <simeonpinder(a)gmail.com>
Date: Thu Aug 25 06:27:04 2011 -0400
moved maven-antrun-plugin, exec-maven-plugin and properties-maven-plugin back into profile for deactivation by brew.
diff --git a/pom.xml b/pom.xml
index 106e5a2..1be70d1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -894,70 +894,6 @@
</plugin>
-->
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>write-build-properties-file</id>
- <goals>
- <goal>run</goal>
- </goals>
- <phase>generate-sources</phase>
- <configuration>
- <tasks>
- <mkdir dir="target" />
-
- <tstamp>
- <format property="buildTime" pattern="MM/dd/yy hh:mm aa z" locale="en,US" timezone="GMT" />
- </tstamp>
- <echo file="target/build.properties">buildTime = ${buildTime}${line.separator}</echo>
-
- <exec executable="git" outputproperty="buildNumber" failonerror="false" failifexecutionfails="false">
- <arg value="log" />
- <arg value="--pretty=format:%h" />
- <arg value="-n1" />
- </exec>
- <echo file="target/build.properties" append="true">buildNumber = ${buildNumber}${line.separator}</echo>
- </tasks>
- </configuration>
- </execution>
-
- <execution>
- <id>echo-build-properties</id>
- <phase>compile</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <echo level="debug">buildTime = ${buildTime}</echo>
- <echo level="debug">buildNumber = ${buildNumber}</echo>
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>properties-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>read-build-properties-file</id>
- <phase>process-sources</phase>
- <goals>
- <goal>read-project-properties</goal>
- </goals>
- <configuration>
- <files>
- <file>${project.build.directory}/build.properties</file>
- </files>
- <quiet>true</quiet>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
</plugins>
</build>
@@ -1185,7 +1121,92 @@
</plugins>
</build>
</profile>
-
+
+ <!-- These plugins i)need to be active by default
+ ii)need to be in a profile so that deactivation is possible for brew builds -->
+ <profile>
+ <id>build-properties</id>
+ <activation>
+ <file>
+ <exists>.git</exists>
+ </file>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>write-build-properties-file</id>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <phase>generate-sources</phase>
+ <configuration>
+ <tasks>
+ <mkdir dir="target" />
+
+ <tstamp>
+ <format property="buildTime" pattern="MM/dd/yy hh:mm aa z" locale="en,US" timezone="GMT" />
+ </tstamp>
+ <echo file="target/build.properties">buildTime = ${buildTime}${line.separator}</echo>
+
+ <exec executable="git" outputproperty="buildNumber" failonerror="false" failifexecutionfails="false">
+ <arg value="log" />
+ <arg value="--pretty=format:%h" />
+ <arg value="-n1" />
+ </exec>
+ <echo file="target/build.properties" append="true">buildNumber = ${buildNumber}${line.separator}</echo>
+ </tasks>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>echo-build-properties</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <echo level="debug">buildTime = ${buildTime}</echo>
+ <echo level="debug">buildNumber = ${buildNumber}</echo>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <!-- NOTE: Version 1.2 of this plugin appears to be broken, so do not
+ upgrade to that version. -->
+ <version>1.1</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>properties-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>read-build-properties-file</id>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>read-project-properties</goal>
+ </goals>
+ <configuration>
+ <files>
+ <file>${project.build.directory}/build.properties</file>
+ </files>
+ <quiet>true</quiet>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
</profiles>
commit 0b63dbefbc9f88145a8012a3677af665b41b13f7
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Aug 25 00:14:01 2011 -0500
Small refactoring and code formating change to make the class easier to read and understand.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
index 6abf955..8cff302 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
@@ -75,6 +75,7 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
*/
public void setPropertyValue(String propertyName, String value) {
boolean propertyFound = false;
+
for (int i = 0; i < beanNode.getChildNodes().getLength(); i++) {
Node currentNode = beanNode.getChildNodes().item(i);
@@ -107,8 +108,10 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
* @return
*/
public String getPropertyValue(String propertyName) {
- for (int i = 0; i < beanNode.getChildNodes().getLength(); i++) {
- Node currentNode = beanNode.getChildNodes().item(i);
+ NodeList nodeList = beanNode.getChildNodes();
+
+ for (int i = 0; i < nodeList.getLength(); i++) {
+ Node currentNode = nodeList.item(i);
if (currentNode.getNodeName().equals("property")
&& currentNode.getAttributes().getNamedItem("name") != null
@@ -126,10 +129,11 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
* @return
*/
private Node getBeanNodeByClass(String className) {
- NodeList result = this.getDocument().getElementsByTagName("bean");
+ NodeList nodeList = this.getDocument().getElementsByTagName("bean");
+
+ for (int i = 1; i < nodeList.getLength(); i++) {
+ Node node = nodeList.item(i);
- for (int i = 1; i < result.getLength(); i++) {
- Node node = result.item(i);
if (node.getAttributes().getNamedItem("class") != null
&& className.equals(node.getAttributes().getNamedItem("class").getTextContent())) {
return node;
@@ -144,10 +148,11 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
* @return
*/
private Node getBeanNodeByName(String beanName) {
- NodeList result = this.getDocument().getElementsByTagName("bean");
+ NodeList nodeList = this.getDocument().getElementsByTagName("bean");
+
+ for (int i = 1; i < nodeList.getLength(); i++) {
+ Node node = nodeList.item(i);
- for (int i = 1; i < result.getLength(); i++) {
- Node node = result.item(i);
if (node.getAttributes().getNamedItem("name") != null
&& beanName.equals(node.getAttributes().getNamedItem("name").getTextContent())) {
return node;
@@ -163,17 +168,17 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
* @return
*/
private String getBeanFromConstructorArgument(Node beanNode, String constructorArgumentClassName) {
- List<Node> tempNodeList = this.getChildNodesByName(beanNode, "constructor");
+ List<Node> nodeList = this.getChildrenNodesByName(beanNode, "constructor");
- if (tempNodeList.size() > 0) {
- Node constructorNode = tempNodeList.get(0);
+ if (nodeList.size() > 0) {
+ Node constructorNode = nodeList.get(0);
- tempNodeList = this.getChildNodesByName(constructorNode, "parameter");
+ nodeList = this.getChildrenNodesByName(constructorNode, "parameter");
- if (tempNodeList.size() > 0) {
+ if (nodeList.size() > 0) {
Node parameterNode = null;
- for (Node currentNode : tempNodeList) {
+ for (Node currentNode : nodeList) {
if (currentNode.getAttributes().getNamedItem("class") != null
&& constructorArgumentClassName.equals(currentNode.getAttributes().getNamedItem("class")
.getTextContent())) {
@@ -183,10 +188,10 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
}
if (parameterNode != null) {
- tempNodeList = this.getChildNodesByName(parameterNode, "inject");
+ nodeList = this.getChildrenNodesByName(parameterNode, "inject");
- if (tempNodeList.size() > 0) {
- Node injectNode = tempNodeList.get(0);
+ if (nodeList.size() > 0) {
+ Node injectNode = nodeList.get(0);
Node beanAttribute = injectNode.getAttributes().getNamedItem("bean");
if (beanAttribute != null) {
@@ -205,17 +210,17 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
* @param nodeName
* @return
*/
- private List<Node> getChildNodesByName(Node node, String nodeName) {
- List<Node> listOfNodes = new ArrayList<Node>();
+ private List<Node> getChildrenNodesByName(Node node, String nodeName) {
+ List<Node> nodeList = new ArrayList<Node>();
for (int i = 0; i < node.getChildNodes().getLength(); i++) {
Node currentNode = node.getChildNodes().item(i);
if (nodeName.equals(currentNode.getNodeName())) {
- listOfNodes.add(currentNode);
+ nodeList.add(currentNode);
}
}
- return listOfNodes;
+ return nodeList;
}
}
commit 7d543559bf07e87dd707fac16e0d1dc8f63b2815
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Thu Aug 25 00:12:49 2011 -0500
Added the proxyInfo metric back to Catalina service context since it is readly available.
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 6f46849..3e523f7 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -374,6 +374,7 @@
</operation>
<metric property="proxyConfiguration" displayName="Proxy Configuration" displayType="summary" dataType="trait" />
+ <metric property="proxyInfo" displayName="Proxy Info" displayType="summary" dataType="trait" />
<metric property="modelerType" displayName="Type of the modeled resource" displayType="summary" dataType="trait" />
<metric property="className" displayName="Fully qualified class name of the managed object" displayType="summary" dataType="trait" />
<metric property="advertise" displayName="Enable autodiscovery of httpd servers." displayType="summary" dataType="trait" />
commit bdc6f5e72b99f9dcffd6ab4395a6529fa32339e6
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Aug 24 22:19:16 2011 -0400
Check to see if a schedule has been removed before sending change set to server
In my previous commit I added support for deleting a drift detection
schedule and purging the change set directory. If the deletion occurs
while the schedule is still active, DriftDetector finishes its run and
the agent could still wind up sending a change set report to the server
for a configuration that has been deleted.
This commit adds a check in DriftManager.sendChangeSetToServer to make
sure that the schedule has not been deleted before sending the change
set to the server.
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
index b162149..a3512dc 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
@@ -150,12 +150,15 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
@Override
public void sendChangeSetToServer(int resourceId, DriftConfiguration driftConfiguration, DriftChangeSetCategory type) {
try {
+ if (!schedulesQueue.contains(resourceId, driftConfiguration)) {
+ return;
+ }
+
File changeSetFile = changeSetMgr.findChangeSet(resourceId, driftConfiguration.getName(), type);
if (changeSetFile == null) {
- log
- .warn("changeset[resourceId: " + resourceId + ", driftConfiguration: "
- + driftConfiguration.getName()
- + "] was not found. Cancelling request to send change set to server");
+ log.warn("changeset[resourceId: " + resourceId + ", driftConfiguration: " +
+ driftConfiguration.getName() + "] was not found. Cancelling request to send change set " +
+ "to server");
return;
}
commit ce28e8689a4ec9be87aa6cad3205d8bc7d467e95
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Aug 24 20:59:22 2011 -0400
Implmenting DriftManager.unscheduleDriftDetection
This method is called by the server when a drift configuration is
deleted on the server. It performs two functions:
1) Deletes the schedule from the queue
2) Deletes the change set directory corresponding to the drift config
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
index c550f2d..b162149 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
@@ -53,6 +53,7 @@ import org.rhq.core.pc.measurement.MeasurementManager;
import org.rhq.core.util.stream.StreamUtil;
import static org.rhq.core.util.ZipUtil.zipFileOrDirectory;
+import static org.rhq.core.util.file.FileUtil.purge;
public class DriftManager extends AgentService implements DriftAgentService, DriftClient, ContainerService {
@@ -127,6 +128,14 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
}
}
+ /**
+ * This method is provided as a test hook.
+ * @return The schedule queue
+ */
+ ScheduleQueue getSchedulesQueue() {
+ return schedulesQueue;
+ }
+
@Override
public void shutdown() {
driftThreadPool.shutdown();
@@ -211,7 +220,7 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
DriftDetectionSchedule schedule = schedulesQueue.remove(resourceId, driftConfiguration);
if (schedule == null) {
- log.warn("No schedule found in the queue for [resourceId:" + resourceId + ", driftConfigurationId:"
+ log.warn("No schedule found in the queue for [resourceId: " + resourceId + ", driftConfigurationId: "
+ driftConfiguration.getId() + ", driftConfigurationName: " + driftConfiguration.getName() + "]. No "
+ " work will be scheduled.");
return;
@@ -241,7 +250,24 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
}
@Override
- public void unscheduleDriftDetection(int resourceId, DriftConfiguration driftConfiguration) {
+ public void unscheduleDriftDetection(final int resourceId, final DriftConfiguration driftConfiguration) {
+ log.debug("Received request to unschedule drift detection for [resourceId:" + resourceId +
+ ", driftConfigurationId:" + driftConfiguration.getId() + ", driftConfigurationName: " +
+ driftConfiguration.getName() + "].");
+
+ DriftDetectionSchedule schedule = schedulesQueue.removeAndExecute(resourceId, driftConfiguration,
+ new Runnable() {
+ @Override
+ public void run() {
+ File resourceDir = new File(changeSetsDir, Integer.toString(resourceId));
+ File changeSetDir = new File(resourceDir, driftConfiguration.getName());
+ purge(changeSetDir, true);
+
+ log.debug("Removed change set directory " + changeSetDir.getAbsolutePath());
+ }
+ });
+
+ log.debug("Removed " + schedule + " from the schedule queue.");
}
@Override
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java
index 374e27e..36fc081 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueue.java
@@ -43,6 +43,17 @@ public interface ScheduleQueue {
boolean addSchedule(DriftDetectionSchedule schedule);
/**
+ * Checks the queue for a schedule with specified resource id and drift configuration
+ * whose name matches the specified configuration.
+ *
+ * @param resourceId The resource id of the schedule
+ * @param config The drift configuration of the schedule
+ * @return true if the queue contains a schedule with the specified resource id and a
+ * drift configuration whose name matches the name of the specified configuration.
+ */
+ boolean contains(int resourceId, DriftConfiguration config);
+
+ /**
* This method attempts to update the schedule identified by the resource id the and
* the drift configuration. More specifically, the schedule is identified by a
* combination of resource id and drift configuraiton name. If the schedule to be
@@ -72,6 +83,33 @@ public interface ScheduleQueue {
DriftDetectionSchedule remove(int resourceId, DriftConfiguration config);
/**
+ * Removes the schedule identified by the resource id and the drift configuration name.
+ * This method can remove either the active schedule or a schedule on the queue. When
+ * the schedule is in the queue, <code>task</code> is executed immediately after the
+ * schedule is removed from the queue. If the schedule is active, then <code>task</code>
+ * will be executed when the schedule is deactivated. If the schedule is not in the
+ * queue, that is it is neither the active schedule nor waiting in the queue, then
+ * <code>task</code>is never invoked and is discarded.
+ * <br/><br/>
+ * <code>task</code> will only be invoked once regardless of whether or the schedule is
+ * active or waiting in the queue.
+ * <br/><br/>
+ * The reason for accepting a task to execute upon removal of the schedule has to do
+ * with the active schedule. If a schedule is active, that means it is being processed
+ * by {@link DriftDetector}. The task may very well involve some clean up work that
+ * could interfere with {@link DriftDetector}. This approach ensures that the schedule
+ * is not in used before task is executed.
+ *
+ * @param resourceId The resource id
+ * @param config A {@link DriftConfiguration} belonging the resource with the specified id
+ * @param task A callback to perform any post-processing when the schedule is removed
+ * from the queue
+ * @return The {@link DriftDetectionSchedule} that is removed or null if no matching
+ * schedule is found.
+ */
+ DriftDetectionSchedule removeAndExecute(int resourceId, DriftConfiguration config, Runnable task);
+
+ /**
* Removes all elements from the queue and deactivates the active schedule.
*/
void clear();
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
index 26e2b1a..f944299 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
@@ -8,12 +8,20 @@ import org.rhq.core.domain.drift.DriftConfiguration;
public class ScheduleQueueImpl implements ScheduleQueue {
+ private static final Runnable NO_OP = new Runnable() {
+ @Override
+ public void run() {
+ }
+ };
+
private PriorityQueue<DriftDetectionSchedule> queue = new PriorityQueue<DriftDetectionSchedule>();
private ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
private DriftDetectionSchedule activeSchedule;
+ private Runnable deactivationTask;
+
@Override
public DriftDetectionSchedule getNextSchedule() {
try {
@@ -44,6 +52,9 @@ public class ScheduleQueueImpl implements ScheduleQueue {
public void deactivateSchedule() {
try {
lock.writeLock().lock();
+ if (deactivationTask != null) {
+ deactivationTask.run();
+ }
if (activeSchedule == null) {
return;
}
@@ -51,6 +62,7 @@ public class ScheduleQueueImpl implements ScheduleQueue {
queue.offer(activeSchedule);
activeSchedule = null;
} finally {
+ deactivationTask = null;
lock.writeLock().unlock();
}
}
@@ -68,10 +80,35 @@ public class ScheduleQueueImpl implements ScheduleQueue {
}
@Override
+ public boolean contains(int resourceId, DriftConfiguration config) {
+ if (isActiveSchedule(resourceId, config)) {
+ return true;
+ }
+ try {
+ lock.readLock().lock();
+ for (DriftDetectionSchedule schedule : queue) {
+ if (schedule.getResourceId() == resourceId &&
+ schedule.getDriftConfiguration().getName().equals(config.getName())) {
+ return true;
+ }
+ }
+ return false;
+ } finally {
+ lock.readLock().unlock();
+ }
+ }
+
+ @Override
public DriftDetectionSchedule remove(int resourceId, DriftConfiguration config) {
+ return removeAndExecute(resourceId, config, NO_OP);
+ }
+
+ @Override
+ public DriftDetectionSchedule removeAndExecute(int resourceId, DriftConfiguration config, Runnable task) {
try {
lock.writeLock().lock();
if (isActiveSchedule(resourceId, config)) {
+ deactivationTask = task;
DriftDetectionSchedule removedSchedule = activeSchedule;
activeSchedule = null;
return removedSchedule;
@@ -83,6 +120,7 @@ public class ScheduleQueueImpl implements ScheduleQueue {
if (schedule.getResourceId() == resourceId
&& schedule.getDriftConfiguration().getName().equals(config.getName())) {
iterator.remove();
+ task.run();
return schedule;
}
}
diff --git a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftManagerTest.java b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftManagerTest.java
index 13fe5ed..5a53ee6 100644
--- a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftManagerTest.java
+++ b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftManagerTest.java
@@ -27,11 +27,13 @@ import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import org.rhq.core.clientapi.server.drift.DriftServerService;
+import org.rhq.core.domain.drift.DriftConfiguration;
import org.rhq.core.pc.PluginContainerConfiguration;
import org.rhq.core.pc.ServerServices;
import static org.rhq.core.util.ZipUtil.unzipFile;
import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;
@@ -62,6 +64,11 @@ public class DriftManagerTest extends DriftTest {
driftMgr.setConfiguration(pcConfig);
}
+// @AfterMethod
+// public void shutDownDriftManager() {
+// driftMgr.shutdown();
+// }
+
@Test
public void writeContentZipFileToChangeSetContentDirectory() throws Exception {
String configName = "send-content-in-zip";
@@ -116,6 +123,54 @@ public class DriftManagerTest extends DriftTest {
assertThatDirectoryIsEmpty(contentDir);
}
+ @Test
+ public void unschedulingDetectionRemovesScheduleFromQueue() throws Exception {
+ DriftConfiguration config = driftConfiguration("remove-from-queue", resourceDir.getAbsolutePath());
+
+ driftMgr.scheduleDriftDetection(resourceId(), config);
+ driftMgr.scheduleDriftDetection(resourceId() + 5, driftConfiguration("another-config", "."));
+ driftMgr.unscheduleDriftDetection(resourceId(), config);
+
+ assertFalse(driftMgr.getSchedulesQueue().contains(resourceId(), config),
+ new DriftDetectionSchedule(resourceId(), config) + " should have been removed from the schedule queue");
+ }
+
+ @Test
+ public void unschedulingDetectionDeletesChangeSetDirectoryWhenScheduleIsNotActive() throws Exception {
+ DriftConfiguration config = driftConfiguration("delete-changeset-dir", resourceDir.getAbsolutePath());
+ File changeSetDir = changeSetDir(config.getName());
+ File contentDir = mkdir(changeSetDir, "content");
+
+ createRandomFile(contentDir, "my_content");
+ createRandomFile(changeSetDir, "changeset.txt");
+
+ driftMgr.scheduleDriftDetection(resourceId(), config);
+ driftMgr.unscheduleDriftDetection(resourceId(), config);
+
+ assertFalse(changeSetDir.exists(), "The change set directory should have been deleted.");
+ }
+
+ @Test
+ public void unschedulingDetectionDeletesChangeSetDirectoryWhenScheduleIsDeactivated() throws Exception {
+ DriftConfiguration config = driftConfiguration("delete-changeset-dir", resourceDir.getAbsolutePath());
+ File changeSetDir = changeSetDir(config.getName());
+ File contentDir = mkdir(changeSetDir, "content");
+
+ createRandomFile(contentDir, "my_content");
+ createRandomFile(changeSetDir, "changeset.txt");
+
+ driftMgr.scheduleDriftDetection(resourceId(), config);
+ driftMgr.getSchedulesQueue().getNextSchedule();
+ driftMgr.unscheduleDriftDetection(resourceId(), config);
+
+ assertTrue(changeSetDir.exists(), "The change set directory should not be deleted while the schedule is " +
+ "still active.");
+
+ driftMgr.getSchedulesQueue().deactivateSchedule();
+ assertFalse(changeSetDir.exists(), "The change set directory should have been deleted after the schedule is " +
+ "deactivated.");
+ }
+
/**
* This method first verifies that each of the expected files is contained in the the
* zip file. Then it verifies that the content for each file in the zip file matches
commit 2c2b08d85b713ad9ff1ff19bf7d689fc8e0b5552
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Wed Aug 24 18:37:56 2011 -0400
Remove dead class for old resource [group] search bar
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/menu/SearchBarPane.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/menu/SearchBarPane.java
deleted file mode 100644
index 6b6c703..0000000
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/menu/SearchBarPane.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2010 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.enterprise.gui.coregui.client.menu;
-
-import static org.rhq.enterprise.gui.coregui.client.inventory.groups.ResourceGroupDataSourceField.CATEGORY;
-import static org.rhq.enterprise.gui.coregui.client.inventory.groups.ResourceGroupDataSourceField.DESCRIPTION;
-import static org.rhq.enterprise.gui.coregui.client.inventory.groups.ResourceGroupDataSourceField.NAME;
-import static org.rhq.enterprise.gui.coregui.client.inventory.groups.ResourceGroupDataSourceField.PLUGIN;
-import static org.rhq.enterprise.gui.coregui.client.inventory.groups.ResourceGroupDataSourceField.TYPE;
-
-import com.google.gwt.user.client.History;
-import com.smartgwt.client.types.Alignment;
-import com.smartgwt.client.types.TextMatchStyle;
-import com.smartgwt.client.widgets.Window;
-import com.smartgwt.client.widgets.form.DynamicForm;
-import com.smartgwt.client.widgets.form.FormItemIfFunction;
-import com.smartgwt.client.widgets.form.fields.ButtonItem;
-import com.smartgwt.client.widgets.form.fields.ComboBoxItem;
-import com.smartgwt.client.widgets.form.fields.FormItem;
-import com.smartgwt.client.widgets.form.fields.SelectItem;
-import com.smartgwt.client.widgets.form.fields.SpacerItem;
-import com.smartgwt.client.widgets.form.fields.events.ChangedEvent;
-import com.smartgwt.client.widgets.form.fields.events.ChangedHandler;
-import com.smartgwt.client.widgets.grid.ListGridField;
-
-import org.rhq.enterprise.gui.coregui.client.LinkManager;
-import org.rhq.enterprise.gui.coregui.client.inventory.groups.ResourceGroupsDataSource;
-import org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceDataSourceField;
-import org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceDatasource;
-import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableDynamicForm;
-import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableHLayout;
-
-/**
- * The search bar, which provides the ability to search for Resources or Resource groups.
- *
- * @author Greg Hinkle
- * @author Joseph Marques
- */
-public class SearchBarPane extends LocatableHLayout {
-
- public SearchBarPane(String locatorId) {
- super(locatorId);
-
- setWidth100();
- setHeight(30);
- }
-
- public enum SearchType {
- RESOURCE(MSG.view_searchBar_resources()), //
- GROUP(MSG.view_searchBar_resourceGroups());
-
- private String displayName;
-
- private SearchType(String displayName) {
- this.displayName = displayName;
- }
-
- public String getDisplayName() {
- return displayName;
- }
-
- public static String[] getValueMap() {
- SearchType[] searchTypes = SearchType.values();
- String[] results = new String[searchTypes.length];
- int i = 0;
- for (SearchType nextType : searchTypes) {
- results[i++] = nextType.getDisplayName();
- }
- return results;
- }
- }
-
- @Override
- protected void onDraw() {
- super.onDraw();
-
- final DynamicForm form = new LocatableDynamicForm(this.getLocatorId());
- form.setNumCols(6);
- form.setColWidths("120", "140", "400");
-
- final SelectItem searchType = new SelectItem("searchType", MSG.common_title_search());
- String[] valueMap = SearchType.getValueMap();
- searchType.setValueMap(valueMap);
- searchType.setValue(valueMap[0]);
- searchType.setWidth(120);
- searchType.addChangedHandler(new ChangedHandler() {
- @Override
- public void onChanged(ChangedEvent event) {
- markForRedraw();
- }
- });
-
- ComboBoxItem resourceSearch = getResourceComboBox();
- ComboBoxItem groupSearch = getGroupComboBox();
-
- ButtonItem search = new ButtonItem("Search", MSG.common_button_search());
- search.setStartRow(false);
- search.setEndRow(false);
- search.setShowTitle(false);
- search.setIcon(Window.getImgURL("[SKIN]/actions/view.png"));
-
- form.setItems(searchType, resourceSearch, groupSearch, search, new SpacerItem());
-
- addMember(form);
- }
-
- private ComboBoxItem getResourceComboBox() {
- final ComboBoxItem comboBox = getBaseComboBox(SearchType.RESOURCE);
-
- ListGridField nameField = ResourceDataSourceField.NAME.getListGridField(250);
- ListGridField descriptionField = ResourceDataSourceField.DESCRIPTION.getListGridField();
- ListGridField typeNameField = ResourceDataSourceField.TYPE.getListGridField(130);
- ListGridField pluginNameField = ResourceDataSourceField.PLUGIN.getListGridField(100);
- ListGridField categoryField = ResourceDataSourceField.CATEGORY.getListGridField(60);
- ListGridField availabilityField = ResourceDataSourceField.AVAILABILITY.getListGridField(55);
- availabilityField.setAlign(Alignment.CENTER);
-
- comboBox.setPickListFields(nameField, descriptionField, typeNameField, pluginNameField, categoryField,
- availabilityField);
-
- comboBox.setValueField("id");
- comboBox.setDisplayField(ResourceDataSourceField.NAME.propertyName());
- comboBox.setOptionDataSource(new ResourceDatasource());
-
- return comboBox;
- }
-
- private ComboBoxItem getGroupComboBox() {
- final ComboBoxItem comboBox = getBaseComboBox(SearchType.GROUP);
-
- ListGridField nameField = NAME.getListGridField(250);
- ListGridField descriptionField = DESCRIPTION.getListGridField();
- ListGridField typeNameField = TYPE.getListGridField(130);
- ListGridField pluginNameField = PLUGIN.getListGridField(100);
- ListGridField categoryField = CATEGORY.getListGridField(105);
-
- comboBox.setPickListFields(nameField, descriptionField, typeNameField, pluginNameField, categoryField);
-
- comboBox.setValueField("id");
- comboBox.setDisplayField(NAME.propertyName());
- comboBox.setOptionDataSource(new ResourceGroupsDataSource());
-
- return comboBox;
- }
-
- private ComboBoxItem getBaseComboBox(final SearchType searchType) {
- final ComboBoxItem comboBox = new ComboBoxItem("query", MSG.view_searchBar_query());
- comboBox.setWidth(400);
- comboBox.setShowTitle(false);
- comboBox.setHint(MSG.common_title_search().toLowerCase());
- comboBox.setShowHintInField(true);
-
- comboBox.setPickListWidth(800);
- comboBox.setTextMatchStyle(TextMatchStyle.SUBSTRING);
- comboBox.setCompleteOnTab(true);
-
- comboBox.addChangedHandler(new ChangedHandler() {
- public void onChanged(ChangedEvent changedEvent) {
- com.allen_sauer.gwt.log.client.Log.debug("ChangedEvent: " + changedEvent.getValue());
-
- Object intermediate = changedEvent.getValue();
- if (!(intermediate instanceof Integer)) {
- return;
- }
-
- Integer id = (Integer) changedEvent.getValue();
- comboBox.setValue("");
-
- String link;
- if (searchType == SearchType.RESOURCE) {
- link = LinkManager.getResourceLink(id);
- } else if (searchType == SearchType.GROUP) {
- link = LinkManager.getResourceGroupLink(id);
- } else {
- throw new IllegalArgumentException("There is no global search type for " + searchType);
- }
-
- if (!link.contains("#")) {
- com.google.gwt.user.client.Window.Location.assign(link);
- } else {
- History.newItem(link.substring(1));
- }
- }
- });
-
- comboBox.setShowIfCondition(new FormItemIfFunction() {
- public boolean execute(FormItem formItem, Object o, DynamicForm dynamicForm) {
- String value = dynamicForm.getValueAsString("searchType");
- return (null != value && value.equals(searchType.getDisplayName()));
- }
- });
-
- return comboBox;
- }
-
-}
commit 2074f8fdd5ae0310cc171552a4d0a82a56ddef7c
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Wed Aug 24 18:37:19 2011 -0400
Search Bar work [BZ 695889]
More to do but the search bar is getting more usable:
- A lot of css tweaks to get sizings such that the saved search
name text box and label are shown correctly.
- Fixes to saved search CRUD, simplify certain things
- Add I18N, this stuff still used string literals
- remove some unused widgets still being built/used but not useful
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java
index 7ec3956..12df81d 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/FlexSearchBar.java
@@ -103,7 +103,6 @@ public class FlexSearchBar extends AbstractSearchBar {
HorizontalPanel sbc_sbbgc_sbcc_sbcrhs_aic;
HorizontalPanel sbc_sbbgc_sbcc_sbcrhs_sic;
HorizontalPanel sbc_sbbgc_sbcc_sbcrhs_pnfc;
- HorizontalPanel sbc_sbbgc_sbcc_sbcrhs;
HorizontalPanel sbc_sbbgc_sbcc_sbcrhs_pnlc;
HorizontalPanel sbc_sbbc;
HorizontalPanel sbc_pfsc;
@@ -142,18 +141,16 @@ public class FlexSearchBar extends AbstractSearchBar {
sbc_sbbgc_sbcc_sbclhs_pfc = createHPanel(sbc_sbbgc_sbcc, "searchBarComponentLHS", "patternFieldContainer");
sbc_sbbgc_sbcc_sbcrhs_aic = createHPanel(sbc_sbbgc_sbcc, "searchBarComponentRHS", "arrowImageContainer");
sbc_sbbgc_sbcc_sbcrhs_sic = createHPanel(sbc_sbbgc_sbcc, "searchBarComponentRHS", "starImageContainer");
- sbc_sbbgc_sbcc_sbcrhs_pnfc = createHPanel(sbc_sbbgc_sbcc, "searchBarComponentRHS", "starImageContainer");
- sbc_sbbgc_sbcc_sbcrhs = createHPanel(sbc_sbbgc_sbcc, "searchBarComponentRHS", null);
- sbc_sbbgc_sbcc_sbcrhs_pnlc = createHPanel(sbc_sbbgc_sbcc_sbcrhs, "rounded", "patternNameLabelContainer");
- sbc_sbbc = createHPanel(sbc, "searchBarButtonContainer", "searchButtonContainer");
+ sbc_sbbgc_sbcc_sbcrhs_pnfc = createHPanel(sbc_sbbgc_sbcc, "searchBarComponentRHS", "patternNameFieldContainer");
+ sbc_sbbgc_sbcc_sbcrhs_pnlc = createHPanel(sbc_sbbgc_sbcc, "searchBarComponentRHS", "patternNameLabelContainer");
sbc_pfsc = createHPanel(sbc, null, "patternFieldSuggestionsContainer");
sbc_ssc = createHPanel(sbc, null, "savedSearchesContainer");
sbc_sbbgc_sbcc_sbclhs_pfc.add(autoCompletePatternField);
- sbc_sbbgc_sbcc_sbcrhs_pnfc.add(patternNameField);
- sbc_sbbgc_sbcc_sbcrhs_pnlc.add(patternNameLabel);
sbc_sbbgc_sbcc_sbcrhs_sic.add(starImage);
sbc_sbbgc_sbcc_sbcrhs_aic.add(arrowImage);
+ sbc_sbbgc_sbcc_sbcrhs_pnfc.add(patternNameField);
+ sbc_sbbgc_sbcc_sbcrhs_pnlc.add(patternNameLabel);
sbc_ssc.add(savedSearchesPanel);
initWidget(sbc);
@@ -173,7 +170,8 @@ public class FlexSearchBar extends AbstractSearchBar {
Integer savedSearchId = Integer.valueOf(getDefaultSavedSearchPatternId());
activateSavedSearch(savedSearchId);
} catch (Exception e) {
- this.autoCompletePatternField.setText(MSG.view_searchBar_error_selectSavedSearch());
+ this.autoCompletePatternField.setText(MSG
+ .view_searchBar_savedSearch_failFind(getDefaultSavedSearchPatternId()));
}
}
}
@@ -252,7 +250,7 @@ public class FlexSearchBar extends AbstractSearchBar {
savedSearchesGrid.addStyleName("savedSearchesPanel");
// panel position will be re-calculated on down-arrow click
- savedSearchesPanel.show();
+ //savedSearchesPanel.show();
savedSearchesPanel.hide();
SavedSearchesEventHandler handler = new SavedSearchesEventHandler();
@@ -270,20 +268,7 @@ public class FlexSearchBar extends AbstractSearchBar {
arrowImage.setVisible(true);
patternNameField.setVisible(false);
- if (name.equals("")) {
- GWTServiceLookup.getSearchService().deleteSavedSearch(currentSearchId, new AsyncCallback<Void>() {
- @Override
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Saved search removal failed", caught);
- }
-
- @Override
- public void onSuccess(Void result) {
- CoreGUI.getMessageCenter().notify(new Message("Removed saved search successfully", Severity.Info));
- currentSearchId = 0;
- }
- });
-
+ if ("".equals(name)) {
starImage.setUrl(STAR_OFF_URL);
} else {
// NOTE: currently do not support updated a saved search pattern
@@ -293,9 +278,11 @@ public class FlexSearchBar extends AbstractSearchBar {
} else if (nameJustUpdated) {
updateSavedSearchName(currentSearchId, name);
}
+
+ starImage.setUrl(STAR_ON_URL);
patternNameLabel.setText(elipse(name));
patternNameLabel.setVisible(true);
- starImage.setUrl(STAR_ON_URL);
+ autoCompletePatternField.setFocus(true);
}
}
@@ -308,7 +295,7 @@ public class FlexSearchBar extends AbstractSearchBar {
private String elipse(String data) {
if (data.length() > 14) {
- return data.substring(0, 14) + "...";
+ return data.substring(0, 20) + "...";
}
return data;
}
@@ -319,13 +306,14 @@ public class FlexSearchBar extends AbstractSearchBar {
GWTServiceLookup.getSearchService().createSavedSearch(newSavedSearch, new AsyncCallback<Integer>() {
@Override
public void onSuccess(Integer newSavedSearchId) {
- CoreGUI.getMessageCenter().notify(new Message("Saved search created successfully", Severity.Info));
+ CoreGUI.getMessageCenter()
+ .notify(new Message(MSG.view_searchBar_savedSearch_save(name), Severity.Info));
currentSearchId = newSavedSearchId;
}
@Override
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Saved search creation failed", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_searchBar_savedSearch_failSave(name), caught);
}
});
}
@@ -335,13 +323,14 @@ public class FlexSearchBar extends AbstractSearchBar {
@Override
public void onSuccess(Boolean hadUpdates) {
if (hadUpdates) {
- CoreGUI.getMessageCenter().notify(new Message("Saved search successfully renamed", Severity.Info));
+ CoreGUI.getMessageCenter().notify(
+ new Message(MSG.view_searchBar_savedSearch_rename(newName), Severity.Info));
}
}
@Override
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Saved search rename failed", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_searchBar_savedSearch_failRename(newName), caught);
}
});
}
@@ -423,35 +412,30 @@ public class FlexSearchBar extends AbstractSearchBar {
return;
}
+ // note - since hover changes off to active, we never have the star off case here
if (starImage.getUrl().endsWith(STAR_ACTIVE_URL)) {
- patternNameField.setText(DEFAULT_PATTERN_NAME);
- patternNameField.setVisible(true);
- patternNameField.selectAll();
- patternNameField.setFocus(true);
- patternNameLabel.setVisible(false);
+ if (patternNameField.isVisible()) {
+ patternNameField.setVisible(false);
+
+ } else {
+ patternNameField.setText(DEFAULT_PATTERN_NAME);
+ patternNameField.setVisible(true);
+ patternNameField.selectAll();
+ patternNameField.setFocus(true);
+ patternNameLabel.setVisible(false);
+
+ }
} else if (starImage.getUrl().endsWith(STAR_ON_URL)) {
starImage.setUrl(STAR_ACTIVE_URL);
patternNameField.setVisible(false);
patternNameLabel.setVisible(false);
- GWTServiceLookup.getSearchService().deleteSavedSearch(currentSearchId, new AsyncCallback<Void>() {
- @Override
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Saved search deletion failure", caught);
- }
-
- @Override
- public void onSuccess(Void result) {
- CoreGUI.getMessageCenter().notify(new Message("Saved search deletion success", Severity.Info));
- currentSearchId = 0;
- }
- });
}
}
public void onMouseOver(MouseOverEvent event) {
- if (starImage.getUrl().endsWith(STAR_OFF_URL)) {
- starImage.setUrl(STAR_ACTIVE_URL);
+ if (starImage.getUrl().endsWith(STAR_OFF_URL) && !"".equals(getValue().trim())) {
+ starImage.setUrl(STAR_ACTIVE_URL);
}
}
@@ -494,11 +478,13 @@ public class FlexSearchBar extends AbstractSearchBar {
GWTServiceLookup.getSearchService().deleteSavedSearch(savedSearch.getId(), new AsyncCallback<Void>() {
@Override
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Saved search deletion failure", caught);
+ CoreGUI.getErrorHandler().handleError(
+ MSG.view_searchBar_savedSearch_failDelete(savedSearch.getName()), caught);
}
@Override
public void onSuccess(Void result) {
+ // handle deletion of current saved search
if (currentSearchId == savedSearch.getId()) {
currentSearchId = 0;
patternNameField.setValue("", true);
@@ -510,11 +496,15 @@ public class FlexSearchBar extends AbstractSearchBar {
savedSearchesPanel.hide();
}
- // is user deleting the one and only element in the list?
+ // handle deletion of the one and only element in the list
if (savedSearchesGrid.size() == 1) {
savedSearchesPanel.hide();
}
+
savedSearchesGrid.removeRow(rowIndex);
+
+ CoreGUI.getMessageCenter().notify(
+ new Message(MSG.view_searchBar_savedSearch_delete(savedSearch.getName()), Severity.Info));
}
});
} else {
@@ -543,21 +533,16 @@ public class FlexSearchBar extends AbstractSearchBar {
new AsyncCallback<List<SavedSearch>>() {
@Override
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failure to select saved search", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_searchBar_savedSearch_failFind(savedSearchName),
+ caught);
}
@Override
public void onSuccess(List<SavedSearch> results) {
if (results.size() == 0) {
CoreGUI.getMessageCenter().notify(
- new Message("Could not find saved search with name [" + savedSearchName + "]",
- Severity.Error));
+ new Message(MSG.view_searchBar_savedSearch_failFind(savedSearchName), Severity.Error));
} else {
- if (results.size() > 1) {
- CoreGUI.getMessageCenter().notify(
- new Message("Found multiple saves searched with name [" + savedSearchName
- + "], loaded the first one", Severity.Warning));
- }
SavedSearch savedSearch = results.get(0);
activateSavedSearch(savedSearch);
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/SearchBar.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/SearchBar.java
index 007f908..8e9b7b3 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/SearchBar.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/SearchBar.java
@@ -194,7 +194,8 @@ public class SearchBar extends AbstractSearchBar {
Integer savedSearchId = Integer.valueOf(defaultSavedSearchPatternId);
activateSavedSearch(savedSearchId);
} catch (Exception e) {
- this.autoCompletePatternField.setText(MSG.view_searchBar_error_selectSavedSearch());
+ this.autoCompletePatternField.setText(MSG
+ .view_searchBar_savedSearch_failFind(defaultSavedSearchPatternId));
click(searchButton); // execute the search, which will help to further highlight the error
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SearchGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SearchGWTServiceImpl.java
index fac1c35..6c8ce1b 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SearchGWTServiceImpl.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SearchGWTServiceImpl.java
@@ -24,7 +24,6 @@ import org.rhq.core.domain.criteria.SavedSearchCriteria;
import org.rhq.core.domain.search.SavedSearch;
import org.rhq.core.domain.search.SearchSubsystem;
import org.rhq.core.domain.search.SearchSuggestion;
-import org.rhq.core.util.exception.ThrowableUtil;
import org.rhq.enterprise.gui.coregui.client.gwt.SearchGWTService;
import org.rhq.enterprise.gui.coregui.server.util.SerialUtility;
import org.rhq.enterprise.server.search.SavedSearchManagerLocal;
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 2c97890..4362b8f 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
@@ -1623,11 +1623,13 @@ view_resource_monitor_table_min = Minimum
view_resource_title_component_errors_tooltip = Shows managed component errors. Click for details
view_resource_title_tagUpdateFailed = Failed to update resource tags
view_searchBar_defaultPattern = name your pattern
-view_searchBar_error_selectSavedSearch = ''Error selecting saved search''
-view_searchBar_query = Query
-view_searchBar_resourceGroups = Resource Groups
-view_searchBar_resources = Resources
-view_searchBar_welcomeMessage = search for {0}s
+view_searchBar_savedSearch_delete = Successfully deleted saved search [{0}]
+view_searchBar_savedSearch_failDelete = Failed to delete saved search with name [{0}]
+view_searchBar_savedSearch_failFind = Failed to find saved search with name [{0}]
+view_searchBar_savedSearch_failRename = Failed to rename saved search with name [{0}]
+view_searchBar_savedSearch_failSave = Failed to create saved search with name [{0}]
+view_searchBar_savedSearch_rename = Successfully renamed saved search to [{0}]
+view_searchBar_savedSearch_save = Successfully created saved search [{0}]
view_searchGUI_loginStatus = Unable to determine login status, check server status
view_selector_assigned = Assigned {0}
view_selector_available = Available {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
index 8710e11..581c8cb 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
@@ -1349,11 +1349,13 @@ view_resource_monitor_table_min = Minimum
view_resource_title_component_errors_tooltip = Zeigt Fehler der gemanagten Ressource. Klicken für Details
view_resource_title_tagUpdateFailed = Fehler beim Aktualisieren der Ressourcen-Tags
view_searchBar_defaultPattern = name your pattern~
-view_searchBar_error_selectSavedSearch = ''Error selecting saved search''~
-view_searchBar_query = Query~
-view_searchBar_resourceGroups = Ressource-Gruppen
-view_searchBar_resources = Ressourcen
-view_searchBar_welcomeMessage = search for {0}s~
+##view_searchBar_savedSearch_delete = Successfully deleted saved search [{0}]
+##view_searchBar_savedSearch_failDelete = Failed to delete saved search with name [{0}]
+##view_searchBar_savedSearch_failFind = Failed to find saved search with name [{0}]
+##view_searchBar_savedSearch_failRename = Failed to rename saved search with name [{0}]
+##view_searchBar_savedSearch_failSave = Failed to create saved search with name [{0}]
+##view_searchBar_savedSearch_rename = Successfully renamed saved search to [{0}]
+##view_searchBar_savedSearch_save = Successfully created saved search [{0}]
view_searchGUI_loginStatus = Unable to determine login status, check server status~
view_selector_assigned = Zugewiesen {0}
view_selector_available = Verfügbar {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
index 907f6f2..67762d3 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
@@ -1590,11 +1590,13 @@ view_resource_monitor_table_min = 最小
view_resource_title_component_errors_tooltip = 管理コンポーネントエラーの表示。詳細はクリックしてください
view_resource_title_tagUpdateFailed = リソースタグの更新に失敗しました
view_searchBar_defaultPattern = パターンを名前を付けてください
-view_searchBar_error_selectSavedSearch = ''保存された検索の選択中のエラー''
-view_searchBar_query = 問い合わせ
-view_searchBar_resourceGroups = リソースグループ
-view_searchBar_resources = リソース
-view_searchBar_welcomeMessage = {0} のための検索
+##view_searchBar_savedSearch_delete = Successfully deleted saved search [{0}]
+##view_searchBar_savedSearch_failDelete = Failed to delete saved search with name [{0}]
+##view_searchBar_savedSearch_failFind = Failed to find saved search with name [{0}]
+##view_searchBar_savedSearch_failRename = Failed to rename saved search with name [{0}]
+##view_searchBar_savedSearch_failSave = Failed to create saved search with name [{0}]
+##view_searchBar_savedSearch_rename = Successfully renamed saved search to [{0}]
+##view_searchBar_savedSearch_save = Successfully created saved search [{0}]
view_searchGUI_loginStatus = ログインステータスが確定できません。サーバーの状態を調べてください
view_selector_assigned = 割り当てられた {0}
view_selector_available = 利用可能な {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
index f8e28da..27312f7 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
@@ -1728,11 +1728,13 @@ view_resource_monitor_table_min = Minimum
view_resource_title_component_errors_tooltip = Shows managed component errors. Click for details
view_resource_title_tagUpdateFailed = Failed to update resource tags
view_searchBar_defaultPattern = definir nome para o padr\u00E3o
-view_searchBar_error_selectSavedSearch = ''Erro ao selecionar a pesquisa''
-view_searchBar_query = Pesquisa
-view_searchBar_resourceGroups = Grupos de Recursos
-view_searchBar_resources = Recursos
-view_searchBar_welcomeMessage = procurar por {0}s
+##view_searchBar_savedSearch_delete = Successfully deleted saved search [{0}]
+##view_searchBar_savedSearch_failDelete = Failed to delete saved search with name [{0}]
+##view_searchBar_savedSearch_failFind = Failed to find saved search with name [{0}]
+##view_searchBar_savedSearch_failRename = Failed to rename saved search with name [{0}]
+##view_searchBar_savedSearch_failSave = Failed to create saved search with name [{0}]
+##view_searchBar_savedSearch_rename = Successfully renamed saved search to [{0}]
+##view_searchBar_savedSearch_save = Successfully created saved search [{0}]
view_searchGUI_loginStatus = Imposs\u00EDvel determinar o status do login, verifique o status do servidor
view_selector_assigned = Associado {0}
view_selector_available = Dispon\u00EDvel {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
index afd099e..9b9fab0 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
@@ -1598,11 +1598,13 @@ view_resource_monitor_table_min = \u6700\u5c0f
view_resource_title_component_errors_tooltip = \u663e\u793a\u88ab\u7ba1\u7ec4\u4ef6\u9519\u8bef.\u5355\u51fb\u67e5\u770b\u8be6\u60c5
view_resource_title_tagUpdateFailed = \u66f4\u65b0\u8d44\u6e90\u6807\u7b7e\u5931\u8d25
view_searchBar_defaultPattern = \u5b9a\u4e49\u81ea\u5df1\u7684\u6837\u5f0f
-view_searchBar_error_selectSavedSearch = ''\u9009\u62e9\u4fdd\u5b58\u7684\u641c\u7d22\u65f6\u51fa\u9519''
-view_searchBar_query = \u67e5\u8be2
-view_searchBar_resourceGroups = \u8d44\u6e90\u7ec4
-view_searchBar_resources = \u8d44\u6e90
-view_searchBar_welcomeMessage = \u641c\u7d22\u4e86{0}\u79d2
+##view_searchBar_savedSearch_delete = Successfully deleted saved search [{0}]
+##view_searchBar_savedSearch_failDelete = Failed to delete saved search with name [{0}]
+##view_searchBar_savedSearch_failFind = Failed to find saved search with name [{0}]
+##view_searchBar_savedSearch_failRename = Failed to rename saved search with name [{0}]
+##view_searchBar_savedSearch_failSave = Failed to create saved search with name [{0}]
+##view_searchBar_savedSearch_rename = Successfully renamed saved search to [{0}]
+##view_searchBar_savedSearch_save = Successfully created saved search [{0}]
view_searchGUI_loginStatus = \u65e0\u6cd5\u786e\u5b9a\u767b\u5f55\u72b6\u6001\uff0c\u8bf7\u68c0\u67e5\u670d\u52a1
view_selector_assigned = \u6307\u5b9a\u7684 {0}
view_selector_available = \u53ef\u7528\u7684 {0}
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/css/search.css b/modules/enterprise/gui/coregui/src/main/webapp/css/search.css
index 45b13f3..f4c8390 100644
--- a/modules/enterprise/gui/coregui/src/main/webapp/css/search.css
+++ b/modules/enterprise/gui/coregui/src/main/webapp/css/search.css
@@ -8,58 +8,12 @@ div {
margin-left: auto;
}
-.searchButton {
- display: block;
- font-size: 13px;
- white-space: nowrap;
-}
-
-
-/*
- *
- * pattern field items
- *
- */
-
-.patternField {
- font-size: 13px;
- font-family: arial, sans-serif;
- width: 675px;
- padding: 0;
- margin: 0;
- border-color: white;
- border-style: none;
- outline: none;
- z-index: 999999;
-}
-
-.patternNameLabel {
- background-color: rgb(192, 236, 207);
- color: rgb(51, 106, 63);
- font-weight: bold;
- white-space: nowrap;
- text-align: center;
- border-style: none;
- font-size: 11px;
- width: 125px;
- z-index: 999999;
-}
-
-.patternNameField {
- font-size: 11px;
- color: green;
- width: 125px;
- white-space: no-wrap;
- border-color: gray;
- border-style: dotted;
- border-width: thin;
- outline: none;
- z-index: 999999;
-}
-
-
/*
+ *
* search container elements
+ * searchBarContainer width is the total width of the search bar.
+ * searchBarBackgroundContainer is the available width for the components inside (takes into consideration RHS padding)
+ *
*/
.searchBarContainer {
@@ -93,22 +47,68 @@ div {
.searchBarComponentLHS {
background-color: white;
float: left;
- width: 200px;
+ /* width: 200px; */
}
.searchBarComponentRHS {
background-color: white;
float: right;
- padding-right: 5px;
+ padding-right: 4px;
padding-top: 2px;
}
-.searchBarButtonContainer {
- float: right;
- padding: 5px 5px 0 0;
+
+/*
+ *
+ * pattern field items
+ * patternField is the current pattern, its width is the max visible portion
+ * patternNameField is the the edit box when naming a saved search, its width is the max visible portion (less the border)
+ * patternNameLabel is for displaying the saved search name when a saved search is selected
+ *
+ * - the combined width of patternField + patternNameField + all other RHS components (the star and
+ * arrow images) must equal the width of searchBarBackgroundContainer in order for everything to be seen when
+ * patternNameField (or patternNameLabel) are being shown.
+ * - the width of patternNameField and patternNameLabel must be the same.
+ *
+ */
+
+.patternField {
+ font-size: 13px;
+ font-family: arial, sans-serif;
+ width: 600px;
+ padding: 0;
margin: 0;
+ border-color: white;
+ border-style: none;
+ outline: none;
+ z-index: 999999;
+}
+
+.patternNameField {
+ font-size: 11px;
+ color: green;
+ width: 150px;
+ white-space: no-wrap;
+ border-color: gray;
+ border-style: dotted;
+ border-width: thin;
+ outline: none;
+ z-index: 999999;
+}
+
+.patternNameLabel {
+ background-color: rgb(192, 236, 207);
+ color: rgb(51, 106, 63);
+ font-weight: bold;
+ white-space: nowrap;
+ text-align: left;
+ border-style: none;
+ font-size: 11px;
+ width: 150px;
+ z-index: 999999;
}
+
/*
*
* saved search items
@@ -153,7 +153,7 @@ div {
}
.savedSearchesPanel-top {
- color: green;
+ font-size: 12px;
position: relative;
padding: 0;
margin: 0;
@@ -161,7 +161,7 @@ div {
}
.savedSearchesPanel-bottom {
- font-size: 16px;
+ color: green;
position: relative;
padding: 0;
margin: 0;
@@ -172,6 +172,7 @@ div {
/*
*
* suggest items
+ * suggestPanel spans the width of the container, all of the relevant widths must equal that of .searchBarBackgroundContainer
*
*/
@@ -216,13 +217,15 @@ div {
/*
* Rounded Corners
* http://articles.sitepoint.com/article/rounded-corners-css-javascript
+ *
+ * Applied to the patternNameLabel, so the width should be set the same
*/
div.rounded {
/* just a container for rounded2 div replacement algorithm */
}
div.rounded2 {
- width: 125px;
+ width: 150px;
z-index: 999999;
background: rgb(192, 236, 207) url(/coregui/images/search/corner-upper-right-8.png) no-repeat top right;
}
commit 0d9d7a77a9fd4d492e6868011f047e17241b7840
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Aug 24 17:36:22 2011 -0400
go to the child history page when link is clicked
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventCreateDeleteChildJSON.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventCreateDeleteChildJSON.jsp
index c72cc59..c1d3df5 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventCreateDeleteChildJSON.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventCreateDeleteChildJSON.jsp
@@ -58,7 +58,7 @@
icon = "/images/icn_create_child.png"; // TODO
}
- String link = "/coregui/CoreGUI.html#Resource/" + resourceId ;
+ String link = "/coregui/CoreGUI.html#Resource/" + resourceId + "/Inventory/ChildHistory";
%>
@@ -95,7 +95,7 @@
icon = "/images/icn_delete_child.png"; // TODO
}
- String link = "/coregui/CoreGUI.html#Resource/" + resourceId ;
+ String link = "/coregui/CoreGUI.html#Resource/" + resourceId + "/Inventory/ChildHistory";
%>
{ "start" : "<%=sdf.format(entry.getCreatedTime())%>",
commit 4f844d0b711924e5be7fe438a64146317efc3e3d
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Aug 24 17:27:40 2011 -0400
remove the extra Condition line. we need a better utility to string-i-fy the alert, but for now, just use name and value
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventAlertJSON.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventAlertJSON.jsp
index f4b9194..978c62e 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventAlertJSON.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventAlertJSON.jsp
@@ -58,7 +58,6 @@
StringBuilder buf = new StringBuilder();
for (AlertConditionLog log : alert.getConditionLogs()) {
buf.append("<b>Condition:</b>" + log.getCondition().getName() + "<br/>");
- buf.append("<b>Condition:</b>" + log.getCondition().getThreshold() + "<br/>");
buf.append("<b>Value:</b>" + log.getValue() + "</b>");
}
commit 53da278317ccf5c148286ad2ab7db903684c0ad2
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Aug 24 16:28:06 2011 -0400
while working on BZ 713750 - put the controls at the top and use the GWT time range editor. fix the bug where clicking a check box in a control duplicates the filters (that's what the jsp's removeAllChildren is about)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index f97d6a8..b6aa0fb 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -71,6 +71,7 @@ import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.monitorin
import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.operation.history.ResourceOperationHistoryListView;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.operation.schedule.ResourceOperationScheduleListView;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.summary.ActivityView;
+import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.summary.TimelineView;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository;
import org.rhq.enterprise.gui.coregui.client.util.message.Message;
@@ -315,8 +316,7 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
updateSubTab(this.summaryTab, this.summaryTimeline, true, true, new ViewFactory() {
@Override
public Canvas createView() {
- return new FullHTMLPane(summaryTimeline.extendLocatorId("View"),
- "/rhq/resource/summary/timeline-plain.xhtml?id=" + resource.getId());
+ return new TimelineView(summaryTimeline.extendLocatorId("View"), resourceComposite);
}
});
}
@@ -606,7 +606,7 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
new AsyncCallback<PageList<ResourceComposite>>() {
public void onFailure(Throwable caught) {
Message message = new Message(MSG.view_inventory_resource_loadFailed(String.valueOf(resourceId)),
- Message.Severity.Warning);
+ Message.Severity.Warning);
CoreGUI.goToView(InventoryView.VIEW_ID.getName(), message);
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/summary/TimelineView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/summary/TimelineView.java
new file mode 100644
index 0000000..eff1281
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/summary/TimelineView.java
@@ -0,0 +1,66 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+package org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.summary;
+
+import org.rhq.core.domain.resource.composite.ResourceComposite;
+import org.rhq.enterprise.gui.coregui.client.components.FullHTMLPane;
+import org.rhq.enterprise.gui.coregui.client.components.measurement.UserPreferencesMeasurementRangeEditor;
+import org.rhq.enterprise.gui.coregui.client.components.view.ViewName;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
+
+/**
+ * @author John Mazzitelli
+ */
+public class TimelineView extends LocatableVLayout {
+ public static final ViewName VIEW_ID = new ViewName("ResourceTimeline", MSG.view_tabs_common_timeline());
+
+ private final ResourceComposite resourceComposite;
+
+ public TimelineView(String locatorId, ResourceComposite resourceComposite) {
+ super(locatorId);
+ this.resourceComposite = resourceComposite;
+
+ setMargin(10);
+ setMembersMargin(1);
+ }
+
+ @Override
+ protected void onDraw() {
+ final FullHTMLPane timelinePane = new FullHTMLPane(extendLocatorId("Timeline"),
+ "/resource/common/monitor/events/EventsView.jsp?id=" + resourceComposite.getResource().getId());
+
+ // we create a simple subclass because we need to know when a new range has been set in order to refresh the timeline
+ class RangeEditor extends UserPreferencesMeasurementRangeEditor {
+ RangeEditor(String editorLocatorId) {
+ super(editorLocatorId);
+ }
+
+ @Override
+ public void setMetricRangeProperties(MetricRangePreferences prefs) {
+ super.setMetricRangeProperties(prefs);
+ timelinePane.redraw();
+ }
+ }
+
+ RangeEditor range = new RangeEditor(extendLocatorId("TimeRangeEditor"));
+ addMember(range); // put it at the top above the timeline's filters
+ addMember(timelinePane);
+ }
+}
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventsView.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventsView.jsp
index e964274..e33abdf 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventsView.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/events/EventsView.jsp
@@ -18,25 +18,24 @@
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
- <head>
- <base target="_top"/>
-
- <script type="text/javascript">
- SimileAjax_urlPrefix = "/js/timeline/ajax/api/";
- </script>
- <script src="/js/timeline/ajax/api/simile-ajax-api.js" type="text/javascript"></script>
- <script src="/js/timeline/api/timeline-api.js" type="text/javascript"></script>
- <script src="/js/timeline/examples/examples.js" type="text/javascript"></script>
- <title>Simple jsp page</title>
-
- <style type="text/css">
- .timeline-band-layer-inner { font-size: smaller; }
- .table-start-label { font-size: smaller; }
- </style>
- <link rel="stylesheet" type="text/css" media="screen" href="/css/win.css"/>
- <link rel="stylesheet" type="text/css" media="screen" href="/css/form-style.css"/>
- </head>
- <%
+<head>
+ <base target="_top"/>
+ <script type="text/javascript">
+ SimileAjax_urlPrefix = "/js/timeline/ajax/api/";
+ </script>
+ <script src="/js/timeline/ajax/api/simile-ajax-api.js" type="text/javascript"></script>
+ <script src="/js/timeline/api/timeline-api.js" type="text/javascript"></script>
+ <script src="/js/timeline/examples/examples.js" type="text/javascript"></script>
+ <title></title>
+
+ <style type="text/css">
+ .timeline-band-layer-inner { font-size: smaller; }
+ .table-start-label { font-size: smaller; }
+ </style>
+ <link rel="stylesheet" type="text/css" media="screen" href="/css/win.css"/>
+ <link rel="stylesheet" type="text/css" media="screen" href="/css/form-style.css"/>
+</head>
+<%
int eventId = WebUtility.getOptionalIntRequestParameter(request, "eventId", -1);
int resourceId = WebUtility.getOptionalIntRequestParameter(request, ParamConstants.RESOURCE_ID_PARAM, -1);
@@ -47,47 +46,28 @@
MetricRangePreferences rangePreferences = preferences.getMetricRangePreferences();
long begin = rangePreferences.begin;
long end = rangePreferences.end;
-
- // System.out.println("Displaying from " + new Date(begin) + " to " + new Date(end));
-// long end = System.currentTimeMillis();
-// long begin = end - (1000L * 60 * 60 * 24);
-
-
+ // System.out.println("Displaying timeline from " + new Date(begin) + " to " + new Date(end));
AvailabilityManagerLocal availabilityManager = LookupUtil.getAvailabilityManager();
-
List<Availability> availabilities = availabilityManager.findAvailabilityWithinInterval(resourceId, new Date(begin), new Date(end));
-
-
%>
-
<body onload="onLoad();" onresize="onResize();">
+<div id="loading" style="position: absolute; left:40%; top: 40%;z-index: 10"><img src="/images/LoadingEvents.png" alt="Loading..."/></div>
-<div id="loading" style="position: absolute; left:40%; top: 40%;z-index: 10"><img src="/images/LoadingEvents.png" alt="Loading events"/></div>
-
-<form action="#" onsubmit="onLoad()" name="show">
-<input type="checkbox" name="alerts" checked="checked" onchange="onLoad()" id="alertsField"/>
- <label for="alertsField"><img src="/images/icons/Alert_grey_16.png"/> Alerts</label>
-
-<input type="checkbox" name="events" checked="checked" onchange="onLoad()" id="eventsField"/>
- <label for="eventsField"><img src="/images/icons/Events_grey_16.png"/> Events</label>
-
-<input type="checkbox" name="configurations" checked="checked" onchange="onLoad()" id="configurationsField"/>
- <label for="configurationsField"><img src="/images/icons/Configure_grey_16.png"/> Configuration Changes</label>
-
-<input type="checkbox" name="operations" checked="checked" onchange="onLoad()" id="operationsField"/>
- <label for="operationsField"><img src="/images/icons/Operation_grey_16.png"/> Operations</label>
-
-<input type="checkbox" name="content" checked="checked" onchange="onLoad()" id="contentField"/>
- <label for="contentField"><img src="/images/icons/Content_grey_16.png"/> Content Changes</label>
-</form>
<script type="text/javascript">
+function removeAllChildren(ele) {
+ if ( ele.hasChildNodes() ) {
+ while ( ele.childNodes.length >= 1 ) {
+ ele.removeChild( ele.firstChild );
+ }
+ }
+}
+
var tl;
function onLoad() {
-
var begin = <%= begin%>;
var end = <%= end%>;
@@ -96,29 +76,29 @@ function onLoad() {
var dateAndOne = "<%= new SimpleDateFormat("MMM dd yyyy HH:mm:ss z").format(new Date(System.currentTimeMillis() + (1000L * 60))) %>";
var timeZoneOffset = <%= (-new Date().getTimezoneOffset()) / 60 %>;
- var resourceId = <%= WebUtility.getOptionalIntRequestParameter(request, ParamConstants.RESOURCE_ID_PARAM, -1) %>;
+ var resourceId = <%= WebUtility.getOptionalIntRequestParameter(request, ParamConstants.RESOURCE_ID_PARAM, -1) %>;
- var eventSource = new Timeline.DefaultEventSource();
+ var eventSource = new Timeline.DefaultEventSource();
- var theme = Timeline.ClassicTheme.create();
+ var theme = Timeline.ClassicTheme.create();
theme.event.bubble.width = 650;
theme.event.bubble.height = 320;
theme.event.label.width = 200;
theme.event.label.lineColor = "black";
theme.event.highlightColors = ["red", "orange"];
- var bandInfos = [
+ var bandInfos = [
Timeline.createBandInfo({
eventSource: eventSource,
- date: "<%= new SimpleDateFormat("EEE MMM dd yyyy HH:mm:ss Z",Locale.US).format(new Date()) %>",
+ date: "<%= new SimpleDateFormat("EEE MMM dd yyyy HH:mm:ss Z",Locale.US).format(new Date()) %>",
width: "80%",
intervalUnit: Timeline.DateTime.MINUTE,
- multiple: 5,
- magnify: 10,
+ multiple: 5,
+ magnify: 10,
intervalPixels: 20,
trackGap: 0.4,
- timeZone: timeZoneOffset,
- theme: theme
+ timeZone: timeZoneOffset,
+ theme: theme
}),
Timeline.createBandInfo({
eventSource: eventSource,
@@ -128,10 +108,10 @@ function onLoad() {
trackGap: 0.2,
intervalUnit: Timeline.DateTime.HOUR,
intervalPixels: 100,
- magnify: 5,
- overview: true,
- timeZone: timeZoneOffset,
- theme: theme
+ magnify: 5,
+ overview: true,
+ timeZone: timeZoneOffset,
+ theme: theme
}),
Timeline.createBandInfo({
eventSource: eventSource,
@@ -141,145 +121,153 @@ function onLoad() {
trackGap: 0.2,
intervalUnit: Timeline.DateTime.DAY,
intervalPixels: 300,
- overview: true,
- timeZone: timeZoneOffset,
- theme: theme
+ overview: true,
+ timeZone: timeZoneOffset,
+ theme: theme
})
- ];
- bandInfos[1].syncWith = 0;
- bandInfos[1].highlight = true;
- bandInfos[2].syncWith = 1;
- bandInfos[2].highlight = true;
+ ];
+ bandInfos[1].syncWith = 0;
+ bandInfos[1].highlight = true;
+ bandInfos[2].syncWith = 1;
+ bandInfos[2].highlight = true;
for (var i = 0; i < bandInfos.length; i++) {
bandInfos[i].decorators = [
new Timeline.PointHighlightDecorator({
- date: "<%= new SimpleDateFormat("EEE MMM dd yyyy HH:mm:ss Z",Locale.US).format(new Date()) %>",
+ date: "<%= new SimpleDateFormat("EEE MMM dd yyyy HH:mm:ss Z",Locale.US).format(new Date()) %>",
color: "#0000CC",
opacity: 30,
startLabel: "Now",
- endLabel: ""
+ endLabel: ""
})
<%
SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd yyyy HH:mm:ss Z",Locale.US);
-for (Availability avail : availabilities) {
+ for (Availability avail : availabilities) {
- out.write(", new Timeline.SpanHighlightDecorator({\n" +
+ out.write(", new Timeline.SpanHighlightDecorator({\n" +
" startDate: \"" + sdf.format(avail.getStartTime()) + "\",\n" +
-" endDate: \"" + sdf.format(avail.getEndTime() == null ? new Date() : avail.getEndTime()) + "\",\n" +
+" endDate: \"" + sdf.format(avail.getEndTime() == null ? new Date() : avail.getEndTime()) + "\",\n" +
" color: \"" + (avail.getAvailabilityType() == AvailabilityType.UP ? "#B0FFC5":"#F7A6A8") + "\",\n" +
" opacity: 20,\n" +
" startLabel: \"\",\n" +
-" endLabel: \"\"\n" +
+" endLabel: \"\"\n" +
" })");
-}
-
+ }
%>
-
-
];
}
-
- tl = Timeline.create(document.getElementById("t1"), bandInfos);
+ tl = Timeline.create(document.getElementById("t1"), bandInfos);
var toLoad = 7;
- function done() {
- toLoad--;
- if (toLoad == 0) {
- if (eventSource.getCount() == 0) {
- document.getElementById("loading").innerHTML = '<img src="/images/NoEvents.png" alt="Loading events"/>';
- } else {
- document.getElementById("loading").style.display = "none";
- }
- }
- }
-
- if (document.forms['show'].configurations.checked) {
- var link = "/resource/common/monitor/events/EventConfigJSON.jsp?id=" + resourceId + "&begin=" + begin + "&end=" + end;
- Timeline.loadJSON(link, function(json, url) {
- eventSource.loadJSON(json, url);
- document.getElementById("event-count").innerHTML = eventSource.getCount();
- done();
- });
- }
+ function done() {
+ toLoad--;
+ if (toLoad == 0) {
+ if (eventSource.getCount() == 0) {
+ document.getElementById("loading").innerHTML = '<img src="/images/NoEvents.png" alt="Loading events"/>';
+ } else {
+ document.getElementById("loading").style.display = "none";
+ }
+ }
+ }
- if (document.forms['show'].configurations.checked) {
- link = "/resource/common/monitor/events/EventPluginConfigJSON.jsp?id=" + resourceId + "&begin=" + begin + "&end=" + end;
- Timeline.loadJSON(link, function(json, url) {
- eventSource.loadJSON(json, url);
- document.getElementById("event-count").innerHTML = eventSource.getCount();
- done();
- });
- }
+ if (document.forms['show'].configurations.checked) {
+ var link = "/resource/common/monitor/events/EventConfigJSON.jsp?id=" + resourceId + "&begin=" + begin + "&end=" + end;
+ Timeline.loadJSON(link, function(json, url) {
+ eventSource.loadJSON(json, url);
+ document.getElementById("event-count").innerHTML = eventSource.getCount();
+ done();
+ });
+ }
- if (document.forms['show'].configurations.checked) {
- link = "/resource/common/monitor/events/EventCreateDeleteChildJSON.jsp?id=" + resourceId + "&begin=" + begin + "&end=" + end;
- Timeline.loadJSON(link, function(json, url) {
- eventSource.loadJSON(json, url);
- document.getElementById("event-count").innerHTML = eventSource.getCount();
- done();
- });
- }
+ if (document.forms['show'].configurations.checked) {
+ link = "/resource/common/monitor/events/EventPluginConfigJSON.jsp?id=" + resourceId + "&begin=" + begin + "&end=" + end;
+ Timeline.loadJSON(link, function(json, url) {
+ eventSource.loadJSON(json, url);
+ document.getElementById("event-count").innerHTML = eventSource.getCount();
+ done();
+ });
+ }
- if (document.forms['show'].alerts.checked) {
- link = "/resource/common/monitor/events/EventAlertJSON.jsp?id=" + resourceId + "&begin=" + begin + "&end=" + end;
- Timeline.loadJSON(link, function(json, url) {
- eventSource.loadJSON(json, url);
- document.getElementById("event-count").innerHTML = eventSource.getCount();
- done();
- });
- }
+ if (document.forms['show'].configurations.checked) {
+ link = "/resource/common/monitor/events/EventCreateDeleteChildJSON.jsp?id=" + resourceId + "&begin=" + begin + "&end=" + end;
+ Timeline.loadJSON(link, function(json, url) {
+ eventSource.loadJSON(json, url);
+ document.getElementById("event-count").innerHTML = eventSource.getCount();
+ done();
+ });
+ }
+ if (document.forms['show'].alerts.checked) {
+ link = "/resource/common/monitor/events/EventAlertJSON.jsp?id=" + resourceId + "&begin=" + begin + "&end=" + end;
+ Timeline.loadJSON(link, function(json, url) {
+ eventSource.loadJSON(json, url);
+ document.getElementById("event-count").innerHTML = eventSource.getCount();
+ done();
+ });
+ }
- if (document.forms['show'].operations.checked) {
- link = "/resource/common/monitor/events/EventOperationsJSON.jsp?id=" + resourceId + "&begin=" + begin + "&end=" + end;
- Timeline.loadJSON(link, function(json, url) {
- eventSource.loadJSON(json, url);
- document.getElementById("event-count").innerHTML = eventSource.getCount();
- done();
- });
- }
+ if (document.forms['show'].operations.checked) {
+ link = "/resource/common/monitor/events/EventOperationsJSON.jsp?id=" + resourceId + "&begin=" + begin + "&end=" + end;
+ Timeline.loadJSON(link, function(json, url) {
+ eventSource.loadJSON(json, url);
+ document.getElementById("event-count").innerHTML = eventSource.getCount();
+ done();
+ });
+ }
- if (document.forms['show']['events'].checked) {
- link = "/resource/common/monitor/events/EventEventsJSON.jsp?id=" + resourceId + "&begin=" + begin + "&end=" + end;
- Timeline.loadJSON(link, function(json, url) {
- eventSource.loadJSON(json, url);
- document.getElementById("event-count").innerHTML = eventSource.getCount();
- done();
- });
- }
+ if (document.forms['show']['events'].checked) {
+ link = "/resource/common/monitor/events/EventEventsJSON.jsp?id=" + resourceId + "&begin=" + begin + "&end=" + end;
+ Timeline.loadJSON(link, function(json, url) {
+ eventSource.loadJSON(json, url);
+ document.getElementById("event-count").innerHTML = eventSource.getCount();
+ done();
+ });
+ }
if (document.forms['show']['content'].checked) {
- link = "/resource/common/monitor/events/EventContentJSON.jsp?id=" + resourceId + "&begin=" + begin + "&end=" + end;
- Timeline.loadJSON(link, function(json, url) {
- eventSource.loadJSON(json, url);
- document.getElementById("event-count").innerHTML = eventSource.getCount();
- done();
- });
- }
+ link = "/resource/common/monitor/events/EventContentJSON.jsp?id=" + resourceId + "&begin=" + begin + "&end=" + end;
+ Timeline.loadJSON(link, function(json, url) {
+ eventSource.loadJSON(json, url);
+ document.getElementById("event-count").innerHTML = eventSource.getCount();
+ done();
+ });
+ }
+ removeAllChildren(document.getElementById("controls"));
setupFilterHighlightControls(document.getElementById("controls"), tl, [0,1], theme);
}
- var resizeTimerID = null;
- function onResize() {
- if (resizeTimerID == null) {
- resizeTimerID = window.setTimeout(function() {
- resizeTimerID = null;
- tl.layout();
- }, 500);
- }
- }
-</script>
-
- <div id="t1" style="height: 450px; border: 1px solid #aaa"></div>
-
- <!-- not accurate with grouping <div>Events: -->
- <span id="event-count" style="display:none;"></span>
- <div class="controls" id="controls"></div>
+var resizeTimerID = null;
+function onResize() {
+ if (resizeTimerID == null) {
+ resizeTimerID = window.setTimeout(function() {
+ resizeTimerID = null;
+ tl.layout();
+ }, 500);
+ }
+}
+</script>
- </body>
-</html>
\ No newline at end of file
+<span id="event-count" style="display:none;"></span>
+<div class="controls" id="controls"></div>
+<form action="#" onsubmit="onLoad()" name="show">
+ <input type="checkbox" name="alerts" checked="checked" onchange="onLoad()" id="alertsField"/>
+ <label for="alertsField"><img src="/images/icons/Alert_grey_16.png"/> Alerts</label>
+
+ <input type="checkbox" name="events" checked="checked" onchange="onLoad()" id="eventsField"/>
+ <label for="eventsField"><img src="/images/icons/Events_grey_16.png"/> Events</label>
+
+ <input type="checkbox" name="configurations" checked="checked" onchange="onLoad()" id="configurationsField"/>
+ <label for="configurationsField"><img src="/images/icons/Configure_grey_16.png"/> Configuration Changes</label>
+
+ <input type="checkbox" name="operations" checked="checked" onchange="onLoad()" id="operationsField"/>
+ <label for="operationsField"><img src="/images/icons/Operation_grey_16.png"/> Operations</label>
+
+ <input type="checkbox" name="content" checked="checked" onchange="onLoad()" id="contentField"/>
+ <label for="contentField"><img src="/images/icons/Content_grey_16.png"/> Content Changes</label>
+</form>
+<div id="t1" style='height: 475px; border: 1px solid #aaa'></div>
+</body></html>
\ No newline at end of file
commit 676fc23804ccf42d8eb2ce236400bc08a4025f89
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Wed Aug 24 11:18:01 2011 -0500
More updates to the naming of each plugin component to match the intent and purpose. Also updated the integration tests to test each resource type.
diff --git a/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModClusterPluginIntegrationTest.java b/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModClusterPluginIntegrationTest.java
new file mode 100644
index 0000000..625163b
--- /dev/null
+++ b/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModClusterPluginIntegrationTest.java
@@ -0,0 +1,229 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.plugins.modcluster.test;
+
+import java.io.File;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.Queue;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.testng.annotations.AfterSuite;
+import org.testng.annotations.BeforeSuite;
+import org.testng.annotations.Test;
+
+import org.rhq.core.clientapi.server.discovery.InventoryReport;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.domain.measurement.MeasurementData;
+import org.rhq.core.domain.measurement.MeasurementDefinition;
+import org.rhq.core.domain.measurement.MeasurementReport;
+import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
+import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.pc.PluginContainer;
+import org.rhq.core.pc.PluginContainerConfiguration;
+import org.rhq.core.pc.plugin.FileSystemPluginFinder;
+import org.rhq.core.pc.plugin.PluginEnvironment;
+import org.rhq.core.pc.plugin.PluginManager;
+import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+import org.rhq.core.pluginapi.measurement.MeasurementFacet;
+import org.rhq.core.pluginapi.operation.OperationFacet;
+import org.rhq.core.pluginapi.operation.OperationResult;
+
+/**
+ * @author Stefan Negrea
+ */
+@SuppressWarnings("rawtypes")
+@Test(groups = "modcluster-plugin")
+public class ModClusterPluginIntegrationTest {
+ private Log log = LogFactory.getLog(this.getClass());
+ private static final String PLUGIN_NAME = "mod_cluster";
+
+ @BeforeSuite
+ public void start() {
+ try {
+ File pluginDir = new File("target/testsetup/plugins");
+ PluginContainerConfiguration pcConfig = new PluginContainerConfiguration();
+ pcConfig.setPluginFinder(new FileSystemPluginFinder(pluginDir));
+ pcConfig.setPluginDirectory(pluginDir);
+
+ pcConfig.setInsideAgent(false);
+ PluginContainer.getInstance().setConfiguration(pcConfig);
+ PluginContainer.getInstance().initialize();
+ log.info("PC started.");
+ for (String plugin : PluginContainer.getInstance().getPluginManager().getMetadataManager().getPluginNames()) {
+ log.info("...Loaded plugin: " + plugin);
+ }
+ } catch (Exception e) {
+ log.info("Error initializing the context", e);
+ }
+ }
+
+ @AfterSuite
+ public void stop() {
+ PluginContainer.getInstance().shutdown();
+ }
+
+ @Test
+ public void testPluginLoad() {
+ PluginManager pluginManager = PluginContainer.getInstance().getPluginManager();
+ PluginEnvironment pluginEnvironment = pluginManager.getPlugin(PLUGIN_NAME);
+ assert (pluginEnvironment != null) : "Null environment, plugin not loaded";
+ assert (pluginEnvironment.getPluginName().equals(PLUGIN_NAME));
+ }
+
+ @Test(dependsOnMethods = "testPluginLoad")
+ public void testDiscovery() throws Exception {
+ InventoryReport report = PluginContainer.getInstance().getInventoryManager().executeServerScanImmediately();
+ assert report != null;
+ log.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
+
+ Thread.sleep(1000);
+
+ report = PluginContainer.getInstance().getInventoryManager().executeServiceScanImmediately();
+ assert report != null;
+ log.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
+
+ Set<Resource> resources = findResource(PluginContainer.getInstance().getInventoryManager().getPlatform());
+ log.info("Found " + resources.size() + " mod_cluster and mod_cluster_context instance(s).");
+
+ assert (resources.size() != 0) : "No mod_cluster or related instances found.";
+
+ if (resources.size() != 0) {
+ for (Object objectResource : resources.toArray()) {
+ Resource resource = (Resource) objectResource;
+ if (resource.getResourceType().getName().equals("mod_cluster")) {
+ testMainResource(resource);
+ } else if (resource.getResourceType().getName().equals("Webapp Context")) {
+ testWebappContext(resource);
+ } else if (resource.getResourceType().getName().equals("HA Service Configuration")) {
+ testLoadServiceConfiguration(resource);
+ } else if (resource.getResourceType().getName().equals("HA Service")) {
+ testServiceMeasurement(resource);
+ testServiceMethodInvocation(resource);
+ }
+ }
+ }
+ }
+
+ private void testServiceMethodInvocation(Resource resource) throws InterruptedException, Exception {
+ ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
+ .getResourceComponent(resource);
+
+ Configuration config = new Configuration();
+ config.put(new PropertySimple("p1", "1"));
+ config.put(new PropertySimple("p2", java.util.concurrent.TimeUnit.SECONDS));
+ OperationResult result = ((OperationFacet) resourceComponent).invokeOperation("stop", config);
+ log.info("Result of operation stopContext was: " + result.getSimpleResult());
+ }
+
+ private void testLoadServiceConfiguration(Resource resource) throws Exception {
+ ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
+ .getResourceComponent(resource);
+ ((ConfigurationFacet) resourceComponent).loadResourceConfiguration();
+ }
+
+ private void testServiceMeasurement(Resource resource) throws Exception {
+ ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
+ .getResourceComponent(resource);
+
+ if (resourceComponent instanceof MeasurementFacet) {
+ for (MeasurementDefinition def : resource.getResourceType().getMetricDefinitions()) {
+ Set<MeasurementScheduleRequest> metricList = new HashSet<MeasurementScheduleRequest>();
+ metricList.add(new MeasurementScheduleRequest(1, def.getName(), 1000, true, def.getDataType(), null));
+ MeasurementReport report = new MeasurementReport();
+ ((MeasurementFacet) resourceComponent).getValues(report, metricList);
+
+ MeasurementData data = report.getTraitData().iterator().next();
+ assert data != null : "Unable to collect trait [" + def.getName() + "] on " + resource;
+ log.info("Measurement: " + def.getName() + "=" + data.getValue());
+ }
+ }
+ }
+
+ private void testMainResource(Resource resource) throws Exception {
+ ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
+ .getResourceComponent(resource);
+
+ if (resourceComponent instanceof OperationFacet) {
+ OperationResult result = null;
+
+ result = ((OperationFacet) resourceComponent).invokeOperation("reset", new Configuration());
+ log.info("Result of operation test was: " + result);
+
+ result = ((OperationFacet) resourceComponent).invokeOperation("refresh", new Configuration());
+ log.info("Result of operation test was: " + result);
+ }
+ }
+
+ private void testWebappContext(Resource resource) throws Exception {
+ ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
+ .getResourceComponent(resource);
+
+ if (resourceComponent instanceof OperationFacet) {
+ try {
+ OperationResult result = ((OperationFacet) resourceComponent).invokeOperation("enableContext", null);
+ log.info("Result of operation " + "enableContext" + " was: " + result.getSimpleResult());
+
+ Configuration config = new Configuration();
+ config.put(new PropertySimple("timeout", "1"));
+ config.put(new PropertySimple("unit", java.util.concurrent.TimeUnit.SECONDS));
+ result = ((OperationFacet) resourceComponent).invokeOperation("stopContext", config);
+ log.info("Result of operation stopContext was: " + result.getSimpleResult());
+
+ result = ((OperationFacet) resourceComponent).invokeOperation("enableContext", null);
+ log.info("Result of operation enableContext was: " + result.getSimpleResult());
+
+ result = ((OperationFacet) resourceComponent).invokeOperation("disableContext", null);
+ log.info("Result of operation disableContext was: " + result.getSimpleResult());
+
+ } catch (Exception e) {
+ log.info("Operation failed. ", e);
+ }
+
+ }
+ }
+
+ private Set<Resource> findResource(Resource parent) {
+ Set<Resource> found = new HashSet<Resource>();
+
+ Queue<Resource> discoveryQueue = new LinkedList<Resource>();
+ discoveryQueue.add(parent);
+
+ while (!discoveryQueue.isEmpty()) {
+ Resource currentResource = discoveryQueue.poll();
+
+ log.info("Discovered resource of type: " + currentResource.getResourceType().getName());
+ if (currentResource.getResourceType().getPlugin().equals(PLUGIN_NAME)) {
+ found.add(currentResource);
+ }
+
+ if (currentResource.getChildResources() != null) {
+ for (Resource child : currentResource.getChildResources()) {
+ discoveryQueue.add(child);
+ }
+ }
+ }
+
+ return found;
+ }
+}
diff --git a/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
deleted file mode 100644
index f27b153..0000000
--- a/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.plugins.modcluster.test;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Queue;
-import java.util.Set;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.testng.annotations.AfterSuite;
-import org.testng.annotations.BeforeSuite;
-import org.testng.annotations.Test;
-
-import org.rhq.core.clientapi.server.discovery.InventoryReport;
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.domain.measurement.MeasurementData;
-import org.rhq.core.domain.measurement.MeasurementDefinition;
-import org.rhq.core.domain.measurement.MeasurementReport;
-import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
-import org.rhq.core.domain.resource.Resource;
-import org.rhq.core.pc.PluginContainer;
-import org.rhq.core.pc.PluginContainerConfiguration;
-import org.rhq.core.pc.plugin.FileSystemPluginFinder;
-import org.rhq.core.pc.plugin.PluginEnvironment;
-import org.rhq.core.pc.plugin.PluginManager;
-import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
-import org.rhq.core.pluginapi.inventory.ResourceComponent;
-import org.rhq.core.pluginapi.measurement.MeasurementFacet;
-import org.rhq.core.pluginapi.operation.OperationFacet;
-import org.rhq.core.pluginapi.operation.OperationResult;
-
-/**
- * @author Stefan Negrea
- */
-@SuppressWarnings("rawtypes")
-@Test(groups = "modcluster-plugin")
-public class ModclusterPluginTest {
- private Log log = LogFactory.getLog(this.getClass());
- private static final String PLUGIN_NAME = "mod_cluster";
-
- @BeforeSuite
- public void start() {
- try {
- File pluginDir = new File("target/testsetup/plugins");
- PluginContainerConfiguration pcConfig = new PluginContainerConfiguration();
- pcConfig.setPluginFinder(new FileSystemPluginFinder(pluginDir));
- pcConfig.setPluginDirectory(pluginDir);
-
- pcConfig.setInsideAgent(false);
- PluginContainer.getInstance().setConfiguration(pcConfig);
- PluginContainer.getInstance().initialize();
- log.info("PC started.");
- for (String plugin : PluginContainer.getInstance().getPluginManager().getMetadataManager().getPluginNames()) {
- log.info("...Loaded plugin: " + plugin);
- }
- } catch (Exception e) {
- log.info("Error initializing the context", e);
- }
- }
-
- @AfterSuite
- public void stop() {
- PluginContainer.getInstance().shutdown();
- }
-
- @Test
- public void testPluginLoad() {
- PluginManager pluginManager = PluginContainer.getInstance().getPluginManager();
- PluginEnvironment pluginEnvironment = pluginManager.getPlugin(PLUGIN_NAME);
- assert (pluginEnvironment != null) : "Null environment, plugin not loaded";
- assert (pluginEnvironment.getPluginName().equals(PLUGIN_NAME));
- }
-
- @Test(dependsOnMethods = "testPluginLoad")
- public void testDiscovery() throws Exception {
- InventoryReport report = PluginContainer.getInstance().getInventoryManager().executeServerScanImmediately();
- assert report != null;
- log.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
-
- Thread.sleep(1000);
-
- report = PluginContainer.getInstance().getInventoryManager().executeServiceScanImmediately();
- assert report != null;
- log.info("Discovery took: " + (report.getEndTime() - report.getStartTime()) + "ms");
-
- List<String> typeNames = new ArrayList<String>() {
- private static final long serialVersionUID = 1L;
-
- {
- add(PLUGIN_NAME);
- add("Webapp Context");
- add("HA Service Configuration");
- add("HA Service");
- }
- };
-
- Set<Resource> resources = findResource(PluginContainer.getInstance().getInventoryManager().getPlatform(),
- typeNames);
- log.info("Found " + resources.size() + " mod_cluster and mod_cluster_context instance(s).");
-
- assert (resources.size() != 0) : "No mod_cluster or related instances found.";
-
- if (resources.size() != 0) {
- for (Object objectResource : resources.toArray()) {
- Resource resource = (Resource) objectResource;
- if (resource.getResourceType().getName().equals("mod_cluster")) {
- testResourceMeasurement(resource);
- } else if (resource.getResourceType().getName().equals("Webapp Context")) {
- testContextOperations(resource);
- } else if (resource.getResourceType().getName().equals("HA Service Configuration")) {
- ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
- .getResourceComponent(resource);
- ((ConfigurationFacet) resourceComponent).loadResourceConfiguration();
- } else if (resource.getResourceType().getName().equals("HA Service")) {
- ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
- .getResourceComponent(resource);
-
- Configuration config = new Configuration();
- config.put(new PropertySimple("p1", "1"));
- config.put(new PropertySimple("p2", java.util.concurrent.TimeUnit.SECONDS));
- OperationResult result = ((OperationFacet) resourceComponent).invokeOperation("stop", config);
- log.info("Result of operation stopContext was: " + result.getSimpleResult());
- }
- }
- }
- }
-
- private void testResourceMeasurement(Resource resource) throws Exception {
- ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
- .getResourceComponent(resource);
- if (resourceComponent instanceof MeasurementFacet) {
- for (MeasurementDefinition def : resource.getResourceType().getMetricDefinitions()) {
- Set<MeasurementScheduleRequest> metricList = new HashSet<MeasurementScheduleRequest>();
- metricList.add(new MeasurementScheduleRequest(1, def.getName(), 1000, true, def.getDataType(), null));
- MeasurementReport report = new MeasurementReport();
- ((MeasurementFacet) resourceComponent).getValues(report, metricList);
-
- MeasurementData data = report.getTraitData().iterator().next();
- assert data != null : "Unable to collect trait [" + def.getName() + "] on " + resource;
- log.info("Measurement: " + def.getName() + "=" + data.getValue());
- }
- }
-
- if (resourceComponent instanceof OperationFacet) {
- OperationResult result = null;
-
- result = ((OperationFacet) resourceComponent).invokeOperation("reset", new Configuration());
- log.info("Result of operation test was: " + result);
-
- result = ((OperationFacet) resourceComponent).invokeOperation("disable", new Configuration());
- log.info("Result of operation test was: " + result.getSimpleResult());
- }
- }
-
- private void testContextOperations(Resource resource) throws Exception {
- ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
- .getResourceComponent(resource);
-
- if (resourceComponent instanceof OperationFacet) {
- try {
- OperationResult result = ((OperationFacet) resourceComponent).invokeOperation("enableContext", null);
- log.info("Result of operation " + "enableContext" + " was: " + result.getSimpleResult());
-
- Configuration config = new Configuration();
- config.put(new PropertySimple("timeout", "1"));
- config.put(new PropertySimple("unit", java.util.concurrent.TimeUnit.SECONDS));
- result = ((OperationFacet) resourceComponent).invokeOperation("stopContext", config);
- log.info("Result of operation stopContext was: " + result.getSimpleResult());
-
- result = ((OperationFacet) resourceComponent).invokeOperation("enableContext", null);
- log.info("Result of operation enableContext was: " + result.getSimpleResult());
-
- result = ((OperationFacet) resourceComponent).invokeOperation("disableContext", null);
- log.info("Result of operation disableContext was: " + result.getSimpleResult());
-
- } catch (Exception e) {
- log.info("Operation failed. ", e);
- }
-
- }
- }
-
- private Set<Resource> findResource(Resource parent, List<String> typeNames) {
- Set<Resource> found = new HashSet<Resource>();
-
- Queue<Resource> discoveryQueue = new LinkedList<Resource>();
- discoveryQueue.add(parent);
-
- while (!discoveryQueue.isEmpty()) {
- Resource currentResource = discoveryQueue.poll();
-
- log.info("Discovered resource of type: " + currentResource.getResourceType().getName());
- if (typeNames.contains(currentResource.getResourceType().getName())) {
- found.add(currentResource);
- }
-
- if (currentResource.getChildResources() != null) {
- for (Resource child : currentResource.getChildResources()) {
- discoveryQueue.add(child);
- }
- }
- }
-
- return found;
- }
-}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ClassNameMBeanDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ClassNameMBeanDiscoveryComponent.java
index b9ce25e..b854398 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ClassNameMBeanDiscoveryComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ClassNameMBeanDiscoveryComponent.java
@@ -89,7 +89,7 @@ public class ClassNameMBeanDiscoveryComponent<T extends JMXComponent> extends MB
emsConnection.queryBeans(objectName);
bean = emsConnection.getBean(objectName);
}
+
return bean;
}
-
-}
\ No newline at end of file
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
deleted file mode 100644
index 4c8b437..0000000
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.plugins.modcluster;
-
-import java.util.concurrent.TimeUnit;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.mc4j.ems.connection.bean.EmsBean;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.measurement.AvailabilityType;
-import org.rhq.core.pluginapi.operation.OperationResult;
-import org.rhq.plugins.jmx.MBeanResourceComponent;
-import org.rhq.plugins.modcluster.helper.JBossHelper;
-
-/**
- * Manages a mod_cluster context entity.
- *
- * @author Stefan Negrea
- */
-@SuppressWarnings({ "rawtypes", "deprecation" })
-public class ContextComponent extends MBeanResourceComponent<MBeanResourceComponent> {
-
- private static final Log log = LogFactory.getLog(ContextComponent.class);
-
- @Override
- protected EmsBean loadBean() {
- return getResourceContext().getParentResourceComponent().getEmsBean();
- }
-
- @Override
- public AvailabilityType getAvailability() {
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- try {
- Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
- String rawProxyInfo = JBossHelper.getRawProxyInfo(getEmsBean());
-
- ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
-
- ProxyInfo.Context context = ProxyInfo.Context.fromString(resourceContext.getResourceKey());
-
- int indexOfCurrentContext = proxyInfo.getAvailableContexts().indexOf(context);
-
- if (indexOfCurrentContext != -1) {
- ProxyInfo.Context currentContext = proxyInfo.getAvailableContexts().get(indexOfCurrentContext);
-
- if (currentContext.isEnabled()) {
- return AvailabilityType.UP;
- }
- }
-
- return AvailabilityType.DOWN;
- } catch (Exception e) {
- log.info(e);
- return AvailabilityType.DOWN;
- } finally {
- Thread.currentThread().setContextClassLoader(cl);
- }
- }
-
- @Override
- public OperationResult invokeOperation(String name, Configuration parameters) throws Exception {
- if ("enableContext".equals(name) || "disableContext".equals(name) || "stopContext".equals(name)) {
-
- ProxyInfo.Context context = ProxyInfo.Context.fromString(resourceContext.getResourceKey());
-
- Object[] configuration = null;
- if ("stopContext".equals(name)) {
- configuration = new Object[] { context.getHost(), context.getPath(),
- parameters.getSimple("timeout").getLongValue(),
- TimeUnit.valueOf(parameters.getSimple("unit").getStringValue()) };
- } else {
- configuration = new Object[] { context.getHost(), context.getPath() };
- }
-
- if (context.getPath().equals("/")) {
- configuration[1] = "ROOT";
- }
-
- log.info(name + " - " + context.getHost() + " " + context.getPath());
-
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- try {
- Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
- Object resultObject = getEmsBean().getOperation(name).invoke(configuration);
-
- if (resultObject instanceof OperationResult) {
- return (OperationResult) resultObject;
- } else {
- return new OperationResult(String.valueOf(resultObject));
- }
- } finally {
- Thread.currentThread().setContextClassLoader(cl);
- }
- }
-
- throw new Exception("Operation " + name + " not available mod_cluster WebApp service.");
- }
-}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
deleted file mode 100644
index 788cbce..0000000
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.plugins.modcluster;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.mc4j.ems.connection.EmsConnection;
-import org.mc4j.ems.connection.bean.EmsBean;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
-import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
-import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
-import org.rhq.plugins.jmx.MBeanResourceComponent;
-import org.rhq.plugins.modcluster.helper.JBossHelper;
-
-/**
- * Discovers mod_cluster contexts from the proxyInfo mbean property.
- *
- * @author Stefan Negrea
- */
-@SuppressWarnings("rawtypes")
-public class ContextDiscoveryComponent implements ResourceDiscoveryComponent<MBeanResourceComponent> {
-
- private static final String JVM_ROUTE_PROPERTY = "jvmRoute";
- private static final String ENGINE_OBJECT_NAME = "engineObjectName";
-
- /* (non-Javadoc)
- * @see org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent#discoverResources(org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext)
- */
- public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<MBeanResourceComponent> context) {
- String jvmRoute = this.getJvmRoute(context);
-
- EmsBean configBean = context.getParentResourceComponent().getEmsBean();
- String rawProxyInfo = JBossHelper.getRawProxyInfo(configBean);
-
- ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
- Set<DiscoveredResourceDetails> entities = new HashSet<DiscoveredResourceDetails>();
-
- for (ProxyInfo.Context availableContext : proxyInfo.getAvailableContexts()) {
- if (availableContext.getJvmRoute().equals(jvmRoute)) {
- DiscoveredResourceDetails detail = new DiscoveredResourceDetails(context.getResourceType(),
- availableContext.createKey(), availableContext.createName(), null, "Webapp Context", null, null);
- entities.add(detail);
- }
- }
-
- return entities;
- }
-
- /**
- * Retrieves the jvm route for the node from the parent context.
- *
- * @param context the discovery context
- * @return node's jvm route
- */
- private String getJvmRoute(ResourceDiscoveryContext<MBeanResourceComponent> context) {
- Configuration pluginConfig = context.getParentResourceComponent().getResourceContext().getPluginConfiguration();
- String engineObjectName = pluginConfig.getSimple(ENGINE_OBJECT_NAME).getStringValue();
- EmsBean engineBean = this.loadBean(engineObjectName, context.getParentResourceComponent());
-
- return (String) engineBean.getAttribute(JVM_ROUTE_PROPERTY).refresh().toString();
- }
-
- /**
- * Loads the bean with the given object name.
- *
- * Subclasses are free to override this method in order to load the bean.
- *
- * @param objectName the name of the bean to load
- * @return the bean that is loaded
- */
- protected EmsBean loadBean(String objectName, MBeanResourceComponent context) {
- EmsConnection emsConnection = context.getEmsConnection();
- EmsBean bean = emsConnection.getBean(objectName);
- if (bean == null) {
- // In some cases, this resource component may have been discovered by some means other than querying its
- // parent's EMSConnection (e.g. ApplicationDiscoveryComponent uses a filesystem to discover EARs and
- // WARs that are not yet deployed). In such cases, getBean() will return null, since EMS won't have the
- // bean in its cache. To cover such cases, make an attempt to query the underlying MBeanServer for the
- // bean before giving up.
- emsConnection.queryBeans(objectName);
- bean = emsConnection.getBean(objectName);
- }
- return bean;
- }
-}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServerComponent.java
index 7d5f0dc..0db722e 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServerComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServerComponent.java
@@ -21,6 +21,7 @@ package org.rhq.plugins.modcluster;
import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.plugins.jmx.MBeanResourceComponent;
import org.rhq.plugins.modcluster.helper.JBossHelper;
+import org.rhq.plugins.modcluster.model.ProxyInfo;
/**
* @author Stefan Negrea
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
deleted file mode 100644
index 8614402..0000000
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ProxyInfo.java
+++ /dev/null
@@ -1,310 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.plugins.modcluster;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * Simple parser for the raw proxy information provided by mod_cluster.
- *
- * @author Stefan Negrea
- */
-public class ProxyInfo {
-
- private Map<String, Node> availableNodes = new HashMap<String, Node>();
- private Map<String, Vhost> availableVhosts = new HashMap<String, Vhost>();
- private List<Context> availableContexts = new ArrayList<ProxyInfo.Context>();
-
- public ProxyInfo(String rawProxyInfo) {
- parseNodes(rawProxyInfo);
- parseVhosts(rawProxyInfo);
- parseContexts(rawProxyInfo);
- }
-
- private void parseNodes(String rawProxyInfo) {
- Pattern nodePattern = Pattern.compile("Node:.*\n");
- Matcher nodeMatcher = nodePattern.matcher(rawProxyInfo);
- while (nodeMatcher.find()) {
- String rawNode = nodeMatcher.group();
- String[] nodePieces = rawNode.split(",");
-
- String identifier = nodePieces[0];
- identifier = identifier.substring(identifier.indexOf("[") + 1, identifier.indexOf("]"));
-
- String jvmRoute = nodePieces[1];
- jvmRoute = jvmRoute.substring(jvmRoute.indexOf(':') + 1).trim();
-
- availableNodes.put(identifier, new Node(jvmRoute, identifier));
- }
- }
-
- private void parseVhosts(String rawProxyInfo) {
- Pattern vhostPattern = Pattern.compile("Vhost:.*\n");
- Matcher vhostMatcher = vhostPattern.matcher(rawProxyInfo);
- while (vhostMatcher.find()) {
- String rawVhost = vhostMatcher.group();
- String[] vhostPieces = rawVhost.split(",");
-
- String identifier = vhostPieces[0].trim();
- identifier = identifier.substring(identifier.indexOf("[") + 1, identifier.indexOf("]"));
- identifier = identifier.substring(0, identifier.lastIndexOf(":"));
-
- String host = vhostPieces[1].trim();
- host = host.substring(host.indexOf(":") + 1).trim();
-
- availableVhosts.put(identifier, new Vhost(identifier, host));
- }
- }
-
- private void parseContexts(String rawProxyInfo) {
- Pattern contextPattern = Pattern.compile("Context:.*[\n|}]");
- Matcher contextMatcher = contextPattern.matcher(rawProxyInfo);
- while (contextMatcher.find()) {
- String rawContext = contextMatcher.group();
- String[] contextPieces = rawContext.split(",");
- String actualContext = contextPieces[1].substring(contextPieces[1].indexOf("/")).trim();
-
- String identifier = contextPieces[0];
- identifier = identifier.substring(identifier.indexOf("[") + 1, identifier.indexOf("]"));
- identifier = identifier.substring(0, identifier.lastIndexOf(":"));
-
- String nodeIdentifier = contextPieces[0];
- nodeIdentifier = nodeIdentifier.substring(nodeIdentifier.indexOf("[") + 1, nodeIdentifier.indexOf("]"));
- nodeIdentifier = nodeIdentifier.substring(0, nodeIdentifier.indexOf(":"));
- String jvmRoute = availableNodes.get(nodeIdentifier).getJvmRoute();
-
- String rawIsEnabled = contextPieces[2];
- rawIsEnabled = rawIsEnabled.substring(rawIsEnabled.indexOf(':') + 1).trim();
- boolean isEnabled = rawIsEnabled.equals("ENABLED") ? true : false;
-
- Vhost relatedVhost = availableVhosts.get(identifier);
-
- availableContexts.add(new Context(jvmRoute, relatedVhost.getHost(), actualContext, isEnabled));
- }
- }
-
- public List<Context> getAvailableContexts() {
- return Collections.unmodifiableList(availableContexts);
- }
-
- public List<Vhost> getAvailableVhosts() {
- return Collections.unmodifiableList(new ArrayList<Vhost>(availableVhosts.values()));
- }
-
- public List<Node> getAvailableNodes() {
- return Collections.unmodifiableList(new ArrayList<Node>(availableNodes.values()));
- }
-
- public static class Node {
- private String jvmRoute;
- private String nodeId;
-
- public Node(String jvmRoute, String nodeId) {
- this.jvmRoute = jvmRoute;
- this.nodeId = nodeId;
- }
-
- public String getNodeId() {
- return nodeId;
- }
-
- public String getJvmRoute() {
- return jvmRoute;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((jvmRoute == null) ? 0 : jvmRoute.hashCode());
- result = prime * result + ((nodeId == null) ? 0 : nodeId.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- Node other = (Node) obj;
- if (jvmRoute == null) {
- if (other.jvmRoute != null)
- return false;
- } else if (!jvmRoute.equals(other.jvmRoute))
- return false;
- if (nodeId == null) {
- if (other.nodeId != null)
- return false;
- } else if (!nodeId.equals(other.nodeId))
- return false;
- return true;
- }
- }
-
- public static class Vhost {
- private String identifier;
- private String host;
-
- public Vhost(String identifier, String host) {
- this.identifier = identifier;
- this.host = host;
- }
-
- public String getIdentifier() {
- return identifier;
- }
-
- public String getHost() {
- return host;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((host == null) ? 0 : host.hashCode());
- result = prime * result + ((identifier == null) ? 0 : identifier.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- Vhost other = (Vhost) obj;
- if (host == null) {
- if (other.host != null)
- return false;
- } else if (!host.equals(other.host))
- return false;
- if (identifier == null) {
- if (other.identifier != null)
- return false;
- } else if (!identifier.equals(other.identifier))
- return false;
- return true;
- }
- }
-
- public static class Context {
- private String path;
- private String host;
- private String jvmRoute;
- private boolean isEnabled;
-
- public Context(String jvmRoute, String host, String path) {
- this(jvmRoute, host, path, false);
- }
-
- public Context(String jvmRoute, String host, String path, boolean isEnabled) {
- this.jvmRoute = jvmRoute;
- this.host = host;
- this.path = path;
- this.isEnabled = isEnabled;
- }
-
- public String getPath() {
- return path;
- }
-
- public String getHost() {
- return host;
- }
-
- public String getJvmRoute() {
- return jvmRoute;
- }
-
- public boolean isEnabled() {
- return isEnabled;
- }
-
- public String createKey() {
- return jvmRoute + ":" + host + ":" + path;
- }
-
- public String createName() {
- return host + ":" + path;
- }
-
- @Override
- public String toString() {
- return createKey();
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((host == null) ? 0 : host.hashCode());
- result = prime * result + ((jvmRoute == null) ? 0 : jvmRoute.hashCode());
- result = prime * result + ((path == null) ? 0 : path.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- Context other = (Context) obj;
- if (host == null) {
- if (other.host != null)
- return false;
- } else if (!host.equals(other.host))
- return false;
- if (jvmRoute == null) {
- if (other.jvmRoute != null)
- return false;
- } else if (!jvmRoute.equals(other.jvmRoute))
- return false;
- if (path == null) {
- if (other.path != null)
- return false;
- } else if (!path.equals(other.path))
- return false;
- return true;
- }
-
- public static Context fromString(String stringRepresentation) throws Exception {
- String parts[] = stringRepresentation.trim().split(":");
- if (parts.length < 3) {
- throw new Exception("Parsing error. Not enough information to create a context.");
- }
-
- return new Context(parts[0], parts[1], parts[2]);
- }
- }
-}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/WebappContextComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/WebappContextComponent.java
new file mode 100644
index 0000000..6131578
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/WebappContextComponent.java
@@ -0,0 +1,117 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.plugins.modcluster;
+
+import java.util.concurrent.TimeUnit;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.mc4j.ems.connection.bean.EmsBean;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.pluginapi.operation.OperationResult;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+import org.rhq.plugins.modcluster.helper.JBossHelper;
+import org.rhq.plugins.modcluster.model.ProxyInfo;
+
+/**
+ * Manages a mod_cluster context entity.
+ *
+ * @author Stefan Negrea
+ */
+@SuppressWarnings({ "rawtypes", "deprecation" })
+public class WebappContextComponent extends MBeanResourceComponent<MBeanResourceComponent> {
+
+ private static final Log log = LogFactory.getLog(WebappContextComponent.class);
+
+ @Override
+ protected EmsBean loadBean() {
+ return getResourceContext().getParentResourceComponent().getEmsBean();
+ }
+
+ @Override
+ public AvailabilityType getAvailability() {
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ try {
+ Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
+ String rawProxyInfo = JBossHelper.getRawProxyInfo(getEmsBean());
+
+ ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
+
+ ProxyInfo.Context context = ProxyInfo.Context.fromString(resourceContext.getResourceKey());
+
+ int indexOfCurrentContext = proxyInfo.getAvailableContexts().indexOf(context);
+
+ if (indexOfCurrentContext != -1) {
+ ProxyInfo.Context currentContext = proxyInfo.getAvailableContexts().get(indexOfCurrentContext);
+
+ if (currentContext.isEnabled()) {
+ return AvailabilityType.UP;
+ }
+ }
+
+ return AvailabilityType.DOWN;
+ } catch (Exception e) {
+ log.info(e);
+ return AvailabilityType.DOWN;
+ } finally {
+ Thread.currentThread().setContextClassLoader(cl);
+ }
+ }
+
+ @Override
+ public OperationResult invokeOperation(String name, Configuration parameters) throws Exception {
+ if ("enableContext".equals(name) || "disableContext".equals(name) || "stopContext".equals(name)) {
+
+ ProxyInfo.Context context = ProxyInfo.Context.fromString(resourceContext.getResourceKey());
+
+ Object[] configuration = null;
+ if ("stopContext".equals(name)) {
+ configuration = new Object[] { context.getHost(), context.getPath(),
+ parameters.getSimple("timeout").getLongValue(),
+ TimeUnit.valueOf(parameters.getSimple("unit").getStringValue()) };
+ } else {
+ configuration = new Object[] { context.getHost(), context.getPath() };
+ }
+
+ if (context.getPath().equals("/")) {
+ configuration[1] = "ROOT";
+ }
+
+ log.info(name + " - " + context.getHost() + " " + context.getPath());
+
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ try {
+ Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
+ Object resultObject = getEmsBean().getOperation(name).invoke(configuration);
+
+ if (resultObject instanceof OperationResult) {
+ return (OperationResult) resultObject;
+ } else {
+ return new OperationResult(String.valueOf(resultObject));
+ }
+ } finally {
+ Thread.currentThread().setContextClassLoader(cl);
+ }
+ }
+
+ throw new Exception("Operation " + name + " not available mod_cluster WebApp service.");
+ }
+}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/WebappContextDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/WebappContextDiscoveryComponent.java
new file mode 100644
index 0000000..559e1b6
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/WebappContextDiscoveryComponent.java
@@ -0,0 +1,105 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.plugins.modcluster;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.mc4j.ems.connection.EmsConnection;
+import org.mc4j.ems.connection.bean.EmsBean;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+import org.rhq.plugins.modcluster.helper.JBossHelper;
+import org.rhq.plugins.modcluster.model.ProxyInfo;
+
+/**
+ * Discovers mod_cluster contexts from the proxyInfo mbean property.
+ *
+ * @author Stefan Negrea
+ */
+@SuppressWarnings("rawtypes")
+public class WebappContextDiscoveryComponent implements ResourceDiscoveryComponent<MBeanResourceComponent> {
+
+ private static final String JVM_ROUTE_PROPERTY = "jvmRoute";
+ private static final String ENGINE_OBJECT_NAME = "engineObjectName";
+
+ /* (non-Javadoc)
+ * @see org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent#discoverResources(org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext)
+ */
+ public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<MBeanResourceComponent> context) {
+ String jvmRoute = this.getJvmRoute(context);
+
+ EmsBean configBean = context.getParentResourceComponent().getEmsBean();
+ String rawProxyInfo = JBossHelper.getRawProxyInfo(configBean);
+
+ ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
+ Set<DiscoveredResourceDetails> entities = new HashSet<DiscoveredResourceDetails>();
+
+ for (ProxyInfo.Context availableContext : proxyInfo.getAvailableContexts()) {
+ if (availableContext.getJvmRoute().equals(jvmRoute)) {
+ DiscoveredResourceDetails detail = new DiscoveredResourceDetails(context.getResourceType(),
+ availableContext.createKey(), availableContext.createName(), null, "Webapp Context", null, null);
+ entities.add(detail);
+ }
+ }
+
+ return entities;
+ }
+
+ /**
+ * Retrieves the jvm route for the node from the parent context.
+ *
+ * @param context the discovery context
+ * @return node's jvm route
+ */
+ private String getJvmRoute(ResourceDiscoveryContext<MBeanResourceComponent> context) {
+ Configuration pluginConfig = context.getParentResourceComponent().getResourceContext().getPluginConfiguration();
+ String engineObjectName = pluginConfig.getSimple(ENGINE_OBJECT_NAME).getStringValue();
+ EmsBean engineBean = this.loadBean(engineObjectName, context.getParentResourceComponent());
+
+ return (String) engineBean.getAttribute(JVM_ROUTE_PROPERTY).refresh().toString();
+ }
+
+ /**
+ * Loads the bean with the given object name.
+ *
+ * Subclasses are free to override this method in order to load the bean.
+ *
+ * @param objectName the name of the bean to load
+ * @return the bean that is loaded
+ */
+ protected EmsBean loadBean(String objectName, MBeanResourceComponent context) {
+ EmsConnection emsConnection = context.getEmsConnection();
+ EmsBean bean = emsConnection.getBean(objectName);
+ if (bean == null) {
+ // In some cases, this resource component may have been discovered by some means other than querying its
+ // parent's EMSConnection (e.g. ApplicationDiscoveryComponent uses a filesystem to discover EARs and
+ // WARs that are not yet deployed). In such cases, getBean() will return null, since EMS won't have the
+ // bean in its cache. To cover such cases, make an attempt to query the underlying MBeanServer for the
+ // bean before giving up.
+ emsConnection.queryBeans(objectName);
+ bean = emsConnection.getBean(objectName);
+ }
+ return bean;
+ }
+}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/model/ProxyInfo.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/model/ProxyInfo.java
new file mode 100644
index 0000000..9cedad5
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/model/ProxyInfo.java
@@ -0,0 +1,310 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.plugins.modcluster.model;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Simple parser for the raw proxy information provided by mod_cluster.
+ *
+ * @author Stefan Negrea
+ */
+public class ProxyInfo {
+
+ private Map<String, Node> availableNodes = new HashMap<String, Node>();
+ private Map<String, Vhost> availableVhosts = new HashMap<String, Vhost>();
+ private List<Context> availableContexts = new ArrayList<ProxyInfo.Context>();
+
+ public ProxyInfo(String rawProxyInfo) {
+ parseNodes(rawProxyInfo);
+ parseVhosts(rawProxyInfo);
+ parseContexts(rawProxyInfo);
+ }
+
+ private void parseNodes(String rawProxyInfo) {
+ Pattern nodePattern = Pattern.compile("Node:.*\n");
+ Matcher nodeMatcher = nodePattern.matcher(rawProxyInfo);
+ while (nodeMatcher.find()) {
+ String rawNode = nodeMatcher.group();
+ String[] nodePieces = rawNode.split(",");
+
+ String identifier = nodePieces[0];
+ identifier = identifier.substring(identifier.indexOf("[") + 1, identifier.indexOf("]"));
+
+ String jvmRoute = nodePieces[1];
+ jvmRoute = jvmRoute.substring(jvmRoute.indexOf(':') + 1).trim();
+
+ availableNodes.put(identifier, new Node(jvmRoute, identifier));
+ }
+ }
+
+ private void parseVhosts(String rawProxyInfo) {
+ Pattern vhostPattern = Pattern.compile("Vhost:.*\n");
+ Matcher vhostMatcher = vhostPattern.matcher(rawProxyInfo);
+ while (vhostMatcher.find()) {
+ String rawVhost = vhostMatcher.group();
+ String[] vhostPieces = rawVhost.split(",");
+
+ String identifier = vhostPieces[0].trim();
+ identifier = identifier.substring(identifier.indexOf("[") + 1, identifier.indexOf("]"));
+ identifier = identifier.substring(0, identifier.lastIndexOf(":"));
+
+ String host = vhostPieces[1].trim();
+ host = host.substring(host.indexOf(":") + 1).trim();
+
+ availableVhosts.put(identifier, new Vhost(identifier, host));
+ }
+ }
+
+ private void parseContexts(String rawProxyInfo) {
+ Pattern contextPattern = Pattern.compile("Context:.*[\n|}]");
+ Matcher contextMatcher = contextPattern.matcher(rawProxyInfo);
+ while (contextMatcher.find()) {
+ String rawContext = contextMatcher.group();
+ String[] contextPieces = rawContext.split(",");
+ String actualContext = contextPieces[1].substring(contextPieces[1].indexOf("/")).trim();
+
+ String identifier = contextPieces[0];
+ identifier = identifier.substring(identifier.indexOf("[") + 1, identifier.indexOf("]"));
+ identifier = identifier.substring(0, identifier.lastIndexOf(":"));
+
+ String nodeIdentifier = contextPieces[0];
+ nodeIdentifier = nodeIdentifier.substring(nodeIdentifier.indexOf("[") + 1, nodeIdentifier.indexOf("]"));
+ nodeIdentifier = nodeIdentifier.substring(0, nodeIdentifier.indexOf(":"));
+ String jvmRoute = availableNodes.get(nodeIdentifier).getJvmRoute();
+
+ String rawIsEnabled = contextPieces[2];
+ rawIsEnabled = rawIsEnabled.substring(rawIsEnabled.indexOf(':') + 1).trim();
+ boolean isEnabled = rawIsEnabled.equals("ENABLED") ? true : false;
+
+ Vhost relatedVhost = availableVhosts.get(identifier);
+
+ availableContexts.add(new Context(jvmRoute, relatedVhost.getHost(), actualContext, isEnabled));
+ }
+ }
+
+ public List<Context> getAvailableContexts() {
+ return Collections.unmodifiableList(availableContexts);
+ }
+
+ public List<Vhost> getAvailableVhosts() {
+ return Collections.unmodifiableList(new ArrayList<Vhost>(availableVhosts.values()));
+ }
+
+ public List<Node> getAvailableNodes() {
+ return Collections.unmodifiableList(new ArrayList<Node>(availableNodes.values()));
+ }
+
+ public static class Node {
+ private String jvmRoute;
+ private String nodeId;
+
+ public Node(String jvmRoute, String nodeId) {
+ this.jvmRoute = jvmRoute;
+ this.nodeId = nodeId;
+ }
+
+ public String getNodeId() {
+ return nodeId;
+ }
+
+ public String getJvmRoute() {
+ return jvmRoute;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((jvmRoute == null) ? 0 : jvmRoute.hashCode());
+ result = prime * result + ((nodeId == null) ? 0 : nodeId.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Node other = (Node) obj;
+ if (jvmRoute == null) {
+ if (other.jvmRoute != null)
+ return false;
+ } else if (!jvmRoute.equals(other.jvmRoute))
+ return false;
+ if (nodeId == null) {
+ if (other.nodeId != null)
+ return false;
+ } else if (!nodeId.equals(other.nodeId))
+ return false;
+ return true;
+ }
+ }
+
+ public static class Vhost {
+ private String identifier;
+ private String host;
+
+ public Vhost(String identifier, String host) {
+ this.identifier = identifier;
+ this.host = host;
+ }
+
+ public String getIdentifier() {
+ return identifier;
+ }
+
+ public String getHost() {
+ return host;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((host == null) ? 0 : host.hashCode());
+ result = prime * result + ((identifier == null) ? 0 : identifier.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Vhost other = (Vhost) obj;
+ if (host == null) {
+ if (other.host != null)
+ return false;
+ } else if (!host.equals(other.host))
+ return false;
+ if (identifier == null) {
+ if (other.identifier != null)
+ return false;
+ } else if (!identifier.equals(other.identifier))
+ return false;
+ return true;
+ }
+ }
+
+ public static class Context {
+ private String path;
+ private String host;
+ private String jvmRoute;
+ private boolean isEnabled;
+
+ public Context(String jvmRoute, String host, String path) {
+ this(jvmRoute, host, path, false);
+ }
+
+ public Context(String jvmRoute, String host, String path, boolean isEnabled) {
+ this.jvmRoute = jvmRoute;
+ this.host = host;
+ this.path = path;
+ this.isEnabled = isEnabled;
+ }
+
+ public String getPath() {
+ return path;
+ }
+
+ public String getHost() {
+ return host;
+ }
+
+ public String getJvmRoute() {
+ return jvmRoute;
+ }
+
+ public boolean isEnabled() {
+ return isEnabled;
+ }
+
+ public String createKey() {
+ return jvmRoute + ":" + host + ":" + path;
+ }
+
+ public String createName() {
+ return host + ":" + path;
+ }
+
+ @Override
+ public String toString() {
+ return createKey();
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((host == null) ? 0 : host.hashCode());
+ result = prime * result + ((jvmRoute == null) ? 0 : jvmRoute.hashCode());
+ result = prime * result + ((path == null) ? 0 : path.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Context other = (Context) obj;
+ if (host == null) {
+ if (other.host != null)
+ return false;
+ } else if (!host.equals(other.host))
+ return false;
+ if (jvmRoute == null) {
+ if (other.jvmRoute != null)
+ return false;
+ } else if (!jvmRoute.equals(other.jvmRoute))
+ return false;
+ if (path == null) {
+ if (other.path != null)
+ return false;
+ } else if (!path.equals(other.path))
+ return false;
+ return true;
+ }
+
+ public static Context fromString(String stringRepresentation) throws Exception {
+ String parts[] = stringRepresentation.trim().split(":");
+ if (parts.length < 3) {
+ throw new Exception("Parsing error. Not enough information to create a context.");
+ }
+
+ return new Context(parts[0], parts[1], parts[2]);
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 7e1a79f..6f46849 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -440,7 +440,7 @@
</resource-configuration>
</service>
- <service name="Webapp Context" discovery="ContextDiscoveryComponent" class="ContextComponent" description="Webapp Context">
+ <service name="Webapp Context" discovery="WebappContextDiscoveryComponent" class="WebappContextComponent" description="Webapp Context">
<operation name="disableContext" displayName="Disable webapp" description="Disable this webapp.">
<results>
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
index 625d8d4..ebadd86 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ProxyInfoTest.java
@@ -23,7 +23,7 @@ import java.io.InputStream;
import org.testng.annotations.Test;
-import org.rhq.plugins.modcluster.ProxyInfo;
+import org.rhq.plugins.modcluster.model.ProxyInfo;
/**
* @author Stefan Negrea
commit ad611c88d9d1fd60a223b209d98a7fde88969e07
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Wed Aug 24 12:05:40 2011 -0400
[BZ 676761] display a friendly error, rather than an ugly stack trace, if the
user enters an invalid search expression on the Resource or group list views
(https://bugzilla.redhat.com/show_bug.cgi?id=676761)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupCompositeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupCompositeDataSource.java
index ab30354..584e652 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupCompositeDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupCompositeDataSource.java
@@ -47,6 +47,7 @@ import org.rhq.enterprise.gui.coregui.client.ImageManager;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.gwt.ResourceGroupGWTServiceAsync;
import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
/**
* @author Joseph Marques
@@ -105,7 +106,12 @@ public class ResourceGroupCompositeDataSource extends RPCDataSource<ResourceGrou
groupService.findResourceGroupCompositesByCriteria(criteria,
new AsyncCallback<PageList<ResourceGroupComposite>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.view_inventory_groups_loadFailed(), caught);
+ if (caught.getMessage().contains("SearchExpressionException")) {
+ Message message = new Message("Invalid search expression.", Message.Severity.Error);
+ CoreGUI.getMessageCenter().notify(message);
+ } else {
+ CoreGUI.getErrorHandler().handleError(MSG.view_inventory_groups_loadFailed(), caught);
+ }
response.setStatus(RPCResponse.STATUS_FAILURE);
processResponse(request.getRequestId(), response);
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceDatasource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceDatasource.java
index 801e8fa..6c6c673 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceDatasource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceDatasource.java
@@ -60,6 +60,7 @@ import org.rhq.enterprise.gui.coregui.client.gwt.ResourceGWTServiceAsync;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository.TypesLoadedCallback;
import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
/**
* @author Greg Hinkle
@@ -164,7 +165,12 @@ public class ResourceDatasource extends RPCDataSource<Resource, ResourceCriteria
public void executeFetch(final DSRequest request, final DSResponse response, final ResourceCriteria criteria) {
resourceService.findResourcesByCriteria(criteria, new AsyncCallback<PageList<Resource>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.view_inventory_resources_loadFailed(), caught);
+ if (caught.getMessage().contains("SearchExpressionException")) {
+ Message message = new Message("Invalid search expression.", Message.Severity.Error);
+ CoreGUI.getMessageCenter().notify(message);
+ } else {
+ CoreGUI.getErrorHandler().handleError(MSG.view_inventory_resources_loadFailed(), caught);
+ }
response.setStatus(RPCResponse.STATUS_FAILURE);
processResponse(request.getRequestId(), response);
}
commit 1fac1f54c438561b1c1907719d55b03f88e8aa43
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Aug 24 11:22:35 2011 -0400
Do not have the change set reader automatically close stream when reading change set file
The reader was automatically closing the stream which caused an
exception in ZipUtil.walkZipFile. This didn't cause a loss in
functionality since the zip file only has one file; however this fix is
needed to avoid noise in the logs and also to handle the future
possibility of the change set zip containing multiple files.
diff --git a/modules/common/drift/src/main/java/org/rhq/common/drift/ChangeSetReaderImpl.java b/modules/common/drift/src/main/java/org/rhq/common/drift/ChangeSetReaderImpl.java
index a935e66..21d72f5 100644
--- a/modules/common/drift/src/main/java/org/rhq/common/drift/ChangeSetReaderImpl.java
+++ b/modules/common/drift/src/main/java/org/rhq/common/drift/ChangeSetReaderImpl.java
@@ -55,6 +55,8 @@ public class ChangeSetReaderImpl implements ChangeSetReader {
private Headers headers;
+ private boolean closeStream;
+
public ChangeSetReaderImpl(File metaDataFile) throws ChangeSetReaderException {
try {
this.metaDataFile = metaDataFile;
@@ -70,8 +72,23 @@ public class ChangeSetReaderImpl implements ChangeSetReader {
}
public ChangeSetReaderImpl(Reader metaDataFile) throws Exception {
+ this(metaDataFile, false);
+ }
+
+ /**
+ * Creates a new change set reader. This constructor takes a boolean argument that can
+ * be used to prevent the reader from closing the stream when using its iterator. Note
+ * that calling {@link #close()} will close the stream regardless of the value of
+ * closeStream.
+ *
+ * @param metaDataFile
+ * @param closeStream
+ * @throws Exception
+ */
+ public ChangeSetReaderImpl(Reader metaDataFile, boolean closeStream) throws Exception {
reader = new BufferedReader(metaDataFile);
readHeaders();
+ this.closeStream = closeStream;
}
private void readHeaders() throws IOException {
@@ -158,7 +175,7 @@ public class ChangeSetReaderImpl implements ChangeSetReader {
try {
FileEntry previous = next;
next = read();
- if (next == null) {
+ if (next == null && closeStream) {
close();
}
return previous;
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/JPADriftServerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/JPADriftServerBean.java
index dd4c6c9..c3a34bf 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/JPADriftServerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/JPADriftServerBean.java
@@ -238,7 +238,7 @@ public class JPADriftServerBean implements JPADriftServerLocal {
try {
ChangeSetReader reader = new ChangeSetReaderImpl(new BufferedReader(new InputStreamReader(
- stream)));
+ stream)), false);
// store the new change set info (not the actual blob)
DriftConfiguration config = findDriftConfiguration(resource, reader.getHeaders());
commit 1138b48738fa014a8f017c248ac5c75606115a51
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Aug 24 10:33:28 2011 -0400
Ensure only content files are stored in the content zip file
In my previous commit, I changed the location of content.zip to be
<agent_home>/data/changesets<resource_id>/<drift_config_id>/content/content.zip.
This ensures that DriftManager doesn't overwrite content files. That
change resulted in content.zip before stored in itself. This commit
makes sure that it is filtered out.
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
index e640c7e..c550f2d 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
@@ -24,6 +24,7 @@ import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
+import java.io.FilenameFilter;
import java.io.IOException;
import java.util.List;
import java.util.Set;
@@ -165,12 +166,19 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
}
@Override
- public void sendChangeSetContentToServer(int resourceId, String driftConfigurationName, File contentDir) {
+ public void sendChangeSetContentToServer(int resourceId, String driftConfigurationName, final File contentDir) {
try {
File zipFile = new File(contentDir, "content.zip");
ZipOutputStream stream = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(zipFile)));
- for (File file : contentDir.listFiles()) {
+ FilenameFilter contentZipFilter = new FilenameFilter() {
+ @Override
+ public boolean accept(File dir, String name) {
+ return dir.equals(contentDir) && !name.equals("content.zip");
+ }
+ };
+
+ for (File file : contentDir.listFiles(contentZipFilter)) {
FileInputStream fis = new FileInputStream(file);
stream.putNextEntry(new ZipEntry(file.getName()));
StreamUtil.copy(fis, stream, false);
diff --git a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftManagerTest.java b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftManagerTest.java
index b9c576d..13fe5ed 100644
--- a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftManagerTest.java
+++ b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftManagerTest.java
@@ -20,11 +20,8 @@
package org.rhq.core.pc.drift;
import java.io.File;
-import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipOutputStream;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -32,7 +29,6 @@ import org.testng.annotations.Test;
import org.rhq.core.clientapi.server.drift.DriftServerService;
import org.rhq.core.pc.PluginContainerConfiguration;
import org.rhq.core.pc.ServerServices;
-import org.rhq.core.util.stream.StreamUtil;
import static org.rhq.core.util.ZipUtil.unzipFile;
import static org.testng.Assert.assertEquals;
@@ -137,6 +133,8 @@ public class DriftManagerTest extends DriftTest {
fail("Failed to unzip zip file from intput stream into " + zipDir.getPath(), e);
}
+ assertEquals(zipDir.listFiles().length, expectedFiles.length, "The zip file has the wrong number of files");
+
for (File expectedFile : expectedFiles) {
File actualFile = findFile(zipDir, expectedFile);
@@ -163,13 +161,6 @@ public class DriftManagerTest extends DriftTest {
return null;
}
- private void addToZipFile(File file, ZipOutputStream stream) throws Exception {
- FileInputStream fis = new FileInputStream(file);
- stream.putNextEntry(new ZipEntry(file.getName()));
- StreamUtil.copy(fis, stream, false);
- fis.close();
- }
-
/**
* Sets a callback that will be invoked immediately after DriftManager calls
* {@link DriftServerService#sendChangesetZip(int, long, java.io.InputStream)} or
commit f5318369a4f710cfc6d24c2c18f13f0b910418d8
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Aug 24 10:08:27 2011 -0400
Purge change set content directory after sending content to server
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftClient.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftClient.java
index 0f4f7cf..8398b82 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftClient.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftClient.java
@@ -13,6 +13,15 @@ public interface DriftClient {
void sendChangeSetToServer(int resourceId, DriftConfiguration driftConfiguration, DriftChangeSetCategory type);
+ /**
+ * Sends requested content to the server. All of the files in the content directory are
+ * zipped up, and the zip file is sent to the server. After the zip file is sent to the
+ * server, the content directory is purged.
+ *
+ * @param resourceId
+ * @param driftConfigurationName
+ * @param contentDir
+ */
void sendChangeSetContentToServer(int resourceId, String driftConfigurationName, File contentDir);
File getAbsoluteBaseDirectory(int resourceId, DriftConfiguration driftConfiguration);
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
index 8b782ce..e640c7e 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
@@ -167,7 +167,7 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
@Override
public void sendChangeSetContentToServer(int resourceId, String driftConfigurationName, File contentDir) {
try {
- File zipFile = new File(pluginContainerConfiguration.getTemporaryDirectory(), "content.zip");
+ File zipFile = new File(contentDir, "content.zip");
ZipOutputStream stream = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(zipFile)));
for (File file : contentDir.listFiles()) {
@@ -185,6 +185,12 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
log.error("An error occurred while trying to send content for changeset[resourceId: " + resourceId
+ ", driftConfiguration: " + driftConfigurationName + "]", e);
}
+
+ for (File file : contentDir.listFiles()) {
+ if (!file.delete()) {
+ log.warn("Unable to clean up content directory. Failed to delete " + file.getPath());
+ }
+ }
}
@Override
diff --git a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftManagerTest.java b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftManagerTest.java
index bd49c20..b9c576d 100644
--- a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftManagerTest.java
+++ b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftManagerTest.java
@@ -37,6 +37,8 @@ import org.rhq.core.util.stream.StreamUtil;
import static org.rhq.core.util.ZipUtil.unzipFile;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.fail;
public class DriftManagerTest extends DriftTest {
@@ -46,7 +48,7 @@ public class DriftManagerTest extends DriftTest {
private PluginContainerConfiguration pcConfig;
-// private DriftManager driftMgr;
+ private DriftManager driftMgr;
@BeforeMethod
public void initTest() throws Exception {
@@ -59,6 +61,30 @@ public class DriftManagerTest extends DriftTest {
pcConfig.setServerServices(serverServices);
pcConfig.setDataDirectory(basedir());
pcConfig.setTemporaryDirectory(tmpDir);
+
+ driftMgr = new DriftManager();
+ driftMgr.setConfiguration(pcConfig);
+ }
+
+ @Test
+ public void writeContentZipFileToChangeSetContentDirectory() throws Exception {
+ String configName = "send-content-in-zip";
+ File changeSetDir = changeSetDir(configName);
+ final File contentDir = mkdir(changeSetDir, "content");
+
+ createRandomFile(contentDir, "content-1");
+ createRandomFile(contentDir, "content-2");
+
+ setDriftServiceCallback(new DriftServiceCallback() {
+ @Override
+ public void execute() {
+ File contentZip = new File(contentDir, "content.zip");
+ assertTrue(contentZip.exists(), "Expected content zip file to be written to the change set content " +
+ "directory: " + contentDir.getPath());
+ }
+ });
+
+ driftMgr.sendChangeSetContentToServer(resourceId(), configName, contentDir);
}
@Test
@@ -67,40 +93,52 @@ public class DriftManagerTest extends DriftTest {
File changeSetDir = changeSetDir(configName);
File contentDir = mkdir(changeSetDir, "content");
- File content1 = createRandomFile(contentDir, "content-1");
- File content2 = createRandomFile(contentDir, "content-2");
+ final File content1 = createRandomFile(contentDir, "content-1");
+ final File content2 = createRandomFile(contentDir, "content-2");
- DriftManager driftMgr = new DriftManager();
- driftMgr.setConfiguration(pcConfig);
+ setDriftServiceCallback(new DriftServiceCallback() {
+ @Override
+ public void execute() {
+ assertZipFileMatches(driftServerService.filesZipStream, content1, content2);
+ }
+ });
driftMgr.sendChangeSetContentToServer(resourceId(), configName, contentDir);
+ }
- File outputDir = new File(tmpDir, "output");
- outputDir.mkdir();
- unzipFile(driftServerService.filesZipStream, outputDir);
+ @Test
+ public void cleanUpAfterSendingContentToServer() throws Exception {
+ String configName = "clean-up-after-sending-content";
+ File changeSetDir = changeSetDir(configName);
+ File contentDir = mkdir(changeSetDir, "content");
- assertEquals(outputDir.listFiles().length, 2, "Expected the zip file to contain two entries");
- assertZipFileMatches(outputDir, content1, content2);
- }
+ createRandomFile(contentDir, "content-1");
+ createRandomFile(contentDir, "content-2");
-// @Test
-// public void cleanUpAfterSendingContentToServer() throws Exception {
-// String configName = "clean-up-after-sending-content";
-// File changeSetDir = changeSetDir(configName);
-// File contentDir = mkdir(changeSetDir, "content");
-// }
+ driftMgr.sendChangeSetContentToServer(resourceId(), configName, contentDir);
+
+ assertThatDirectoryIsEmpty(contentDir);
+ }
/**
* This method first verifies that each of the expected files is contained in the the
* zip file. Then it verifies that the content for each file in the zip file matches
* the expected files by comparing their SHA-256 hashes.
*
- * @param zipDir
+ * @param zipStream
* @param expectedFiles
* @throws IOException
*/
- private void assertZipFileMatches(File zipDir, File... expectedFiles) throws IOException {
+ private void assertZipFileMatches(InputStream zipStream, File... expectedFiles) {
+ File zipDir = new File(tmpDir, "output");
+ try {
+ unzipFile(zipStream, zipDir);
+ } catch (IOException e) {
+ fail("Failed to unzip zip file from intput stream into " + zipDir.getPath(), e);
+ }
+
for (File expectedFile : expectedFiles) {
+
File actualFile = findFile(zipDir, expectedFile);
assertNotNull(actualFile, "Expected zip file to contain " + expectedFile.getName());
@@ -112,6 +150,10 @@ public class DriftManagerTest extends DriftTest {
}
}
+ private void assertThatDirectoryIsEmpty(File dir) {
+ assertEquals(dir.listFiles().length, 0, "Expected " + dir.getPath() + " to be empty");
+ }
+
private File findFile(File dir, File file) {
for (File f : dir.listFiles()) {
if (f.getName().equals(file.getName())) {
@@ -128,12 +170,27 @@ public class DriftManagerTest extends DriftTest {
fis.close();
}
+ /**
+ * Sets a callback that will be invoked immediately after DriftManager calls
+ * {@link DriftServerService#sendChangesetZip(int, long, java.io.InputStream)} or
+ * {@link DriftServerService#sendFilesZip(int, long, java.io.InputStream)}. The callback
+ * can perform any verification as necessary, and that will happen before the call to
+ * to DriftServerService returns.
+ *
+ * @param callback
+ */
+ private void setDriftServiceCallback(DriftServiceCallback callback) {
+ driftServerService.callback = callback;
+ }
+
private static class TestDriftServerService implements DriftServerService {
public int filesZipResourceId;
public long filesZipSize;
public InputStream filesZipStream;
+ public DriftServiceCallback callback;
+
@Override
public void sendChangesetZip(int resourceId, long zipSize, InputStream zipStream) {
}
@@ -143,7 +200,19 @@ public class DriftManagerTest extends DriftTest {
filesZipResourceId = resourceId;
filesZipSize = zipSize;
filesZipStream = zipStream;
+
+ if (callback != null) {
+ callback.execute();
+ }
}
}
+ /**
+ * This callback interface provides a hook for doing any verification immediately after
+ * DriftManager calls DriftServerService.
+ */
+ private static interface DriftServiceCallback {
+ void execute();
+ }
+
}
diff --git a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftTest.java b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftTest.java
index b1ab9ec..a22b26f 100644
--- a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftTest.java
+++ b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftTest.java
@@ -202,8 +202,12 @@ public class DriftTest {
* @return The SHA-256 hash as a string
* @throws IOException
*/
- protected String sha256(File file) throws IOException {
- return digestGenerator.calcDigestString(file);
+ protected String sha256(File file) {
+ try {
+ return digestGenerator.calcDigestString(file);
+ } catch (IOException e) {
+ throw new RuntimeException("Failed to calculate SHA-256 hash for " + file.getPath(), e);
+ }
}
protected File createRandomFile(File dir, String fileName) throws Exception {
commit d686a211d51682884c38f87deaf2faea2f78f6c9
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue Aug 23 20:54:36 2011 -0400
Work on Search Bar [BZ 695889]
NPE protection for some saved search actions
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SavedSearchManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SavedSearchManagerBean.java
index 759658e..5ebf6c8 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SavedSearchManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/SavedSearchManagerBean.java
@@ -63,7 +63,7 @@ public class SavedSearchManagerBean implements SavedSearchManagerLocal /* local
// this needs to prevent certains types of updates, be more sophisticated, etc
validateManipulatePermission(subject, savedSearch);
SavedSearch oldSavedSearch = entityManager.find(SavedSearch.class, savedSearch.getId());
- if (oldSavedSearch.equals(savedSearch)) {
+ if (null == oldSavedSearch || oldSavedSearch.equals(savedSearch)) {
return false;
} else {
entityManager.merge(savedSearch);
@@ -76,8 +76,10 @@ public class SavedSearchManagerBean implements SavedSearchManagerLocal /* local
*/
public void deleteSavedSearch(Subject subject, int savedSearchId) {
SavedSearch savedSearch = entityManager.find(SavedSearch.class, savedSearchId);
- validateManipulatePermission(subject, savedSearch);
- entityManager.remove(savedSearch);
+ if (null != savedSearch) {
+ validateManipulatePermission(subject, savedSearch);
+ entityManager.remove(savedSearch);
+ }
}
/**
commit 876517e012d468e9841f3a15432cd801df0d404d
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue Aug 23 20:54:02 2011 -0400
Work on Search Bar [BZ 695889]
Keep focus in the text box as much as possible. This allows more natural
editing of the pattern, and avoids causing unanticipated browser
when just trying to perform text box delete.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java
index 28aabb6..a2e2d5d 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java
@@ -101,6 +101,8 @@ public class SuggestTextBox_v3 extends Composite implements HasText, HasAllFocus
// suggestionMenu must be created before suggestionPopup, because
// suggestionMenu is suggestionPopup's widget
suggestionMenu = new SuggestionMenu(true);
+ // let the text box maintain focus when navigating the menu
+ suggestionMenu.setFocusOnHoverEnabled(false);
suggestionPopup = createPopup();
// need to fork PopupPanel to access the animation type
@@ -189,6 +191,8 @@ public class SuggestTextBox_v3 extends Composite implements HasText, HasAllFocus
} else {
suggestionPopup.hide();
}
+
+ setFocus(true);
}
private void addEventsToTextBox() {
commit 101f9542e726a2a3b68fa74f83422110d4be5f61
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue Aug 23 20:42:53 2011 -0400
[BZ 729329 - if RHQ server is down, UI shows globally uncaught exception]
Catch certain gttp response codes and use them to inform the user that
the server is not reachable. For Firefox, handle the fact that even
trying to read the response code causes a javascript exception.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/TrackingRequestCallback.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/TrackingRequestCallback.java
index 44264bb..734adda 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/TrackingRequestCallback.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/TrackingRequestCallback.java
@@ -23,6 +23,7 @@ import com.google.gwt.http.client.Request;
import com.google.gwt.http.client.RequestCallback;
import com.google.gwt.http.client.Response;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.UserSessionManager;
/**
@@ -36,6 +37,8 @@ public class TrackingRequestCallback implements RequestCallback {
private long start = System.currentTimeMillis();
private static final int STATUS_CODE_OK = 200;
+ private static final int STATUS_CODE_ERROR_INTERNET_CANNOT_CONNECT = 12029;
+ private static final int STATUS_CODE_ERROR_INTERNET_CONNECTION_ABORTED = 12030;
private RequestCallback callback;
@@ -58,17 +61,48 @@ public class TrackingRequestCallback implements RequestCallback {
}
public void onResponseReceived(Request request, Response response) {
+ int statusCode;
+ String statusText;
+
+ try {
+ statusCode = response.getStatusCode();
+ statusText = response.getStatusText();
+ } catch (Throwable t) {
+ // If the server is unreachable or has terminated firefox will generate a JavaScript exception
+ // when trying to read the response object. Let the user know the server is unreachable.
+ // (http://helpful.knobs-dials.com/index.php/0x80004005_%28NS_ERROR_FAILURE%2...
+ if (UserSessionManager.isLoggedIn()) {
+ CoreGUI.getErrorHandler().handleError(CoreGUI.getMessages().view_core_serverUnreachable(), t);
+ }
+ return;
+ }
+
if (Log.isTraceEnabled()) {
- Log.trace(toString() + ": " + response.getStatusCode() + "/" + response.getStatusText());
+ Log.trace(toString() + ": " + statusCode + "/" + statusText);
}
RemoteServiceStatistics.record(getName(), getAge());
- if (STATUS_CODE_OK == response.getStatusCode()) {
+
+ switch (statusCode) {
+ case STATUS_CODE_OK:
RPCTracker.getInstance().succeedCall(this);
callback.onResponseReceived(request, response);
- } else {
+ break;
+
+ case STATUS_CODE_ERROR_INTERNET_CANNOT_CONNECT:
+ case STATUS_CODE_ERROR_INTERNET_CONNECTION_ABORTED:
+ RPCTracker.getInstance().failCall(this);
+ // If the server is unreachable or has terminated, and the user is still logged in,
+ // let them know the server is now unreachable.
+ if (UserSessionManager.isLoggedIn()) {
+ CoreGUI.getErrorHandler().handleError("Server unreachable and may be down");
+ }
+ break;
+
+ default:
RPCTracker.getInstance().failCall(this);
- if (UserSessionManager.isLoggedIn()) { // only handle failures if user still logged in
+ // process the failure only if the user still logged in
+ if (UserSessionManager.isLoggedIn()) {
callback.onResponseReceived(request, response);
}
}
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 93e38ab..2c97890 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
@@ -1102,6 +1102,7 @@ view_connectionSettingsDetails_somePropertiesInvalid = The following connection
view_core_loggedOut = Logged out
view_core_noRecentAlerts = There are no recent alerts to report
view_core_recentAlerts = There are [{0}] recent alerts - click to go to the recent alerts report
+view_core_serverUnreachable = The server is unreachable and may be down
view_core_uncaught = Globally uncaught exception
view_dashboardManager_deleteFail = Failed to delete dashboard.
view_dashboardManager_deleted = Successfully deleted dashboard {0}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
index 19d264b..8710e11 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
@@ -927,6 +927,7 @@ view_connectionSettingsDetails_somePropertiesInvalid = The following connection
view_core_loggedOut = Ausgeloggt
view_core_noRecentAlerts = Es liegen keine frischen Alarme vor
view_core_recentAlerts = [{0}] frische Alarme
+##view_core_serverUnreachable = The server is unreachable and may be down
view_core_uncaught = Es ist eine nicht abgefangene Ausnahme aufgetreten.
view_dashboardManager_deleteFail = Konnte das Dashboard nicht löschen.
view_dashboardManager_deleted = Successfully deleted dashboard {0}~
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
index 2cc6d6b..907f6f2 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
@@ -1089,6 +1089,7 @@ view_connectionSettingsDetails_somePropertiesInvalid = 次のコネクション
view_core_loggedOut = ログアウト
view_core_noRecentAlerts = レポートすべき最近のアラートは存在しません
view_core_recentAlerts = [{0}] 個の最近のアラートがありました - 最近のアラートレポートへクリックしてください
+##view_core_serverUnreachable = The server is unreachable and may be down
view_core_uncaught = グローバルにキャッチされない例外
view_dashboardManager_deleteFail = ダッシュボードの削除に失敗しました
view_dashboardManager_deleted = ダッシュボード {0} の削除に成功しました
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
index ecc380d..f8e28da 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
@@ -1121,6 +1121,7 @@ view_core_loggedInAs = Logado como {0}
view_core_loggedOut = Desconectado
view_core_noRecentAlerts = N�o existem alertas recentes
view_core_recentAlerts = [{0}] alertas recentes
+##view_core_serverUnreachable = The server is unreachable and may be down
view_core_uncaught = Exce\u00E7\u00E3o n\u00E3o capturada
view_dashboardManager_deleteFail = Falha ao excluir o dashboard.
view_dashboardManager_deleted = Dashboard {0} exclu\u00EDdo com sucesso!
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
index ff0bca8..afd099e 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
@@ -1098,6 +1098,7 @@ view_connectionSettingsDetails_somePropertiesInvalid = \u4e0b\u9762\u7684\u8fde\
view_core_loggedOut = \u9000\u51fa\u767b\u5f55
view_core_noRecentAlerts = \u6ca1\u6709\u65b0\u4ea7\u751f\u7684\u544a\u8b66\u4fe1\u606f
view_core_recentAlerts = \u65b0\u4ea7\u751f [{0}] \u6761\u544a\u8b66 - \u70b9\u51fb\u8df3\u8f6c\u5230\u65b0\u544a\u8b66\u62a5\u8868\u754c\u9762
+##view_core_serverUnreachable = The server is unreachable and may be down
view_core_uncaught = \u5168\u5c40\u672a\u6355\u6349\u7684\u5f02\u5e38
view_dashboardManager_deleteFail = \u5220\u9664\u7edf\u8ba1\u8868\u76d8\u5931\u8d25.
view_dashboardManager_deleted = \u6210\u529f\u5220\u9664\u7edf\u8ba1\u8868\u76d8{0}
commit dee21cbe94b5d5befc5a087a74cc5884bea96ee4
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Aug 23 16:12:11 2011 -0500
Renaming mod_cluster components to match their explicit purpose.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
index 0a0a570..b87bfcd 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
@@ -30,14 +30,16 @@ import org.rhq.core.domain.configuration.definition.PropertyDefinition;
import org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple;
import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
import org.rhq.core.util.exception.ThrowableUtil;
+import org.rhq.plugins.jmx.JMXComponent;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
import org.rhq.plugins.modcluster.config.ModClusterBeanFile;
/**
* @author Stefan Negrea
*
*/
-@SuppressWarnings({ "deprecation" })
-public class FileConfiguredMBeanResourceComponent extends TimeUnitParamResourceComponent {
+@SuppressWarnings({ "deprecation", "rawtypes" })
+public class FileConfiguredMBeanResourceComponent extends MBeanResourceComponent<JMXComponent> {
private static final Log log = LogFactory.getLog(FileConfiguredMBeanResourceComponent.class);
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServiceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServiceComponent.java
new file mode 100644
index 0000000..d9da81c
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServiceComponent.java
@@ -0,0 +1,52 @@
+package org.rhq.plugins.modcluster;
+
+import java.util.concurrent.TimeUnit;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.pluginapi.operation.OperationResult;
+
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.
+ */
+
+/**
+ *
+ * @author Stefan Negrea
+ */
+public class ModClusterServiceComponent extends FileConfiguredMBeanResourceComponent {
+
+ @Override
+ public OperationResult invokeOperation(String name, Configuration parameters) throws Exception {
+ if (name.toLowerCase().startsWith("ping")) {
+ name = "ping";
+ }
+
+ return super.invokeOperation(name, parameters);
+ }
+
+ @Override
+ protected Object getPropertyValueAsType(PropertySimple propSimple, String typeName) {
+ System.out.println(typeName);
+ if (typeName.equals(TimeUnit.class.getName())) {
+ return TimeUnit.valueOf(propSimple.getStringValue());
+ }
+
+ return super.getPropertyValueAsType(propSimple, typeName);
+ }
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java
deleted file mode 100644
index c67bf61..0000000
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.rhq.plugins.modcluster;
-
-import java.util.concurrent.TimeUnit;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.pluginapi.operation.OperationResult;
-
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2009 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.
- */
-
-/**
- *
- * @author Stefan Negrea
- */
-public class PolyPingMBeanResourceComponent extends FileConfiguredMBeanResourceComponent {
-
- @Override
- public OperationResult invokeOperation(String name, Configuration parameters) throws Exception {
- if (name.toLowerCase().startsWith("ping")) {
- name = "ping";
- }
-
- return super.invokeOperation(name, parameters);
- }
-
- @Override
- protected Object getPropertyValueAsType(PropertySimple propSimple, String typeName) {
- System.out.println(typeName);
- if (typeName.equals(TimeUnit.class.getName())) {
- return TimeUnit.valueOf(propSimple.getStringValue());
- }
-
- return super.getPropertyValueAsType(propSimple, typeName);
- }
-}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/TimeUnitParamResourceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/TimeUnitParamResourceComponent.java
deleted file mode 100644
index 0296eaf..0000000
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/TimeUnitParamResourceComponent.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2009 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.modcluster;
-
-import java.util.concurrent.TimeUnit;
-
-import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.plugins.jmx.MBeanResourceComponent;
-
-/**
- * @author Stefan Negrea
- *
- */
-@SuppressWarnings("rawtypes")
-public class TimeUnitParamResourceComponent extends MBeanResourceComponent {
-
- @Override
- protected Object getPropertyValueAsType(PropertySimple propSimple, String typeName) {
- System.out.println(typeName);
- if (typeName.equals(TimeUnit.class.getName())) {
- return TimeUnit.valueOf(propSimple.getStringValue());
- }
-
- return super.getPropertyValueAsType(propSimple, typeName);
- }
-}
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index ed82f7c..7e1a79f 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -27,7 +27,7 @@
<!-- Start - Configuration for HAModClusterService -->
<service name="HA Service" discovery="ClassNameMBeanDiscoveryComponent"
- class="PolyPingMBeanResourceComponent"
+ class="ModClusterServiceComponent"
supportsManualAdd="true"
description="HA Service Listener" singleton="true">
@@ -199,7 +199,7 @@
<!-- End - Configuration for HAModClusterService -->
<!-- Start - Configuration for ModClusterService -->
- <service name="Service" discovery="ClassNameMBeanDiscoveryComponent" class="PolyPingMBeanResourceComponent" supportsManualAdd="true" description="HA Service Listener" singleton="true">
+ <service name="Service" discovery="ClassNameMBeanDiscoveryComponent" class="ModClusterServiceComponent" supportsManualAdd="true" description="HA Service Listener" singleton="true">
<plugin-configuration>
<c:simple-property name="objectName" readOnly="true" default="jboss.web:service=ModCluster" />
commit 17aeff283b1518e9c70d37431a4cc3def801e145
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Aug 23 17:01:55 2011 -0400
Initial commit for DriftManagerTest
Starting to add tests for sending content to the server. Tests for
DriftManager are overdue and the timing is perfect because code needs to
be added to clean up after sending content to the server. Cleaning up
entails deleting the content that the agent made copies of.
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
index 62e1e39..8b782ce 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
@@ -19,8 +19,6 @@
package org.rhq.core.pc.drift;
-import static org.rhq.core.util.ZipUtil.zipFileOrDirectory;
-
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
@@ -53,6 +51,8 @@ import org.rhq.core.pc.inventory.ResourceContainer;
import org.rhq.core.pc.measurement.MeasurementManager;
import org.rhq.core.util.stream.StreamUtil;
+import static org.rhq.core.util.ZipUtil.zipFileOrDirectory;
+
public class DriftManager extends AgentService implements DriftAgentService, DriftClient, ContainerService {
private final Log log = LogFactory.getLog(DriftManager.class);
@@ -169,7 +169,6 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
try {
File zipFile = new File(pluginContainerConfiguration.getTemporaryDirectory(), "content.zip");
ZipOutputStream stream = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(zipFile)));
- //zipFileOrDirectory(contentDir, zipFile);
for (File file : contentDir.listFiles()) {
FileInputStream fis = new FileInputStream(file);
diff --git a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftManagerTest.java b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftManagerTest.java
new file mode 100644
index 0000000..bd49c20
--- /dev/null
+++ b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftManagerTest.java
@@ -0,0 +1,149 @@
+/*
+ * 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 as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+package org.rhq.core.pc.drift;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import org.rhq.core.clientapi.server.drift.DriftServerService;
+import org.rhq.core.pc.PluginContainerConfiguration;
+import org.rhq.core.pc.ServerServices;
+import org.rhq.core.util.stream.StreamUtil;
+
+import static org.rhq.core.util.ZipUtil.unzipFile;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+
+public class DriftManagerTest extends DriftTest {
+
+ private File tmpDir;
+
+ private TestDriftServerService driftServerService;
+
+ private PluginContainerConfiguration pcConfig;
+
+// private DriftManager driftMgr;
+
+ @BeforeMethod
+ public void initTest() throws Exception {
+ tmpDir = mkdir(basedir(), "tmp");
+
+ pcConfig = new PluginContainerConfiguration();
+ ServerServices serverServices = new ServerServices();
+ driftServerService = new TestDriftServerService();
+ serverServices.setDriftServerService(driftServerService);
+ pcConfig.setServerServices(serverServices);
+ pcConfig.setDataDirectory(basedir());
+ pcConfig.setTemporaryDirectory(tmpDir);
+ }
+
+ @Test
+ public void sendContentToServerInZipFile() throws Exception {
+ String configName = "send-content-in-zip";
+ File changeSetDir = changeSetDir(configName);
+ File contentDir = mkdir(changeSetDir, "content");
+
+ File content1 = createRandomFile(contentDir, "content-1");
+ File content2 = createRandomFile(contentDir, "content-2");
+
+ DriftManager driftMgr = new DriftManager();
+ driftMgr.setConfiguration(pcConfig);
+
+ driftMgr.sendChangeSetContentToServer(resourceId(), configName, contentDir);
+
+ File outputDir = new File(tmpDir, "output");
+ outputDir.mkdir();
+ unzipFile(driftServerService.filesZipStream, outputDir);
+
+ assertEquals(outputDir.listFiles().length, 2, "Expected the zip file to contain two entries");
+ assertZipFileMatches(outputDir, content1, content2);
+ }
+
+// @Test
+// public void cleanUpAfterSendingContentToServer() throws Exception {
+// String configName = "clean-up-after-sending-content";
+// File changeSetDir = changeSetDir(configName);
+// File contentDir = mkdir(changeSetDir, "content");
+// }
+
+ /**
+ * This method first verifies that each of the expected files is contained in the the
+ * zip file. Then it verifies that the content for each file in the zip file matches
+ * the expected files by comparing their SHA-256 hashes.
+ *
+ * @param zipDir
+ * @param expectedFiles
+ * @throws IOException
+ */
+ private void assertZipFileMatches(File zipDir, File... expectedFiles) throws IOException {
+ for (File expectedFile : expectedFiles) {
+ File actualFile = findFile(zipDir, expectedFile);
+ assertNotNull(actualFile, "Expected zip file to contain " + expectedFile.getName());
+
+ String expectedHash = sha256(expectedFile);
+ String actualHash = sha256(actualFile);
+
+ assertEquals(actualHash, expectedHash, "The zip file content is wrong. The SHA-256 hash does not match " +
+ "for " + expectedFile.getName());
+ }
+ }
+
+ private File findFile(File dir, File file) {
+ for (File f : dir.listFiles()) {
+ if (f.getName().equals(file.getName())) {
+ return f;
+ }
+ }
+ return null;
+ }
+
+ private void addToZipFile(File file, ZipOutputStream stream) throws Exception {
+ FileInputStream fis = new FileInputStream(file);
+ stream.putNextEntry(new ZipEntry(file.getName()));
+ StreamUtil.copy(fis, stream, false);
+ fis.close();
+ }
+
+ private static class TestDriftServerService implements DriftServerService {
+
+ public int filesZipResourceId;
+ public long filesZipSize;
+ public InputStream filesZipStream;
+
+ @Override
+ public void sendChangesetZip(int resourceId, long zipSize, InputStream zipStream) {
+ }
+
+ @Override
+ public void sendFilesZip(int resourceId, long zipSize, InputStream zipStream) {
+ filesZipResourceId = resourceId;
+ filesZipSize = zipSize;
+ filesZipStream = zipStream;
+ }
+ }
+
+}
diff --git a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftTest.java b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftTest.java
index 1c02b3f..b1ab9ec 100644
--- a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftTest.java
+++ b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftTest.java
@@ -124,7 +124,7 @@ public class DriftTest {
*/
@BeforeClass
public void initResourcesAndChangeSetsDirs() throws Exception {
- File basedir = new File("target", getClass().getSimpleName());
+ File basedir = basedir();
deleteDirectory(basedir);
basedir.mkdir();
@@ -148,6 +148,10 @@ public class DriftTest {
changeSetMgr = new ChangeSetManagerImpl(changeSetsDir);
}
+ protected File basedir() {
+ return new File("target", getClass().getSimpleName());
+ }
+
/** @return The current or last resource id generated */
protected int resourceId() {
return resourceId;
commit 35d73023552f4b83976705e88f14e6fecf0eed6f
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Aug 23 15:39:58 2011 -0500
Updates to support integration with JBoss' mod_cluster module for AS6 and EAP5.1.x
diff --git a/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index b642573..f27b153 100644
--- a/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -112,6 +112,7 @@ public class ModclusterPluginTest {
add(PLUGIN_NAME);
add("Webapp Context");
add("HA Service Configuration");
+ add("HA Service");
}
};
@@ -132,6 +133,15 @@ public class ModclusterPluginTest {
ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
.getResourceComponent(resource);
((ConfigurationFacet) resourceComponent).loadResourceConfiguration();
+ } else if (resource.getResourceType().getName().equals("HA Service")) {
+ ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
+ .getResourceComponent(resource);
+
+ Configuration config = new Configuration();
+ config.put(new PropertySimple("p1", "1"));
+ config.put(new PropertySimple("p2", java.util.concurrent.TimeUnit.SECONDS));
+ OperationResult result = ((OperationFacet) resourceComponent).invokeOperation("stop", config);
+ log.info("Result of operation stopContext was: " + result.getSimpleResult());
}
}
}
diff --git a/modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/MBeanResourceComponent.java b/modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/MBeanResourceComponent.java
index 6a60a93..8da6a2d 100644
--- a/modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/MBeanResourceComponent.java
+++ b/modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/MBeanResourceComponent.java
@@ -561,15 +561,15 @@ public class MBeanResourceComponent<T extends JMXComponent> implements Measureme
paramIndex = Integer.valueOf(propName.substring(propName.indexOf('[') + 1, propName.indexOf(']')));
if (paramIndex < 0 || paramIndex >= emsParams.size()) {
throw new IllegalStateException("Index [" + paramIndex + "] specified for parameter of operation ["
- + name + "] on MBean [" + emsBean.getBeanName() + "] is invalid. The MBean operation takes "
- + emsParams.size() + " parameters.");
+ + name + "] on MBean [" + emsBean.getBeanName() + "] is invalid. The MBean operation takes "
+ + emsParams.size() + " parameters.");
}
} else {
paramIndex = emsParamIndexesByName.get(propName);
if (paramIndex == null) {
throw new IllegalStateException("Name [" + propName + "] specified for parameter of operation ["
- + name + "] on MBean [" + emsBean.getBeanName()
- + "] is invalid. The MBean operation does not take a parameter by that name.");
+ + name + "] on MBean [" + emsBean.getBeanName()
+ + "] is invalid. The MBean operation does not take a parameter by that name.");
}
}
EmsParameter emsParam = emsParams.get(paramIndex);
@@ -611,7 +611,7 @@ public class MBeanResourceComponent<T extends JMXComponent> implements Measureme
return resultToReturn;
}
- private Object getPropertyValueAsType(PropertySimple propSimple, String typeName) {
+ protected Object getPropertyValueAsType(PropertySimple propSimple, String typeName) {
Object value;
if (typeName.equals(String.class.getName())) {
value = (propSimple == null) ? null : propSimple.getStringValue();
@@ -626,7 +626,8 @@ public class MBeanResourceComponent<T extends JMXComponent> implements Measureme
} else if (typeName.equals(Double.class.getName()) || typeName.equals(double.class.getName())) {
value = (propSimple == null) ? null : propSimple.getDoubleValue();
} else {
- throw new IllegalStateException("Operation parameter maps to MBean parameter with an unsupported type (" + typeName + ").");
+ throw new IllegalStateException("Operation parameter maps to MBean parameter with an unsupported type ("
+ + typeName + ").");
}
// TODO GH: Handle rest of types. (I think i have a mapper for this in mc4j
return value;
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index 35c5b28..3a6deaa 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -31,6 +31,11 @@
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.jboss.on</groupId>
+ <artifactId>jopr-jboss-as-plugin</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>log4j</groupId>
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
index c5343d0..4c8b437 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
@@ -90,6 +90,10 @@ public class ContextComponent extends MBeanResourceComponent<MBeanResourceCompon
configuration = new Object[] { context.getHost(), context.getPath() };
}
+ if (context.getPath().equals("/")) {
+ configuration[1] = "ROOT";
+ }
+
log.info(name + " - " + context.getHost() + " " + context.getPath());
ClassLoader cl = Thread.currentThread().getContextClassLoader();
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
index ee0369c..0a0a570 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
@@ -30,21 +30,20 @@ import org.rhq.core.domain.configuration.definition.PropertyDefinition;
import org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple;
import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
import org.rhq.core.util.exception.ThrowableUtil;
-import org.rhq.plugins.jmx.MBeanResourceComponent;
import org.rhq.plugins.modcluster.config.ModClusterBeanFile;
/**
* @author Stefan Negrea
*
*/
-@SuppressWarnings({ "rawtypes", "deprecation" })
-public class FileConfiguredMBeanResourceComponent extends MBeanResourceComponent {
+@SuppressWarnings({ "deprecation" })
+public class FileConfiguredMBeanResourceComponent extends TimeUnitParamResourceComponent {
private static final Log log = LogFactory.getLog(FileConfiguredMBeanResourceComponent.class);
private static final String BEAN_CLASS_NAME_PROPERTY = "className";
private static final String DEPENDENCY_BEAN_CLASS_NAME_PROPERTY = "dependencyClassName";
- private static final String SERVER_HOME_DIR = "jboss.server.home.dir";
+ private static final String SERVER_HOME_DIR = "serverHomeDir";
private static final String CONFIGURATION_FILE_RELATIVE_PATH = "/deploy/mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml";
/**
@@ -105,7 +104,7 @@ public class FileConfiguredMBeanResourceComponent extends MBeanResourceComponent
}
private String getServerHomeDirectory() {
- ModclusterServerComponent modClusterComponent = (ModclusterServerComponent) this.resourceContext
+ ModClusterServerComponent modClusterComponent = (ModClusterServerComponent) this.resourceContext
.getParentResourceComponent();
PropertySimple property = modClusterComponent.getResourceContext().getPluginConfiguration()
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java
index 496068c..3eb7cbe 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java
@@ -36,9 +36,6 @@ import org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent;
@SuppressWarnings("rawtypes")
public class LoadMetricDiscoveryComponent extends MBeanResourceDiscoveryComponent<JMXComponent> {
- /* (non-Javadoc)
- * @see org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent#discoverResources(org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext, boolean)
- */
@Override
public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<JMXComponent> context,
boolean skipUnknownProps) {
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterDiscoveryComponent.java
new file mode 100644
index 0000000..b9a73b5
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterDiscoveryComponent.java
@@ -0,0 +1,70 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.modcluster;
+
+import java.util.Set;
+
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+import org.rhq.plugins.jbossas.JBossASServerComponent;
+import org.rhq.plugins.jbossas5.ApplicationServerComponent;
+import org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent;
+
+/**
+ * @author Stefan Negrea
+ *
+ */
+@SuppressWarnings({ "rawtypes", "unchecked" })
+public class ModClusterDiscoveryComponent extends MBeanResourceDiscoveryComponent {
+
+ private final static String JBOSS_SERVER_HOME_DIR = "serverHomeDir";
+
+ @Override
+ public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext context) {
+ Set<DiscoveredResourceDetails> tempSet = super.discoverResources(context);
+
+ for (DiscoveredResourceDetails detail : tempSet) {
+ String serverHomeDirectory = findServerHomeDirectory(context.getParentResourceComponent());
+ detail.getPluginConfiguration().put(new PropertySimple(JBOSS_SERVER_HOME_DIR, serverHomeDirectory));
+ }
+
+ return tempSet;
+ }
+
+ @SuppressWarnings("static-access")
+ public String findServerHomeDirectory(ResourceComponent parentResourceComponent) {
+ if (parentResourceComponent instanceof ApplicationServerComponent) {
+ ApplicationServerComponent parentComponent = (ApplicationServerComponent) parentResourceComponent;
+
+ return parentComponent.getResourceContext().getPluginConfiguration().getSimple("serverHomeDir")
+ .getStringValue();
+
+ } else if (parentResourceComponent instanceof JBossASServerComponent) {
+ JBossASServerComponent parentComponent = (JBossASServerComponent) parentResourceComponent;
+
+ return parentComponent.getPluginConfiguration().getSimple(parentComponent.JBOSS_HOME_DIR_CONFIG_PROP)
+ .getStringValue();
+ }
+
+ return null;
+ }
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServerComponent.java
new file mode 100644
index 0000000..7d5f0dc
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModClusterServerComponent.java
@@ -0,0 +1,47 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.modcluster;
+
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+import org.rhq.plugins.modcluster.helper.JBossHelper;
+
+/**
+ * @author Stefan Negrea
+ *
+ */
+@SuppressWarnings({ "rawtypes" })
+public class ModClusterServerComponent extends MBeanResourceComponent {
+
+ @Override
+ public AvailabilityType getAvailability() {
+ String rawProxyInfo = JBossHelper.getRawProxyInfo(getEmsBean());
+
+ if (rawProxyInfo == null) {
+ return AvailabilityType.DOWN;
+ }
+
+ ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
+ if (proxyInfo.getAvailableNodes().size() == 0) {
+ return AvailabilityType.DOWN;
+ }
+
+ return super.getAvailability();
+ }
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
deleted file mode 100644
index 03598e9..0000000
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2009 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.modcluster;
-
-import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.domain.measurement.AvailabilityType;
-import org.rhq.core.pluginapi.inventory.ResourceContext;
-import org.rhq.plugins.jbossas.JBossASServerComponent;
-import org.rhq.plugins.jbossas5.ApplicationServerComponent;
-import org.rhq.plugins.jmx.MBeanResourceComponent;
-import org.rhq.plugins.modcluster.helper.JBossHelper;
-
-/**
- * @author Stefan Negrea
- *
- */
-@SuppressWarnings({ "rawtypes" })
-public class ModclusterServerComponent extends MBeanResourceComponent {
-
- private final static String JBOSS_SERVER_HOME_DIR = "jboss.server.home.dir";
-
- @SuppressWarnings({ "unchecked", "deprecation", "static-access" })
- @Override
- public void start(ResourceContext context) {
- super.start(context);
-
- String serverHomeDirectory = null;
- if (this.resourceContext.getParentResourceComponent() instanceof ApplicationServerComponent) {
- ApplicationServerComponent parentComponent = (ApplicationServerComponent) this.resourceContext
- .getParentResourceComponent();
-
- serverHomeDirectory = parentComponent.getResourceContext().getPluginConfiguration()
- .getSimple("serverHomeDir").getStringValue();
-
- } else if (this.resourceContext.getParentResourceComponent() instanceof JBossASServerComponent) {
- JBossASServerComponent parentComponent = (JBossASServerComponent) this.resourceContext
- .getParentResourceComponent();
-
- serverHomeDirectory = parentComponent.getPluginConfiguration()
- .getSimple(parentComponent.JBOSS_HOME_DIR_CONFIG_PROP).getStringValue();
- }
-
- if (serverHomeDirectory != null) {
- PropertySimple serverHomeDirectoryProperty = null;
- serverHomeDirectoryProperty = new PropertySimple();
- serverHomeDirectoryProperty.setName(JBOSS_SERVER_HOME_DIR);
- serverHomeDirectoryProperty.setStringValue(serverHomeDirectory);
- this.resourceContext.getPluginConfiguration().put(serverHomeDirectoryProperty);
- }
- };
-
- //private final static String PROXY_INFO_PROPERTY_NAME
-
- /* (non-Javadoc)
- * @see org.rhq.plugins.jmx.MBeanResourceComponent#getAvailability()
- */
- @Override
- public AvailabilityType getAvailability() {
- String rawProxyInfo = JBossHelper.getRawProxyInfo(getEmsBean());
-
- if (rawProxyInfo == null) {
- return AvailabilityType.DOWN;
- }
-
- ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
- if (proxyInfo.getAvailableNodes().size() == 0) {
- return AvailabilityType.DOWN;
- }
-
- return super.getAvailability();
- }
-}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java
index bc54267..c67bf61 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java
@@ -1,6 +1,9 @@
package org.rhq.plugins.modcluster;
+import java.util.concurrent.TimeUnit;
+
import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.pluginapi.operation.OperationResult;
/*
@@ -36,4 +39,14 @@ public class PolyPingMBeanResourceComponent extends FileConfiguredMBeanResourceC
return super.invokeOperation(name, parameters);
}
+
+ @Override
+ protected Object getPropertyValueAsType(PropertySimple propSimple, String typeName) {
+ System.out.println(typeName);
+ if (typeName.equals(TimeUnit.class.getName())) {
+ return TimeUnit.valueOf(propSimple.getStringValue());
+ }
+
+ return super.getPropertyValueAsType(propSimple, typeName);
+ }
}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/TimeUnitParamResourceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/TimeUnitParamResourceComponent.java
new file mode 100644
index 0000000..0296eaf
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/TimeUnitParamResourceComponent.java
@@ -0,0 +1,42 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.modcluster;
+
+import java.util.concurrent.TimeUnit;
+
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+
+/**
+ * @author Stefan Negrea
+ *
+ */
+@SuppressWarnings("rawtypes")
+public class TimeUnitParamResourceComponent extends MBeanResourceComponent {
+
+ @Override
+ protected Object getPropertyValueAsType(PropertySimple propSimple, String typeName) {
+ System.out.println(typeName);
+ if (typeName.equals(TimeUnit.class.getName())) {
+ return TimeUnit.valueOf(propSimple.getStringValue());
+ }
+
+ return super.getPropertyValueAsType(propSimple, typeName);
+ }
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java
index 6c00130..dee2f81 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java
@@ -18,11 +18,18 @@
*/
package org.rhq.plugins.modcluster.config;
+import java.io.File;
import java.io.IOException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
@@ -38,11 +45,13 @@ public abstract class AbstractConfigurationFile {
public AbstractConfigurationFile(String fileName) throws ParserConfigurationException, SAXException, IOException {
this.fileName = fileName;
- DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
- DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
- this.document = docBuilder.parse(this.getFileName());
+ loadConfiguratonFile();
}
+ abstract void setPropertyValue(String propertyName, String value);
+
+ abstract String getPropertyValue(String propertyName);
+
/**
* @return the fileName
*/
@@ -57,9 +66,19 @@ public abstract class AbstractConfigurationFile {
return document;
}
- abstract void setPropertyValue(String propertyName, String value);
+ public void saveConfigurationFile() throws Exception {
+ File file = new File(this.getFileName());
+ StreamResult result = new StreamResult(file);
+ Source source = new DOMSource(this.getDocument());
- abstract String getPropertyValue(String propertyName);
+ Transformer transformer = TransformerFactory.newInstance().newTransformer();
+ transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+ transformer.transform(source, result);
+ }
- abstract void saveConfigurationFile() throws Exception;
+ private void loadConfiguratonFile() throws ParserConfigurationException, SAXException, IOException {
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
+ this.document = docBuilder.parse(this.getFileName());
+ }
}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java
index 1d008ee..354fa99 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java
@@ -47,11 +47,4 @@ public class JBossWebServerFile extends AbstractConfigurationFile {
// TODO Auto-generated method stub
return null;
}
-
- @Override
- void saveConfigurationFile() throws Exception {
- // TODO Auto-generated method stub
-
- }
-
}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
index 45053f7..6abf955 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
@@ -19,17 +19,10 @@
package org.rhq.plugins.modcluster.config;
import java.io.IOException;
-import java.io.StringWriter;
import java.util.ArrayList;
import java.util.List;
import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Attr;
import org.w3c.dom.Node;
@@ -129,22 +122,6 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
}
/**
- * @throws TransformerException
- */
- public void saveConfigurationFile() throws TransformerException {
- Transformer transformer = TransformerFactory.newInstance().newTransformer();
- transformer.setOutputProperty(OutputKeys.INDENT, "no");
-
- //initialize StreamResult with File object to save to file
- StreamResult result = new StreamResult(new StringWriter());
- DOMSource source = new DOMSource(this.getDocument());
- transformer.transform(source, result);
-
- String xmlString = result.getWriter().toString();
- System.out.println(xmlString);
- }
-
- /**
* @param className
* @return
*/
@@ -155,7 +132,6 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
Node node = result.item(i);
if (node.getAttributes().getNamedItem("class") != null
&& className.equals(node.getAttributes().getNamedItem("class").getTextContent())) {
- System.out.println(node.getAttributes().getNamedItem("class").getTextContent());
return node;
}
}
@@ -174,7 +150,6 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
Node node = result.item(i);
if (node.getAttributes().getNamedItem("name") != null
&& beanName.equals(node.getAttributes().getNamedItem("name").getTextContent())) {
- System.out.println(node.getAttributes().getNamedItem("name").getTextContent());
return node;
}
}
@@ -243,5 +218,4 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
return listOfNodes;
}
-
}
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 4f3010f..ed82f7c 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -6,7 +6,9 @@
<depends plugin="JMX" />
<service name="mod_cluster"
- discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent" class="ModclusterServerComponent" supportsManualAdd="true" description="mod_cluster plugin" singleton="true">
+ discovery="ModClusterDiscoveryComponent"
+ class="ModClusterServerComponent"
+ supportsManualAdd="true" description="mod_cluster plugin" singleton="true">
<runs-inside>
<parent-resource-type name="JBossAS Server" plugin="JBossAS" />
@@ -17,13 +19,17 @@
<c:simple-property name="objectName" readOnly="true" default="Catalina:type=ModClusterListener,*|jboss.web:service=ModCluster" />
<c:simple-property name="engineObjectName" readOnly="true" default="jboss.web:type=Engine" />
<c:simple-property name="nameTemplate" default="mod_cluster" />
+ <c:simple-property name="serverHomeDir"/>
</plugin-configuration>
<operation name="reset" displayName="Reset the node" description="Move this application server out of an error state." />
<operation name="refresh" displayName="Refresh configuration" description="Refresh configuration for this application server." />
<!-- Start - Configuration for HAModClusterService -->
- <service name="HA Service" discovery="ClassNameMBeanDiscoveryComponent" class="PolyPingMBeanResourceComponent" supportsManualAdd="true" description="HA Service Listener" singleton="true">
+ <service name="HA Service" discovery="ClassNameMBeanDiscoveryComponent"
+ class="PolyPingMBeanResourceComponent"
+ supportsManualAdd="true"
+ description="HA Service Listener" singleton="true">
<plugin-configuration>
<c:simple-property name="objectName" readOnly="true" default="jboss.web:service=ModCluster" />
@@ -35,18 +41,18 @@
<!-- HA Operations -->
<operation name="disableDomain" displayName="Disable domain" description="Disables all contexts on each node within the current domain. If the current domain is null, then all nodes are stopped.">
<results>
- <c:simple-property name="result" description="The result of the operation" />
+ <c:simple-property name="operationResult" description="The result of the operation" />
</results>
</operation>
<operation name="enableDomain" displayName="Enable domain" description="Enable all contexts on each node within the current domain. If the current domain is null, then all nodes are stopped.">
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ <c:simple-property name="operationResult" type="boolean" description="The result of the operation" />
</results>
</operation>
<operation name="stopDomain" displayName="Stop domain" description="Gracefully stops all contexts on each node within the current domain. If the current domain is null, then all nodes are stopped.">
<parameters>
- <c:simple-property required="true" name="timeout" type="string" displayName="The number of units of time for which to wait for all sessions to drain on a given node." />
- <c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
+ <c:simple-property required="true" name="p1" type="string" displayName="The number of units of time for which to wait for all sessions to drain on a given node." />
+ <c:simple-property required="true" name="p2" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
<c:property-options allowCustomValue="false">
<c:option value="MICROSECONDS" name="MICROSECONDS" />
<c:option value="MILLISECONDS" name="MILLISECONDS" />
@@ -58,7 +64,7 @@
</c:simple-property>
</parameters>
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ <c:simple-property name="operationResult" type="boolean" description="The result of the operation" />
</results>
</operation>
@@ -66,59 +72,60 @@
<operation name="pingHTTPD" displayName="Ping httpd" description="Ping httpd and determine whether each proxy is accessible and healthy. Returns the PING_RSP grouped by proxy address.">
<results>
- <c:simple-property name="result" description="Map of PING_RPS response, grouped by proxy.">
+ <c:simple-property name="operationResult" description="Map of PING_RPS response, grouped by proxy.">
</c:simple-property>
</results>
</operation>
<operation name="pingNodeByJVMRoute" displayName="Ping node by JVM Route"
description="Ping a node from httpd and returns the PING_RSP grouped by proxy address. Dtermines whether the node configured with the specified jvm route is accessible from each proxy returning the PING_RSP grouped by proxy address.">
<parameters>
- <c:simple-property required="true" name="jvmRoute" type="string" displayName="JVM Route of node to ping." />
+ <c:simple-property required="true" name="p1" type="string" displayName="JVM Route of node to ping." />
</parameters>
<results>
- <c:simple-property name="result" type="string" description="Map of PING_RPS response, grouped by proxy." />
+ <c:simple-property name="operationResult" type="string" description="Map of PING_RPS response, grouped by proxy." />
</results>
</operation>
<operation name="pingNodeByAddress" displayName="Ping node by address"
description="Ping a node from httpd and returns the PING_RSP grouped by proxy address. Determines whether the node configured with the specified jvm route is accessible from each proxy returning the PING_RSP grouped by proxy address.">
<parameters>
- <c:simple-property required="true" name="scheme" type="string" displayName="Scheme (ajp, http, https)" />
- <c:simple-property required="true" name="hostname" type="string" displayName="Name or ip address of a node." />
- <c:simple-property required="true" name="port" type="string" displayName="Port" />
+ <c:simple-property required="true" name="p1" type="string" displayName="Scheme (ajp, http, https)" />
+ <c:simple-property required="true" name="p2" type="string" displayName="Name or ip address of a node." />
+ <c:simple-property required="true" name="p3" type="integer" displayName="Port" />
</parameters>
<results>
- <c:simple-property name="result" type="string" description="Map of PING_RPS response, grouped by proxy." />
+ <c:simple-property name="operationResult" type="string" description="Map of PING_RPS response, grouped by proxy." />
</results>
</operation>
<operation name="addProxy" displayName="Add a proxy" description="Add a proxy.">
<parameters>
- <c:simple-property required="true" name="host" type="string" displayName="Proxy address" />
- <c:simple-property required="true" name="port" type="string" displayName="Proxy port" />
+ <c:simple-property required="true" name="p1" type="string" displayName="Proxy address" />
+ <c:simple-property required="true" name="p2" type="integer" displayName="Proxy port" />
</parameters>
</operation>
<operation name="removeProxy" displayName="Remove a proxy" description="Remove a proxy.">
<parameters>
- <c:simple-property required="true" name="host" type="string" displayName="Proxy address" />
- <c:simple-property required="true" name="port" type="string" displayName="Proxy port" />
+ <c:simple-property required="true" name="p1" type="string" displayName="Proxy address" />
+ <c:simple-property required="true" name="p2" type="integer" displayName="Proxy port" />
</parameters>
</operation>
+
<operation name="disable" displayName="Disable all webpapps" description="Disable all webapps for all virtual hosts of this application server.">
<results>
- <c:simple-property name="result" description="The result of the operation">
+ <c:simple-property name="operationResult" description="The result of the operation">
</c:simple-property>
</results>
</operation>
<operation name="enable" displayName="Enable all webapps" description="Enable all webapps for all virtual hosts of this application server.">
<results>
- <c:simple-property name="result" description="The result of the operation">
+ <c:simple-property name="operationResult" description="The result of the operation">
</c:simple-property>
</results>
</operation>
<operation name="stop" displayName="Stop all webapps" description="Gracefully stops all webapps for all virtual hosts of this application server.">
<parameters>
- <c:simple-property required="true" name="timeout" type="string" displayName="Session draining timeout" />
- <c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
+ <c:simple-property required="true" name="p1" type="string" displayName="Session draining timeout" />
+ <c:simple-property required="true" name="p2" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
<c:property-options allowCustomValue="false">
<c:option value="MICROSECONDS" name="MICROSECONDS" />
<c:option value="MILLISECONDS" name="MILLISECONDS" />
@@ -130,7 +137,7 @@
</c:simple-property>
</parameters>
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ <c:simple-property name="operationResult" type="boolean" description="The result of the operation" />
</results>
</operation>
@@ -139,7 +146,7 @@
<metric property="ProxyInfo" displayName="Proxy Info" displayType="summary" dataType="trait" />
<resource-configuration>
- <c:simple-property name="processStatusFrequency" type="integer" description="Process status frequency." />
+ <c:simple-property name="processStatusFrequency" type="integer" required="false" description="Process status frequency." />
</resource-configuration>
</service>
@@ -203,56 +210,57 @@
<operation name="pingHTTPD" displayName="Ping httpd" description="Ping httpd and determine whether each proxy is accessible and healthy. Returns the PING_RSP grouped by proxy address.">
<results>
- <c:simple-property name="result" type="string" description="Map of PING_RPS response, grouped by proxy." />
+ <c:simple-property name="operationResult" type="string" description="Map of PING_RPS response, grouped by proxy." />
</results>
</operation>
<operation name="pingNodeByJVMRoute" displayName="Ping node by JVM Route"
description="Ping a node from httpd and returns the PING_RSP grouped by proxy address. Dtermines whether the node configured with the specified jvm route is accessible from each proxy returning the PING_RSP grouped by proxy address.">
<parameters>
- <c:simple-property required="true" name="jvmRoute" type="string" displayName="JVM Route of node to ping." />
+ <c:simple-property required="true" name="p1" type="string" displayName="JVM Route of node to ping." />
</parameters>
<results>
- <c:simple-property name="result" type="string" description="Map of PING_RPS response, grouped by proxy." />
+ <c:simple-property name="operationResult" type="string" description="Map of PING_RPS response, grouped by proxy." />
</results>
</operation>
<operation name="pingNodeByAddress" displayName="Ping node by address"
description="Ping a node from httpd and returns the PING_RSP grouped by proxy address. Determines whether the node configured with the specified jvm route is accessible from each proxy returning the PING_RSP grouped by proxy address.">
<parameters>
- <c:simple-property required="true" name="scheme" type="string" displayName="Scheme (ajp, http, https)" />
- <c:simple-property required="true" name="hostname" type="string" displayName="Name or ip address of a node." />
- <c:simple-property required="true" name="port" type="string" displayName="Port" />
+ <c:simple-property required="true" name="p1" type="string" displayName="Scheme (ajp, http, https)" />
+ <c:simple-property required="true" name="p2" type="string" displayName="Name or ip address of a node." />
+ <c:simple-property required="true" name="p3" type="integer" displayName="Port" />
</parameters>
<results>
- <c:simple-property name="result" type="string" description="Map of PING_RPS response, grouped by proxy." />
+ <c:simple-property name="operationResult" type="string" description="Map of PING_RPS response, grouped by proxy." />
</results>
</operation>
<operation name="addProxy" displayName="Add a proxy" description="Add a proxy.">
<parameters>
- <c:simple-property required="true" name="host" type="string" displayName="Proxy address" />
- <c:simple-property required="true" name="port" type="string" displayName="Proxy port" />
+ <c:simple-property required="true" name="p1" type="string" displayName="Proxy address" />
+ <c:simple-property required="true" name="p2" type="integer" displayName="Proxy port" />
</parameters>
</operation>
<operation name="removeProxy" displayName="Remove a proxy" description="Remove a proxy.">
<parameters>
- <c:simple-property required="true" name="host" type="string" displayName="Proxy address" />
- <c:simple-property required="true" name="port" type="string" displayName="Proxy port" />
+ <c:simple-property required="true" name="p1" type="string" displayName="Proxy address" />
+ <c:simple-property required="true" name="p2" type="integer" displayName="Proxy port" />
</parameters>
</operation>
+
<operation name="disable" displayName="Disable all webpapps" description="Disable all webapps for all virtual hosts of this application server.">
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ <c:simple-property name="operationResult" type="boolean" description="The result of the operation" />
</results>
</operation>
<operation name="enable" displayName="Enable all webapps" description="Enable all webapps for all virtual hosts of this application server.">
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ <c:simple-property name="operationResult" type="boolean" description="The result of the operation" />
</results>
</operation>
<operation name="stop" displayName="Stop all webapps" description="Gracefully stops all webapps for all virtual hosts of this application server.">
<parameters>
- <c:simple-property required="true" name="timeout" type="string" displayName="Session draining timeout" />
- <c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
+ <c:simple-property required="true" name="p1" type="string" displayName="Session draining timeout" />
+ <c:simple-property required="true" name="p2" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
<c:property-options allowCustomValue="false">
<c:option value="MICROSECONDS" name="MICROSECONDS" />
<c:option value="MILLISECONDS" name="MILLISECONDS" />
@@ -264,7 +272,7 @@
</c:simple-property>
</parameters>
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ <c:simple-property name="operationResult" type="boolean" description="The result of the operation" />
</results>
</operation>
@@ -338,12 +346,12 @@
</operation>
<operation name="disable" displayName="Disable all webpapps" description="Disable all webapps for all virtual hosts of this application server.">
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ <c:simple-property name="operationResult" type="boolean" description="The result of the operation" />
</results>
</operation>
<operation name="enable" displayName="Enable all webapps" description="Enable all webapps for all virtual hosts of this application server.">
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ <c:simple-property name="operationResult" type="boolean" description="The result of the operation" />
</results>
</operation>
<operation name="stop" displayName="Stop all webapps" description="Gracefully stops all webapps for all virtual hosts of this application server.">
@@ -361,7 +369,7 @@
</c:simple-property>
</parameters>
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ <c:simple-property name="operationResult" type="boolean" description="The result of the operation" />
</results>
</operation>
@@ -396,11 +404,9 @@
<c:simple-property name="nameTemplate" default="Dynamic Load Balancer Factor" />
</plugin-configuration>
- <metric property="Metrics" displayName="Collected Metrics" displayType="summary" dataType="trait" />
-
<resource-configuration>
- <c:simple-property name="DecayFactor" type="integer" description="The number of historical load values used to determine load factor." />
- <c:simple-property name="History" type="integer" description="The exponential decay factor for historical load values." />
+ <c:simple-property name="decayFactor" type="integer" required="false" description="The number of historical load values used to determine load factor." />
+ <c:simple-property name="history" type="integer" required="false" description="The exponential decay factor for historical load values." />
</resource-configuration>
</service>
@@ -424,11 +430,13 @@
<c:simple-property name="nameTemplate" default="Load Metric" />
</plugin-configuration>
- <metric property="Load" displayName="Load" category="utilization" description="The current load of this metric as a percent of the metric's capacity." dataType="measurement" />
+ <metric property="Load" displayName="Load" category="utilization"
+ description="The current load of this metric as a percent of the metric's capacity." dataType="measurement"
+ defaultOn="true" displayType="summary"/>
<resource-configuration>
- <c:simple-property name="Weight" type="integer" description="The significance of this load metric compared to the other metrics." />
- <c:simple-property name="Capacity" type="double" description="Used to normalize the value returned by load expressed as a percentage of the capacity, such that: 0 < (load/capacity) < 1" />
+ <c:simple-property name="weight" type="integer" description="The significance of this load metric compared to the other metrics." />
+ <c:simple-property name="capacity" type="double" description="Used to normalize the value returned by load expressed as a percentage of the capacity, such that: 0 < (load/capacity) < 1" />
</resource-configuration>
</service>
@@ -436,7 +444,7 @@
<operation name="disableContext" displayName="Disable webapp" description="Disable this webapp.">
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation." />
+ <c:simple-property name="operationResult" type="boolean" description="The result of the operation." />
</results>
</operation>
<operation name="stopContext" displayName="Stop webapp" description="Gracefully stops this webapp.">
@@ -454,12 +462,12 @@
</c:simple-property>
</parameters>
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ <c:simple-property name="operationResult" type="boolean" description="The result of the operation" />
</results>
</operation>
<operation name="enableContext" displayName="Enable webapp" description="Enable this webapp.">
<results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ <c:simple-property name="operationResult" type="boolean" description="The result of the operation" />
</results>
</operation>
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java
index c50b0e6..cba5672 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java
@@ -28,16 +28,19 @@ public class ServerConfigTest {
public void TestConfig() {
try {
+ //Test simple bean configuration
ModClusterBeanFile config = new ModClusterBeanFile("org.jboss.modcluster.ha.HAModClusterService",
"/home/snegrea/Downloads/jboss51eap/jboss-as/server/all/deploy/mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml");
config.setPropertyValue("processStatusFrequency", "4");
config.setPropertyValue("test", "5");
config.setPropertyValue("test", "123");
- System.out.println(config.getPropertyValue("test"));
+ config.setPropertyValue("test", null);
+ config.setPropertyValue("processStatusFrequency", null);
config.saveConfigurationFile();
+ //Test bean configuration with constructor dependency
config = new ModClusterBeanFile("org.jboss.modcluster.ha.HAModClusterService",
"org.jboss.modcluster.config.ha.HAModClusterConfig",
"/home/snegrea/Downloads/jboss51eap/jboss-as/server/all/deploy/mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml");
@@ -45,11 +48,8 @@ public class ServerConfigTest {
config.setPropertyValue("test", "5");
config.setPropertyValue("test", "123");
- System.out.println(config.getPropertyValue("test"));
-
- config.saveConfigurationFile();
-
config.setPropertyValue("test", null);
+ config.setPropertyValue("processStatusFrequency", null);
config.saveConfigurationFile();
} catch (Exception e) {
// TODO Auto-generated catch block
commit 0c020afb287d34d49472b48c27029437fc562920
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Tue Aug 23 16:07:25 2011 -0400
[BZ 696664] remove NotNull annotations for the 'name' field, since it is not a
required field according the DB schema for RHQ_RESOURCE
(https://bugzilla.redhat.com/show_bug.cgi?id=696664)
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java
index 40afa2f..de415f4 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java
@@ -80,7 +80,7 @@ import org.rhq.core.domain.tagging.Tag;
import org.rhq.core.domain.util.Summary;
/**
- * Represents a JON managed resource (i.e. a platform, server, or service).
+ * Represents an RHQ managed resource (i.e. a platform, server, or service).
*/
@Entity
@NamedQueries( {
@@ -1085,7 +1085,7 @@ public class Resource implements Comparable<Resource>, Serializable {
* Primarily for deserialization and cases where the resource object is just a reference to the real one in the db.
* (Key is this avoids the irrelevant UUID generation that has contention problems.
*
- * @param id
+ * @param id the Resource's id
*/
public Resource(int id) {
this.id = id;
@@ -1093,7 +1093,7 @@ public class Resource implements Comparable<Resource>, Serializable {
public Resource( //
@NotNull String resourceKey, //
- @NotNull String name, //
+ String name, //
@NotNull ResourceType type) {
this.resourceKey = resourceKey;
this.name = name;
@@ -1133,12 +1133,11 @@ public class Resource implements Comparable<Resource>, Serializable {
this.uuid = uuid;
}
- @NotNull
public String getName() {
return this.name;
}
- public void setName(@NotNull String name) {
+ public void setName(String name) {
this.name = name;
}
@@ -1147,8 +1146,8 @@ public class Resource implements Comparable<Resource>, Serializable {
}
/**
- * In general this method should not be called by application code. At least not for any Resource that will be
- * persisted or merged. The ancestry string is maintained internally. {@link #updateAncestryForResource()}.
+ * In general this method should not be called by application code, at least not for any Resource that will be
+ * persisted or merged. The ancestry string is maintained internally (see {@link #updateAncestryForResource()}).
*
* @param ancestry
*/
commit 00637543a1757f1d3547206b6e3e02581f48716c
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue Aug 23 16:03:09 2011 -0400
[BZ 695880] refactor the way the user-delete functionality works. now works without getting that ugly exception
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UsersDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UsersDataSource.java
index 9136e35..55b0281 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UsersDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UsersDataSource.java
@@ -43,7 +43,6 @@ import org.rhq.enterprise.gui.coregui.client.admin.roles.RolesDataSource;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.gwt.SubjectGWTServiceAsync;
import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
-import org.rhq.enterprise.gui.coregui.client.util.message.Message;
/**
* A DataSource for RHQ {@link Subject user}s.
@@ -252,26 +251,6 @@ public class UsersDataSource extends RPCDataSource<Subject, SubjectCriteria> {
});
}
- @Override
- protected void executeRemove(final Record userRecordToRemove, final DSRequest request, final DSResponse response) {
- final Subject subjectToRemove = copyValues(userRecordToRemove);
-
- final String username = subjectToRemove.getName();
- subjectService.deleteSubjects(new int[] { subjectToRemove.getId() }, new AsyncCallback<Void>() {
- public void onFailure(Throwable caught) {
- String message = MSG.dataSource_users_deleteFailed(username);
- sendFailureResponse(request, response, message, caught);
- }
-
- public void onSuccess(Void result) {
- Message message = new Message(MSG.dataSource_users_delete(username));
- sendSuccessResponse(request, response, subjectToRemove, message, UsersView.VIEW_PATH);
- }
- });
-
- }
-
- @SuppressWarnings("unchecked")
public Subject copyValues(Record from) {
Subject to = new Subject();
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UsersView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UsersView.java
index 4fdd6e5..58c0912 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UsersView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UsersView.java
@@ -22,6 +22,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Set;
+import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.types.SelectionStyle;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.grid.ListGridField;
@@ -30,6 +31,7 @@ import com.smartgwt.client.widgets.grid.events.CellClickEvent;
import com.smartgwt.client.widgets.grid.events.CellClickHandler;
import org.rhq.core.domain.authz.Permission;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.PermissionsLoadedListener;
import org.rhq.enterprise.gui.coregui.client.PermissionsLoader;
import org.rhq.enterprise.gui.coregui.client.admin.AdministrationView;
@@ -37,6 +39,9 @@ import org.rhq.enterprise.gui.coregui.client.components.table.EscapedHtmlCellFor
import org.rhq.enterprise.gui.coregui.client.components.table.TableAction;
import org.rhq.enterprise.gui.coregui.client.components.table.TableSection;
import org.rhq.enterprise.gui.coregui.client.components.view.ViewName;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.gwt.SubjectGWTServiceAsync;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
/**
* A table that lists all users and provides the ability to view or edit details of users, delete users, or create new
@@ -206,7 +211,32 @@ public class UsersView extends TableSection<UsersDataSource> {
}
public void executeAction(ListGridRecord[] selection, Object actionValue) {
- deleteSelectedRecords();
+ if (selection == null || selection.length == 0) {
+ return;
+ }
+
+ final ArrayList<String> doomedNames = new ArrayList<String>(selection.length);
+ final int[] doomedIds = new int[selection.length];
+ int i = 0;
+ for (ListGridRecord record : selection) {
+ doomedNames.add(record.getAttribute(UsersDataSource.Field.NAME));
+ doomedIds[i++] = record.getAttributeAsInt(UsersDataSource.Field.ID);
+ }
+
+ SubjectGWTServiceAsync subjectService = GWTServiceLookup.getSubjectService();
+ subjectService.deleteSubjects(doomedIds, new AsyncCallback<Void>() {
+ public void onFailure(Throwable caught) {
+ String message = MSG.dataSource_users_deleteFailed(doomedNames.toString());
+ CoreGUI.getErrorHandler().handleError(message, caught);
+ UsersView.this.refresh();
+ }
+
+ public void onSuccess(Void result) {
+ Message message = new Message(MSG.dataSource_users_delete(doomedNames.toString()));
+ CoreGUI.getMessageCenter().notify(message);
+ UsersView.this.refresh();
+ }
+ });
}
};
}
commit 0bb55c1b461a27ff009958d825b68e24ad07f6c1
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Aug 23 13:40:46 2011 -0400
Add return statement in if block
The if block that is executed when the diff function is called with
three arguments was missing a return statement. This caused both file
and snapshot diffs to be generated.
diff --git a/etc/cli-scripts/drift.js b/etc/cli-scripts/drift.js
index c52c72d..5a1e6e0a 100644
--- a/etc/cli-scripts/drift.js
+++ b/etc/cli-scripts/drift.js
@@ -55,6 +55,7 @@ function diff(s1, s2) {
var fileDiff = DriftManager.generateUnifiedDiff(e1, e2);
foreach(fileDiff.diff, println);
+ return "";
}
function printEntry(entry) {
commit 544acabdbacec088de0bb2ed46471c2fb79b4055
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Aug 23 12:13:27 2011 -0400
Adding javadocs
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/FileDiffReport.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/FileDiffReport.java
index 8afbeb6..72e9353 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/FileDiffReport.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/FileDiffReport.java
@@ -22,6 +22,10 @@ package org.rhq.core.domain.drift;
import java.io.Serializable;
import java.util.List;
+/**
+ * This is a data structure that encapsulates a file diff and is suitable for use in the
+ * GWT UI as well as in remote clients.
+ */
public class FileDiffReport implements Serializable {
private static final long serialVersionUID = 1L;
@@ -37,10 +41,17 @@ public class FileDiffReport implements Serializable {
this.diff = diff;
}
+ /** @return The number of changes in the diff */
public int getNumberOfChanges() {
return changes;
}
+ /**
+ * Returns the actual diff as a list of strings where each line corresponds to an
+ * element in the list.
+ *
+ * @return The diff as a list of strings.
+ */
public List<String> getDiff() {
return diff;
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
index 23eb0e7..3f8ffa7 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
@@ -379,11 +379,6 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
}
@Override
- public PageList<Drift> findHistory(Drift drift) {
- return null;
- }
-
- @Override
public void updateDriftConfiguration(Subject subject, EntityContext entityContext, DriftConfiguration driftConfig) {
// before we do anything, make sure the drift config name is valid
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
index 290fb81..c6fc043 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java
@@ -119,7 +119,14 @@ public interface DriftManagerLocal extends DriftServerPluginFacet, DriftManagerR
*/
String getDriftFileBits(String hash);
+ /**
+ * Generates a unified diff of the two files references by drift. In the case of a
+ * modified file, a Drift object references the current and previous versions of the
+ * file. This method generates a diff of the two versions.
+ *
+ * @param drift Specifies the two files that will be compared
+ * @return A report containing a unified diff of the two versions of the file
+ * referenced by drift
+ */
FileDiffReport generateUnifiedDiff(Drift drift);
-
- PageList<Drift> findHistory(Drift drift);
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerRemote.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerRemote.java
index ab75921..c181e51 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerRemote.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerRemote.java
@@ -59,8 +59,26 @@ public interface DriftManagerRemote {
*/
String getDriftFileBits(String hash);
+ /**
+ * Generates a unified diff of the two files references by drift. In the case of a
+ * modified file, a Drift object references the current and previous versions of the
+ * file. This method generates a diff of the two versions.
+ *
+ * @param drift Specifies the two files that will be compared
+ * @return A report containing a unified diff of the two versions of the file
+ * referenced by drift
+ */
FileDiffReport generateUnifiedDiff(Drift drift);
+ /**
+ * Generates a unified diff of the two files referenced by drift1 and drift2. More
+ * specifically, the files referenced by {@link org.rhq.core.domain.drift.Drift#getNewDriftFile()}
+ * are compared.
+ *
+ * @param drift1 References the first file to be compared
+ * @param drift2 References the second file to be compared
+ * @return A report containing a unified diff of the two files compared
+ */
FileDiffReport generateUnifiedDiff(Drift drift1, Drift drift2);
}
commit 8dadee911fe148763f7e5eb48446dd83b4d812ea
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Tue Aug 23 13:02:59 2011 -0400
in the resource creation wizard, if the resource type does not define multiple resource config templates, still show the "info" step since that step also prompts for the resource name, but do not show the template input field, since there is only one possible template (I missed this file in my previous commit)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryCreateWizard.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryCreateWizard.java
index 3bb3456..aeb53ce 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryCreateWizard.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryCreateWizard.java
@@ -19,6 +19,7 @@
package org.rhq.enterprise.gui.coregui.client.inventory.resource.factory;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.EnumSet;
import java.util.Map;
@@ -80,16 +81,13 @@ public class ResourceFactoryCreateWizard extends AbstractResourceFactoryWizard {
ConfigurationDefinition resourceConfigDef = getChildType().getResourceConfigurationDefinition();
this.setNewResourceConfigurationDefinition(resourceConfigDef);
- // Skip the choose-template step if the type does not define a resource config or does not define more than
- // one resource config template.
- if (resourceConfigDef != null) {
- Map<String, ConfigurationTemplate> templates = resourceConfigDef.getTemplates();
- if (templates.size() > 1) {
- steps.add(new ResourceFactoryInfoStep(ResourceFactoryCreateWizard.this, MSG
- .widget_resourceFactoryWizard_namePrompt(),
- MSG.widget_resourceFactoryWizard_configTemplatePrompt(), templates));
- }
- }
+ // Even if the type doesn't define multiple resource config templates, we still need to include the info
+ // step, since it also prompts for the Resource name.
+ Map<String, ConfigurationTemplate> templates = (resourceConfigDef != null) ?
+ resourceConfigDef.getTemplates() : Collections.<String, ConfigurationTemplate>emptyMap();
+ steps.add(new ResourceFactoryInfoStep(ResourceFactoryCreateWizard.this, MSG
+ .widget_resourceFactoryWizard_namePrompt(),
+ MSG.widget_resourceFactoryWizard_configTemplatePrompt(), templates));
steps.add(new ResourceFactoryConfigurationStep(ResourceFactoryCreateWizard.this));
commit 9a8f17589a51c988f1cd61a7cf7b94b5c3e3e3e5
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Tue Aug 23 13:02:13 2011 -0400
in the resource creation wizard, if the resource type does not define multiple resource config templates, still show the "info" step since that step also prompts for the resource name, but do not show the template input field, since there is only one possible template; change the label for the template input field from "Templates" to "Template", since the user is selecting a single template
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryInfoStep.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryInfoStep.java
index ad2e1d2..20ebf5f 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryInfoStep.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryInfoStep.java
@@ -152,7 +152,7 @@ public class ResourceFactoryInfoStep extends AbstractWizardStep {
templateSelect.setAlign(Alignment.LEFT);
templateSelect.setWidth(300);
- if (templates != null && !templates.isEmpty()) {
+ if (templates != null && templates.size() > 1) {
templateSelect.setValueMap(templates.keySet().toArray(new String[templates.size()]));
templateSelect.setValue("default");
wizard.setNewResourceStartingConfiguration(templates.get("default").createConfiguration());
@@ -166,7 +166,7 @@ public class ResourceFactoryInfoStep extends AbstractWizardStep {
}
});
} else {
- templateSelect.setDisabled(true);
+ templateSelect.setVisible(false);
}
formItems.add(templateSelect);
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 332396b..93e38ab 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
@@ -1815,8 +1815,8 @@ widget_recordEditor_title_new = Create New {0}
widget_recordEditor_title_view = View {0} [{1}]
widget_recordEditor_warn_validation = One or more fields have invalid values. This [{0}] cannot be saved until these values are corrected
widget_resourceFactoryWizard_archPrompt = Package Architecture
-widget_resourceFactoryWizard_configTemplatePrompt = Resource Configuration Templates
-widget_resourceFactoryWizard_contentTemplatePrompt = Deployment Time Configuration Templates
+widget_resourceFactoryWizard_configTemplatePrompt = Resource Configuration Template
+widget_resourceFactoryWizard_contentTemplatePrompt = Deployment Configuration Template
widget_resourceFactoryWizard_createSubmit = A request to create a resource with the name of [{0}] has been submitted successfully.
widget_resourceFactoryWizard_createSubmitType = A request to create a resource of type [{0}] has been submitted successfully.
widget_resourceFactoryWizard_createWizardTitle = Create New Resource of Type [{0}]
commit 8a536964575372d7b55b75173d478c367313a285
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Tue Aug 23 12:59:00 2011 -0400
[BZ 732804] don't show Previous button on the first step of a wizard (https://bugzilla.redhat.com/show_bug.cgi?id=732804)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/wizard/WizardView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/wizard/WizardView.java
index 6b82ade..f8f173d 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/wizard/WizardView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/wizard/WizardView.java
@@ -174,6 +174,10 @@ public class WizardView extends LocatableVLayout {
closeDialog();
}
});
+ buttonBar.addMember(cancelButton);
+
+ buttonBar.addMember(new LayoutSpacer());
+
previousButton = new LocatableIButton(extendLocatorId("Previous"), PREVIOUS);
previousButton.setDisabled(true);
previousButton.addClickHandler(new ClickHandler() {
@@ -185,6 +189,11 @@ public class WizardView extends LocatableVLayout {
}
}
});
+ if (wizard.getSteps().size() <= 1) {
+ previousButton.setVisible(false);
+ }
+ buttonBar.addMember(previousButton);
+
nextButton = new LocatableIButton(extendLocatorId("Next"), NEXT);
nextButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent clickEvent) {
@@ -195,17 +204,14 @@ public class WizardView extends LocatableVLayout {
}
}
});
-
- buttonBar.addMember(cancelButton);
- buttonBar.addMember(new LayoutSpacer());
- buttonBar.addMember(previousButton);
buttonBar.addMember(nextButton);
-
}
private void setStep(final int stepIndex) {
+ previousButton.setVisible(stepIndex >= 1);
+
if (stepIndex < 0) {
- this.previousButton.setDisabled(true);
+ previousButton.setDisabled(true);
return;
}
@@ -235,9 +241,9 @@ public class WizardView extends LocatableVLayout {
buttonBar.removeMember(button);
}
customButtons.clear();
- List<IButton> cbs = wizard.getCustomButtons(currentStep);
- if (cbs != null) {
- for (IButton button : cbs) {
+ List<IButton> newCustomButtons = wizard.getCustomButtons(currentStep);
+ if (newCustomButtons != null) {
+ for (IButton button : newCustomButtons) {
button.setDisabled(true);
buttonBar.addMember(button);
customButtons.add(button);
commit 10cca68e4230bb141784f44d41eec497fc0e68c5
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Aug 23 09:15:41 2011 -0400
Adding function for viewing previous version of file
diff --git a/etc/cli-scripts/drift.js b/etc/cli-scripts/drift.js
index 1fa8147..c52c72d 100644
--- a/etc/cli-scripts/drift.js
+++ b/etc/cli-scripts/drift.js
@@ -78,6 +78,12 @@ function fetchHistory(rid, configName, path) {
this.echo = function(msg) {println(msg);}
+ function findDrift(version) {
+ return find(entries, function(drift) {
+ return drift.changeSet.version == version
+ });
+ }
+
var generate = function() {
entries = [];
@@ -99,7 +105,7 @@ function fetchHistory(rid, configName, path) {
});
}
- this.display = function() {
+ this.list = function() {
var format = java.text.DateFormat.getDateTimeInstance();
println(path + "\n-----------------------------------");
foreach(entries, function(drift) {
@@ -107,14 +113,23 @@ function fetchHistory(rid, configName, path) {
});
}
+ this.view = function(version) {
+ var drift = findDrift(version);
+ if (drift == null) {
+ return "Could not find version " + version;
+ }
+ return DriftManager.getDriftFileBits(drift.newDriftFile.hashId);
+ }
+
this.compare = function(v1, v2) {
- var d1 = find(entries, function(drift) {
- return drift.changeSet.version == v1;
- });
- var d2 = find(entries, function(drift) {
- return drift.changeSet.version == v2;
- });
-
+ var d1 = findDrift(v1);
+ if (d1 == null) {
+ return "Could not find version " + v1;
+ }
+ var d2 = findDrift(v2);
+ if (d2 == null) {
+ return "Could not find version " + v2;
+ }
var fileDiff = DriftManager.generateUnifiedDiff(d1, d2);
foreach(fileDiff.diff, println);
}
commit fb8add5e05d6e8e5a8a08d8bab07dd8cab0a47b4
Author: John Sanda <jsanda(a)redhat.com>
Date: Tue Aug 23 08:39:43 2011 -0400
Adding more functions for file diffs and fetching file version history
diff --git a/etc/cli-scripts/drift.js b/etc/cli-scripts/drift.js
index cddd7de..1fa8147 100644
--- a/etc/cli-scripts/drift.js
+++ b/etc/cli-scripts/drift.js
@@ -8,7 +8,7 @@
function createSnapshot(rid, cname) {
var config = findDriftConfig(rid, function(c) { return cname.equals(c.name) });
- var criteria = BasicDriftChangeSetCriteria();
+ var criteria = GenericDriftChangeSetCriteria();
criteria.addFilterResourceId(rid);
criteria.addFilterDriftConfigurationId(config.id);
@@ -19,10 +19,10 @@ function createSnapshot(rid, cname) {
}
}
- return DriftServer.createSnapshot(criteria);
+ return DriftManager.createSnapshot(criteria);
}
-function findDriftConfig(rid, fn) {
+function findDriftConfig(rid, filter) {
var criteria = ResourceCriteria();
criteria.addFilterId(rid);
criteria.fetchDriftConfigurations(true);
@@ -31,13 +31,32 @@ function findDriftConfig(rid, fn) {
var resource = resources.get(0);
return find(resource.driftConfigurations, function(config) {
- return fn(DriftConfiguration(config));
+ return filter(DriftConfiguration(config));
});
}
function diff(s1, s2) {
var theDiff = s1.diff(s2);
+ if (arguments.length > 2) {
+ var path = arguments[2];
+
+ if (theDiff.elementsInConflict.size() == 0) {
+ // If the snapshot diff reports no files in conflict, then there
+ // is no need to call the server to perform the file diff. We can
+ // instead return quickly.
+ println("There are no differences to report");
+ return "";
+ }
+
+ var pathFilter = function(entry) { return entry.path == path; };
+ var e1 = find(s1.entries, pathFilter);
+ var e2 = find(s2.entries, pathFilter);
+
+ var fileDiff = DriftManager.generateUnifiedDiff(e1, e2);
+ foreach(fileDiff.diff, println);
+ }
+
function printEntry(entry) {
println(entry.newDriftFile.hashId + '\t' + entry.path);
}
@@ -53,14 +72,77 @@ function diff(s1, s2) {
report('elements not in right', theDiff.elementsNotInRight);
}
-function filterEntry(props) {
- return function(entry) {
- var filteredEntry = {};
- foreach(props, function(prop) {
- if (entry[prop]) {
- filteredEntry[prop] = entry[prop];
- }
- });
- return filteredEntry;
+function fetchHistory(rid, configName, path) {
+ function History() {
+ var entries = [];
+
+ this.echo = function(msg) {println(msg);}
+
+
+ var generate = function() {
+ entries = [];
+ var criteria = GenericDriftCriteria();
+ criteria.addFilterResourceIds([rid]);
+ criteria.fetchChangeSet(true);
+ criteria.addFilterPath(path);
+
+ var drifts = DriftManager.findDriftsByCriteria(criteria);
+ foreach(drifts, function(drift) {
+ if (drift.changeSet.driftConfiguration.name == configName &&
+ drift.path == path) {
+ entries.push(drift);
+ }
+ });
+
+ entries.sort(function(d1, d2) {
+ return d1.changeSet.version <= d2.changeSet.version
+ });
+ }
+
+ this.display = function() {
+ var format = java.text.DateFormat.getDateTimeInstance();
+ println(path + "\n-----------------------------------");
+ foreach(entries, function(drift) {
+ println(drift.changeSet.version + "\t" + format.format(drift.ctime));
+ });
+ }
+
+ this.compare = function(v1, v2) {
+ var d1 = find(entries, function(drift) {
+ return drift.changeSet.version == v1;
+ });
+ var d2 = find(entries, function(drift) {
+ return drift.changeSet.version == v2;
+ });
+
+ var fileDiff = DriftManager.generateUnifiedDiff(d1, d2);
+ foreach(fileDiff.diff, println);
+ }
+
+ generate();
}
+
+ return new History();
+
+/*
+ var criteria = GenericDriftCriteria();
+ criteria.addFilterResourceIds([rid]);
+ criteria.fetchChangeSet(true);
+ criteria.addFilterPath(path);
+
+ var drifts = DriftManager.findDriftsByCriteria(criteria);
+ var history = [];
+ foreach(drifts, function(drift) {
+ if (drift.changeSet.driftConfiguration.name == configName &&
+ drift.path == path) {
+ history.push(drift);
+ }
+ });
+
+ history.sort(function(d1, d2) {
+ return d1.changeSet.version <= d2.changeSet.version
+ });
+
+ return history;
+*/
}
commit 846a462e4b52222fe689330bcb7621028def0e06
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Mon Aug 22 20:09:43 2011 -0400
Folks claim the spinner still exists, so give back its space.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/Footer.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/Footer.java
index 72c3529..5e935ab 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/Footer.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/Footer.java
@@ -60,7 +60,7 @@ public class Footer extends LocatableHLayout {
messageBar = new MessageBar();
// leave space for the RPC Activity Spinner (I think this has been removed, giving back the space)
- // addMember(createHSpacer(16));
+ addMember(createHSpacer(16));
addMember(messageBar);
commit c885793a7c649e94c60e2a0bf271bcfe83e4176c
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Mon Aug 22 18:12:04 2011 -0400
skip the template selection step in resource-create wizard if resource config def does not define more than one template; do not assume resource config defs or plugin config defs define a default template
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/AbstractResourceFactoryWizard.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/AbstractResourceFactoryWizard.java
index c94fae3..ef74a72 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/AbstractResourceFactoryWizard.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/AbstractResourceFactoryWizard.java
@@ -20,6 +20,7 @@ package org.rhq.enterprise.gui.coregui.client.inventory.resource.factory;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
+import org.rhq.core.domain.configuration.definition.ConfigurationTemplate;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.enterprise.gui.coregui.client.components.wizard.AbstractWizard;
@@ -104,8 +105,9 @@ public abstract class AbstractResourceFactoryWizard extends AbstractWizard {
|| !this.newResourceConfigurationDefinition.equals(newResourceConfigurationDefinition)) {
this.newResourceConfigurationDefinition = newResourceConfigurationDefinition;
if (newResourceConfigurationDefinition != null) {
- this.newResourceStartingConfiguration = this.newResourceConfigurationDefinition.getDefaultTemplate()
- .createConfiguration();
+ ConfigurationTemplate defaultTemplate = this.newResourceConfigurationDefinition.getDefaultTemplate();
+ this.newResourceStartingConfiguration = (defaultTemplate != null) ?
+ defaultTemplate.createConfiguration() : new Configuration();
}
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryCreateWizard.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryCreateWizard.java
index ee48168..3bb3456 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryCreateWizard.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryCreateWizard.java
@@ -20,7 +20,6 @@ package org.rhq.enterprise.gui.coregui.client.inventory.resource.factory;
import java.util.ArrayList;
import java.util.EnumSet;
-import java.util.LinkedHashMap;
import java.util.Map;
import com.google.gwt.user.client.rpc.AsyncCallback;
@@ -80,15 +79,17 @@ public class ResourceFactoryCreateWizard extends AbstractResourceFactoryWizard {
ConfigurationDefinition resourceConfigDef = getChildType().getResourceConfigurationDefinition();
this.setNewResourceConfigurationDefinition(resourceConfigDef);
- Map<String, ConfigurationTemplate> templates;
- if (resourceConfigDef == null) {
- templates = new LinkedHashMap<String, ConfigurationTemplate>();
- } else {
- templates = resourceConfigDef.getTemplates();
+
+ // Skip the choose-template step if the type does not define a resource config or does not define more than
+ // one resource config template.
+ if (resourceConfigDef != null) {
+ Map<String, ConfigurationTemplate> templates = resourceConfigDef.getTemplates();
+ if (templates.size() > 1) {
+ steps.add(new ResourceFactoryInfoStep(ResourceFactoryCreateWizard.this, MSG
+ .widget_resourceFactoryWizard_namePrompt(),
+ MSG.widget_resourceFactoryWizard_configTemplatePrompt(), templates));
+ }
}
- steps.add(new ResourceFactoryInfoStep(ResourceFactoryCreateWizard.this, MSG
- .widget_resourceFactoryWizard_namePrompt(), MSG.widget_resourceFactoryWizard_configTemplatePrompt(),
- templates));
steps.add(new ResourceFactoryConfigurationStep(ResourceFactoryCreateWizard.this));
@@ -141,8 +142,6 @@ public class ResourceFactoryCreateWizard extends AbstractResourceFactoryWizard {
new Message(MSG.widget_resourceFactoryWizard_createSubmitType(getChildType().getName()),
Message.Severity.Info));
getView().closeDialog();
- // try a refresh now but the resource may not get created fast enough to show up.
- CoreGUI.refresh();
}
});
@@ -165,8 +164,6 @@ public class ResourceFactoryCreateWizard extends AbstractResourceFactoryWizard {
new Message(MSG.widget_resourceFactoryWizard_createSubmit(newResourceName),
Message.Severity.Info));
getView().closeDialog();
- // try a refresh now but the resource may not get created fast enough to show up.
- CoreGUI.refresh();
}
});
commit e3d08a550739f693aa760c3d3ea6b073650461d2
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Mon Aug 22 18:10:11 2011 -0400
minor - add missing class-level javadoc, extract out a var for easier debugging, improve a comment
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/BundleDeployWizard.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/BundleDeployWizard.java
index f16a071..e2c242c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/BundleDeployWizard.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/BundleDeployWizard.java
@@ -33,6 +33,10 @@ import org.rhq.enterprise.gui.coregui.client.components.wizard.WizardStep;
import org.rhq.enterprise.gui.coregui.client.gwt.BundleGWTServiceAsync;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+/**
+ * @author Jay Shaughnessy
+ *
+ */
public class BundleDeployWizard extends AbstractBundleDeployWizard {
// Initial Deployment, No Bundle Selected
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/GetDeploymentConfigStep.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/GetDeploymentConfigStep.java
index a7840f4..42d1c70 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/GetDeploymentConfigStep.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/GetDeploymentConfigStep.java
@@ -29,6 +29,10 @@ import org.rhq.enterprise.gui.coregui.client.components.configuration.Configurat
import org.rhq.enterprise.gui.coregui.client.components.wizard.AbstractWizardStep;
import org.rhq.enterprise.gui.coregui.client.util.selenium.Locatable;
+/**
+ * @author Jay Shaughnessy
+ *
+ */
public class GetDeploymentConfigStep extends AbstractWizardStep {
private final BundleDeployWizard wizard;
@@ -62,11 +66,8 @@ public class GetDeploymentConfigStep extends AbstractWizardStep {
Configuration startingConfig;
if (wizard.getLiveDeployment() == null) {
ConfigurationTemplate defaultTemplate = configDef.getDefaultTemplate();
- if (defaultTemplate == null) {
- startingConfig = new Configuration();
- } else {
- startingConfig = defaultTemplate.createConfiguration();
- }
+ startingConfig = (defaultTemplate != null) ? defaultTemplate.createConfiguration() :
+ new Configuration();
} else {
startingConfig = getNormalizedLiveConfig(configDef);
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/GetDeploymentOptionsStep.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/GetDeploymentOptionsStep.java
index a29547b..171bcb1 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/GetDeploymentOptionsStep.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/GetDeploymentOptionsStep.java
@@ -30,6 +30,10 @@ import org.rhq.enterprise.gui.coregui.client.components.wizard.AbstractWizardSte
import org.rhq.enterprise.gui.coregui.client.util.selenium.Locatable;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableDynamicForm;
+/**
+ * @author Jay Shaughnessy
+ *
+ */
public class GetDeploymentOptionsStep extends AbstractWizardStep {
static private final String DEPLOY_LATER = "later";
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/GetDestinationStep.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/GetDestinationStep.java
index 7459562..871329b 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/GetDestinationStep.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/GetDestinationStep.java
@@ -57,6 +57,10 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.Locatable;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableDynamicForm;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
+/**
+ * @author Jay Shaughnessy
+ *
+ */
public class GetDestinationStep extends AbstractWizardStep {
private final BundleGWTServiceAsync bundleServer = GWTServiceLookup.getBundleService();
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/SelectBundleStep.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/SelectBundleStep.java
index 1017215..3b59b3a 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/SelectBundleStep.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deploy/SelectBundleStep.java
@@ -30,6 +30,10 @@ import org.rhq.enterprise.gui.coregui.client.components.selector.AbstractSelecto
import org.rhq.enterprise.gui.coregui.client.components.wizard.AbstractWizardStep;
import org.rhq.enterprise.gui.coregui.client.util.selenium.Locatable;
+/**
+ * @author Jay Shaughnessy
+ *
+ */
public class SelectBundleStep extends AbstractWizardStep {
private final BundleDeployWizard wizard;
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..e68d159 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
@@ -40,6 +40,10 @@ import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.util.selenium.Locatable;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableDynamicForm;
+/**
+ * @author Jay Shaughnessy
+ *
+ */
public class SelectBundleVersionStep extends AbstractWizardStep {
static private final String LATEST_VERSION = "latest";
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/operation/schedule/AbstractOperationScheduleDetailsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/operation/schedule/AbstractOperationScheduleDetailsView.java
index 0f001e5..1c12b98 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/operation/schedule/AbstractOperationScheduleDetailsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/operation/schedule/AbstractOperationScheduleDetailsView.java
@@ -49,6 +49,7 @@ import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.common.JobTrigger;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
+import org.rhq.core.domain.configuration.definition.ConfigurationTemplate;
import org.rhq.core.domain.operation.OperationDefinition;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
@@ -426,8 +427,8 @@ public abstract class AbstractOperationScheduleDetailsView extends
this.operationParametersConfigurationHolder.addMember(horizontalSpacer);
if (isNewRecord()) {
- this.operationParameters = (parametersDefinition.getDefaultTemplate() != null) ? parametersDefinition
- .getDefaultTemplate().createConfiguration()
+ ConfigurationTemplate defaultTemplate = parametersDefinition.getDefaultTemplate();
+ this.operationParameters = (defaultTemplate != null) ? defaultTemplate.createConfiguration()
: new Configuration();
} else {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryImportWizard.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryImportWizard.java
index 365c07c..721970b 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryImportWizard.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryImportWizard.java
@@ -54,7 +54,8 @@ public class ResourceFactoryImportWizard extends AbstractResourceFactoryWizard {
ArrayList<WizardStep> steps = new ArrayList<WizardStep>();
- // skip the info step if the type has only the default template to offer for user selection or no plugin config
+ // Skip the choose-template step if the type does not define a plugin config or does not define more than one
+ // plugin config template.
if (childTypePluginConfigDef != null) {
Map<String, ConfigurationTemplate> templates = childTypePluginConfigDef.getTemplates();
if (templates.size() > 1) {
@@ -97,8 +98,6 @@ public class ResourceFactoryImportWizard extends AbstractResourceFactoryWizard {
new Message(MSG.widget_resourceFactoryWizard_importSubmitted(getChildType().getName()),
Message.Severity.Info));
getView().closeDialog();
- // try a refresh now but the resource may not get added fast enough to show up.
- CoreGUI.refresh();
}
});
}
commit ff5bb9e3f225e8430a4a4a749d1c2f937829ef2d
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Mon Aug 22 18:05:34 2011 -0400
[BZ 705713] always make all properties, even read-only ones, writable in the config editors in the create-resource and import-resource wizards (https://bugzilla.redhat.com/show_bug.cgi?id=705713)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java
index cda038d..438f73b 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java
@@ -171,6 +171,7 @@ public class ConfigurationEditor extends LocatableVLayout {
private String editorTitle = null;
private boolean readOnly = false;
+ private boolean allPropertiesWritable = false;
private Map<String, String> invalidPropertyNameToDisplayNameMap = new HashMap<String, String>();
private Set<PropertyValueChangeListener> propertyValueChangeListeners = new HashSet<PropertyValueChangeListener>();
@@ -238,6 +239,14 @@ public class ConfigurationEditor extends LocatableVLayout {
this.readOnly = readOnly;
}
+ public boolean isAllPropertiesWritable() {
+ return allPropertiesWritable;
+ }
+
+ public void setAllPropertiesWritable(boolean allPropertiesWritable) {
+ this.allPropertiesWritable = allPropertiesWritable;
+ }
+
public String getEditorTitle() {
return editorTitle;
}
@@ -971,7 +980,8 @@ public class ConfigurationEditor extends LocatableVLayout {
});
fieldsList.add(editField);
- if (!(readOnly || propertyDefinitionList.isReadOnly())) {
+ boolean propertyReadOnly = (readOnly || (!allPropertiesWritable && propertyDefinitionList.isReadOnly()));
+ if (!propertyReadOnly) {
ListGridField removeField = new ListGridField("remove", 20);
removeField.setType(ListGridFieldType.ICON);
removeField.setCellIcon(Window.getImgURL(ImageManager.getRemoveIcon()));
@@ -1013,7 +1023,7 @@ public class ConfigurationEditor extends LocatableVLayout {
ToolStrip toolStrip = new ToolStrip();
toolStrip.setWidth100();
- if (!(readOnly || propertyDefinitionList.isReadOnly())) {
+ if (!propertyReadOnly) {
IButton addRowButton = new IButton();
addRowButton.setIcon(Window.getImgURL("[SKIN]/actions/add.png"));
addRowButton.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() {
@@ -1469,6 +1479,9 @@ public class ConfigurationEditor extends LocatableVLayout {
if (this.readOnly) {
return true;
}
+ if (this.allPropertiesWritable) {
+ return false;
+ }
String errorMessage = property.getErrorMessage();
if ((errorMessage != null) && (!errorMessage.trim().equals(""))) {
// special case 1: property has a plugin-set error message - allow user to edit it even if it's a read-only prop,
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryConfigurationStep.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryConfigurationStep.java
index a05974a..ddd821b 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryConfigurationStep.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryConfigurationStep.java
@@ -37,6 +37,8 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.Locatable;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
/**
+ * This step displays a config editor for the user to enter the new Resource's initial Resource or plugin configuration.
+ *
* @author Jay Shaughnessy
* @author Greg Hinkle
*/
@@ -100,12 +102,14 @@ public class ResourceFactoryConfigurationStep extends AbstractWizardStep {
public void onFailure(Throwable throwable) {
editor = new ConfigurationEditor(vLayout.extendLocatorId("Editor"), def, startingConfig);
+ editor.setAllPropertiesWritable(true);
vLayout.addMember(editor, 0);
}
public void onSuccess(ConfigurationDefinition result) {
editor = new ConfigurationEditor(vLayout.extendLocatorId("Editor"), result, startingConfig);
+ editor.setAllPropertiesWritable(true);
vLayout.addMember(editor, 0);
}
});
diff --git a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/helper/JBossInstallationInfo.java b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/helper/JBossInstallationInfo.java
index 3c43ac4..fe13a7a 100644
--- a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/helper/JBossInstallationInfo.java
+++ b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/helper/JBossInstallationInfo.java
@@ -51,6 +51,10 @@ public class JBossInstallationInfo {
public JBossInstallationInfo(File installationDir) throws IOException {
File binDir = new File(installationDir, "bin");
File runJar = new File(binDir, "run.jar");
+ if (!runJar.exists()) {
+ throw new RuntimeException(runJar + " does not exist - " + installationDir
+ + " does not appear to be a JBoss installation/home directory.");
+ }
Attributes jarManifestAttributes = loadManifestAttributesFromJar(runJar);
this.productType = JBossProductType.determineJBossProductType(jarManifestAttributes);
this.version = getVersion(jarManifestAttributes);
diff --git a/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/helper/JBossInstallationInfo.java b/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/helper/JBossInstallationInfo.java
index 23e2fe2..39507ef 100644
--- a/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/helper/JBossInstallationInfo.java
+++ b/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/helper/JBossInstallationInfo.java
@@ -47,7 +47,11 @@ public class JBossInstallationInfo {
public JBossInstallationInfo(File installationDir) throws IOException {
File binDir = new File(installationDir, "bin");
- File runJar = new File(binDir, "run.jar");
+ File runJar = new File(binDir, "run.jar");
+ if (!runJar.exists()) {
+ throw new RuntimeException(runJar + " does not exist - " + installationDir
+ + " does not appear to be a JBoss installation/home directory.");
+ }
Attributes jarManifestAttributes = loadManifestAttributesFromJar(runJar);
this.productType = JBossProductType.determineJBossProductType(jarManifestAttributes);
this.version = getVersion(jarManifestAttributes);
commit ded5c12883f1d64d57d01f8d8458c99d77956f18
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Mon Aug 22 17:30:10 2011 -0400
[BZ 729132 - New alerts lookup failed]
People complained about the alert count widget (the flag at the far left of
the message bar) because it didn't serve much purpose, took up message
real estate, and was refreshed in a background job that would sometimes
generate an exception if server comm was compromised. So, this
commit rips it out.
- also removes the reserved space for the rpc spinner. I think took that
out, so let the message bar expand all the way to the left.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/Footer.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/Footer.java
index 24841e3..72c3529 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/Footer.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/Footer.java
@@ -18,24 +18,13 @@
*/
package org.rhq.enterprise.gui.coregui.client;
-import com.google.gwt.user.client.History;
import com.google.gwt.user.client.Timer;
-import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.types.Alignment;
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 org.rhq.core.domain.alert.Alert;
-import org.rhq.core.domain.alert.AlertPriority;
-import org.rhq.core.domain.criteria.AlertCriteria;
-import org.rhq.core.domain.criteria.Criteria.Restriction;
-import org.rhq.core.domain.util.PageList;
-import org.rhq.enterprise.gui.coregui.client.alert.AlertHistoryView;
import org.rhq.enterprise.gui.coregui.client.footer.FavoritesButton;
-import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
-import org.rhq.enterprise.gui.coregui.client.report.ReportTopView;
import org.rhq.enterprise.gui.coregui.client.util.message.MessageBar;
import org.rhq.enterprise.gui.coregui.client.util.message.MessageCenterView;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableHLayout;
@@ -68,16 +57,13 @@ public class Footer extends LocatableHLayout {
messageCenter = new MessageCenterView(extendLocatorId(MessageCenterView.LOCATOR_ID));
final FavoritesButton favoritesButton = new FavoritesButton(extendLocatorId("Favorites"));
- final AlertsMessage alertsMessage = new AlertsMessage(extendLocatorId("Alerts"));
messageBar = new MessageBar();
- // leave space for the RPC Activity Spinner
- addMember(createHSpacer(16));
+ // leave space for the RPC Activity Spinner (I think this has been removed, giving back the space)
+ // addMember(createHSpacer(16));
addMember(messageBar);
- addMember(alertsMessage);
-
VLayout favoritesLayout = new VLayout();
favoritesLayout.setHeight100();
favoritesLayout.setAutoWidth();
@@ -87,35 +73,7 @@ public class Footer extends LocatableHLayout {
addMember(getMessageCenterButton());
- // people don't like the refresh and CoreGUI.refresh() isn't refreshing everything I want
- // if we ever want to reintroduce the refresh button to manually call CoreGUI.refresh(), just uncomment this line
- // addMember(getRefreshButton());
-
addMember(createHSpacer(0));
-
- alertsMessage.schedule(60000);
- }
-
- private LocatableVLayout getRefreshButton() {
- LocatableVLayout layout = new LocatableVLayout(extendLocatorId("refreshLayout"));
- layout.setHeight100();
- layout.setAlign(Alignment.CENTER);
- layout.setAutoWidth();
-
- LocatableIButton button = new LocatableIButton(extendLocatorId("refreshButton"), "");
- button.setAlign(Alignment.CENTER);
- button.setAutoFit(true);
- button.setIcon("[SKIN]/actions/refresh.png");
- button.setPrompt(CoreGUI.getMessages().common_button_refresh());
- button.addClickHandler(new ClickHandler() {
- @Override
- public void onClick(ClickEvent event) {
- CoreGUI.refresh();
- }
- });
-
- layout.addMember(button);
- return layout;
}
private LocatableVLayout getMessageCenterButton() {
@@ -139,6 +97,8 @@ public class Footer extends LocatableHLayout {
return layout;
}
+ // Leaving this although it's unused. It used to be the subclass for the alert count mechanism, which is now
+ // gone, but this may be useful in the future for something else.
public abstract static class RefreshableLabel extends LocatableLabel {
public RefreshableLabel(String locatorId) {
super(locatorId);
@@ -176,57 +136,6 @@ public class Footer extends LocatableHLayout {
}
}
- public static class AlertsMessage extends RefreshableLabel {
- public AlertsMessage(String locatorId) {
- super(locatorId);
- setHeight100();
- setWidth(25);
- setPadding(5);
- setHoverWidth(200);
- setIconSize(16);
- setWrap(false);
- changeIcon(0);
- addClickHandler(new ClickHandler() {
- public void onClick(ClickEvent clickEvent) {
- History.newItem(ReportTopView.VIEW_ID.getName() + "/" + ReportTopView.SECTION_SUBSYSTEMS_VIEW_ID
- + "/" + AlertHistoryView.SUBSYSTEM_VIEW_ID);
- }
- });
- }
-
- private void changeIcon(int alertCount) {
- if (alertCount == 0) {
- setPrompt(MSG.view_core_noRecentAlerts());
- setContents(imgHTML("subsystems/alert/Alerts_16.png", 16, 16)
- + "<span style=\"display:inline-block; vertical-align:middle\">0</span>");
- } else {
- setPrompt(MSG.view_core_recentAlerts(String.valueOf(alertCount)));
- String link = '#' + ReportTopView.VIEW_ID.getName() + "/" + ReportTopView.SECTION_SUBSYSTEMS_VIEW_ID
- + "/" + AlertHistoryView.SUBSYSTEM_VIEW_ID;
- setContents("<a href=\"" + link + "\">" + imgHTML(ImageManager.getAlertIcon(AlertPriority.HIGH))
- + "<span style=\"display:inline-block; vertical-align:middle\">" + String.valueOf(alertCount)
- + "</span></a>");
- }
- }
-
- public void refreshLoggedIn() {
- AlertCriteria alertCriteria = new AlertCriteria();
- alertCriteria.addFilterStartTime(System.currentTimeMillis() - (1000L * 60 * 60 * 8)); // last 8 hrs
- alertCriteria.setRestriction(Restriction.COUNT_ONLY);
-
- GWTServiceLookup.getAlertService().findAlertsByCriteria(alertCriteria,
- new AsyncCallback<PageList<Alert>>() {
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.view_core_error_1(), caught);
- }
-
- public void onSuccess(PageList<Alert> result) {
- changeIcon(result.getTotalSize());
- }
- });
- }
- }
-
public MessageBar getMessageBar() {
return messageBar;
}
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 c4866f4..332396b 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
@@ -1099,7 +1099,6 @@ view_connectionSettingsDetails_messageConcise_updateSuccess = Connection setting
view_connectionSettingsDetails_messageDetailed_updateSuccess = Connection settings update initiated for Resource [{0}].
view_connectionSettingsDetails_noPermission = You do not have permission to edit this Resource''s connection settings.
view_connectionSettingsDetails_somePropertiesInvalid = The following connection settings have invalid values: {0}. The values must be corrected before the settings can be saved.
-view_core_error_1 = New Alerts lookup failed
view_core_loggedOut = Logged out
view_core_noRecentAlerts = There are no recent alerts to report
view_core_recentAlerts = There are [{0}] recent alerts - click to go to the recent alerts report
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
index 691a934..19d264b 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
@@ -924,7 +924,6 @@ view_connectionSettingsDetails_error_updateFailure = Failed to update connection
##view_connectionSettingsDetails_messageDetailed_updateSuccess = Connection settings update initiated for Resource [{0}].\n
view_connectionSettingsDetails_noPermission = You do not have permission to edit this Resource''s connection settings.~
view_connectionSettingsDetails_somePropertiesInvalid = The following connection settings have invalid values: {0}. The values must be corrected before the settings can be saved.~
-view_core_error_1 = Konnte keine Alarminformationen laden
view_core_loggedOut = Ausgeloggt
view_core_noRecentAlerts = Es liegen keine frischen Alarme vor
view_core_recentAlerts = [{0}] frische Alarme
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
index 5b6d34e..2cc6d6b 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
@@ -1085,7 +1085,6 @@ view_connectionSettingsDetails_messageConcise_updateSuccess = コネクション
view_connectionSettingsDetails_messageDetailed_updateSuccess = リソース [{0} のためのコネクション設定が更新されました
view_connectionSettingsDetails_noPermission = このリソースのコネクション設定を編集する権限がありません
view_connectionSettingsDetails_somePropertiesInvalid = 次のコネクション設定は不正な値: {0} です。設定を保存する前に訂正しなければなりません。
-view_core_error_1 = 新規アラートの参照に失敗しました
#view_core_loggedInAs = Logged in as {0}
view_core_loggedOut = ログアウト
view_core_noRecentAlerts = レポートすべき最近のアラートは存在しません
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
index ef72d35..ecc380d 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
@@ -1117,7 +1117,6 @@ view_connectionSettingsDetails_error_updateFailure = Falha ao atualizar as propr
##view_connectionSettingsDetails_messageDetailed_updateSuccess = Propriedades de conex�o do Recurso [{0}] atualizadas
view_connectionSettingsDetails_noPermission = Voc� n�o possui permiss�o para editar as propriedades de conex�o do Recurso.
view_connectionSettingsDetails_somePropertiesInvalid = As seguintes propriedades de conex�o est�o incorretas: {0}. Os valores devem ser corrigidos antes de serem salvos.
-view_core_error_1 = Falha ao perquisar novos alertas
view_core_loggedInAs = Logado como {0}
view_core_loggedOut = Desconectado
view_core_noRecentAlerts = N�o existem alertas recentes
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
index f0dd375..ff0bca8 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
@@ -1095,7 +1095,6 @@ view_connectionSettingsDetails_error_updateFailure = \u66f4\u65b0\u8fde\u63a5\u8
##view_connectionSettingsDetails_messageDetailed_updateSuccess = \u8d44\u6e90 [{0}]\u7684\u8fde\u63a5\u8bbe\u7f6e\u5df2\u7ecf\u66f4\u65b0.
view_connectionSettingsDetails_noPermission = \u60a8\u6ca1\u6709\u6743\u9650\u7f16\u8f91\u6b64\u8d44\u6e90\u7684\u8fde\u63a5\u8bbe\u7f6e.
view_connectionSettingsDetails_somePropertiesInvalid = \u4e0b\u9762\u7684\u8fde\u63a5\u8bbe\u7f6e\u4fe1\u606f\u586b\u5199\u4e86\u975e\u6cd5\u7684\u503c: {0}. \u5fc5\u987b\u4fee\u6539\u6b64\u4fe1\u606f\u4ee5\u4fbf\u4fdd\u5b58\u6b64\u8bbe\u7f6e.
-view_core_error_1 = \u67e5\u627e\u65b0\u544a\u8b66\u4fe1\u606f\u5931\u8d25
view_core_loggedOut = \u9000\u51fa\u767b\u5f55
view_core_noRecentAlerts = \u6ca1\u6709\u65b0\u4ea7\u751f\u7684\u544a\u8b66\u4fe1\u606f
view_core_recentAlerts = \u65b0\u4ea7\u751f [{0}] \u6761\u544a\u8b66 - \u70b9\u51fb\u8df3\u8f6c\u5230\u65b0\u544a\u8b66\u62a5\u8868\u754c\u9762
commit 28ad282ea3d014f3fb4483e2a311958f7e425299
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Mon Aug 22 17:16:10 2011 -0400
[BZ 715380 - Uncaught exception defining Alert that triggers CLI script]
The gui exception in this bz seems to have been fixed previously. But
there was an additional issue that prevented scripts from running because
it tried to run them without a session. This may have worked in the past,
well back, before we fixed our session handling, because the sender may
have been able to piggyback on an existing session. For example, if
rhqadmin was logged into a gui session, and the script was beng run as
rhqadmin, it would have worked. But no more. So, this fix from mazz
gives the runner a proper session. Note that a very small portion of the
script's timeout period is now devoted to generating a script engine
with a valid session. Also, the session is now eagerly terminated in a
finally.
scrip
diff --git a/modules/enterprise/server/plugins/alert-cli/src/main/java/org/rhq/enterprise/server/plugins/alertCli/CliSender.java b/modules/enterprise/server/plugins/alert-cli/src/main/java/org/rhq/enterprise/server/plugins/alertCli/CliSender.java
index 16c7644..3aab6a2 100644
--- a/modules/enterprise/server/plugins/alert-cli/src/main/java/org/rhq/enterprise/server/plugins/alertCli/CliSender.java
+++ b/modules/enterprise/server/plugins/alert-cli/src/main/java/org/rhq/enterprise/server/plugins/alertCli/CliSender.java
@@ -110,9 +110,16 @@ public class CliSender extends AlertSender<CliComponent> {
SenderResult result = new SenderResult();
BufferedReader reader = null;
ScriptEngine engine = null;
+ Subject subjectWithSession = null;
+ final SessionManager sessionManager = SessionManager.getInstance();
+
try {
final Config config = getConfig();
+ // simulate the login by getting a session ID
+ config.subject = sessionManager.put(config.subject, pluginComponent.getScriptTimeout() * 1000);
+ subjectWithSession = config.subject;
+
result.setSummary(createSummary(config, SUMMARY_TEMPLATE));
ByteArrayOutputStream scriptOutputStream = new ByteArrayOutputStream();
@@ -133,11 +140,7 @@ public class CliSender extends AlertSender<CliComponent> {
Thread scriptRunner = new Thread(new Runnable() {
public void run() {
try {
- //fake the login
- config.subject = SessionManager.getInstance().put(config.subject,
- pluginComponent.getScriptTimeout() * 1000);
sandbox.eval(rdr);
- SessionManager.getInstance().invalidate(config.subject.getSessionId());
} catch (ScriptException e) {
exceptionHolder.scriptException = e;
}
@@ -187,6 +190,9 @@ public class CliSender extends AlertSender<CliComponent> {
result.addFailureMessage(ThrowableUtil.getAllMessages(e, true, remainingResultSize(result)));
return result;
} finally {
+ if (subjectWithSession != null) {
+ sessionManager.invalidate(subjectWithSession.getSessionId());
+ }
if (engine != null) {
returnEngine(engine);
}
commit de96edb84ca67d3d3a227d5268adb3bb4c22a117
Author: John Sanda <jsanda(a)redhat.com>
Date: Mon Aug 22 17:23:45 2011 -0400
Add method for generating diff between any two Drift objects
This version of generateUnifiedDiff takes two Drift objects and compares
the files referenced by their newDriftFile properties.
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
index 3497520..23eb0e7 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
@@ -364,6 +364,21 @@ public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
}
@Override
+ public FileDiffReport generateUnifiedDiff(Drift drift1, Drift drift2) {
+ String content1 = getDriftFileBits(drift1.getNewDriftFile().getHashId());
+ List<String> content1List = asList(content1.split("\\n"));
+
+ String content2 = getDriftFileBits(drift2.getNewDriftFile().getHashId());
+ List<String> content2List = asList(content2.split("\\n"));
+
+ Patch patch = DiffUtils.diff(content1List, content2List);
+ List<String> deltas = DiffUtils.generateUnifiedDiff(drift1.getPath(), drift2.getPath(), content1List, patch,
+ 10);
+
+ return new FileDiffReport(patch.getDeltas().size(), deltas);
+ }
+
+ @Override
public PageList<Drift> findHistory(Drift drift) {
return null;
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerRemote.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerRemote.java
index fd33467..ab75921 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerRemote.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerRemote.java
@@ -61,4 +61,6 @@ public interface DriftManagerRemote {
FileDiffReport generateUnifiedDiff(Drift drift);
+ FileDiffReport generateUnifiedDiff(Drift drift1, Drift drift2);
+
}
commit b1771757b971949dfe69cccfaa062c957bfc03ff
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Mon Aug 22 15:44:43 2011 -0400
[BZ 732090] fix so user can only select a single item at a time from the
left-side navigation menus on the Inventory, Reports, Administration, Help, and
Test top views (https://bugzilla.redhat.com/show_bug.cgi?id=732090)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/view/AbstractSectionedLeftNavigationView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/view/AbstractSectionedLeftNavigationView.java
index 3e0e169..c677777 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/view/AbstractSectionedLeftNavigationView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/view/AbstractSectionedLeftNavigationView.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
@@ -26,6 +26,7 @@ import java.util.Map;
import java.util.Set;
import com.allen_sauer.gwt.log.client.Log;
+import com.smartgwt.client.types.SelectionStyle;
import com.smartgwt.client.types.VisibilityMode;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.grid.events.CellClickEvent;
@@ -133,6 +134,7 @@ public abstract class AbstractSectionedLeftNavigationView extends LocatableHLayo
final TreeGrid treeGrid = new LocatableTreeGrid(navigationSection.getName());
treeGrid.setLeaveScrollbarGap(false);
treeGrid.setShowHeader(false);
+ treeGrid.setSelectionType(SelectionStyle.SINGLE);
List<NavigationItem> navigationItems = navigationSection.getNavigationItems();
TreeNode[] treeNodes = new TreeNode[navigationItems.size()];
commit 4c29315efa25abf0c2135c8b8397f3570c74bd94
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Mon Aug 22 15:14:02 2011 -0400
[BZ 676756] fix a few corner case NPEs in original fix;
log failure to select tab as warning rather than info and pass Exception to
ensure log message includes the stack trace
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
index 3c7e33c..0caeb61 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
@@ -502,6 +502,7 @@ public class Table<DS extends RPCDataSource> extends LocatableHLayout implements
this.refreshButton = new LocatableIButton(extendLocatorId("Refresh"), MSG.common_button_refresh());
refreshButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent clickEvent) {
+ disableAllFooterControls();
refresh();
}
});
@@ -530,8 +531,8 @@ public class Table<DS extends RPCDataSource> extends LocatableHLayout implements
}
private void disableAllFooterControls() {
- for (TableActionInfo tableActionToDisable : tableActions) {
- tableActionToDisable.actionCanvas.disable();
+ for (TableActionInfo tableAction : tableActions) {
+ tableAction.actionCanvas.disable();
}
for (Canvas extraWidget : extraWidgetsAboveFooter) {
extraWidget.disable();
@@ -539,7 +540,7 @@ public class Table<DS extends RPCDataSource> extends LocatableHLayout implements
for (Canvas extraWidget : extraWidgetsInMainFooter) {
extraWidget.disable();
}
- if (isShowFooterRefresh()) {
+ if (isShowFooterRefresh() && this.refreshButton != null) {
this.refreshButton.disable();
}
}
@@ -607,9 +608,6 @@ public class Table<DS extends RPCDataSource> extends LocatableHLayout implements
*/
public void refresh() {
if (this.listGrid != null) {
- if (isShowFooter()) {
- disableAllFooterControls();
- }
Criteria criteria = getCurrentCriteria();
this.listGrid.setCriteria(criteria);
this.listGrid.invalidateCache();
@@ -911,7 +909,7 @@ public class Table<DS extends RPCDataSource> extends LocatableHLayout implements
}
}
refreshRowCount();
- if (isShowFooterRefresh()) {
+ if (isShowFooterRefresh() && this.refreshButton != null) {
this.refreshButton.enable();
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/AbstractTwoLevelTabSetView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/AbstractTwoLevelTabSetView.java
index 5f1833f..e580b9c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/AbstractTwoLevelTabSetView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/AbstractTwoLevelTabSetView.java
@@ -290,7 +290,7 @@ public abstract class AbstractTwoLevelTabSetView<T, U extends Layout> extends Lo
} catch (Exception e) {
this.tabSet.enable();
- Log.info("Failed to select tab " + tabName + "/" + subtabName + ": " + e);
+ Log.warn("Failed to select tab " + tabName + "/" + subtabName + ".", e);
}
}
commit 04308a0367d5684ab89ab7e9589e47d2c1f2e89b
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Mon Aug 22 13:31:29 2011 -0400
[BZ 676756] when any action button in a table's footer is clicked, disable all
buttons and other controls in the footer until that action completes; this fixes
https://bugzilla.redhat.com/show_bug.cgi?id=676756 and should also prevent a
bunch of other similar quick clicking issues
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
index 2ae4ee2..3c7e33c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/table/Table.java
@@ -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
@@ -95,7 +95,7 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
* trivial, you must get it peer reviewed. Send out your proposed changes
* to the dev mailing list and ask for comments. Any problems introduced to
* this class are magnified because it is used in so many UI views and problems
- * are hard to detect due to the varies ways it is used.
+ * are hard to detect due to the various ways it is used.
*
* @author Greg Hinkle
* @author Ian Springer
@@ -143,6 +143,7 @@ public class Table<DS extends RPCDataSource> extends LocatableHLayout implements
protected List<Canvas> extraWidgetsInMainFooter = new ArrayList<Canvas>();
private LocatableToolStrip footer;
private LocatableToolStrip footerExtraWidgets;
+ private LocatableIButton refreshButton;
public Table(String locatorId) {
this(locatorId, null, null, null, null, true);
@@ -441,8 +442,8 @@ public class Table<DS extends RPCDataSource> extends LocatableHLayout implements
button.setOverflow(Overflow.VISIBLE);
button.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent clickEvent) {
+ disableAllFooterControls();
if (tableAction.confirmMessage != null) {
-
String message = tableAction.confirmMessage.replaceAll("\\#", String.valueOf(listGrid
.getSelection().length));
@@ -450,6 +451,8 @@ public class Table<DS extends RPCDataSource> extends LocatableHLayout implements
public void execute(Boolean confirmed) {
if (confirmed) {
tableAction.action.executeAction(listGrid.getSelection(), null);
+ } else {
+ refreshTableInfo();
}
}
});
@@ -469,9 +472,8 @@ public class Table<DS extends RPCDataSource> extends LocatableHLayout implements
for (final String key : menuEntries.keySet()) {
MenuItem item = new MenuItem(key);
item.addClickHandler(new com.smartgwt.client.widgets.menu.events.ClickHandler() {
-
- @Override
public void onClick(MenuItemClickEvent event) {
+ disableAllFooterControls();
tableAction.getAction().executeAction(listGrid.getSelection(), menuEntries.get(key));
}
});
@@ -497,7 +499,7 @@ public class Table<DS extends RPCDataSource> extends LocatableHLayout implements
footer.addMember(new LayoutSpacer());
if (isShowFooterRefresh()) {
- IButton refreshButton = new LocatableIButton(extendLocatorId("Refresh"), MSG.common_button_refresh());
+ this.refreshButton = new LocatableIButton(extendLocatorId("Refresh"), MSG.common_button_refresh());
refreshButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent clickEvent) {
refresh();
@@ -527,6 +529,21 @@ public class Table<DS extends RPCDataSource> extends LocatableHLayout implements
refreshTableInfo();
}
+ private void disableAllFooterControls() {
+ for (TableActionInfo tableActionToDisable : tableActions) {
+ tableActionToDisable.actionCanvas.disable();
+ }
+ for (Canvas extraWidget : extraWidgetsAboveFooter) {
+ extraWidget.disable();
+ }
+ for (Canvas extraWidget : extraWidgetsInMainFooter) {
+ extraWidget.disable();
+ }
+ if (isShowFooterRefresh()) {
+ this.refreshButton.disable();
+ }
+ }
+
/**
* Subclasses can use this as a chance to configure the list grid after it has been
* created but before it has been drawn to the DOM. This is also the proper place to add table
@@ -590,6 +607,9 @@ public class Table<DS extends RPCDataSource> extends LocatableHLayout implements
*/
public void refresh() {
if (this.listGrid != null) {
+ if (isShowFooter()) {
+ disableAllFooterControls();
+ }
Criteria criteria = getCurrentCriteria();
this.listGrid.setCriteria(criteria);
this.listGrid.invalidateCache();
@@ -863,7 +883,7 @@ public class Table<DS extends RPCDataSource> extends LocatableHLayout implements
}
protected void refreshTableInfo() {
- if (showFooter && null != this.listGrid) {
+ if (this.showFooter && (this.listGrid != null)) {
if (this.tableActionDisableOverride) {
this.listGrid.setSelectionType(SelectionStyle.NONE);
} else {
@@ -871,24 +891,29 @@ public class Table<DS extends RPCDataSource> extends LocatableHLayout implements
}
//int selectionCount = this.listGrid.getSelection().length;
- for (TableActionInfo tableAction : tableActions) {
+ for (TableActionInfo tableAction : this.tableActions) {
if (tableAction.actionCanvas != null) { // if null, we haven't initialized our buttons yet, so skip this
boolean enabled = (!this.tableActionDisableOverride && tableAction.action.isEnabled(this.listGrid
.getSelection()));
tableAction.actionCanvas.setDisabled(!enabled);
}
}
- for (Canvas extraWidget : extraWidgetsAboveFooter) {
+ for (Canvas extraWidget : this.extraWidgetsAboveFooter) {
+ extraWidget.enable();
if (extraWidget instanceof TableWidget) {
((TableWidget) extraWidget).refresh(this.listGrid);
}
}
- for (Canvas extraWidget : extraWidgetsInMainFooter) {
+ for (Canvas extraWidget : this.extraWidgetsInMainFooter) {
+ extraWidget.enable();
if (extraWidget instanceof TableWidget) {
((TableWidget) extraWidget).refresh(this.listGrid);
}
}
refreshRowCount();
+ if (isShowFooterRefresh()) {
+ this.refreshButton.enable();
+ }
}
}
commit de0e2844e6588790e1f07842d41bdeb33ab5480a
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Mon Aug 22 14:54:14 2011 -0400
[BZ 730991 - Left nav tree does not refresh after resource creation]
Two things done here:
First, In the resource search views we now perform a CoreGUI refresh after
uninv/delete/import/create. This updates the tree but in all cases other
than uninventory (and maybe import), the action is actually async and
depends on agent interaction, and possible a discovery run. If async
stuff finishes very quickly it may get picked up by the refresh but it
probably will not.
So, second, The resource tree resource and autogroup nodes now offer
'Refresh' in the context menu. This will refresh the subtree below the
node (for autogroups, below the parent resource node). So, a user can
perform a point refresh of the tree as desired.
Note that group trees do not offer refresh. Mixed groups show only the
top node anyway, so it's not needed. Compat group trees really require
a full CoreGUI refresh to build from the top down, and we already do that
on membership change. So, a refresh in the context menu is not really
needed/feasbible.
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 525f92c..6f552c8 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
@@ -40,6 +40,8 @@ import com.smartgwt.client.widgets.menu.MenuItem;
import com.smartgwt.client.widgets.menu.MenuItemSeparator;
import com.smartgwt.client.widgets.menu.events.ClickHandler;
import com.smartgwt.client.widgets.menu.events.MenuItemClickEvent;
+import com.smartgwt.client.widgets.tree.Tree;
+import com.smartgwt.client.widgets.tree.TreeNode;
import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.domain.criteria.DashboardCriteria;
@@ -58,11 +60,14 @@ import org.rhq.enterprise.gui.coregui.client.LinkManager;
import org.rhq.enterprise.gui.coregui.client.dashboard.portlets.inventory.groups.graph.ResourceGroupGraphPortlet;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.ResourceDetailView;
+import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.ResourceTreeDatasource.AutoGroupTreeNode;
+import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.ResourceTreeDatasource.ResourceTreeNode;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository;
import org.rhq.enterprise.gui.coregui.client.util.message.Message;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableMenu;
/**
+ * @author Jay Shaughnessy
* @author Greg Hinkle
*/
public class ResourceGroupContextMenu extends LocatableMenu {
@@ -78,7 +83,7 @@ public class ResourceGroupContextMenu extends LocatableMenu {
super(locatorId);
}
- public void showContextMenu(final ResourceGroup group) {
+ public void showContextMenu(final Tree tree, final TreeNode node, final ResourceGroup group) {
// we need the group composite to access permissions for context menu authz, so get it now
ResourceGroupCriteria criteria = new ResourceGroupCriteria();
criteria.addFilterId(group.getId());
@@ -107,13 +112,13 @@ public class ResourceGroupContextMenu extends LocatableMenu {
CoreGUI.getErrorHandler().handleError(
MSG.view_group_detail_failLoadComp(String.valueOf(group.getId())));
} else {
- showContextMenu(result.get(0));
+ showContextMenu(tree, node, result.get(0));
}
}
});
}
- public void showContextMenu(ResourceGroupComposite groupComposite) {
+ public void showContextMenu(final Tree tree, final TreeNode node, ResourceGroupComposite groupComposite) {
this.groupComposite = groupComposite;
group = groupComposite.getResourceGroup();
groupMemberType = group.getResourceType();
@@ -130,19 +135,45 @@ public class ResourceGroupContextMenu extends LocatableMenu {
public void onTypesLoaded(ResourceType type) {
groupMemberType = type;
- buildResourceGroupContextMenu(group, type);
+ buildResourceGroupContextMenu(tree, node, group, type);
showContextMenu();
}
});
}
- private void buildResourceGroupContextMenu(final ResourceGroup group, final ResourceType resourceType) {
+ private void buildResourceGroupContextMenu(final Tree tree, final TreeNode node, final ResourceGroup group,
+ final ResourceType resourceType) {
// name
setItems(new MenuItem(group.getName()));
// type name
addItem(new MenuItem("Type: " + resourceType.getName()));
+ // Mixed group refresh is not needed as there is only a single top node. Compat group
+ // refresh makes sense after a group membership change but we already perform a CoreGUI refresh to
+ // reset the whole detail view after that user action. So, only suuport refresh for autogroup nodes
+ // in the resource tree.
+ if (node instanceof AutoGroupTreeNode) {
+ // separator
+ addItem(new MenuItemSeparator());
+
+ // refresh node
+ MenuItem refresh = new MenuItem(MSG.common_button_refresh());
+ refresh.addClickHandler(new ClickHandler() {
+
+ public void onClick(MenuItemClickEvent event) {
+ // autogroup nodes are in the resource tree and reloads are performed only on resource nodes.
+ // so find the actual resource parent node, traversing through subcategory nodes as needed.
+ TreeNode resourceNode = tree.getParent(node);
+ while (!(resourceNode instanceof ResourceTreeNode)) {
+ resourceNode = tree.getParent(resourceNode);
+ }
+ tree.reloadChildren(resourceNode);
+ }
+ });
+ addItem(refresh);
+ }
+
// separator
addItem(new MenuItemSeparator());
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTreeContextMenu.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTreeContextMenu.java
index 7ad3a74..7c8904d 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTreeContextMenu.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTreeContextMenu.java
@@ -23,6 +23,7 @@
package org.rhq.enterprise.gui.coregui.client.inventory.groups.detail;
import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.smartgwt.client.widgets.tree.Tree;
import org.rhq.core.domain.criteria.ResourceGroupCriteria;
import org.rhq.core.domain.resource.group.ClusterKey;
@@ -33,6 +34,7 @@ import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.inventory.groups.detail.ResourceGroupTreeView.ResourceGroupEnhancedTreeNode;
/**
+ * @author Jay Shaughnessy
* @author Greg Hinkle
*/
public class ResourceGroupTreeContextMenu extends ResourceGroupContextMenu {
@@ -41,7 +43,7 @@ public class ResourceGroupTreeContextMenu extends ResourceGroupContextMenu {
super(locatorId);
}
- public void showContextMenu(ResourceGroupEnhancedTreeNode node) {
+ public void showContextMenu(final Tree tree, final ResourceGroupEnhancedTreeNode node) {
if (node.isAutoClusterNode()) {
final ClusterKey clusterKey = (ClusterKey) node.getAttributeAsObject("key");
@@ -55,7 +57,7 @@ public class ResourceGroupTreeContextMenu extends ResourceGroupContextMenu {
@Override
public void onSuccess(ResourceGroup result) {
- showContextMenu(result);
+ showContextMenu(tree, node, result);
}
});
@@ -72,7 +74,7 @@ public class ResourceGroupTreeContextMenu extends ResourceGroupContextMenu {
@Override
public void onSuccess(PageList<ResourceGroup> result) {
- showContextMenu(result.get(0));
+ showContextMenu(tree, node, result.get(0));
}
});
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTreeView.java
index 0b2f45c..a26f382 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTreeView.java
@@ -190,7 +190,7 @@ public class ResourceGroupTreeView extends LocatableVLayout implements Bookmarka
// only show the context menu for cluster nodes and our top root node
if (contextNode.isCompatibleGroupTopNode() || contextNode.isAutoClusterNode()) {
- contextMenu.showContextMenu(contextNode);
+ contextMenu.showContextMenu(treeGrid.getTree(), contextNode);
}
}
});
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceCompositeSearchView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceCompositeSearchView.java
index de0dba6..15ab3dc 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceCompositeSearchView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceCompositeSearchView.java
@@ -48,6 +48,9 @@ import org.rhq.enterprise.gui.coregui.client.util.TableUtility;
import org.rhq.enterprise.gui.coregui.client.util.message.Message;
import org.rhq.enterprise.gui.coregui.client.util.message.Message.Severity;
+/**
+ * @author Jay Shaughnessy
+ */
public class ResourceCompositeSearchView extends ResourceSearchView {
private final ResourceComposite parentResourceComposite;
@@ -74,7 +77,6 @@ public class ResourceCompositeSearchView extends ResourceSearchView {
return ResourceCompositeDataSource.getInstance();
}
- @SuppressWarnings("unchecked")
@Override
protected void configureTable() {
addTableAction(extendLocatorId("Delete"), MSG.common_button_delete(), MSG
@@ -115,7 +117,9 @@ public class ResourceCompositeSearchView extends ResourceSearchView {
CoreGUI.getMessageCenter().notify(
new Message(MSG.view_inventory_resources_deleteSuccessful(), Severity.Info));
- ResourceCompositeSearchView.this.refresh();
+ // refresh the entire gui so it encompasses any relevant tree view. Don't call this.refresh()
+ // because CoreGUI.refresh is more comprehensive.
+ CoreGUI.refresh();
}
});
}
@@ -128,6 +132,7 @@ public class ResourceCompositeSearchView extends ResourceSearchView {
super.configureTable();
}
+ @SuppressWarnings("unchecked")
private void addImportButton() {
ResourceType parentType = parentResourceComposite.getResource().getResourceType();
@@ -142,13 +147,13 @@ public class ResourceCompositeSearchView extends ResourceSearchView {
}
if (!importTypeValueMap.isEmpty()) {
addTableAction(extendLocatorId("Import"), MSG.common_button_import(), null, importTypeValueMap,
- new AbstractTableAction(TableActionEnablement.ALWAYS) {
+ new AbstractTableAction(TableActionEnablement.ALWAYS) {
- public void executeAction(ListGridRecord[] selection, Object actionValue) {
- ResourceFactoryImportWizard.showImportWizard(parentResourceComposite.getResource(),
- (ResourceType) actionValue);
- }
- });
+ public void executeAction(ListGridRecord[] selection, Object actionValue) {
+ ResourceFactoryImportWizard.showImportWizard(parentResourceComposite.getResource(),
+ (ResourceType) actionValue);
+ }
+ });
}
// creatable child type menu
@@ -161,17 +166,23 @@ public class ResourceCompositeSearchView extends ResourceSearchView {
}
}
if (!createTypeValueMap.isEmpty()) {
- addTableAction(extendLocatorId("CreateChild"), MSG.common_button_create_child(), null,
- createTypeValueMap, new AbstractTableAction(TableActionEnablement.ALWAYS) {
+ addTableAction(extendLocatorId("CreateChild"), MSG.common_button_create_child(), null, createTypeValueMap,
+ new AbstractTableAction(TableActionEnablement.ALWAYS) {
public void executeAction(ListGridRecord[] selection, Object actionValue) {
ResourceFactoryCreateWizard.showCreateWizard(parentResourceComposite.getResource(),
- (ResourceType) actionValue);
+ (ResourceType) actionValue);
}
});
}
}
+ protected void onUninventorySuccess() {
+ // refresh the entire gui so it encompasses any relevant tree view. Don't call this.refresh()
+ // because CoreGUI.refresh is more comprehensive.
+ CoreGUI.refresh();
+ }
+
public ResourceComposite getParentResourceComposite() {
return parentResourceComposite;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceSearchView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceSearchView.java
index 025ee97..53d5b18 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceSearchView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceSearchView.java
@@ -18,7 +18,19 @@
*/
package org.rhq.enterprise.gui.coregui.client.inventory.resource;
-import static org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceDataSourceField.*;
+import static org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceDataSourceField.AVAILABILITY;
+import static org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceDataSourceField.CATEGORY;
+import static org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceDataSourceField.CTIME;
+import static org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceDataSourceField.DESCRIPTION;
+import static org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceDataSourceField.ITIME;
+import static org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceDataSourceField.KEY;
+import static org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceDataSourceField.LOCATION;
+import static org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceDataSourceField.MODIFIER;
+import static org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceDataSourceField.MTIME;
+import static org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceDataSourceField.NAME;
+import static org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceDataSourceField.PLUGIN;
+import static org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceDataSourceField.TYPE;
+import static org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceDataSourceField.VERSION;
import java.util.ArrayList;
import java.util.Collection;
@@ -44,9 +56,9 @@ import org.rhq.core.domain.search.SearchSubsystem;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.LinkManager;
import org.rhq.enterprise.gui.coregui.client.components.table.EscapedHtmlCellFormatter;
+import org.rhq.enterprise.gui.coregui.client.components.table.IconField;
import org.rhq.enterprise.gui.coregui.client.components.table.RecordExtractor;
import org.rhq.enterprise.gui.coregui.client.components.table.ResourceAuthorizedTableAction;
-import org.rhq.enterprise.gui.coregui.client.components.table.IconField;
import org.rhq.enterprise.gui.coregui.client.components.table.ResourceCategoryCellFormatter;
import org.rhq.enterprise.gui.coregui.client.components.table.Table;
import org.rhq.enterprise.gui.coregui.client.components.table.TableActionEnablement;
@@ -63,8 +75,10 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
/**
* The list view for {@link Resource}s.
*
+ * @author Jay Shaughnessy
* @author Greg Hinkle
*/
+@SuppressWarnings("unchecked")
public class ResourceSearchView extends Table {
private static final String DEFAULT_TITLE = MSG.view_inventory_resources_title();
@@ -103,7 +117,6 @@ public class ResourceSearchView extends Table {
*
* @param headerIcons 24x24 icon(s) to be displayed in the header
*/
- @SuppressWarnings("unchecked")
public ResourceSearchView(String locatorId, Criteria criteria, String title, SortSpecifier[] sortSpecifier,
String[] excludeFields, String... headerIcons) {
super(locatorId, title, criteria, sortSpecifier, excludeFields);
@@ -117,7 +130,6 @@ public class ResourceSearchView extends Table {
}
// surpress unchecked warnings because the subclasses may have different generic types for the datasource
- @SuppressWarnings("unchecked")
protected RPCDataSource getDataSourceInstance() {
return ResourceDatasource.getInstance();
}
@@ -154,7 +166,7 @@ public class ResourceSearchView extends Table {
CoreGUI.getMessageCenter().notify(
new Message(MSG.view_inventory_resources_uninventorySuccessful(), Severity.Info));
- ResourceSearchView.this.refresh();
+ onUninventorySuccess();
}
});
}
@@ -172,6 +184,10 @@ public class ResourceSearchView extends Table {
});
}
+ protected void onUninventorySuccess() {
+ refresh();
+ }
+
protected List<ListGridField> createFields() {
List<ListGridField> fields = new ArrayList<ListGridField>();
@@ -181,12 +197,12 @@ public class ResourceSearchView extends Table {
public String hoverHTML(Object value, ListGridRecord record, int rowNum, int colNum) {
String resCat = record.getAttribute(CATEGORY.propertyName());
switch (ResourceCategory.valueOf(resCat)) {
- case PLATFORM:
- return MSG.common_title_platform();
- case SERVER:
- return MSG.common_title_server();
- case SERVICE:
- return MSG.common_title_service();
+ case PLATFORM:
+ return MSG.common_title_platform();
+ case SERVER:
+ return MSG.common_title_server();
+ case SERVICE:
+ return MSG.common_title_service();
}
return null;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTopView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTopView.java
index 04c55c1..1044a5d 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTopView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTopView.java
@@ -27,6 +27,7 @@ import org.rhq.enterprise.gui.coregui.client.inventory.groups.detail.ResourceGro
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableHLayout;
/**
+ * @author Jay Shaughnessy
* @author Greg Hinkle
*/
public class ResourceTopView extends LocatableHLayout implements BookmarkableView {
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 279ec46..501d9b2 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
@@ -94,6 +94,7 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableMenu;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
/**
+ * @author Jay Shaughnessy
* @author Greg Hinkle
*/
public class ResourceTreeView extends LocatableVLayout {
@@ -310,6 +311,10 @@ public class ResourceTreeView extends LocatableVLayout {
}
private void updateSelection() {
+ updateSelection(false);
+ }
+
+ private void updateSelection(boolean isRefresh) {
TreeNode selectedNode;
@@ -325,11 +330,15 @@ public class ResourceTreeView extends LocatableVLayout {
treeGrid.selectRecord(selectedNode);
}
+ if (isRefresh) {
+ treeGrid.getTree().reloadChildren(selectedNode);
+ }
+
treeGrid.markForRedraw();
}
}
- private void showContextMenu(AutoGroupTreeNode agNode) {
+ private void showContextMenu(final AutoGroupTreeNode agNode) {
getAutoGroupBackingGroup(agNode, new AsyncCallback<ResourceGroup>() {
public void onFailure(Throwable caught) {
@@ -337,7 +346,7 @@ public class ResourceTreeView extends LocatableVLayout {
}
public void onSuccess(ResourceGroup result) {
- autoGroupContextMenu.showContextMenu(result);
+ autoGroupContextMenu.showContextMenu(treeGrid.getTree(), agNode, result);
}
});
}
@@ -380,7 +389,7 @@ public class ResourceTreeView extends LocatableVLayout {
new ResourceTypeRepository.TypeLoadedCallback() {
public void onTypesLoaded(ResourceType type) {
- buildResourceContextMenu(resourceComposite, type);
+ buildResourceContextMenu(node, resourceComposite, type);
resourceContextMenu.showContextMenu();
}
});
@@ -389,7 +398,8 @@ public class ResourceTreeView extends LocatableVLayout {
});
}
- private void buildResourceContextMenu(final ResourceComposite resourceComposite, final ResourceType resourceType) {
+ private void buildResourceContextMenu(final ResourceTreeNode node, final ResourceComposite resourceComposite,
+ final ResourceType resourceType) {
final Resource resource = resourceComposite.getResource();
final ResourcePermission resourcePermission = resourceComposite.getResourcePermission();
@@ -403,6 +413,19 @@ public class ResourceTreeView extends LocatableVLayout {
// separator
resourceContextMenu.addItem(new MenuItemSeparator());
+ // refresh node
+ MenuItem refresh = new MenuItem(MSG.common_button_refresh());
+ refresh.addClickHandler(new ClickHandler() {
+
+ public void onClick(MenuItemClickEvent event) {
+ treeGrid.getTree().reloadChildren(node);
+ }
+ });
+ resourceContextMenu.addItem(refresh);
+
+ // separator
+ resourceContextMenu.addItem(new MenuItemSeparator());
+
// plugin config
MenuItem pluginConfiguration = new MenuItem(MSG.view_tabs_common_connectionSettings());
boolean pluginConfigEnabled = resourceType.getPluginConfigurationDefinition() != null;
@@ -701,14 +724,14 @@ public class ResourceTreeView extends LocatableVLayout {
this.rootResource = rootResource;
}
- public void setSelectedResource(final int selectedResourceId) {
+ public void setSelectedResource(final int selectedResourceId, boolean isRefresh) {
selectedNodeId = ResourceTreeNode.idOf(selectedResourceId);
if (treeGrid != null && treeGrid.getTree() != null && (treeGrid.getTree().findById(selectedNodeId)) != null) {
// This is the case where the tree was previously loaded and we get fired to look at a different
// node in the same tree and just have to switch the selection
- updateSelection();
+ updateSelection(isRefresh);
} else {
// This is for cases where we have to load the tree fresh including down to the currently visible node
@@ -900,6 +923,7 @@ public class ResourceTreeView extends LocatableVLayout {
*/
public void renderView(ViewPath viewPath) {
+
ViewId currentViewId = viewPath.getCurrent();
String currentViewIdPath = currentViewId.getPath();
if ("AutoGroup".equals(currentViewIdPath)) {
@@ -911,8 +935,7 @@ public class ResourceTreeView extends LocatableVLayout {
} else {
String resourceIdString = currentViewId.getPath();
Integer resourceId = Integer.parseInt(resourceIdString);
- setSelectedResource(resourceId);
+ setSelectedResource(resourceId, viewPath.isRefresh());
}
}
-
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryCreateWizard.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryCreateWizard.java
index 10fe75f..ee48168 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryCreateWizard.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryCreateWizard.java
@@ -141,6 +141,8 @@ public class ResourceFactoryCreateWizard extends AbstractResourceFactoryWizard {
new Message(MSG.widget_resourceFactoryWizard_createSubmitType(getChildType().getName()),
Message.Severity.Info));
getView().closeDialog();
+ // try a refresh now but the resource may not get created fast enough to show up.
+ CoreGUI.refresh();
}
});
@@ -163,6 +165,8 @@ public class ResourceFactoryCreateWizard extends AbstractResourceFactoryWizard {
new Message(MSG.widget_resourceFactoryWizard_createSubmit(newResourceName),
Message.Severity.Info));
getView().closeDialog();
+ // try a refresh now but the resource may not get created fast enough to show up.
+ CoreGUI.refresh();
}
});
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryImportWizard.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryImportWizard.java
index 225a933..365c07c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryImportWizard.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryImportWizard.java
@@ -97,6 +97,8 @@ public class ResourceFactoryImportWizard extends AbstractResourceFactoryWizard {
new Message(MSG.widget_resourceFactoryWizard_importSubmitted(getChildType().getName()),
Message.Severity.Info));
getView().closeDialog();
+ // try a refresh now but the resource may not get added fast enough to show up.
+ CoreGUI.refresh();
}
});
}
commit 2b9ad457efe41706015630ad5d526311ee1b9376
Author: John Sanda <jsanda(a)redhat.com>
Date: Mon Aug 22 14:49:03 2011 -0400
DriftManagerBean needs to implement DriftManagerRemote
Also adding some more logging in DriftDetector.
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
index ecf3821..f10ca40 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
@@ -71,15 +71,22 @@ public class DriftDetector implements Runnable {
public void run() {
DriftDetectionSchedule schedule = scheduleQueue.getNextSchedule();
if (schedule == null) {
+ log.debug("No schedules are in the queue.");
return;
}
+ if (log.isDebugEnabled()) {
+ log.debug("Processing " + schedule);
+ }
+
try {
if (schedule.getNextScan() > (System.currentTimeMillis() + 100L)) {
+ log.debug("Skipping " + schedule + " because it is too early to do the next detection.");
return;
}
if (!schedule.getDriftConfiguration().isEnabled()) {
+ log.debug("Skipping " + schedule + " because the drift configuration is disabled.");
return;
}
@@ -111,6 +118,7 @@ public class DriftDetector implements Runnable {
}
private int generateDriftChangeSet(final DriftDetectionSchedule schedule) throws IOException {
+ log.debug("Generating drift change set for " + schedule);
final File basedir = new File(basedir(schedule.getResourceId(), schedule.getDriftConfiguration()));
final ChangeSetWriter driftWriter = changeSetMgr.getChangeSetWriter(schedule.getResourceId(),
@@ -128,6 +136,9 @@ public class DriftDetector implements Runnable {
File file = new File(basedir, entry.getFile());
if (!file.exists()) {
// The file has been deleted since the last scan
+ if (log.isInfoEnabled()) {
+ log.info("Detected deleted file for " + schedule + " --> " + file.getAbsolutePath());
+ }
driftWriter.write(removedFileEntry(entry.getFile(), entry.getNewSHA()));
changes.incrementAndGet();
} else {
@@ -135,6 +146,9 @@ public class DriftDetector implements Runnable {
String currentSHA = sha256(file);
if (!currentSHA.equals(entry.getNewSHA())) {
// The file has been updated
+ if (log.isInfoEnabled()) {
+ log.info("Detected modified file for " + schedule + " --> " + file.getAbsolutePath());
+ }
FileEntry modifiedEntry = changedFileEntry(entry.getFile(), entry.getNewSHA(), currentSHA);
driftWriter.write(modifiedEntry);
coverageWriter.write(modifiedEntry);
@@ -155,6 +169,11 @@ public class DriftDetector implements Runnable {
if (processedFiles.contains(file)) {
return;
}
+
+ if (log.isInfoEnabled()) {
+ log.info("Detected added file for " + schedule + " --> " + file.getAbsolutePath());
+ }
+
FileEntry newEntry = addedFileEntry(relativePath(basedir, file), sha256(file));
driftWriter.write(newEntry);
coverageWriter.write(newEntry);
@@ -175,6 +194,8 @@ public class DriftDetector implements Runnable {
}
private void generateCoverageChangeSet(final DriftDetectionSchedule schedule) throws IOException {
+ log.debug("Generating coverage change set for " + schedule);
+
final ChangeSetWriter writer = changeSetMgr.getChangeSetWriter(schedule.getResourceId(), createHeaders(schedule,
COVERAGE));
final DriftConfiguration config = schedule.getDriftConfiguration();
@@ -185,6 +206,9 @@ public class DriftDetector implements Runnable {
@Override
public void visit(File file) {
try {
+ if (log.isInfoEnabled()) {
+ log.info("Adding " + file.getAbsolutePath() + " to coverage change set for " + schedule);
+ }
writer.write(addedFileEntry(relativePath(basedir, file), sha256(file)));
} catch (IOException e) {
log.error("An error occurred while generating a coverage change set for " + schedule + ": " +
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
index 60c2547..3497520 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java
@@ -90,7 +90,7 @@ import static javax.ejb.TransactionAttributeType.REQUIRES_NEW;
* @author Jay Shaughnessy
*/
@Stateless
-public class DriftManagerBean implements DriftManagerLocal {
+public class DriftManagerBean implements DriftManagerLocal, DriftManagerRemote {
// TODO Should security checks be handled here instead of delegating to the drift plugin?
// Currently any security checks that need to be performed are delegated to the plugin.
commit 018fd0346961c6527e7f07b71e12f3f793e46546
Author: John Sanda <jsanda(a)redhat.com>
Date: Mon Aug 22 13:37:19 2011 -0400
Fixing plugin property name in drift template
The plugin property name for the 'Core Files' template was set to
jbossHomeDir but the correct property name is homeDir.
Also updating DriftDetector to catch any Throwable so that the thread
continues execution even in the event of an unexpected error.
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
index 5ae6447..ecf3821 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftDetector.java
@@ -103,6 +103,8 @@ public class DriftDetector implements Runnable {
if (changeSetType == COVERAGE || changes > 0) {
driftClient.sendChangeSetToServer(schedule.getResourceId(), driftConfig, changeSetType);
}
+ } catch (Throwable t) {
+ log.error("An unexpected error occurred during drift detection: " + t.getCause().getMessage(), t);
} finally {
scheduleQueue.deactivateSchedule();
}
diff --git a/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml
index 1f6bc7c..5dc6600 100644
--- a/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml
@@ -1194,7 +1194,7 @@
<drift-configuration name="Core Files">
<basedir>
<value-context>pluginConfiguration</value-context>
- <value-name>jbossHomeDir</value-name>
+ <value-name>homeDir</value-name>
</basedir>
<includes>
<include path="bin" />
commit 90f0867435ee2b426a2cd7eb67fa5d36a5293356
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Mon Aug 22 12:38:37 2011 -0400
[BZ 732089] a new unit test to make sure the fix works.
diff --git a/.classpath b/.classpath
index 52f9dab..cb9d57f 100644
--- a/.classpath
+++ b/.classpath
@@ -177,6 +177,7 @@
<classpathentry kind="src" path="modules/enterprise/remoting/cli/src/test/java"/>
<classpathentry kind="src" path="modules/enterprise/server/sars/agent-sar/src/main/java"/>
<classpathentry kind="src" path="modules/enterprise/server/safe-invoker/src/main/java"/>
+ <classpathentry kind="src" path="modules/enterprise/server/safe-invoker/src/test/java"/>
<classpathentry kind="src" path="modules/enterprise/server/container-lib/src/main/java"/>
<classpathentry kind="src" path="modules/enterprise/server/plugins/ant-bundle/src/main/java"/>
<classpathentry kind="src" path="modules/enterprise/server/plugins/filetemplate-bundle/src/main/java"/>
diff --git a/modules/enterprise/server/safe-invoker/src/main/java/org/rhq/enterprise/server/util/HibernateDetachUtility.java b/modules/enterprise/server/safe-invoker/src/main/java/org/rhq/enterprise/server/util/HibernateDetachUtility.java
index a978a85..51b78ee 100644
--- a/modules/enterprise/server/safe-invoker/src/main/java/org/rhq/enterprise/server/util/HibernateDetachUtility.java
+++ b/modules/enterprise/server/safe-invoker/src/main/java/org/rhq/enterprise/server/util/HibernateDetachUtility.java
@@ -64,18 +64,49 @@ public class HibernateDetachUtility {
SERIALIZATION, JAXB
}
+ /*
+ * This is the type of object that will be used to generate identity
+ * hashcodes for objects that are being scanned during the detach.
+ * During production runtime, the hashCodeGenerator will use the
+ * java.lang.System mechanism, but since this is package scoped,
+ * tests can override this since. (See BZ 732089).
+ */
+ static interface HashCodeGenerator {
+ Integer getHashCode(Object value);
+ }
+
+ static class SystemHashCodeGenerator implements HashCodeGenerator {
+ @Override
+ public Integer getHashCode(Object value) {
+ return System.identityHashCode(value);
+ }
+ }
+
+ static HashCodeGenerator hashCodeGenerator = new SystemHashCodeGenerator();
+
// 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 String THROW_EXCEPTION_ON_DEPTH_LIMIT_SYSPROP = "rhq.server.hibernate-detach-utility.throw-exception-on-depth-limit";
private static final int depthAllowed;
+ private static final boolean throwExceptionOnDepthLimit;
static {
int value;
try {
- String str = System.getProperty(DEPTH_ALLOWED_SYSPROP, "50");
+ String str = System.getProperty(DEPTH_ALLOWED_SYSPROP, "100");
value = Integer.parseInt(str);
} catch (Throwable t) {
- value = 50;
+ value = 100;
}
depthAllowed = value;
+
+ boolean booleanValue;
+ try {
+ String str = System.getProperty(THROW_EXCEPTION_ON_DEPTH_LIMIT_SYSPROP, "true");
+ booleanValue = Boolean.parseBoolean(str);
+ } catch (Throwable t) {
+ booleanValue = true;
+ }
+ throwExceptionOnDepthLimit = booleanValue;
}
public static void nullOutUninitializedFields(Object value, SerializationType serializationType) throws Exception {
@@ -107,18 +138,24 @@ public class HibernateDetachUtility {
* for a single hash and is used to ensure we never try to detach an object already processed.
* @param depth used to stop infinite recursion, defaults to a depth we don't expectto see, but it is configurable.
* @param serializationType
- * @throws Exception
+ * @throws Exception if a problem occurs
+ * @throws IllegalStateException if the recursion depth limit is reached
*/
private static void nullOutUninitializedFields(Object value, Map<Integer, Object> checkedObjectMap,
Map<Integer, List<Object>> checkedObjectCollisionMap, int depth, SerializationType serializationType)
throws Exception {
if (depth > depthAllowed) {
- LOG.warn("Recursed too deep [" + depth + " > " + depthAllowed
+ String warningMessage = "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 + "].");
+ + "]. This may cause serialization errors later. "
+ + "You can try to work around this by setting the system property [" + DEPTH_ALLOWED_SYSPROP
+ + "] to a value higher than [" + depth + "] or you can set the system property ["
+ + THROW_EXCEPTION_ON_DEPTH_LIMIT_SYSPROP + "] to 'false'";
+ LOG.warn(warningMessage);
+ if (throwExceptionOnDepthLimit) {
+ throw new IllegalStateException(warningMessage);
+ }
return;
}
@@ -129,7 +166,7 @@ public class HibernateDetachUtility {
// 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);
+ Integer valueIdentity = hashCodeGenerator.getHashCode(value);
Object checkedObject = checkedObjectMap.get(valueIdentity);
if (null == checkedObject) {
diff --git a/modules/enterprise/server/safe-invoker/src/test/java/org/rhq/enterprise/server/util/HibernateDetachUtilityTest.java b/modules/enterprise/server/safe-invoker/src/test/java/org/rhq/enterprise/server/util/HibernateDetachUtilityTest.java
new file mode 100644
index 0000000..3df5403
--- /dev/null
+++ b/modules/enterprise/server/safe-invoker/src/test/java/org/rhq/enterprise/server/util/HibernateDetachUtilityTest.java
@@ -0,0 +1,141 @@
+/*
+ * 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, 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.server.util;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import org.testng.annotations.Test;
+
+import org.rhq.enterprise.server.util.HibernateDetachUtility.SerializationType;
+
+@Test
+public class HibernateDetachUtilityTest {
+ /**
+ * This tests the rare, but very possible, condition where two objects
+ * have the same identity hashcode (System.identityHashCode(A) == System.identityHashCode(B))
+ * but are not identical objects (A != B). We have seen this as a valid condition
+ * on both SUN and IBM JRE implementations.
+ */
+ public void testIdenticalHashCodesNonIdenticalObjects() throws Exception {
+ class ArrayObject implements Serializable {
+ private static final long serialVersionUID = 1L;
+ long id;
+ Integer[] array;
+ ArrayObject object; // needed for self-referencing
+
+ ArrayObject(long key, ArrayObject obj, Integer... members) {
+ id = key;
+ object = obj;
+ array = members;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder builder = new StringBuilder();
+ builder.append("ArrayObject [id=").append(id).append(", object=").append(
+ (object == null) ? "null" : object.id).append(", array=").append(Arrays.toString(array))
+ .append("]");
+ return builder.toString();
+ }
+
+ }
+
+ class DuplicateHashCodeGenerator implements HibernateDetachUtility.HashCodeGenerator {
+ public Integer getHashCode(Object value) {
+ if (value instanceof Integer && ((Integer) value).intValue() >= 2) {
+ return 11111;
+ } else if (value instanceof ArrayObject) {
+ return 22222;
+ } else {
+ return System.identityHashCode(value);
+ }
+ }
+ }
+
+ ArrayObject array1 = new ArrayObject(1, null, 1, 2, 3);
+ ArrayObject array2 = new ArrayObject(2, array1, 2, 3);
+ array1.object = array2; // now 1 references 2 and 2 reference 1, circular dependency
+ ArrayObject array3 = new ArrayObject(3, array2, 3);
+ array3.object = array3;
+ ArrayList<ArrayObject> array = new ArrayList<ArrayObject>(3);
+ array.add(array1);
+ array.add(array2);
+ array.add(array3);
+
+ // SANITY CHECK - make sure our setup is as we expect it to be
+ assert array.get(0).array[0] == Integer.valueOf(1);
+ assert array.get(0).array[1] == Integer.valueOf(2);
+ assert array.get(0).array[2] == Integer.valueOf(3);
+ assert array.get(1).array[0] == Integer.valueOf(2);
+ assert array.get(1).array[1] == Integer.valueOf(3);
+ assert array.get(2).array[0] == Integer.valueOf(3);
+
+ // make sure array1 still references array2 and vice versa
+ assertObjectEquals(array.get(0).object, array.get(1));
+ assertObjectEquals(array.get(1).object, array.get(0));
+
+ // make sure array3 still self-references
+ assertObjectEquals(array.get(2).object, array.get(2));
+
+ // simulate rare condition
+ HibernateDetachUtility.hashCodeGenerator = new DuplicateHashCodeGenerator();
+ HibernateDetachUtility.nullOutUninitializedFields(array, SerializationType.SERIALIZATION);
+ assert array.get(0).array[0] == Integer.valueOf(1);
+ assert array.get(0).array[1] == Integer.valueOf(2);
+ assert array.get(0).array[2] == Integer.valueOf(3);
+ assert array.get(1).array[0] == Integer.valueOf(2);
+ assert array.get(1).array[1] == Integer.valueOf(3);
+ assert array.get(2).array[0] == Integer.valueOf(3);
+
+ // make sure array1 still references array2 and vice versa
+ assertObjectEquals(array.get(0).object, array.get(1));
+ assertObjectEquals(array.get(1).object, array.get(0));
+
+ // make sure array3 still self-references
+ assertObjectEquals(array.get(2).object, array.get(2));
+
+ // put it back the way it was
+ HibernateDetachUtility.hashCodeGenerator = new HibernateDetachUtility.SystemHashCodeGenerator();
+ HibernateDetachUtility.nullOutUninitializedFields(array, SerializationType.SERIALIZATION);
+ assert array.get(0).array[0] == Integer.valueOf(1);
+ assert array.get(0).array[1] == Integer.valueOf(2);
+ assert array.get(0).array[2] == Integer.valueOf(3);
+ assert array.get(1).array[0] == Integer.valueOf(2);
+ assert array.get(1).array[1] == Integer.valueOf(3);
+ assert array.get(2).array[0] == Integer.valueOf(3);
+
+ // make sure array1 still references array2 and vice versa
+ assertObjectEquals(array.get(0).object, array.get(1));
+ assertObjectEquals(array.get(1).object, array.get(0));
+
+ // make sure array3 still self-references
+ assertObjectEquals(array.get(2).object, array.get(2));
+ }
+
+ private void assertObjectEquals(Object o1, Object o2) {
+ assert o1 == o2 : "Object [" + o1 + "] does not equal object [" + o2 + "]";
+ }
+}
\ No newline at end of file
commit 727a1443bb20098900a08fa739e732f78581d0b9
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Sun Aug 21 12:42:38 2011 -0400
[BZ 729994 - Create/Import wizard does not allow reselection of template]
Now, in the resource factory wizard (import, create child), a user
can back up via the previous button, re-select the template, and the
new selection will be honored when the config editor is next displayed.
(related to BZ 705713 - Templates not honored for resource-config when
creating a new resource)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryConfigurationStep.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryConfigurationStep.java
index 5274e40..a05974a 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryConfigurationStep.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryConfigurationStep.java
@@ -45,6 +45,7 @@ public class ResourceFactoryConfigurationStep extends AbstractWizardStep {
private boolean noConfigurationNeeded = false; // if true, it has been determined the user doesn't have to set any config
private LocatableVLayout vLayout;
private ConfigurationEditor editor;
+ private Configuration startingConfig;
private DurationItem timeoutItem;
AbstractResourceFactoryWizard wizard;
@@ -53,49 +54,14 @@ public class ResourceFactoryConfigurationStep extends AbstractWizardStep {
}
public Canvas getCanvas(Locatable parent) {
- if (vLayout == null) {
+ boolean newCanvas = this.vLayout == null;
+
+ if (newCanvas) {
String locatorId = (null == parent) ? "ResourceFactoryConfig" : parent
.extendLocatorId("ResourceFactoryConfig");
- vLayout = new LocatableVLayout(locatorId);
-
- final ConfigurationDefinition def = wizard.getNewResourceConfigurationDefinition();
- if (def != null) {
-
- final Configuration startingConfig = wizard.getNewResourceStartingConfiguration();
-
- ConfigurationGWTServiceAsync configurationService = GWTServiceLookup.getConfigurationService();
- configurationService.getOptionValuesForConfigDefinition(def,new AsyncCallback<ConfigurationDefinition>() {
-
-
- @Override
- public void onFailure(Throwable throwable) {
- editor = new ConfigurationEditor(vLayout.extendLocatorId("Editor"),
- def, startingConfig);
-// configurationEditor.setReadOnly(isReadOnly());
-// operationParametersConfigurationHolder.addMember(configurationEditor);
-// operationParametersConfigurationHolder.show();
- vLayout.addMember(editor);
-
- }
-
- @Override
- public void onSuccess(ConfigurationDefinition result) {
- editor = new ConfigurationEditor(vLayout.extendLocatorId("Editor"),
- result, startingConfig);
-// configurationEditor.setReadOnly(isReadOnly());
-// operationParametersConfigurationHolder.addMember(configurationEditor);
-// operationParametersConfigurationHolder.show();
- vLayout.addMember(editor);
- }
- });
-
-
-
-// Configuration startingConfig = wizard.getNewResourceStartingConfiguration();
-// editor = new ConfigurationEditor(vLayout.extendLocatorId("Editor"), def, startingConfig);
-// vLayout.addMember(editor);
- }
+ this.vLayout = new LocatableVLayout(locatorId);
+ // only create the timeout member 1 time, even if we end up recreating the config editor
TreeSet<TimeUnit> supportedUnits = new TreeSet<TimeUnit>();
supportedUnits.add(TimeUnit.SECONDS);
supportedUnits.add(TimeUnit.MINUTES);
@@ -109,6 +75,43 @@ public class ResourceFactoryConfigurationStep extends AbstractWizardStep {
timeoutForm.setMargin(10);
vLayout.addMember(timeoutForm);
}
+
+ // if this is a newCanvas, or if the starting config has changed, create a new config editor. The starting
+ // config (i.e. template) may have changed if the user, via the previous button, backed up and changed the
+ // selected template.
+ if (newCanvas || this.startingConfig != wizard.getNewResourceStartingConfiguration()) {
+
+ final ConfigurationDefinition def = wizard.getNewResourceConfigurationDefinition();
+ if (def != null) {
+
+ this.startingConfig = wizard.getNewResourceStartingConfiguration();
+
+ if (!newCanvas) {
+ Canvas doomedConfigEditor = this.vLayout.getMember(0);
+ this.vLayout.removeMember(doomedConfigEditor);
+ doomedConfigEditor.destroy();
+ }
+
+ this.startingConfig = wizard.getNewResourceStartingConfiguration();
+
+ ConfigurationGWTServiceAsync configurationService = GWTServiceLookup.getConfigurationService();
+ configurationService.getOptionValuesForConfigDefinition(def,
+ new AsyncCallback<ConfigurationDefinition>() {
+
+ public void onFailure(Throwable throwable) {
+ editor = new ConfigurationEditor(vLayout.extendLocatorId("Editor"), def, startingConfig);
+ vLayout.addMember(editor, 0);
+
+ }
+
+ public void onSuccess(ConfigurationDefinition result) {
+ editor = new ConfigurationEditor(vLayout.extendLocatorId("Editor"), result, startingConfig);
+ vLayout.addMember(editor, 0);
+ }
+ });
+ }
+ }
+
return vLayout;
}
commit 29b542700591bb3b481479671341c70447d53874
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Sun Aug 21 11:23:16 2011 -0400
[BZ 717788 - NPE on Inventory>Agent subtab for a platform that has UNKNOWN avail and has never been UP]
Handle situation when no avail report has yet ben sent.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/ResourceResourceAgentView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/ResourceResourceAgentView.java
index ddab284..ff1addc 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/ResourceResourceAgentView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/ResourceResourceAgentView.java
@@ -174,7 +174,8 @@ public class ResourceResourceAgentView extends LocatableVLayout implements Refre
nameValue.setValue(agent.getName());
addressValue.setValue(agent.getAddress());
portValue.setValue(agent.getPort());
- lastAvailReportValue.setValue(new Date(agent.getLastAvailabilityReport()));
+ Long lastAvail = agent.getLastAvailabilityReport();
+ lastAvailReportValue.setValue((null != lastAvail) ? new Date(lastAvail) : MSG.common_val_none());
String remoteEndpoint = agent.getRemoteEndpoint();
if (remoteEndpoint != null) {
// some browsers (firefox in particular) won't wrap unless you put breaks in the string
commit acc1feadf27a2235d5a070d3cd59b56515a62d74
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Fri Aug 19 17:35:49 2011 -0400
show different folder icon for categories
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/CustomResourceTreeGrid.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/CustomResourceTreeGrid.java
index 76ac9f1..92b7d9e 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/CustomResourceTreeGrid.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/CustomResourceTreeGrid.java
@@ -25,6 +25,7 @@ import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.core.domain.resource.Resource;
import org.rhq.enterprise.gui.coregui.client.ImageManager;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.ResourceTreeDatasource.ResourceTreeNode;
+import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.ResourceTreeDatasource.SubCategoryTreeNode;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableTreeGrid;
/**
@@ -52,6 +53,8 @@ public class CustomResourceTreeGrid extends LocatableTreeGrid {
boolean up = resource.getCurrentAvailability().getAvailabilityType() == AvailabilityType.UP;
return ImageManager.getResourceIcon(resource.getResourceType().getCategory(), up);
}
+ } else if (record instanceof SubCategoryTreeNode) {
+ return "resources/folder_mixed_" + (open ? "opened" : "closed") + ".png";
} else {
return "resources/folder_group_" + (open ? "opened" : "closed") + ".png";
}
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/resources/folder_mixed_closed.png b/modules/enterprise/gui/coregui/src/main/webapp/images/resources/folder_mixed_closed.png
new file mode 100644
index 0000000..0f3ce88
Binary files /dev/null and b/modules/enterprise/gui/coregui/src/main/webapp/images/resources/folder_mixed_closed.png differ
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/resources/folder_mixed_opened.png b/modules/enterprise/gui/coregui/src/main/webapp/images/resources/folder_mixed_opened.png
new file mode 100644
index 0000000..6352365
Binary files /dev/null and b/modules/enterprise/gui/coregui/src/main/webapp/images/resources/folder_mixed_opened.png differ
commit 8c77babdf5f14c6a4161833c06ca6cf944d630a8
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Fri Aug 19 16:45:29 2011 -0400
A fix to the identity collision logic, preventing falling through to the
scrubbing if we've already done it (thanks, Ian!)
diff --git a/modules/enterprise/server/safe-invoker/src/main/java/org/rhq/enterprise/server/util/HibernateDetachUtility.java b/modules/enterprise/server/safe-invoker/src/main/java/org/rhq/enterprise/server/util/HibernateDetachUtility.java
index fd92da6..a978a85 100644
--- a/modules/enterprise/server/safe-invoker/src/main/java/org/rhq/enterprise/server/util/HibernateDetachUtility.java
+++ b/modules/enterprise/server/safe-invoker/src/main/java/org/rhq/enterprise/server/util/HibernateDetachUtility.java
@@ -189,10 +189,13 @@ public class HibernateDetachUtility {
LOG.debug(message);
}
- // if not already detached then add to the list of collision objects for this hash, and start scrubbing
- if (!alreadyDetached) {
- collisionObjects.add(value);
+ // now that we've done our logging, if already detached we're done. Otherwise add to the list of collision
+ // objects for this hash, and start scrubbing
+ if (alreadyDetached) {
+ return;
}
+
+ collisionObjects.add(value);
}
// Perform the detaching
commit 0f1e427b130240ea6189c183cd6829e3400970f7
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Fri Aug 19 15:53:01 2011 -0400
New and Improved HibernateDetachUtility, now with enhanced collision
handling and lemony fresh scent!
[BZ-732089 - Hibernate Detach Utility Identity Conflicts]
diff --git a/modules/enterprise/server/safe-invoker/src/main/java/org/rhq/enterprise/server/util/HibernateDetachUtility.java b/modules/enterprise/server/safe-invoker/src/main/java/org/rhq/enterprise/server/util/HibernateDetachUtility.java
index a496efe..fd92da6 100644
--- a/modules/enterprise/server/safe-invoker/src/main/java/org/rhq/enterprise/server/util/HibernateDetachUtility.java
+++ b/modules/enterprise/server/safe-invoker/src/main/java/org/rhq/enterprise/server/util/HibernateDetachUtility.java
@@ -80,20 +80,38 @@ public class HibernateDetachUtility {
public static void nullOutUninitializedFields(Object value, SerializationType serializationType) throws Exception {
long start = System.currentTimeMillis();
- Map<Integer, Object> checkedObjects = new HashMap<Integer, Object>();
- nullOutUninitializedFields(value, checkedObjects, 0, serializationType);
+ Map<Integer, Object> checkedObjectMap = new HashMap<Integer, Object>();
+ Map<Integer, List<Object>> checkedObjectCollisionMap = new HashMap<Integer, List<Object>>();
+ nullOutUninitializedFields(value, checkedObjectMap, checkedObjectCollisionMap, 0, serializationType);
long duration = System.currentTimeMillis() - start;
if (duration > 1000) {
- LOG.info("Detached [" + checkedObjects.size() + "] objects in [" + duration + "]ms");
+ LOG.info("Detached [" + checkedObjectMap.size() + "] objects in [" + duration + "]ms");
} else {
- LOG.debug("Detached [" + checkedObjects.size() + "] objects in [" + duration + "]ms");
+ LOG.debug("Detached [" + checkedObjectMap.size() + "] objects in [" + duration + "]ms");
}
// help the garbage collector be clearing these before we leave
- checkedObjects.clear();
+ checkedObjectMap.clear();
+ checkedObjectCollisionMap.clear();
}
- private static void nullOutUninitializedFields(Object value, Map<Integer, Object> checkedObjects, int depth,
- SerializationType serializationType) throws Exception {
+ /**
+ * @param value the object needing to be detached/scrubbed.
+ * @param checkedObjectMap This maps identityHashCodes to Objects we've already detached. In that way we can
+ * quickly determine if we've already done the work for the incoming value and avoid taversing it again. This
+ * works well almost all of the time, but it is possible that two different objects can have the same identity hash
+ * (conflicts are always possible with a hash). In that case we utilize the checkedObjectCollisionMap (see below).
+ * @param checkedObjectCollisionMap checkedObjectMap maps the identityhash to the *first* object with that hash. In
+ * most cases there will only be mapping for one hash, but it is possible to encounter the same hash for multiple
+ * objects, especially on 32bit or IBM JVMs. It is important to know if an object has already been detached
+ * because if it is somehow self-referencing, we have to stop the recursion. This map holds the 2nd..Nth mapping
+ * for a single hash and is used to ensure we never try to detach an object already processed.
+ * @param depth used to stop infinite recursion, defaults to a depth we don't expectto see, but it is configurable.
+ * @param serializationType
+ * @throws Exception
+ */
+ private static void nullOutUninitializedFields(Object value, Map<Integer, Object> checkedObjectMap,
+ Map<Integer, List<Object>> checkedObjectCollisionMap, int depth, SerializationType serializationType)
+ throws Exception {
if (depth > depthAllowed) {
LOG.warn("Recursed too deep [" + depth + " > " + depthAllowed
+ "], will not attempt to detach object of type ["
@@ -112,22 +130,72 @@ public class HibernateDetachUtility {
// 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);
+ Object checkedObject = checkedObjectMap.get(valueIdentity);
if (null == checkedObject) {
- checkedObjects.put(valueIdentity, value);
+ // if we have not yet encountered an object with this hash, store it in our map and start scrubbing
+ checkedObjectMap.put(valueIdentity, value);
} else if (value == checkedObject) {
+ // if we have scrubbed this already, no more work to be done
return;
} else {
+ // we have a situation where multiple objects have the same identity hashcode, work with our
+ // collision map to decide whether it needs to be scrubbed and add if necessary.
+ // Note that this code block is infrequently hit, it is by design that we've pushed the extra
+ // work, map, etc, involved for this infrequent case into its own block. The standard cases must
+ // be as fast and lean as possible.
+
+ boolean alreadyDetached = false;
+ List<Object> collisionObjects = checkedObjectCollisionMap.get(valueIdentity);
+
+ if (null == collisionObjects) {
+ // if this is the 2nd occurrence for this hash, create a new map entry
+ collisionObjects = new ArrayList<Object>(1);
+ checkedObjectCollisionMap.put(valueIdentity, collisionObjects);
+
+ } else {
+ // if we have scrubbed this already, no more work to be done
+ for (Object collisionObject : collisionObjects) {
+ if (value == collisionObject) {
+ alreadyDetached = true;
+ break;
+ }
+ }
+ }
+
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);
+ StringBuilder message = new StringBuilder("\n\tIDENTITY HASHCODE COLLISION [hash=");
+ message.append(valueIdentity);
+ message.append(", alreadyDetached=");
+ message.append(alreadyDetached);
+ message.append("]");
+ message.append("\n\tCurrent : ");
+ message.append(value.getClass().getName());
+ message.append("\n\t ");
+ message.append(value);
+ message.append("\n\tPrevious : ");
+ message.append(checkedObject.getClass().getName());
+ message.append("\n\t ");
+ message.append(checkedObject);
+ for (Object collisionObject : collisionObjects) {
+ message.append("\n\tPrevious : ");
+ message.append(collisionObject.getClass().getName());
+ message.append("\n\t ");
+ message.append(collisionObject);
+ }
+
+ LOG.debug(message);
+ }
+
+ // if not already detached then add to the list of collision objects for this hash, and start scrubbing
+ if (!alreadyDetached) {
+ collisionObjects.add(value);
}
}
+ // Perform the detaching
if (value instanceof Object[]) {
Object[] objArray = (Object[]) value;
for (int i = 0; i < objArray.length; i++) {
@@ -136,7 +204,8 @@ public class HibernateDetachUtility {
if (replaceEntry != null) {
objArray[i] = replaceEntry;
}
- nullOutUninitializedFields(objArray[i], checkedObjects, depth + 1, serializationType);
+ nullOutUninitializedFields(objArray[i], checkedObjectMap, checkedObjectCollisionMap, depth + 1,
+ serializationType);
}
} else if (value instanceof List) {
// Null out any entries in initialized collections
@@ -148,7 +217,8 @@ public class HibernateDetachUtility {
val = replace;
i.set(replace);
}
- nullOutUninitializedFields(val, checkedObjects, depth + 1, serializationType);
+ nullOutUninitializedFields(val, checkedObjectMap, checkedObjectCollisionMap, depth + 1,
+ serializationType);
}
} else if (value instanceof Collection) {
@@ -162,7 +232,8 @@ public class HibernateDetachUtility {
replacementItems.add(replacementItem);
item = replacementItem;
}
- nullOutUninitializedFields(item, checkedObjects, depth + 1, serializationType);
+ nullOutUninitializedFields(item, checkedObjectMap, checkedObjectCollisionMap, depth + 1,
+ serializationType);
}
collection.removeAll(itemsToBeReplaced);
collection.addAll(replacementItems); // watch out! if this collection is a Set, HashMap$MapSet doesn't support addAll. See BZ 688000
@@ -194,8 +265,10 @@ public class HibernateDetachUtility {
// now go through each item in the map and null out their internal fields
for (Object key : originalMap.keySet()) {
- nullOutUninitializedFields(originalMap.get(key), checkedObjects, depth + 1, serializationType);
- nullOutUninitializedFields(key, checkedObjects, depth + 1, serializationType);
+ nullOutUninitializedFields(originalMap.get(key), checkedObjectMap, checkedObjectCollisionMap,
+ depth + 1, serializationType);
+ nullOutUninitializedFields(key, checkedObjectMap, checkedObjectCollisionMap, depth + 1,
+ serializationType);
}
} else if (value instanceof Enum) {
// don't need to detach enums, treat them as special objects
@@ -205,18 +278,19 @@ public class HibernateDetachUtility {
if (serializationType == SerializationType.JAXB) {
XmlAccessorType at = value.getClass().getAnnotation(XmlAccessorType.class);
if (at != null && at.value() == XmlAccessType.FIELD) {
- nullOutFieldsByFieldAccess(value, checkedObjects, depth, serializationType);
+ nullOutFieldsByFieldAccess(value, checkedObjectMap, checkedObjectCollisionMap, depth, serializationType);
} else {
- nullOutFieldsByAccessors(value, checkedObjects, depth, serializationType);
+ nullOutFieldsByAccessors(value, checkedObjectMap, checkedObjectCollisionMap, depth, serializationType);
}
} else if (serializationType == SerializationType.SERIALIZATION) {
- nullOutFieldsByFieldAccess(value, checkedObjects, depth, serializationType);
+ nullOutFieldsByFieldAccess(value, checkedObjectMap, checkedObjectCollisionMap, depth, serializationType);
}
}
- private static void nullOutFieldsByFieldAccess(Object object, Map<Integer, Object> checkedObjects, int depth,
- SerializationType serializationType) throws Exception {
+ private static void nullOutFieldsByFieldAccess(Object object, Map<Integer, Object> checkedObjects,
+ Map<Integer, List<Object>> checkedObjectCollisionMap, int depth, SerializationType serializationType)
+ throws Exception {
Class tmpClass = object.getClass();
List<Field> fieldsToClean = new ArrayList<Field>();
@@ -232,11 +306,13 @@ public class HibernateDetachUtility {
tmpClass = tmpClass.getSuperclass();
}
- nullOutFieldsByFieldAccess(object, fieldsToClean, checkedObjects, depth, serializationType);
+ nullOutFieldsByFieldAccess(object, fieldsToClean, checkedObjects, checkedObjectCollisionMap, depth,
+ serializationType);
}
private static void nullOutFieldsByFieldAccess(Object object, List<Field> classFields,
- Map<Integer, Object> checkedObjects, int depth, SerializationType serializationType) throws Exception {
+ Map<Integer, Object> checkedObjects, Map<Integer, List<Object>> checkedObjectCollisionMap, int depth,
+ SerializationType serializationType) throws Exception {
boolean accessModifierFlag = false;
for (Field field : classFields) {
@@ -260,10 +336,11 @@ public class HibernateDetachUtility {
replacement = m.invoke(fieldValue);
String assistNameDelimiter = assistClassName.contains("javassist") ? "_$$_" : "$$";
-
+
assistClassName = assistClassName.substring(0, assistClassName.indexOf(assistNameDelimiter));
if (!replacement.getClass().getName().contains("hibernate")) {
- nullOutUninitializedFields(replacement, checkedObjects, depth + 1, serializationType);
+ nullOutUninitializedFields(replacement, checkedObjects, checkedObjectCollisionMap,
+ depth + 1, serializationType);
field.set(object, replacement);
} else {
@@ -277,11 +354,12 @@ public class HibernateDetachUtility {
if (replacement == null) {
String className = ((HibernateProxy) fieldValue).getHibernateLazyInitializer().getEntityName();
-
+
//see if there is a context classloader we should use instead of the current one.
ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
-
- Class clazz = contextClassLoader == null ? Class.forName(className) : Class.forName(className, true, contextClassLoader);
+
+ Class clazz = contextClassLoader == null ? Class.forName(className) : Class.forName(className,
+ true, contextClassLoader);
Class[] constArgs = { Integer.class };
Constructor construct = null;
@@ -327,7 +405,8 @@ public class HibernateDetachUtility {
replacement = new ArrayList((List) fieldValue);
} else if (fieldValue instanceof Set) {
ArrayList l = new ArrayList((Set) fieldValue); // cannot recurse Sets, see BZ 688000
- nullOutUninitializedFields(l, checkedObjects, depth + 1, serializationType);
+ nullOutUninitializedFields(l, checkedObjects, checkedObjectCollisionMap, 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) {
@@ -336,7 +415,8 @@ public class HibernateDetachUtility {
setField(object, field.getName(), replacement);
if (needToNullOutFields) {
- nullOutUninitializedFields(replacement, checkedObjects, depth + 1, serializationType);
+ nullOutUninitializedFields(replacement, checkedObjects, checkedObjectCollisionMap,
+ depth + 1, serializationType);
}
}
@@ -344,7 +424,8 @@ public class HibernateDetachUtility {
if (fieldValue != null
&& (fieldValue.getClass().getName().contains("org.rhq") || fieldValue instanceof Collection
|| fieldValue instanceof Object[] || fieldValue instanceof Map))
- nullOutUninitializedFields((fieldValue), checkedObjects, depth + 1, serializationType);
+ nullOutUninitializedFields((fieldValue), checkedObjects, checkedObjectCollisionMap, depth + 1,
+ serializationType);
}
}
if (accessModifierFlag) {
@@ -364,7 +445,6 @@ public class HibernateDetachUtility {
Method m = assistClass.getMethod("writeReplace");
replacement = m.invoke(object);
- String className = object.getClass().getName();
} catch (Exception e) {
LOG.error("Unable to write replace object " + object.getClass(), e);
}
@@ -373,8 +453,9 @@ public class HibernateDetachUtility {
return replacement;
}
- private static void nullOutFieldsByAccessors(Object value, Map<Integer, Object> checkedObjects, int depth,
- SerializationType serializationType) throws Exception {
+ private static void nullOutFieldsByAccessors(Object value, Map<Integer, Object> checkedObjects,
+ Map<Integer, List<Object>> checkedObjectCollisionMap, int depth, SerializationType serializationType)
+ throws Exception {
// Null out any collections that aren't loaded
BeanInfo bi = Introspector.getBeanInfo(value.getClass(), Object.class);
@@ -409,7 +490,8 @@ public class HibernateDetachUtility {
} else {
if ((propertyValue instanceof Collection)
|| ((propertyValue != null) && propertyValue.getClass().getName().startsWith("org.rhq.core.domain"))) {
- nullOutUninitializedFields(propertyValue, checkedObjects, depth + 1, serializationType);
+ nullOutUninitializedFields(propertyValue, checkedObjects, checkedObjectCollisionMap, depth + 1,
+ serializationType);
}
}
}
commit aceb9d010cb9a910d998463a01857f47d25a5445
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Fri Aug 19 16:10:54 2011 -0400
[BZ 696224] support direct nav to traits details
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/AbstractMeasurementDataTraitListView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/AbstractMeasurementDataTraitListView.java
index a4911f8..27a766c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/AbstractMeasurementDataTraitListView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/AbstractMeasurementDataTraitListView.java
@@ -57,16 +57,22 @@ public abstract class AbstractMeasurementDataTraitListView extends TableSection
@Override
protected void configureTable() {
+ super.configureTable();
+
ListGrid listGrid = getListGrid();
listGrid.setSelectionType(SelectionStyle.SINGLE);
// Set widths and cell formatters on the fields.
- listGrid.getField(MeasurementDataTraitCriteria.SORT_FIELD_DISPLAY_NAME).setWidth("20%");
- ListGridField timestampField = listGrid.getField(MeasurementDataTraitCriteria.SORT_FIELD_TIMESTAMP);
- timestampField.setWidth("20%");
- timestampField.setCellFormatter(new TimestampCellFormatter());
+ ListGridField displayNameField = listGrid.getField(MeasurementDataTraitCriteria.SORT_FIELD_DISPLAY_NAME);
+ if (displayNameField != null) {
+ displayNameField.setWidth("20%");
+ }
- super.configureTable();
+ ListGridField timestampField = listGrid.getField(MeasurementDataTraitCriteria.SORT_FIELD_TIMESTAMP);
+ if (timestampField != null) {
+ timestampField.setWidth("20%");
+ timestampField.setCellFormatter(new TimestampCellFormatter());
+ }
}
@Override
commit 97c70790efd90a237830ebff95b2cc165975cf53
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Fri Aug 19 15:06:00 2011 -0400
[BZ 696276] fix exception that occurred when a non-admin user user clicked on a metric detailed chart link in one of the recent metrics portlets (https://bugzilla.redhat.com/show_bug.cgi?id=696276)
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/GlobalActivationContext.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/GlobalActivationContext.java
index ea1e067..bc1937f 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/GlobalActivationContext.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/GlobalActivationContext.java
@@ -79,7 +79,8 @@ public class GlobalActivationContext implements ActivationContext {
if (this.globalPermissions == null) {
AuthorizationManagerLocal authorizationManager = LookupUtil.getAuthorizationManager();
Set<Permission> perms = authorizationManager.getExplicitGlobalPermissions(this.subject);
- this.globalPermissions = EnumSet.copyOf(perms);
+ this.globalPermissions = EnumSet.noneOf(Permission.class);
+ this.globalPermissions.addAll(perms);
}
return this.globalPermissions;
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/GroupActivationContext.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/GroupActivationContext.java
index 2c572fb..7b1fe4c 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/GroupActivationContext.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/GroupActivationContext.java
@@ -70,14 +70,15 @@ public class GroupActivationContext extends AbstractResourceOrGroupActivationCon
if (this.resourcePermissions == null) {
Set<Permission> perms = this.authorizationManager.getImplicitGroupPermissions(getSubject(), this.group
.getId());
- this.resourcePermissions = EnumSet.copyOf(perms);
+ this.resourcePermissions = EnumSet.noneOf(Permission.class);
+ this.resourcePermissions.addAll(perms);
}
return this.resourcePermissions;
}
public Set<Resource> getResources() {
// lazy load
- if (null == this.group.getExplicitResources()) {
+ if (this.group.getExplicitResources() == null) {
ResourceGroupCriteria criteria = new ResourceGroupCriteria();
criteria.addFilterId(this.group.getId());
criteria.fetchExplicitResources(true);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/ResourceActivationContext.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/ResourceActivationContext.java
index 7f13169..b636eff 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/ResourceActivationContext.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/ResourceActivationContext.java
@@ -82,7 +82,8 @@ public class ResourceActivationContext extends AbstractResourceOrGroupActivation
if (this.resourcePermissions == null) {
Set<Permission> perms = this.authorizationManager.getImplicitResourcePermissions(getSubject(),
this.resource.getId());
- this.resourcePermissions = EnumSet.copyOf(perms);
+ this.resourcePermissions = EnumSet.noneOf(Permission.class);
+ this.resourcePermissions.addAll(perms);
}
return this.resourcePermissions;
}
commit 7f158ef2a64380659beb5a0ed80ed848756fb858
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Fri Aug 19 15:03:14 2011 -0400
[BZ 696214] fix so that if user updates one or more prefs via coregui, those updates get synced to portal-war - we do this by clearing server-jar's prefs cache for that user so the cache will refresh and pick up the updates (https://bugzilla.redhat.com/show_bug.cgi?id=696214)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SubjectGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SubjectGWTServiceImpl.java
index 064035d..6079bf3 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SubjectGWTServiceImpl.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SubjectGWTServiceImpl.java
@@ -24,6 +24,7 @@ import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.coregui.client.gwt.SubjectGWTService;
import org.rhq.enterprise.gui.coregui.server.util.SerialUtility;
import org.rhq.enterprise.server.auth.SubjectManagerLocal;
+import org.rhq.enterprise.server.auth.prefs.SubjectPreferencesCache;
import org.rhq.enterprise.server.exception.LoginException;
import org.rhq.enterprise.server.util.LookupUtil;
@@ -88,8 +89,12 @@ public class SubjectGWTServiceImpl extends AbstractGWTServiceImpl implements Sub
public Subject updateSubject(Subject subjectToModify) throws RuntimeException {
try {
- return SerialUtility.prepare(subjectManager.updateSubject(getSessionSubject(), subjectToModify),
- "SubjectManager.updateSubject");
+ Subject subject = SerialUtility.prepare(subjectManager.updateSubject(getSessionSubject(), subjectToModify),
+ "SubjectManager.updateSubject");
+ // Clear the prefs for this subject from the user prefs cache that portal-war uses, in case we just
+ // changed any prefs; otherwise the cache would contain stale prefs.
+ SubjectPreferencesCache.getInstance().clearConfiguration(subject.getId());
+ return subject;
} catch (Throwable t) {
throw getExceptionToThrowToClient(t);
}
commit cf9bcd6d8b65eabf03c19de9c231046d493c01bf
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Fri Aug 19 12:03:24 2011 -0400
More work on op scheduling. Now will not schedule job with invalid
op parameters config. Will provide warning message for invalid param or
trigger config and wait for resolution.
- removed some dead code and some minor refactoring for clarity
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/AbstractRecordEditor.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/AbstractRecordEditor.java
index 23a0469..bddf144 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/AbstractRecordEditor.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/AbstractRecordEditor.java
@@ -201,6 +201,10 @@ public abstract class AbstractRecordEditor<DS extends RPCDataSource> extends Loc
return this.dataSource;
}
+ public String getDataTypeName() {
+ return dataTypeName;
+ }
+
public boolean isReadOnly() {
return this.isReadOnly;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/operation/schedule/AbstractOperationScheduleDetailsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/operation/schedule/AbstractOperationScheduleDetailsView.java
index a65fa33..0f001e5 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/operation/schedule/AbstractOperationScheduleDetailsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/operation/schedule/AbstractOperationScheduleDetailsView.java
@@ -21,6 +21,7 @@ package org.rhq.enterprise.gui.coregui.client.inventory.common.detail.operation.
import java.util.ArrayList;
import java.util.Date;
+import java.util.EnumSet;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -50,6 +51,7 @@ import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
import org.rhq.core.domain.operation.OperationDefinition;
import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.UserSessionManager;
import org.rhq.enterprise.gui.coregui.client.ViewPath;
import org.rhq.enterprise.gui.coregui.client.components.configuration.ConfigurationEditor;
@@ -64,6 +66,7 @@ import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.operation.schedule.ResourceOperationScheduleDataSource;
import org.rhq.enterprise.gui.coregui.client.util.FormUtility;
import org.rhq.enterprise.gui.coregui.client.util.TypeConversionUtility;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableHLayout;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
@@ -87,8 +90,9 @@ public abstract class AbstractOperationScheduleDetailsView extends
private StaticTextItem operationDescriptionItem;
private StaticTextItem operationParametersItem;
private LocatableHLayout operationParametersConfigurationHolder;
+ private ConfigurationEditor operationParametersConfigurationEditor;
+ private Configuration operationParameters;
private JobTriggerEditor triggerEditor;
- private Configuration parameters;
private EnhancedDynamicForm notesForm;
private Integer operationDefinitionId;
@@ -322,7 +326,7 @@ public abstract class AbstractOperationScheduleDetailsView extends
}
notesItem.setValue(notesValue);
- this.parameters = (Configuration) record
+ this.operationParameters = (Configuration) record
.getAttributeAsObject(AbstractOperationScheduleDataSource.Field.PARAMETERS);
super.editExistingRecord(record);
@@ -330,12 +334,21 @@ public abstract class AbstractOperationScheduleDetailsView extends
@Override
protected void save(DSRequest requestProperties) {
- requestProperties.setAttribute(AbstractOperationScheduleDataSource.RequestProperty.PARAMETERS, this.parameters);
-
- if (!this.triggerEditor.validate()) {
- // TODO: print error Message
- return;
+ if ((null != this.operationParametersConfigurationEditor && !this.operationParametersConfigurationEditor
+ .isValid())
+ || !this.triggerEditor.validate()) {
+ {
+ Message message = new Message(MSG.widget_recordEditor_warn_validation(this.getDataTypeName()),
+ Message.Severity.Warning, EnumSet.of(Message.Option.Transient));
+ CoreGUI.getMessageCenter().notify(message);
+
+ return;
+ }
}
+
+ requestProperties.setAttribute(AbstractOperationScheduleDataSource.RequestProperty.PARAMETERS,
+ this.operationParameters);
+
EnhancedDynamicForm form = getForm();
Record jobTriggerRecord = new ListGridRecord();
@@ -393,30 +406,29 @@ public abstract class AbstractOperationScheduleDetailsView extends
}
this.operationParametersConfigurationHolder.hide();
} else {
+ // make sure we wipe out anything left by the previous op def
+ for (Canvas child : this.operationParametersConfigurationHolder.getChildren()) {
+ child.destroy();
+ }
+
final ConfigurationDefinition parametersDefinition = this.operationNameToParametersDefinitionMap
.get(operationName);
if (parametersDefinition == null || parametersDefinition.getPropertyDefinitions().isEmpty()) {
value = "<i>" + MSG.view_operationScheduleDetails_noParameters() + "</i>";
- // make sure we wipe out anything left by the previous op def
- for (Canvas child : this.operationParametersConfigurationHolder.getChildren()) {
- child.destroy();
- }
this.operationParametersConfigurationHolder.hide();
+
} else {
value = isNewRecord() ? "<i>" + MSG.view_operationScheduleDetails_enterParametersBelow() + "</i>" : "";
- for (Canvas child : this.operationParametersConfigurationHolder.getChildren()) {
- child.destroy();
- }
-
// Add spacer so params are indented.
VLayout horizontalSpacer = new VLayout();
horizontalSpacer.setWidth(FIRST_COLUMN_WIDTH);
this.operationParametersConfigurationHolder.addMember(horizontalSpacer);
if (isNewRecord()) {
- this.parameters = (parametersDefinition.getDefaultTemplate() != null) ? parametersDefinition
- .getDefaultTemplate().createConfiguration() : new Configuration();
+ this.operationParameters = (parametersDefinition.getDefaultTemplate() != null) ? parametersDefinition
+ .getDefaultTemplate().createConfiguration()
+ : new Configuration();
} else {
}
@@ -427,32 +439,24 @@ public abstract class AbstractOperationScheduleDetailsView extends
@Override
public void onFailure(Throwable throwable) {
- ConfigurationEditor configurationEditor = new ConfigurationEditor("ParametersEditor",
- parametersDefinition, parameters);
- configurationEditor.setReadOnly(isReadOnly());
- operationParametersConfigurationHolder.addMember(configurationEditor);
+ operationParametersConfigurationEditor = new ConfigurationEditor("ParametersEditor",
+ parametersDefinition, operationParameters);
+ operationParametersConfigurationEditor.setReadOnly(isReadOnly());
+ operationParametersConfigurationHolder.addMember(operationParametersConfigurationEditor);
operationParametersConfigurationHolder.show();
}
@Override
public void onSuccess(ConfigurationDefinition result) {
- ConfigurationEditor configurationEditor = new ConfigurationEditor("ParametersEditor",
- result, parameters);
- configurationEditor.setReadOnly(isReadOnly());
- operationParametersConfigurationHolder.addMember(configurationEditor);
+ operationParametersConfigurationEditor = new ConfigurationEditor("ParametersEditor",
+ result, operationParameters);
+ operationParametersConfigurationEditor.setReadOnly(isReadOnly());
+ operationParametersConfigurationHolder.addMember(operationParametersConfigurationEditor);
operationParametersConfigurationHolder.show();
}
});
-
- /*
- ConfigurationEditor configurationEditor = new ConfigurationEditor("ParametersEditor",
- parametersDefinition, this.parameters);
- configurationEditor.setReadOnly(isReadOnly());
- this.operationParametersConfigurationHolder.addMember(configurationEditor);
- this.operationParametersConfigurationHolder.show();
- */
}
}
this.operationParametersItem.setValue(value);
commit 05d671b031b5626fac75cbce22b84a18675c8e8e
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Fri Aug 19 17:19:07 2011 +0200
BZ 732000 Directly return from shutdown operation to prevent a spurious failure message.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java
index 2119a52..6168dad 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HostControllerComponent.java
@@ -59,7 +59,7 @@ public class HostControllerComponent extends BaseServerComponent implements Oper
Operation op = new Operation("shutdown","host",domainHost);
Result res = getASConnection().execute(op);
- postProcessResult(name,res);
+ return postProcessResult(name,res);
}
// Defer other stuff to the base component for now
commit cd4a8bc5be50a8bf0ff47aa44baa2e8b67a075f0
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Fri Aug 19 10:53:14 2011 -0400
[BZ 732041] clear messages in message center and message bar when a user logs out (https://bugzilla.redhat.com/show_bug.cgi?id=732041)
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 80ee92d..2a52e4d 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
@@ -430,6 +430,11 @@ public class CoreGUI implements EntryPoint, ValueChangeHandler<String>, Event.Na
return MSGCONST;
}
+ public void reset() {
+ messageCenter.reset();
+ footer.reset();
+ }
+
private class RootCanvas extends VLayout implements BookmarkableView {
private ViewId currentViewId;
private Canvas currentCanvas;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/Footer.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/Footer.java
index 88e7a9b..24841e3 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/Footer.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/Footer.java
@@ -235,6 +235,11 @@ public class Footer extends LocatableHLayout {
return messageCenter;
}
+ public void reset() {
+ messageBar.reset();
+ messageCenter.reset();
+ }
+
private HLayout createHSpacer(int width) {
HLayout spacer = new HLayout();
spacer.setWidth(width);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/UserSessionManager.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/UserSessionManager.java
index b00d8a0..56c3658 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/UserSessionManager.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/UserSessionManager.java
@@ -505,11 +505,15 @@ public class UserSessionManager {
}
sessionState = State.IS_LOGGED_OUT;
+
Log.info("Destroying session timer...");
coreGuiSessionTimer.cancel();
- Log.info("Destroying http session refresh timer...");
+
+ Log.info("Destroying HTTP session refresh timer...");
httpSessionTimer.cancel();
+ CoreGUI.get().reset();
+
// log out the web session on the server-side in a delayed fashion,
// allowing enough time to pass to let in-flight requests complete
scheduleLogoutServerSide(String.valueOf(sessionSubject.getSessionId()));
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/message/MessageBar.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/message/MessageBar.java
index 5d48055..25a8782 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/message/MessageBar.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/message/MessageBar.java
@@ -135,6 +135,10 @@ public class MessageBar extends LocatableHLayout implements MessageCenter.Messag
}
}
+ public void reset() {
+ clearMessage(true);
+ }
+
public void clearMessage(boolean clearSticky) {
this.currentMessage = null;
setLabelEmpty();
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/message/MessageCenter.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/message/MessageCenter.java
index d9fba53..dbba59c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/message/MessageCenter.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/message/MessageCenter.java
@@ -73,6 +73,10 @@ public class MessageCenter {
return messages;
}
+ public void reset() {
+ this.messages.clear();
+ }
+
public interface MessageListener {
void onMessage(Message message);
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/message/MessageCenterView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/message/MessageCenterView.java
index f692f44..1a6b896 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/message/MessageCenterView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/message/MessageCenterView.java
@@ -100,7 +100,7 @@ public class MessageCenterView extends Table implements MessageCenter.MessageLis
try {
window.hide();
} catch (Throwable e) {
- Log.warn("Cannot destroy message center", e);
+ Log.warn("Cannot hide message center", e);
}
}
});
@@ -127,6 +127,13 @@ public class MessageCenterView extends Table implements MessageCenter.MessageLis
}
}
+ public void reset() {
+ if (window != null) {
+ window.hide();
+ }
+ refresh();
+ }
+
@Override
protected void configureTable() {
getListGrid().setEmptyMessage(MSG.view_messageCenter_noRecentMessages());
commit a2489d6626a8a4ba5b36c80acc366883adb4ddc3
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Fri Aug 19 10:49:29 2011 -0400
[BZ 663722] fix bug in original fix for RHQ user passwords with special characters not working (https://bugzilla.redhat.com/show_bug.cgi?id=663722)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LoginView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LoginView.java
index f0422ae..b0d418f 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LoginView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LoginView.java
@@ -526,8 +526,8 @@ public class LoginView extends LocatableCanvas {
requestBuilder.setHeader("Content-Type", "application/x-www-form-urlencoded");
// URL-encode the username and password in case they contain URL special characters ('?', '&', '%', '+',
// etc.), which would corrupt the request if not encoded.
- String encodedUsername = URL.encode(username);
- String encodedPassword = URL.encode(password);
+ String encodedUsername = URL.encodeComponent(username);
+ String encodedPassword = URL.encodeComponent(password);
String requestData = "j_username=" + encodedUsername + "&j_password=" + encodedPassword;
requestBuilder.setRequestData(requestData);
requestBuilder.setCallback(new RequestCallback() {
commit b6bb1914c3e83c2655872c2104ac7773cf029f45
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Fri Aug 19 10:05:13 2011 -0400
Add the default drift server plugin to the ear packaging.
diff --git a/modules/enterprise/server/ear/pom.xml b/modules/enterprise/server/ear/pom.xml
index b1502d6..8cdaf8b 100644
--- a/modules/enterprise/server/ear/pom.xml
+++ b/modules/enterprise/server/ear/pom.xml
@@ -333,6 +333,13 @@
<artifactId>packagetype-cli</artifactId>
<version>${project.version}</version>
</artifactItem>
+
+ <artifactItem>
+ <groupId>org.rhq</groupId>
+ <artifactId>rhq-serverplugin-drift</artifactId>
+ <version>${project.version}</version>
+ </artifactItem>
+
</artifactItems>
<outputDirectory>${earDirectory}/rhq-serverplugins</outputDirectory>
</configuration>
commit c5c70b8558f02f326030d7f43c63a81d6753d555
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Aug 18 23:13:01 2011 -0400
<option> no longer supports default attrib
diff --git a/etc/samples/custom-serverplugin/src/main/resources/META-INF/rhq-serverplugin.xml b/etc/samples/custom-serverplugin/src/main/resources/META-INF/rhq-serverplugin.xml
index 46bf0e7..eb390ab 100644
--- a/etc/samples/custom-serverplugin/src/main/resources/META-INF/rhq-serverplugin.xml
+++ b/etc/samples/custom-serverplugin/src/main/resources/META-INF/rhq-serverplugin.xml
@@ -41,7 +41,7 @@
<c:simple-property name="scheduleType" type="string" required="true" default="cron" summary="true" description="Indicates when the schedule triggers">
<c:property-options>
<c:option value="periodic"/>
- <c:option value="cron" default="true"/>
+ <c:option value="cron" />
</c:property-options>
</c:simple-property>
<c:simple-property name="scheduleTrigger" type="string" required="true" default="0 0/5 * * * ?" summary="true" description="Based on the schedule type, this is either the period, in milliseconds, or the cron expression"/>
@@ -77,7 +77,7 @@
<c:simple-property name="enabled" type="boolean" required="true" default="true" summary="true" description="Whether or not the job should be scheduled"/>
<c:simple-property name="scheduleType" type="string" required="true" default="periodic" summary="true" description="Indicates when the schedule triggers">
<c:property-options>
- <c:option value="periodic" default="true"/>
+ <c:option value="periodic" />
<c:option value="cron" />
</c:property-options>
</c:simple-property>
diff --git a/etc/samples/simplereport-serverplugin/src/main/resources/META-INF/rhq-serverplugin.xml b/etc/samples/simplereport-serverplugin/src/main/resources/META-INF/rhq-serverplugin.xml
index 180b711..452a771 100644
--- a/etc/samples/simplereport-serverplugin/src/main/resources/META-INF/rhq-serverplugin.xml
+++ b/etc/samples/simplereport-serverplugin/src/main/resources/META-INF/rhq-serverplugin.xml
@@ -26,7 +26,7 @@
description="Indicates when the reports should be generated">
<c:property-options>
<c:option value="periodic"/>
- <c:option value="cron" default="true" />
+ <c:option value="cron" />
</c:property-options>
</c:simple-property>
<c:simple-property name="scheduleTrigger" type="string" required="true" default="0 0/5 * * * ?" summary="true"
@@ -50,7 +50,7 @@
<c:simple-property name="scheduleType" type="string" required="true" default="periodic" summary="true"
description="Indicates when the report should be generated">
<c:property-options>
- <c:option value="periodic" default="true" />
+ <c:option value="periodic" />
<c:option value="cron" />
</c:property-options>
</c:simple-property>
diff --git a/modules/core/plugin-container/src/test/xml/rhq-plugin-jmx-server-test.xml b/modules/core/plugin-container/src/test/xml/rhq-plugin-jmx-server-test.xml
index 1bc6c55..583601d 100644
--- a/modules/core/plugin-container/src/test/xml/rhq-plugin-jmx-server-test.xml
+++ b/modules/core/plugin-container/src/test/xml/rhq-plugin-jmx-server-test.xml
@@ -10,7 +10,7 @@
<plugin-configuration>
<c:simple-property name="type" type="string" description="The EMS connection type for this JMX Server">
<c:property-options>
- <c:option value="JDK5ConnectionType" default="true"/>
+ <c:option value="JDK5ConnectionType"/>
<c:option value="JBossConnectionType"/>
</c:property-options>
</c:simple-property>
diff --git a/modules/enterprise/server/plugins/cloud/src/main/resources/META-INF/rhq-serverplugin.xml b/modules/enterprise/server/plugins/cloud/src/main/resources/META-INF/rhq-serverplugin.xml
index e6944c0..f475641 100644
--- a/modules/enterprise/server/plugins/cloud/src/main/resources/META-INF/rhq-serverplugin.xml
+++ b/modules/enterprise/server/plugins/cloud/src/main/resources/META-INF/rhq-serverplugin.xml
@@ -33,7 +33,7 @@
summary="true"
description="Indicates the type of trigger this synchronize job will use">
<c:property-options>
- <c:option value="periodic" default="true"/>
+ <c:option value="periodic" />
<c:option value="cron"/>
</c:property-options>
</c:simple-property>
commit 2012267a9dab1f48dcbda2febd6f0fb7f007bf2d
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Thu Aug 18 23:06:18 2011 -0400
fix this so it can build standalone
diff --git a/etc/samples/custom-serverplugin/pom.xml b/etc/samples/custom-serverplugin/pom.xml
index 555fe7f..68d76f6 100644
--- a/etc/samples/custom-serverplugin/pom.xml
+++ b/etc/samples/custom-serverplugin/pom.xml
@@ -15,7 +15,7 @@
<description>A template for building a custom generic RHQ Server plugin</description>
<properties>
- <rhq.version>3.0.0.B05</rhq.version>
+ <rhq.version>4.0.1</rhq.version>
</properties>
<dependencies>
@@ -28,6 +28,13 @@
<scope>provided</scope> <!-- provided by the server/plugin-container -->
</dependency>
+ <dependency>
+ <groupId>org.rhq</groupId>
+ <artifactId>rhq-core-domain</artifactId>
+ <version>${rhq.version}</version>
+ <scope>provided</scope> <!-- provided by the server/plugin-container -->
+ </dependency>
+
<!-- TODO: This is a fix for the Javac bug requiring annotations to be
available when compiling dependent classes. It is fixed in JDK 6. -->
<dependency>
commit 7b57da38ba1b16241e06480cf0b95a22c3508999
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Mon Aug 15 14:59:16 2011 -0500
The JBoss server home directory is now correctly retrieved from the parent resource component. Included some other minor code tweaks and refactorings.
diff --git a/modules/integration-tests/mod_cluster-plugin-test/pom.xml b/modules/integration-tests/mod_cluster-plugin-test/pom.xml
index 77a81b2..ba94746 100644
--- a/modules/integration-tests/mod_cluster-plugin-test/pom.xml
+++ b/modules/integration-tests/mod_cluster-plugin-test/pom.xml
@@ -42,7 +42,13 @@
</dependencyManagement>
<dependencies>
-
+ <dependency>
+ <groupId>org.jboss.on</groupId>
+ <artifactId>jopr-jboss-as-5-plugin</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
<dependency>
<groupId>org.jboss.integration</groupId>
<artifactId>jboss-profileservice-spi</artifactId>
diff --git a/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index 0a39eab..b642573 100644
--- a/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -45,6 +45,7 @@ import org.rhq.core.pc.PluginContainerConfiguration;
import org.rhq.core.pc.plugin.FileSystemPluginFinder;
import org.rhq.core.pc.plugin.PluginEnvironment;
import org.rhq.core.pc.plugin.PluginManager;
+import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
import org.rhq.core.pluginapi.inventory.ResourceComponent;
import org.rhq.core.pluginapi.measurement.MeasurementFacet;
import org.rhq.core.pluginapi.operation.OperationFacet;
@@ -109,7 +110,8 @@ public class ModclusterPluginTest {
{
add(PLUGIN_NAME);
- add(PLUGIN_NAME + " Webapp Context");
+ add("Webapp Context");
+ add("HA Service Configuration");
}
};
@@ -124,8 +126,12 @@ public class ModclusterPluginTest {
Resource resource = (Resource) objectResource;
if (resource.getResourceType().getName().equals("mod_cluster")) {
testResourceMeasurement(resource);
- } else {
+ } else if (resource.getResourceType().getName().equals("Webapp Context")) {
testContextOperations(resource);
+ } else if (resource.getResourceType().getName().equals("HA Service Configuration")) {
+ ResourceComponent resourceComponent = PluginContainer.getInstance().getInventoryManager()
+ .getResourceComponent(resource);
+ ((ConfigurationFacet) resourceComponent).loadResourceConfiguration();
}
}
}
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index fdc4f37..35c5b28 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -23,6 +23,14 @@
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.jboss.on</groupId>
+ <artifactId>jopr-jboss-as-5-plugin</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
<dependency>
<groupId>log4j</groupId>
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
index 8e14f9b..c5343d0 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
@@ -20,6 +20,8 @@ package org.rhq.plugins.modcluster;
import java.util.concurrent.TimeUnit;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.mc4j.ems.connection.bean.EmsBean;
import org.rhq.core.domain.configuration.Configuration;
@@ -35,6 +37,9 @@ import org.rhq.plugins.modcluster.helper.JBossHelper;
*/
@SuppressWarnings({ "rawtypes", "deprecation" })
public class ContextComponent extends MBeanResourceComponent<MBeanResourceComponent> {
+
+ private static final Log log = LogFactory.getLog(ContextComponent.class);
+
@Override
protected EmsBean loadBean() {
return getResourceContext().getParentResourceComponent().getEmsBean();
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
index 9b511b3..ee0369c 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
@@ -19,6 +19,9 @@
package org.rhq.plugins.modcluster;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.ConfigurationUpdateStatus;
import org.rhq.core.domain.configuration.PropertySimple;
@@ -34,11 +37,15 @@ import org.rhq.plugins.modcluster.config.ModClusterBeanFile;
* @author Stefan Negrea
*
*/
-@SuppressWarnings("rawtypes")
+@SuppressWarnings({ "rawtypes", "deprecation" })
public class FileConfiguredMBeanResourceComponent extends MBeanResourceComponent {
+ private static final Log log = LogFactory.getLog(FileConfiguredMBeanResourceComponent.class);
+
private static final String BEAN_CLASS_NAME_PROPERTY = "className";
private static final String DEPENDENCY_BEAN_CLASS_NAME_PROPERTY = "dependencyClassName";
+ private static final String SERVER_HOME_DIR = "jboss.server.home.dir";
+ private static final String CONFIGURATION_FILE_RELATIVE_PATH = "/deploy/mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml";
/**
* This default setup of configuration properties can map to mbean attributes
@@ -46,15 +53,14 @@ public class FileConfiguredMBeanResourceComponent extends MBeanResourceComponent
* @return the configuration of the component
*/
@Override
- @SuppressWarnings("deprecation")
public Configuration loadResourceConfiguration() {
+
Configuration configuration = new Configuration();
ConfigurationDefinition configurationDefinition = this.resourceContext.getResourceType()
.getResourceConfigurationDefinition();
try {
- ModClusterBeanFile modClusterBeanFile = this.getModClusterBeanFileInstance(this.resourceContext
- .getPluginConfiguration());
+ ModClusterBeanFile modClusterBeanFile = this.getModClusterBeanFileInstance();
for (PropertyDefinition property : configurationDefinition.getPropertyDefinitions().values()) {
if (property instanceof PropertyDefinitionSimple) {
@@ -69,8 +75,7 @@ public class FileConfiguredMBeanResourceComponent extends MBeanResourceComponent
}
}
} catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.debug("Unable to load mod_cluster configuration file.", e);
}
return configuration;
@@ -84,19 +89,35 @@ public class FileConfiguredMBeanResourceComponent extends MBeanResourceComponent
updateResourceConfiguration(report, false);
}
- private ModClusterBeanFile getModClusterBeanFileInstance(Configuration pluginConfig) throws Exception {
+ private ModClusterBeanFile getModClusterBeanFileInstance() throws Exception {
+ Configuration pluginConfig = this.resourceContext.getPluginConfiguration();
String beanClassName = pluginConfig.getSimple(BEAN_CLASS_NAME_PROPERTY).getStringValue();
+ String fileName = this.getServerHomeDirectory() + CONFIGURATION_FILE_RELATIVE_PATH;
+
if (pluginConfig.getSimple(DEPENDENCY_BEAN_CLASS_NAME_PROPERTY) != null) {
String dependencyBeanClassName = pluginConfig.getSimple(DEPENDENCY_BEAN_CLASS_NAME_PROPERTY)
.getStringValue();
- return new ModClusterBeanFile(dependencyBeanClassName);
+ return new ModClusterBeanFile(beanClassName, dependencyBeanClassName, fileName);
+ }
+
+ return new ModClusterBeanFile(beanClassName, fileName);
+ }
+
+ private String getServerHomeDirectory() {
+ ModclusterServerComponent modClusterComponent = (ModclusterServerComponent) this.resourceContext
+ .getParentResourceComponent();
+
+ PropertySimple property = modClusterComponent.getResourceContext().getPluginConfiguration()
+ .getSimple(SERVER_HOME_DIR);
+
+ if (property != null) {
+ return property.getStringValue();
}
- return new ModClusterBeanFile(beanClassName);
+ return null;
}
- @SuppressWarnings("deprecation")
@Override
public void updateResourceConfiguration(ConfigurationUpdateReport report, boolean ignoreReadOnly) {
ConfigurationDefinition configurationDefinition = this.getResourceContext().getResourceType()
@@ -106,8 +127,7 @@ public class FileConfiguredMBeanResourceComponent extends MBeanResourceComponent
report.setStatus(ConfigurationUpdateStatus.SUCCESS);
try {
- ModClusterBeanFile modClusterBeanFile = this.getModClusterBeanFileInstance(this.resourceContext
- .getPluginConfiguration());
+ ModClusterBeanFile modClusterBeanFile = this.getModClusterBeanFileInstance();
for (String key : report.getConfiguration().getSimpleProperties().keySet()) {
PropertySimple property = report.getConfiguration().getSimple(key);
@@ -127,10 +147,9 @@ public class FileConfiguredMBeanResourceComponent extends MBeanResourceComponent
}
}
- modClusterBeanFile.saveConfigFile();
+ modClusterBeanFile.saveConfigurationFile();
} catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.debug("Unable to save mod_cluster configuration file.", e);
}
}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java
index fb944c8..496068c 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java
@@ -30,7 +30,7 @@ import org.rhq.plugins.jmx.JMXComponent;
import org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent;
/**
- * @author snegrea
+ * @author Stefan Negrea
*
*/
@SuppressWarnings("rawtypes")
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
index 2c964c0..03598e9 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
@@ -18,7 +18,11 @@
*/
package org.rhq.plugins.modcluster;
+import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
+import org.rhq.plugins.jbossas.JBossASServerComponent;
+import org.rhq.plugins.jbossas5.ApplicationServerComponent;
import org.rhq.plugins.jmx.MBeanResourceComponent;
import org.rhq.plugins.modcluster.helper.JBossHelper;
@@ -29,6 +33,38 @@ import org.rhq.plugins.modcluster.helper.JBossHelper;
@SuppressWarnings({ "rawtypes" })
public class ModclusterServerComponent extends MBeanResourceComponent {
+ private final static String JBOSS_SERVER_HOME_DIR = "jboss.server.home.dir";
+
+ @SuppressWarnings({ "unchecked", "deprecation", "static-access" })
+ @Override
+ public void start(ResourceContext context) {
+ super.start(context);
+
+ String serverHomeDirectory = null;
+ if (this.resourceContext.getParentResourceComponent() instanceof ApplicationServerComponent) {
+ ApplicationServerComponent parentComponent = (ApplicationServerComponent) this.resourceContext
+ .getParentResourceComponent();
+
+ serverHomeDirectory = parentComponent.getResourceContext().getPluginConfiguration()
+ .getSimple("serverHomeDir").getStringValue();
+
+ } else if (this.resourceContext.getParentResourceComponent() instanceof JBossASServerComponent) {
+ JBossASServerComponent parentComponent = (JBossASServerComponent) this.resourceContext
+ .getParentResourceComponent();
+
+ serverHomeDirectory = parentComponent.getPluginConfiguration()
+ .getSimple(parentComponent.JBOSS_HOME_DIR_CONFIG_PROP).getStringValue();
+ }
+
+ if (serverHomeDirectory != null) {
+ PropertySimple serverHomeDirectoryProperty = null;
+ serverHomeDirectoryProperty = new PropertySimple();
+ serverHomeDirectoryProperty.setName(JBOSS_SERVER_HOME_DIR);
+ serverHomeDirectoryProperty.setStringValue(serverHomeDirectory);
+ this.resourceContext.getPluginConfiguration().put(serverHomeDirectoryProperty);
+ }
+ };
+
//private final static String PROXY_INFO_PROPERTY_NAME
/* (non-Javadoc)
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java
index 8f5d08b..bc54267 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java
@@ -22,6 +22,10 @@ import org.rhq.core.pluginapi.operation.OperationResult;
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+/**
+ *
+ * @author Stefan Negrea
+ */
public class PolyPingMBeanResourceComponent extends FileConfiguredMBeanResourceComponent {
@Override
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java
index 4fe5788..6c00130 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java
@@ -32,9 +32,6 @@ import org.xml.sax.SAXException;
* @author Stefan Negrea
*/
public abstract class AbstractConfigurationFile {
-
- public static final String SERVER_HOME_DIR = "jboss.server.home.dir";
-
private String fileName;
private Document document;
@@ -60,4 +57,9 @@ public abstract class AbstractConfigurationFile {
return document;
}
+ abstract void setPropertyValue(String propertyName, String value);
+
+ abstract String getPropertyValue(String propertyName);
+
+ abstract void saveConfigurationFile() throws Exception;
}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java
index 602e52b..1d008ee 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java
@@ -36,4 +36,22 @@ public class JBossWebServerFile extends AbstractConfigurationFile {
// TODO Auto-generated constructor stub
}
+ @Override
+ void setPropertyValue(String propertyName, String value) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ String getPropertyValue(String propertyName) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ void saveConfigurationFile() throws Exception {
+ // TODO Auto-generated method stub
+
+ }
+
}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
index 0e25f26..45053f7 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
@@ -16,7 +16,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
package org.rhq.plugins.modcluster.config;
import java.io.IOException;
@@ -38,24 +37,38 @@ import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
/**
- * @author snegrea
+ * @author Stefan Negrea
*
*/
public class ModClusterBeanFile extends AbstractConfigurationFile {
private Node beanNode;
- public ModClusterBeanFile(String className) throws ParserConfigurationException, SAXException, IOException {
- super(
- "/home/snegrea/Downloads/jboss51eap/jboss-as/server/all/deploy/mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml");
+ /**
+ * @param className
+ * @param configurationFile
+ * @throws ParserConfigurationException
+ * @throws SAXException
+ * @throws IOException
+ */
+ public ModClusterBeanFile(String className, String configurationFile) throws ParserConfigurationException,
+ SAXException, IOException {
+ super(configurationFile);
beanNode = this.getBeanNodeByClass(className);
}
- public ModClusterBeanFile(String className, String constructorArgumentClassName)
+ /**
+ * @param className
+ * @param constructorArgumentClassName
+ * @param configurationFile
+ * @throws ParserConfigurationException
+ * @throws SAXException
+ * @throws IOException
+ */
+ public ModClusterBeanFile(String className, String constructorArgumentClassName, String configurationFile)
throws ParserConfigurationException, SAXException, IOException {
- super(
- "/home/snegrea/Downloads/jboss51eap/jboss-as/server/all/deploy/mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml");
+ super(configurationFile);
Node primaryBeanNode = this.getBeanNodeByClass(className);
String dependencyName = this.getBeanFromConstructorArgument(primaryBeanNode, constructorArgumentClassName);
@@ -63,58 +76,10 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
beanNode = this.getBeanNodeByName(dependencyName);
}
- private String getBeanFromConstructorArgument(Node beanNode, String constructorArgumentClassName) {
- List<Node> tempNodeList = this.getChildNodesByName(beanNode, "constructor");
-
- if (tempNodeList.size() > 0) {
- Node constructorNode = tempNodeList.get(0);
-
- tempNodeList = this.getChildNodesByName(constructorNode, "parameter");
-
- if (tempNodeList.size() > 0) {
- Node parameterNode = null;
-
- for (Node currentNode : tempNodeList) {
- if (currentNode.getAttributes().getNamedItem("class") != null
- && constructorArgumentClassName.equals(currentNode.getAttributes().getNamedItem("class")
- .getTextContent())) {
- parameterNode = currentNode;
- break;
- }
- }
-
- if (parameterNode != null) {
- tempNodeList = this.getChildNodesByName(parameterNode, "inject");
-
- if (tempNodeList.size() > 0) {
- Node injectNode = tempNodeList.get(0);
- Node beanAttribute = injectNode.getAttributes().getNamedItem("bean");
-
- if (beanAttribute != null) {
- return beanAttribute.getTextContent();
- }
- }
- }
- }
- }
-
- return null;
- }
-
- private List<Node> getChildNodesByName(Node node, String nodeName) {
- List<Node> listOfNodes = new ArrayList<Node>();
-
- for (int i = 0; i < node.getChildNodes().getLength(); i++) {
- Node currentNode = node.getChildNodes().item(i);
-
- if (nodeName.equals(currentNode.getNodeName())) {
- listOfNodes.add(currentNode);
- }
- }
-
- return listOfNodes;
- }
-
+ /**
+ * @param propertyName
+ * @param value
+ */
public void setPropertyValue(String propertyName, String value) {
boolean propertyFound = false;
for (int i = 0; i < beanNode.getChildNodes().getLength(); i++) {
@@ -144,6 +109,10 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
}
}
+ /**
+ * @param propertyName
+ * @return
+ */
public String getPropertyValue(String propertyName) {
for (int i = 0; i < beanNode.getChildNodes().getLength(); i++) {
Node currentNode = beanNode.getChildNodes().item(i);
@@ -159,7 +128,10 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
return null;
}
- public void saveConfigFile() throws TransformerException {
+ /**
+ * @throws TransformerException
+ */
+ public void saveConfigurationFile() throws TransformerException {
Transformer transformer = TransformerFactory.newInstance().newTransformer();
transformer.setOutputProperty(OutputKeys.INDENT, "no");
@@ -172,7 +144,11 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
System.out.println(xmlString);
}
- public Node getBeanNodeByClass(String className) {
+ /**
+ * @param className
+ * @return
+ */
+ private Node getBeanNodeByClass(String className) {
NodeList result = this.getDocument().getElementsByTagName("bean");
for (int i = 1; i < result.getLength(); i++) {
@@ -187,7 +163,11 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
return null;
}
- public Node getBeanNodeByName(String beanName) {
+ /**
+ * @param beanName
+ * @return
+ */
+ private Node getBeanNodeByName(String beanName) {
NodeList result = this.getDocument().getElementsByTagName("bean");
for (int i = 1; i < result.getLength(); i++) {
@@ -202,4 +182,66 @@ public class ModClusterBeanFile extends AbstractConfigurationFile {
return null;
}
+ /**
+ * @param beanNode
+ * @param constructorArgumentClassName
+ * @return
+ */
+ private String getBeanFromConstructorArgument(Node beanNode, String constructorArgumentClassName) {
+ List<Node> tempNodeList = this.getChildNodesByName(beanNode, "constructor");
+
+ if (tempNodeList.size() > 0) {
+ Node constructorNode = tempNodeList.get(0);
+
+ tempNodeList = this.getChildNodesByName(constructorNode, "parameter");
+
+ if (tempNodeList.size() > 0) {
+ Node parameterNode = null;
+
+ for (Node currentNode : tempNodeList) {
+ if (currentNode.getAttributes().getNamedItem("class") != null
+ && constructorArgumentClassName.equals(currentNode.getAttributes().getNamedItem("class")
+ .getTextContent())) {
+ parameterNode = currentNode;
+ break;
+ }
+ }
+
+ if (parameterNode != null) {
+ tempNodeList = this.getChildNodesByName(parameterNode, "inject");
+
+ if (tempNodeList.size() > 0) {
+ Node injectNode = tempNodeList.get(0);
+ Node beanAttribute = injectNode.getAttributes().getNamedItem("bean");
+
+ if (beanAttribute != null) {
+ return beanAttribute.getTextContent();
+ }
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * @param node
+ * @param nodeName
+ * @return
+ */
+ private List<Node> getChildNodesByName(Node node, String nodeName) {
+ List<Node> listOfNodes = new ArrayList<Node>();
+
+ for (int i = 0; i < node.getChildNodes().getLength(); i++) {
+ Node currentNode = node.getChildNodes().item(i);
+
+ if (nodeName.equals(currentNode.getNodeName())) {
+ listOfNodes.add(currentNode);
+ }
+ }
+
+ return listOfNodes;
+ }
+
}
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index fe4ac7d..4f3010f 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -5,7 +5,8 @@
<depends plugin="JMX" />
- <service name="mod_cluster" discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent" class="ModclusterServerComponent" supportsManualAdd="true" description="mod_cluster plugin" singleton="true">
+ <service name="mod_cluster"
+ discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent" class="ModclusterServerComponent" supportsManualAdd="true" description="mod_cluster plugin" singleton="true">
<runs-inside>
<parent-resource-type name="JBossAS Server" plugin="JBossAS" />
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java
index 4e4aac1..c50b0e6 100644
--- a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java
@@ -28,27 +28,29 @@ public class ServerConfigTest {
public void TestConfig() {
try {
- ModClusterBeanFile config = new ModClusterBeanFile("org.jboss.modcluster.ha.HAModClusterService");
+ ModClusterBeanFile config = new ModClusterBeanFile("org.jboss.modcluster.ha.HAModClusterService",
+ "/home/snegrea/Downloads/jboss51eap/jboss-as/server/all/deploy/mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml");
config.setPropertyValue("processStatusFrequency", "4");
config.setPropertyValue("test", "5");
config.setPropertyValue("test", "123");
System.out.println(config.getPropertyValue("test"));
- config.saveConfigFile();
+ config.saveConfigurationFile();
config = new ModClusterBeanFile("org.jboss.modcluster.ha.HAModClusterService",
- "org.jboss.modcluster.config.ha.HAModClusterConfig");
+ "org.jboss.modcluster.config.ha.HAModClusterConfig",
+ "/home/snegrea/Downloads/jboss51eap/jboss-as/server/all/deploy/mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml");
config.setPropertyValue("processStatusFrequency", "4");
config.setPropertyValue("test", "5");
config.setPropertyValue("test", "123");
System.out.println(config.getPropertyValue("test"));
- config.saveConfigFile();
+ config.saveConfigurationFile();
config.setPropertyValue("test", null);
- config.saveConfigFile();
+ config.saveConfigurationFile();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
commit c166ad34f0490dea2ea9c95ff6c1d2c1c8d9e0fc
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Sun Aug 14 12:06:26 2011 -0500
Enable mod_cluster support for JBoss 5&6 with simple and HA configuration listeners. Also, added metric collections and configuration save to bean file.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ClassNameMBeanDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ClassNameMBeanDiscoveryComponent.java
new file mode 100644
index 0000000..b9ce25e
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ClassNameMBeanDiscoveryComponent.java
@@ -0,0 +1,95 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.plugins.modcluster;
+
+import java.util.Set;
+
+import org.mc4j.ems.connection.EmsConnection;
+import org.mc4j.ems.connection.bean.EmsBean;
+
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+import org.rhq.plugins.jmx.JMXComponent;
+import org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent;
+
+/**
+ * Discovers mod_cluster contexts from the proxyInfo mbean property.
+ *
+ * @author Stefan Negrea
+ */
+@SuppressWarnings("rawtypes")
+public class ClassNameMBeanDiscoveryComponent<T extends JMXComponent> extends MBeanResourceDiscoveryComponent<T> {
+
+ private static final String CLASS_NAME = "className";
+
+ /* (non-Javadoc)
+ * @see org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent#discoverResources(org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext, boolean)
+ */
+ @Override
+ public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<T> context,
+ boolean skipUnknownProps) {
+
+ Set<DiscoveredResourceDetails> results = super.discoverResources(context, skipUnknownProps);
+
+ for (DiscoveredResourceDetails discoveredResource : results) {
+ if (!isBeanConfiguredClassName(context, discoveredResource.getResourceKey())) {
+ results.remove(discoveredResource);
+ }
+ }
+
+ return results;
+ }
+
+ /**
+ * @param context
+ * @param objectName
+ * @return
+ */
+ public boolean isBeanConfiguredClassName(ResourceDiscoveryContext<T> context, String objectName) {
+ String className = context.getDefaultPluginConfiguration().getSimple(CLASS_NAME).getStringValue();
+
+ EmsConnection connection = context.getParentResourceComponent().getEmsConnection();
+ EmsBean emsBean = loadBean(connection, objectName);
+
+ return className.equals(emsBean.getClassTypeName());
+ }
+
+ /**
+ * Loads the bean with the given object name.
+ *
+ * Subclasses are free to override this method in order to load the bean.
+ *
+ * @param objectName the name of the bean to load
+ * @return the bean that is loaded
+ */
+ protected EmsBean loadBean(EmsConnection emsConnection, String objectName) {
+ EmsBean bean = emsConnection.getBean(objectName);
+ if (bean == null) {
+ // In some cases, this resource component may have been discovered by some means other than querying its
+ // parent's EMSConnection (e.g. ApplicationDiscoveryComponent uses a filesystem to discover EARs and
+ // WARs that are not yet deployed). In such cases, getBean() will return null, since EMS won't have the
+ // bean in its cache. To cover such cases, make an attempt to query the underlying MBeanServer for the
+ // bean before giving up.
+ emsConnection.queryBeans(objectName);
+ bean = emsConnection.getBean(objectName);
+ }
+ return bean;
+ }
+
+}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
index 3545fa5..8e14f9b 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextComponent.java
@@ -26,6 +26,7 @@ import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.core.pluginapi.operation.OperationResult;
import org.rhq.plugins.jmx.MBeanResourceComponent;
+import org.rhq.plugins.modcluster.helper.JBossHelper;
/**
* Manages a mod_cluster context entity.
@@ -44,7 +45,7 @@ public class ContextComponent extends MBeanResourceComponent<MBeanResourceCompon
ClassLoader cl = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
- String rawProxyInfo = (String) getEmsBean().getAttribute("proxyInfo").refresh().toString();
+ String rawProxyInfo = JBossHelper.getRawProxyInfo(getEmsBean());
ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
@@ -91,12 +92,16 @@ public class ContextComponent extends MBeanResourceComponent<MBeanResourceCompon
Thread.currentThread().setContextClassLoader(getEmsBean().getClass().getClassLoader());
Object resultObject = getEmsBean().getOperation(name).invoke(configuration);
- return new OperationResult(String.valueOf(resultObject));
+ if (resultObject instanceof OperationResult) {
+ return (OperationResult) resultObject;
+ } else {
+ return new OperationResult(String.valueOf(resultObject));
+ }
} finally {
Thread.currentThread().setContextClassLoader(cl);
}
}
- throw new Exception("Operation " + name + " not available mod_cluster_context service");
+ throw new Exception("Operation " + name + " not available mod_cluster WebApp service.");
}
}
\ No newline at end of file
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
index 3d03715..788cbce 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ContextDiscoveryComponent.java
@@ -1,24 +1,20 @@
/*
- * Jopr Management Platform
+ * RHQ Management Platform
* Copyright (C) 2005-2008 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, 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.
+ * 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 and the GNU Lesser General Public License
- * for more details.
+ * GNU 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.
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package org.rhq.plugins.modcluster;
@@ -33,6 +29,7 @@ import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
import org.rhq.plugins.jmx.MBeanResourceComponent;
+import org.rhq.plugins.modcluster.helper.JBossHelper;
/**
* Discovers mod_cluster contexts from the proxyInfo mbean property.
@@ -43,7 +40,6 @@ import org.rhq.plugins.jmx.MBeanResourceComponent;
public class ContextDiscoveryComponent implements ResourceDiscoveryComponent<MBeanResourceComponent> {
private static final String JVM_ROUTE_PROPERTY = "jvmRoute";
- private static final String PROXY_INFO_PROPERTY = "proxyInfo";
private static final String ENGINE_OBJECT_NAME = "engineObjectName";
/* (non-Javadoc)
@@ -51,7 +47,9 @@ public class ContextDiscoveryComponent implements ResourceDiscoveryComponent<MBe
*/
public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<MBeanResourceComponent> context) {
String jvmRoute = this.getJvmRoute(context);
- String rawProxyInfo = this.getRawProxyInfo(context);
+
+ EmsBean configBean = context.getParentResourceComponent().getEmsBean();
+ String rawProxyInfo = JBossHelper.getRawProxyInfo(configBean);
ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
Set<DiscoveredResourceDetails> entities = new HashSet<DiscoveredResourceDetails>();
@@ -59,8 +57,7 @@ public class ContextDiscoveryComponent implements ResourceDiscoveryComponent<MBe
for (ProxyInfo.Context availableContext : proxyInfo.getAvailableContexts()) {
if (availableContext.getJvmRoute().equals(jvmRoute)) {
DiscoveredResourceDetails detail = new DiscoveredResourceDetails(context.getResourceType(),
- availableContext.createKey(), availableContext.createName(), null, "mod_cluster Webapp Context",
- null, null);
+ availableContext.createKey(), availableContext.createName(), null, "Webapp Context", null, null);
entities.add(detail);
}
}
@@ -83,17 +80,6 @@ public class ContextDiscoveryComponent implements ResourceDiscoveryComponent<MBe
}
/**
- * Retrieves raw proxy configuration from the parent context.
- *
- * @param context the discovery context
- * @return raw proxy configuration
- */
- private String getRawProxyInfo(ResourceDiscoveryContext<MBeanResourceComponent> context) {
- EmsBean statsBean = context.getParentResourceComponent().getEmsBean();
- return (String) statsBean.getAttribute(PROXY_INFO_PROPERTY).refresh().toString();
- }
-
- /**
* Loads the bean with the given object name.
*
* Subclasses are free to override this method in order to load the bean.
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
new file mode 100644
index 0000000..9b511b3
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/FileConfiguredMBeanResourceComponent.java
@@ -0,0 +1,137 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.modcluster;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.ConfigurationUpdateStatus;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
+import org.rhq.core.domain.configuration.definition.PropertyDefinition;
+import org.rhq.core.domain.configuration.definition.PropertyDefinitionSimple;
+import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
+import org.rhq.core.util.exception.ThrowableUtil;
+import org.rhq.plugins.jmx.MBeanResourceComponent;
+import org.rhq.plugins.modcluster.config.ModClusterBeanFile;
+
+/**
+ * @author Stefan Negrea
+ *
+ */
+@SuppressWarnings("rawtypes")
+public class FileConfiguredMBeanResourceComponent extends MBeanResourceComponent {
+
+ private static final String BEAN_CLASS_NAME_PROPERTY = "className";
+ private static final String DEPENDENCY_BEAN_CLASS_NAME_PROPERTY = "dependencyClassName";
+
+ /**
+ * This default setup of configuration properties can map to mbean attributes
+ *
+ * @return the configuration of the component
+ */
+ @Override
+ @SuppressWarnings("deprecation")
+ public Configuration loadResourceConfiguration() {
+ Configuration configuration = new Configuration();
+ ConfigurationDefinition configurationDefinition = this.resourceContext.getResourceType()
+ .getResourceConfigurationDefinition();
+
+ try {
+ ModClusterBeanFile modClusterBeanFile = this.getModClusterBeanFileInstance(this.resourceContext
+ .getPluginConfiguration());
+
+ for (PropertyDefinition property : configurationDefinition.getPropertyDefinitions().values()) {
+ if (property instanceof PropertyDefinitionSimple) {
+ String value = modClusterBeanFile.getPropertyValue(property.getName());
+ if (value != null) {
+ configuration.put(new PropertySimple(property.getName(), value));
+ } else {
+ PropertyDefinitionSimple propertyDefinitionSimple = (PropertyDefinitionSimple) property;
+ configuration.put(new PropertySimple(property.getName(), propertyDefinitionSimple
+ .getDefaultValue()));
+ }
+ }
+ }
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ return configuration;
+ }
+
+ /**
+ * Equivalent to updateResourceConfiguration(report, false);
+ */
+ @Override
+ public void updateResourceConfiguration(ConfigurationUpdateReport report) {
+ updateResourceConfiguration(report, false);
+ }
+
+ private ModClusterBeanFile getModClusterBeanFileInstance(Configuration pluginConfig) throws Exception {
+ String beanClassName = pluginConfig.getSimple(BEAN_CLASS_NAME_PROPERTY).getStringValue();
+
+ if (pluginConfig.getSimple(DEPENDENCY_BEAN_CLASS_NAME_PROPERTY) != null) {
+ String dependencyBeanClassName = pluginConfig.getSimple(DEPENDENCY_BEAN_CLASS_NAME_PROPERTY)
+ .getStringValue();
+ return new ModClusterBeanFile(dependencyBeanClassName);
+ }
+
+ return new ModClusterBeanFile(beanClassName);
+ }
+
+ @SuppressWarnings("deprecation")
+ @Override
+ public void updateResourceConfiguration(ConfigurationUpdateReport report, boolean ignoreReadOnly) {
+ ConfigurationDefinition configurationDefinition = this.getResourceContext().getResourceType()
+ .getResourceConfigurationDefinition();
+
+ // assume we succeed - we'll set to failure if we can't set all properties
+ report.setStatus(ConfigurationUpdateStatus.SUCCESS);
+
+ try {
+ ModClusterBeanFile modClusterBeanFile = this.getModClusterBeanFileInstance(this.resourceContext
+ .getPluginConfiguration());
+
+ for (String key : report.getConfiguration().getSimpleProperties().keySet()) {
+ PropertySimple property = report.getConfiguration().getSimple(key);
+ if (property != null) {
+ try {
+ PropertyDefinitionSimple def = configurationDefinition.getPropertyDefinitionSimple(property
+ .getName());
+ if (!(ignoreReadOnly && def.isReadOnly())) {
+ modClusterBeanFile.setPropertyValue(property.getName(), property.getStringValue());
+ }
+ } catch (Exception e) {
+ property.setErrorMessage(ThrowableUtil.getStackAsString(e));
+ report
+ .setErrorMessage("Failed setting resource configuration - see property error messages for details");
+ log.info("Failure setting MBean Resource configuration value for " + key, e);
+ }
+ }
+ }
+
+ modClusterBeanFile.saveConfigFile();
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java
new file mode 100644
index 0000000..fb944c8
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/LoadMetricDiscoveryComponent.java
@@ -0,0 +1,95 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.modcluster;
+
+import java.util.Set;
+
+import org.mc4j.ems.connection.EmsConnection;
+import org.mc4j.ems.connection.bean.EmsBean;
+
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+import org.rhq.plugins.jmx.JMXComponent;
+import org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent;
+
+/**
+ * @author snegrea
+ *
+ */
+@SuppressWarnings("rawtypes")
+public class LoadMetricDiscoveryComponent extends MBeanResourceDiscoveryComponent<JMXComponent> {
+
+ /* (non-Javadoc)
+ * @see org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent#discoverResources(org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext, boolean)
+ */
+ @Override
+ public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<JMXComponent> context,
+ boolean skipUnknownProps) {
+
+ Set<DiscoveredResourceDetails> results = super.discoverResources(context, skipUnknownProps);
+
+ for (DiscoveredResourceDetails discoveredResource : results) {
+
+ String name = getBeanConfiguredClassName(context, discoveredResource.getResourceKey());
+
+ name = name.substring(name.lastIndexOf(".") + 1);
+ name = name.substring(0, name.lastIndexOf("LoadMetric"));
+
+ discoveredResource.setResourceName(name);
+ discoveredResource.setResourceDescription("Load Metric");
+ }
+
+ return results;
+ }
+
+ /**
+ * @param context
+ * @param objectName
+ * @return
+ */
+ public String getBeanConfiguredClassName(ResourceDiscoveryContext<JMXComponent> context, String objectName) {
+ EmsConnection connection = context.getParentResourceComponent().getEmsConnection();
+ EmsBean emsBean = loadBean(connection, objectName);
+
+ return emsBean.getClassTypeName();
+ }
+
+ /**
+ * Loads the bean with the given object name.
+ *
+ * Subclasses are free to override this method in order to load the bean.
+ *
+ * @param objectName the name of the bean to load
+ * @return the bean that is loaded
+ */
+ protected EmsBean loadBean(EmsConnection emsConnection, String objectName) {
+ EmsBean bean = emsConnection.getBean(objectName);
+ if (bean == null) {
+ // In some cases, this resource component may have been discovered by some means other than querying its
+ // parent's EMSConnection (e.g. ApplicationDiscoveryComponent uses a filesystem to discover EARs and
+ // WARs that are not yet deployed). In such cases, getBean() will return null, since EMS won't have the
+ // bean in its cache. To cover such cases, make an attempt to query the underlying MBeanServer for the
+ // bean before giving up.
+ emsConnection.queryBeans(objectName);
+ bean = emsConnection.getBean(objectName);
+ }
+ return bean;
+ }
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
index 70898ef..2c964c0 100644
--- a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/ModclusterServerComponent.java
@@ -20,6 +20,7 @@ package org.rhq.plugins.modcluster;
import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.plugins.jmx.MBeanResourceComponent;
+import org.rhq.plugins.modcluster.helper.JBossHelper;
/**
* @author Stefan Negrea
@@ -28,15 +29,21 @@ import org.rhq.plugins.jmx.MBeanResourceComponent;
@SuppressWarnings({ "rawtypes" })
public class ModclusterServerComponent extends MBeanResourceComponent {
+ //private final static String PROXY_INFO_PROPERTY_NAME
+
/* (non-Javadoc)
* @see org.rhq.plugins.jmx.MBeanResourceComponent#getAvailability()
*/
@Override
public AvailabilityType getAvailability() {
- String rawProxyInfo = (String) getEmsBean().getAttribute("proxyInfo").refresh().toString();
- ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
+ String rawProxyInfo = JBossHelper.getRawProxyInfo(getEmsBean());
+
+ if (rawProxyInfo == null) {
+ return AvailabilityType.DOWN;
+ }
- if (proxyInfo.getAvailableContexts().size() == 0) {
+ ProxyInfo proxyInfo = new ProxyInfo(rawProxyInfo);
+ if (proxyInfo.getAvailableNodes().size() == 0) {
return AvailabilityType.DOWN;
}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java
new file mode 100644
index 0000000..8f5d08b
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/PolyPingMBeanResourceComponent.java
@@ -0,0 +1,35 @@
+package org.rhq.plugins.modcluster;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.pluginapi.operation.OperationResult;
+
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.
+ */
+
+public class PolyPingMBeanResourceComponent extends FileConfiguredMBeanResourceComponent {
+
+ @Override
+ public OperationResult invokeOperation(String name, Configuration parameters) throws Exception {
+ if (name.toLowerCase().startsWith("ping")) {
+ name = "ping";
+ }
+
+ return super.invokeOperation(name, parameters);
+ }
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java
new file mode 100644
index 0000000..4fe5788
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/AbstractConfigurationFile.java
@@ -0,0 +1,63 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.plugins.modcluster.config;
+
+import java.io.IOException;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
+
+/**
+ *
+ * @author Stefan Negrea
+ */
+public abstract class AbstractConfigurationFile {
+
+ public static final String SERVER_HOME_DIR = "jboss.server.home.dir";
+
+ private String fileName;
+ private Document document;
+
+ public AbstractConfigurationFile(String fileName) throws ParserConfigurationException, SAXException, IOException {
+ this.fileName = fileName;
+
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
+ this.document = docBuilder.parse(this.getFileName());
+ }
+
+ /**
+ * @return the fileName
+ */
+ public String getFileName() {
+ return fileName;
+ }
+
+ /**
+ * @return the doc
+ */
+ public Document getDocument() {
+ return document;
+ }
+
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java
new file mode 100644
index 0000000..602e52b
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/JBossWebServerFile.java
@@ -0,0 +1,39 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.modcluster.config;
+
+import java.io.IOException;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.xml.sax.SAXException;
+
+/**
+ * @author Stefan Negrea
+ *
+ */
+public class JBossWebServerFile extends AbstractConfigurationFile {
+
+ public JBossWebServerFile(String fileName) throws ParserConfigurationException, SAXException, IOException {
+ super(fileName);
+ // TODO Auto-generated constructor stub
+ }
+
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
new file mode 100644
index 0000000..0e25f26
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/config/ModClusterBeanFile.java
@@ -0,0 +1,205 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.modcluster.config;
+
+import java.io.IOException;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+/**
+ * @author snegrea
+ *
+ */
+public class ModClusterBeanFile extends AbstractConfigurationFile {
+
+ private Node beanNode;
+
+ public ModClusterBeanFile(String className) throws ParserConfigurationException, SAXException, IOException {
+ super(
+ "/home/snegrea/Downloads/jboss51eap/jboss-as/server/all/deploy/mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml");
+
+ beanNode = this.getBeanNodeByClass(className);
+ }
+
+ public ModClusterBeanFile(String className, String constructorArgumentClassName)
+ throws ParserConfigurationException, SAXException, IOException {
+ super(
+ "/home/snegrea/Downloads/jboss51eap/jboss-as/server/all/deploy/mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml");
+
+ Node primaryBeanNode = this.getBeanNodeByClass(className);
+ String dependencyName = this.getBeanFromConstructorArgument(primaryBeanNode, constructorArgumentClassName);
+
+ beanNode = this.getBeanNodeByName(dependencyName);
+ }
+
+ private String getBeanFromConstructorArgument(Node beanNode, String constructorArgumentClassName) {
+ List<Node> tempNodeList = this.getChildNodesByName(beanNode, "constructor");
+
+ if (tempNodeList.size() > 0) {
+ Node constructorNode = tempNodeList.get(0);
+
+ tempNodeList = this.getChildNodesByName(constructorNode, "parameter");
+
+ if (tempNodeList.size() > 0) {
+ Node parameterNode = null;
+
+ for (Node currentNode : tempNodeList) {
+ if (currentNode.getAttributes().getNamedItem("class") != null
+ && constructorArgumentClassName.equals(currentNode.getAttributes().getNamedItem("class")
+ .getTextContent())) {
+ parameterNode = currentNode;
+ break;
+ }
+ }
+
+ if (parameterNode != null) {
+ tempNodeList = this.getChildNodesByName(parameterNode, "inject");
+
+ if (tempNodeList.size() > 0) {
+ Node injectNode = tempNodeList.get(0);
+ Node beanAttribute = injectNode.getAttributes().getNamedItem("bean");
+
+ if (beanAttribute != null) {
+ return beanAttribute.getTextContent();
+ }
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+
+ private List<Node> getChildNodesByName(Node node, String nodeName) {
+ List<Node> listOfNodes = new ArrayList<Node>();
+
+ for (int i = 0; i < node.getChildNodes().getLength(); i++) {
+ Node currentNode = node.getChildNodes().item(i);
+
+ if (nodeName.equals(currentNode.getNodeName())) {
+ listOfNodes.add(currentNode);
+ }
+ }
+
+ return listOfNodes;
+ }
+
+ public void setPropertyValue(String propertyName, String value) {
+ boolean propertyFound = false;
+ for (int i = 0; i < beanNode.getChildNodes().getLength(); i++) {
+ Node currentNode = beanNode.getChildNodes().item(i);
+
+ if (currentNode.getNodeName().equals("property")
+ && currentNode.getAttributes().getNamedItem("name") != null
+ && propertyName.equals(currentNode.getAttributes().getNamedItem("name").getTextContent())) {
+
+ if (value != null) {
+ currentNode.setTextContent(value);
+ } else {
+ beanNode.removeChild(currentNode);
+ }
+
+ propertyFound = true;
+ }
+ }
+
+ if (value != null && !propertyFound) {
+ Node propertyChild = this.getDocument().createElement("property");
+ Attr nameProperty = this.getDocument().createAttribute("name");
+ nameProperty.setValue(propertyName);
+ propertyChild.setTextContent(value);
+ propertyChild.getAttributes().setNamedItem(nameProperty);
+ beanNode.appendChild(propertyChild);
+ }
+ }
+
+ public String getPropertyValue(String propertyName) {
+ for (int i = 0; i < beanNode.getChildNodes().getLength(); i++) {
+ Node currentNode = beanNode.getChildNodes().item(i);
+
+ if (currentNode.getNodeName().equals("property")
+ && currentNode.getAttributes().getNamedItem("name") != null
+ && propertyName.equals(currentNode.getAttributes().getNamedItem("name").getTextContent())) {
+
+ return currentNode.getTextContent();
+ }
+ }
+
+ return null;
+ }
+
+ public void saveConfigFile() throws TransformerException {
+ Transformer transformer = TransformerFactory.newInstance().newTransformer();
+ transformer.setOutputProperty(OutputKeys.INDENT, "no");
+
+ //initialize StreamResult with File object to save to file
+ StreamResult result = new StreamResult(new StringWriter());
+ DOMSource source = new DOMSource(this.getDocument());
+ transformer.transform(source, result);
+
+ String xmlString = result.getWriter().toString();
+ System.out.println(xmlString);
+ }
+
+ public Node getBeanNodeByClass(String className) {
+ NodeList result = this.getDocument().getElementsByTagName("bean");
+
+ for (int i = 1; i < result.getLength(); i++) {
+ Node node = result.item(i);
+ if (node.getAttributes().getNamedItem("class") != null
+ && className.equals(node.getAttributes().getNamedItem("class").getTextContent())) {
+ System.out.println(node.getAttributes().getNamedItem("class").getTextContent());
+ return node;
+ }
+ }
+
+ return null;
+ }
+
+ public Node getBeanNodeByName(String beanName) {
+ NodeList result = this.getDocument().getElementsByTagName("bean");
+
+ for (int i = 1; i < result.getLength(); i++) {
+ Node node = result.item(i);
+ if (node.getAttributes().getNamedItem("name") != null
+ && beanName.equals(node.getAttributes().getNamedItem("name").getTextContent())) {
+ System.out.println(node.getAttributes().getNamedItem("name").getTextContent());
+ return node;
+ }
+ }
+
+ return null;
+ }
+
+}
diff --git a/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/helper/JBossHelper.java b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/helper/JBossHelper.java
new file mode 100644
index 0000000..364f3ef
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/main/java/org/rhq/plugins/modcluster/helper/JBossHelper.java
@@ -0,0 +1,49 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2009 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.modcluster.helper;
+
+import org.mc4j.ems.connection.bean.EmsBean;
+
+/**
+ * @author Stefan Negrea
+ *
+ */
+public class JBossHelper {
+
+ public static String getRawProxyInfo(EmsBean emsBean) {
+ String rawProxyInfo = null;
+
+ //try first to get the value for JBoss EAP5.x or AS6
+ try {
+ rawProxyInfo = (String) emsBean.getAttribute("ProxyInfo").refresh().toString();
+ } catch (Exception e) {
+ }
+
+ //if not able to get the value after the first attempt try to get the value for JBoss 4.2/4.3
+ if (rawProxyInfo == null) {
+ try {
+ rawProxyInfo = (String) emsBean.getAttribute("proxyInfo").refresh().toString();
+ } catch (Exception e) {
+ }
+ }
+
+ return rawProxyInfo;
+ }
+}
diff --git a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
index 4846490..fe4ac7d 100644
--- a/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/mod-cluster/src/main/resources/META-INF/rhq-plugin.xml
@@ -1,132 +1,466 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<plugin name="mod_cluster"
- displayName="mod_cluster"
- description="Monitoring and management of mod_cluster plugin."
- version="1.0"
- package="org.rhq.plugins.modcluster"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="urn:xmlns:rhq-plugin"
- xmlns:c="urn:xmlns:rhq-configuration">
+<plugin name="mod_cluster" displayName="mod_cluster" description="Monitoring and management of mod_cluster plugin." version="1.0" package="org.rhq.plugins.modcluster" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:xmlns:rhq-plugin"
+ xmlns:c="urn:xmlns:rhq-configuration">
<depends plugin="JMX" />
- <service name="mod_cluster"
- discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
- class="ModclusterServerComponent"
- supportsManualAdd="true"
- description="mod_cluster plugin"
- singleton="true">
-
+ <service name="mod_cluster" discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent" class="ModclusterServerComponent" supportsManualAdd="true" description="mod_cluster plugin" singleton="true">
+
<runs-inside>
- <parent-resource-type name="JBossAS Server" plugin="JBossAS"/>
- <parent-resource-type name="JBossAS5 Server" plugin="JBossAS5"/>
+ <parent-resource-type name="JBossAS Server" plugin="JBossAS" />
+ <parent-resource-type name="JBossAS Server" plugin="JBossAS5" />
</runs-inside>
-
+
<plugin-configuration>
- <c:simple-property name="objectName" readOnly="true" default="Catalina:type=ModClusterListener,*"/>
- <c:simple-property name="engineObjectName" readOnly="true" default="jboss.web:type=Engine"/>
- <c:simple-property name="nameTemplate" default="mod_cluster"/>
+ <c:simple-property name="objectName" readOnly="true" default="Catalina:type=ModClusterListener,*|jboss.web:service=ModCluster" />
+ <c:simple-property name="engineObjectName" readOnly="true" default="jboss.web:type=Engine" />
+ <c:simple-property name="nameTemplate" default="mod_cluster" />
</plugin-configuration>
-
- <operation name="stop" displayName="Stop all webapps" description="Gracefully stops all webapps for all virtual hosts of this application server.">
- <parameters>
- <c:simple-property required="true" name="timeout" type="string" displayName="Session draining timeout"/>
- <c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
- <c:property-options allowCustomValue="false">
- <c:option value="MICROSECONDS" name="MICROSECONDS"/>
- <c:option value="MILLISECONDS" name="MILLISECONDS"/>
- <c:option value="NANOSECONDS" name="NANOSECONDS"/>
- <c:option value="SECONDS" name="SECONDS"/>
- <c:option value="HOURS" name="HOURS"/>
- <c:option value="DAYS" name="DAYS"/>
- </c:property-options>
- </c:simple-property>
- </parameters>
- <results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
- </results>
- </operation>
- <operation name="addProxy" displayName="Add a proxy" description="Add a proxy.">
- <parameters>
- <c:simple-property required="true" name="host" type="string" displayName="Proxy address"/>
- <c:simple-property required="true" name="port" type="string" displayName="Proxy port"/>
- </parameters>
- </operation>
- <operation name="enable" displayName="Enable all webapps" description="Enable all webapps for all virtual hosts of this application server.">
- <results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
- </results>
- </operation>
+
<operation name="reset" displayName="Reset the node" description="Move this application server out of an error state." />
- <operation name="disable" displayName="Disable all webpapps" description="Disable all webapps for all virtual hosts of this application server.">
- <results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
- </results>
- </operation>
- <operation name="removeProxy" displayName="Remove a proxy" description="Remove a proxy.">
- <parameters>
- <c:simple-property required="true" name="host" type="string" displayName="Proxy address"/>
- <c:simple-property required="true" name="port" type="string" displayName="Proxy port"/>
- </parameters>
- </operation>
<operation name="refresh" displayName="Refresh configuration" description="Refresh configuration for this application server." />
-
- <metric property="proxyConfiguration" displayName="Proxy Configuration" displayType="summary" dataType="trait" />
- <metric property="modelerType" displayName="Type of the modeled resource" displayType="summary" dataType="trait" />
- <metric property="className" displayName="Fully qualified class name of the managed object" displayType="summary" dataType="trait" />
- <metric property="advertise" displayName="Enable autodiscovery of httpd servers." displayType="summary" dataType="trait" />
-
- <resource-configuration>
- <c:simple-property name="workerTimeout" type="integer" description="Timeout to wait for an available worker (default is no wait)." />
- <c:simple-property name="stickySession" type="boolean" description="Enables sticky session for the cluster."/>
- <c:simple-property name="stickySessionRemove" type="boolean" description="Remove session when the request cannot be routed to the right node for this cluster."/>
- <c:simple-property name="smax" type="integer" description="Maximum time on seconds for idle connections above smax."/>
- <c:simple-property name="maxAttempts" type="integer" description="Maximum number of attempts to send the request to the backend server."/>
- <c:simple-property name="advertiseSecurityKey" type="string" required="false" description="Security key for discovery."/>
- <c:simple-property name="stickySessionForce" type="boolean" description="Return an error when the request cannot be routed to the right node."/>
- <c:simple-property name="balancer" type="string" required="false" description="Name of the balancer."/>
- <c:simple-property name="flushPackets" type="boolean" description="Allows controlling flusing of packets."/>
- <c:simple-property name="socketTimeout" type="integer" description="Connection timeout for communication with the proxy." />
- <c:simple-property name="advertisePort" type="integer" required="false" description="Multicast port for discovery" />
- <c:simple-property name="advertiseGroupAddress" type="string" required="false" description="Multicast address for discovery."/>
- <c:simple-property name="flushWait" type="integer" description="Time in ms to wait before flushing packets."/>
- <c:simple-property name="ping" type="integer" description="Time in s to wait for a pong answer to a ping."/>
- </resource-configuration>
-
- <service name="mod_cluster Webapp Context"
- discovery="ContextDiscoveryComponent"
- class="ContextComponent"
- description="mod_cluster webapp context">
-
- <operation name="disableContext" displayName="Disable webapp" description="Disable this webapp.">
- <results>
- <c:simple-property name="result" type="boolean" description="The result of the operation."/>
- </results>
- </operation>
- <operation name="stopContext" displayName="Stop webapp" description="Gracefully stops this webapp.">
+
+ <!-- Start - Configuration for HAModClusterService -->
+ <service name="HA Service" discovery="ClassNameMBeanDiscoveryComponent" class="PolyPingMBeanResourceComponent" supportsManualAdd="true" description="HA Service Listener" singleton="true">
+
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true" default="jboss.web:service=ModCluster" />
+ <c:simple-property name="nameTemplate" default="HA Service" />
+ <c:simple-property name="className" readOnly="true" default="org.jboss.modcluster.ha.HAModClusterService" />
+ <c:simple-property name="proxyInfoProperty" readOnly="true" default="ProxyInfo" />
+ </plugin-configuration>
+
+ <!-- HA Operations -->
+ <operation name="disableDomain" displayName="Disable domain" description="Disables all contexts on each node within the current domain. If the current domain is null, then all nodes are stopped.">
+ <results>
+ <c:simple-property name="result" description="The result of the operation" />
+ </results>
+ </operation>
+ <operation name="enableDomain" displayName="Enable domain" description="Enable all contexts on each node within the current domain. If the current domain is null, then all nodes are stopped.">
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+ <operation name="stopDomain" displayName="Stop domain" description="Gracefully stops all contexts on each node within the current domain. If the current domain is null, then all nodes are stopped.">
+ <parameters>
+ <c:simple-property required="true" name="timeout" type="string" displayName="The number of units of time for which to wait for all sessions to drain on a given node." />
+ <c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
+ <c:property-options allowCustomValue="false">
+ <c:option value="MICROSECONDS" name="MICROSECONDS" />
+ <c:option value="MILLISECONDS" name="MILLISECONDS" />
+ <c:option value="NANOSECONDS" name="NANOSECONDS" />
+ <c:option value="SECONDS" name="SECONDS" />
+ <c:option value="HOURS" name="HOURS" />
+ <c:option value="DAYS" name="DAYS" />
+ </c:property-options>
+ </c:simple-property>
+ </parameters>
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+
+ <!-- Regular Operations -->
+
+ <operation name="pingHTTPD" displayName="Ping httpd" description="Ping httpd and determine whether each proxy is accessible and healthy. Returns the PING_RSP grouped by proxy address.">
+ <results>
+ <c:simple-property name="result" description="Map of PING_RPS response, grouped by proxy.">
+ </c:simple-property>
+ </results>
+ </operation>
+ <operation name="pingNodeByJVMRoute" displayName="Ping node by JVM Route"
+ description="Ping a node from httpd and returns the PING_RSP grouped by proxy address. Dtermines whether the node configured with the specified jvm route is accessible from each proxy returning the PING_RSP grouped by proxy address.">
+ <parameters>
+ <c:simple-property required="true" name="jvmRoute" type="string" displayName="JVM Route of node to ping." />
+ </parameters>
+ <results>
+ <c:simple-property name="result" type="string" description="Map of PING_RPS response, grouped by proxy." />
+ </results>
+ </operation>
+ <operation name="pingNodeByAddress" displayName="Ping node by address"
+ description="Ping a node from httpd and returns the PING_RSP grouped by proxy address. Determines whether the node configured with the specified jvm route is accessible from each proxy returning the PING_RSP grouped by proxy address.">
+ <parameters>
+ <c:simple-property required="true" name="scheme" type="string" displayName="Scheme (ajp, http, https)" />
+ <c:simple-property required="true" name="hostname" type="string" displayName="Name or ip address of a node." />
+ <c:simple-property required="true" name="port" type="string" displayName="Port" />
+ </parameters>
+ <results>
+ <c:simple-property name="result" type="string" description="Map of PING_RPS response, grouped by proxy." />
+ </results>
+ </operation>
+
+ <operation name="addProxy" displayName="Add a proxy" description="Add a proxy.">
+ <parameters>
+ <c:simple-property required="true" name="host" type="string" displayName="Proxy address" />
+ <c:simple-property required="true" name="port" type="string" displayName="Proxy port" />
+ </parameters>
+ </operation>
+ <operation name="removeProxy" displayName="Remove a proxy" description="Remove a proxy.">
+ <parameters>
+ <c:simple-property required="true" name="host" type="string" displayName="Proxy address" />
+ <c:simple-property required="true" name="port" type="string" displayName="Proxy port" />
+ </parameters>
+ </operation>
+ <operation name="disable" displayName="Disable all webpapps" description="Disable all webapps for all virtual hosts of this application server.">
+ <results>
+ <c:simple-property name="result" description="The result of the operation">
+ </c:simple-property>
+ </results>
+ </operation>
+ <operation name="enable" displayName="Enable all webapps" description="Enable all webapps for all virtual hosts of this application server.">
+ <results>
+ <c:simple-property name="result" description="The result of the operation">
+ </c:simple-property>
+ </results>
+ </operation>
+ <operation name="stop" displayName="Stop all webapps" description="Gracefully stops all webapps for all virtual hosts of this application server.">
+ <parameters>
+ <c:simple-property required="true" name="timeout" type="string" displayName="Session draining timeout" />
+ <c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
+ <c:property-options allowCustomValue="false">
+ <c:option value="MICROSECONDS" name="MICROSECONDS" />
+ <c:option value="MILLISECONDS" name="MILLISECONDS" />
+ <c:option value="NANOSECONDS" name="NANOSECONDS" />
+ <c:option value="SECONDS" name="SECONDS" />
+ <c:option value="HOURS" name="HOURS" />
+ <c:option value="DAYS" name="DAYS" />
+ </c:property-options>
+ </c:simple-property>
+ </parameters>
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+
+ <metric property="MasterNode" displayName="Master Node" displayType="summary" dataType="trait" />
+ <metric property="ProxyConfiguration" displayName="Proxy Configuration" displayType="summary" dataType="trait" />
+ <metric property="ProxyInfo" displayName="Proxy Info" displayType="summary" dataType="trait" />
+
+ <resource-configuration>
+ <c:simple-property name="processStatusFrequency" type="integer" description="Process status frequency." />
+ </resource-configuration>
+ </service>
+
+ <service name="HA Service Configuration" discovery="ClassNameMBeanDiscoveryComponent" class="FileConfiguredMBeanResourceComponent" supportsManualAdd="true" description="HA Service Configuration" singleton="true">
+
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true" default="jboss.web:service=ModCluster" />
+ <c:simple-property name="nameTemplate" default="HA Service Configuration" />
+ <c:simple-property name="className" readOnly="true" default="org.jboss.modcluster.ha.HAModClusterService" />
+ <c:simple-property name="dependencyClassName" readOnly="true" default="org.jboss.modcluster.config.ha.HAModClusterConfig" />
+ <c:simple-property name="proxyInfoProperty" readOnly="true" default="ProxyInfo" />
+ </plugin-configuration>
+
+ <resource-configuration>
+
+ <!-- HA Configuration -->
+ <c:simple-property name="masterPerLoadBalancingGroup" type="boolean" required="false" description="Enable current node to be master in the load balancing group." />
+
+ <!-- Handler Configuration -->
+ <c:simple-property name="advertise" type="boolean" required="false" default="false" description="Enable autodiscovery of httpd servers." />
+ <c:simple-property name="advertiseGroupAddress" type="string" description="Multicast address on which to listen for advertisements." />
+ <c:simple-property name="advertisePort" type="string" required="false" description="Multicast port for discovery" />
+ <c:simple-property name="advertiseInterface" type="string" required="false" description="Multicast interface for discovery" />
+ <c:simple-property name="advertiseSecurityKey" type="string" required="false" description="Security key for discovery." />
+ <c:simple-property name="proxyList" type="string" required="false" description="Comma separated list of address:port listing the httpd servers where mod_cluster is running." />
+ <c:simple-property name="proxyURL" type="string" required="false" description="URL prefix to send with commands to mod_cluster. Default is no prefix." />
+ <c:simple-property name="socketTimeout" type="integer" required="false" description="Connection timeout for communication with the proxy." />
+ <c:simple-property name="ssl" type="boolean" description="Whether to use SSL to communicate with mod_cluster. Note this has nothing to do with handling of https requests by JBoss Web" />
+ <c:simple-property name="excludedContexts" type="string" required="false" description="Comma delimited list of contexts that should *not* be auto-registered with httpd. Contexts may be qualified by host using a colon, e.g. host1:context1. If no host is defined, localhost is assumed." />
+ <c:simple-property name="autoEnableContexts" type="boolean" required="false" default="true" description="Toggle for context auto-enable during mod_cluster startup." />
+
+ <!-- Node Configuration -->
+ <c:simple-property name="loadBalancingGroup" type="string" required="false" description="Load balancing group." />
+ <c:simple-property name="flushPackets" type="boolean" required="false" description="Allows controlling flusing of packets." />
+ <c:simple-property name="flushWait" type="integer" required="false" description="Time in ms to wait before flushing packets." />
+ <c:simple-property name="ping" type="integer" required="false" description="Time in s to wait for a pong answer to a ping." />
+ <c:simple-property name="smax" type="integer" required="false" description="Maximum time on seconds for idle connections above smax." />
+ <c:simple-property name="ttl" type="integer" required="false" description="TTL" />
+ <c:simple-property name="nodeTimeout" type="integer" required="false" description="Node timeout" />
+ <c:simple-property name="balancer" type="string" required="false" description="Name of the balancer" />
+
+ <!-- Balancer Configuration -->
+ <c:simple-property name="stickySession" type="boolean" description="Enables sticky session for the node." />
+ <c:simple-property name="stickySessionRemove" type="boolean" description="Remove session when the request cannot be routed to the right node for this cluster." />
+ <c:simple-property name="stickySessionForce" type="boolean" description="Return an error when the request cannot be routed to the right node." />
+ <c:simple-property name="workerTimeout" type="integer" description="Timeout to wait for an available worker (default is no wait)." />
+ <c:simple-property name="maxAttempts" type="integer" description="Maximum number of attempts to send the request to the backend server." />
+ </resource-configuration>
+ </service>
+ <!-- End - Configuration for HAModClusterService -->
+
+ <!-- Start - Configuration for ModClusterService -->
+ <service name="Service" discovery="ClassNameMBeanDiscoveryComponent" class="PolyPingMBeanResourceComponent" supportsManualAdd="true" description="HA Service Listener" singleton="true">
+
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true" default="jboss.web:service=ModCluster" />
+ <c:simple-property name="nameTemplate" default="HA Service" />
+ <c:simple-property name="className" readOnly="true" default="org.jboss.modcluster.ModClusterService" />
+ <c:simple-property name="proxyInfoProperty" readOnly="true" default="ProxyInfo" />
+ </plugin-configuration>
+
+ <operation name="pingHTTPD" displayName="Ping httpd" description="Ping httpd and determine whether each proxy is accessible and healthy. Returns the PING_RSP grouped by proxy address.">
+ <results>
+ <c:simple-property name="result" type="string" description="Map of PING_RPS response, grouped by proxy." />
+ </results>
+ </operation>
+ <operation name="pingNodeByJVMRoute" displayName="Ping node by JVM Route"
+ description="Ping a node from httpd and returns the PING_RSP grouped by proxy address. Dtermines whether the node configured with the specified jvm route is accessible from each proxy returning the PING_RSP grouped by proxy address.">
+ <parameters>
+ <c:simple-property required="true" name="jvmRoute" type="string" displayName="JVM Route of node to ping." />
+ </parameters>
+ <results>
+ <c:simple-property name="result" type="string" description="Map of PING_RPS response, grouped by proxy." />
+ </results>
+ </operation>
+ <operation name="pingNodeByAddress" displayName="Ping node by address"
+ description="Ping a node from httpd and returns the PING_RSP grouped by proxy address. Determines whether the node configured with the specified jvm route is accessible from each proxy returning the PING_RSP grouped by proxy address.">
+ <parameters>
+ <c:simple-property required="true" name="scheme" type="string" displayName="Scheme (ajp, http, https)" />
+ <c:simple-property required="true" name="hostname" type="string" displayName="Name or ip address of a node." />
+ <c:simple-property required="true" name="port" type="string" displayName="Port" />
+ </parameters>
+ <results>
+ <c:simple-property name="result" type="string" description="Map of PING_RPS response, grouped by proxy." />
+ </results>
+ </operation>
+
+ <operation name="addProxy" displayName="Add a proxy" description="Add a proxy.">
+ <parameters>
+ <c:simple-property required="true" name="host" type="string" displayName="Proxy address" />
+ <c:simple-property required="true" name="port" type="string" displayName="Proxy port" />
+ </parameters>
+ </operation>
+ <operation name="removeProxy" displayName="Remove a proxy" description="Remove a proxy.">
+ <parameters>
+ <c:simple-property required="true" name="host" type="string" displayName="Proxy address" />
+ <c:simple-property required="true" name="port" type="string" displayName="Proxy port" />
+ </parameters>
+ </operation>
+ <operation name="disable" displayName="Disable all webpapps" description="Disable all webapps for all virtual hosts of this application server.">
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+ <operation name="enable" displayName="Enable all webapps" description="Enable all webapps for all virtual hosts of this application server.">
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+ <operation name="stop" displayName="Stop all webapps" description="Gracefully stops all webapps for all virtual hosts of this application server.">
+ <parameters>
+ <c:simple-property required="true" name="timeout" type="string" displayName="Session draining timeout" />
+ <c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
+ <c:property-options allowCustomValue="false">
+ <c:option value="MICROSECONDS" name="MICROSECONDS" />
+ <c:option value="MILLISECONDS" name="MILLISECONDS" />
+ <c:option value="NANOSECONDS" name="NANOSECONDS" />
+ <c:option value="SECONDS" name="SECONDS" />
+ <c:option value="HOURS" name="HOURS" />
+ <c:option value="DAYS" name="DAYS" />
+ </c:property-options>
+ </c:simple-property>
+ </parameters>
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+
+ <metric property="ProxyConfiguration" displayName="Proxy Configuration" displayType="summary" dataType="trait" />
+ <metric property="ProxyInfo" displayName="Proxy Info" displayType="summary" dataType="trait" />
+ </service>
+
+ <service name="Service Configuration" discovery="ClassNameMBeanDiscoveryComponent" class="FileConfiguredMBeanResourceComponent" supportsManualAdd="true" description="HA Service Configuration" singleton="true">
+
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true" default="jboss.web:service=ModCluster" />
+ <c:simple-property name="nameTemplate" default="HA Service Configuration" />
+ <c:simple-property name="className" readOnly="true" default="org.jboss.modcluster.ModClusterService" />
+ <c:simple-property name="dependencyClassName" readOnly="true" default="org.jboss.modcluster.config.ModClusterConfig" />
+ <c:simple-property name="proxyInfoProperty" readOnly="true" default="ProxyInfo" />
+ </plugin-configuration>
+
+ <resource-configuration>
+ <!-- Handler Configuration -->
+ <c:simple-property name="advertise" type="boolean" required="false" default="false" description="Enable autodiscovery of httpd servers." />
+ <c:simple-property name="advertiseGroupAddress" type="string" description="Multicast address on which to listen for advertisements." />
+ <c:simple-property name="advertisePort" type="string" required="false" description="Multicast port for discovery" />
+ <c:simple-property name="advertiseInterface" type="string" required="false" description="Multicast interface for discovery" />
+ <c:simple-property name="advertiseSecurityKey" type="string" required="false" description="Security key for discovery." />
+ <c:simple-property name="proxyList" type="string" required="false" description="Comma separated list of address:port listing the httpd servers where mod_cluster is running." />
+ <c:simple-property name="proxyURL" type="string" required="false" description="URL prefix to send with commands to mod_cluster. Default is no prefix." />
+ <c:simple-property name="socketTimeout" type="integer" required="false" description="Connection timeout for communication with the proxy." />
+ <c:simple-property name="ssl" type="boolean" description="Whether to use SSL to communicate with mod_cluster. Note this has nothing to do with handling of https requests by JBoss Web" />
+ <c:simple-property name="excludedContexts" type="string" required="false"
+ description="Comma delimited list of contexts that should *not* be auto-registered with httpd. Contexts may be qualified by host using a colon, e.g. host1:context1. If no host is defined, localhost is assumed." />
+ <c:simple-property name="autoEnableContexts" type="boolean" required="false" default="true" description="Toggle for context auto-enable during mod_cluster startup." />
+
+ <!-- Node Configuration -->
+ <c:simple-property name="loadBalancingGroup" type="string" required="false" description="Load balancing group." />
+ <c:simple-property name="flushPackets" type="boolean" required="false" description="Allows controlling flusing of packets." />
+ <c:simple-property name="flushWait" type="integer" required="false" description="Time in ms to wait before flushing packets." />
+ <c:simple-property name="ping" type="integer" required="false" description="Time in s to wait for a pong answer to a ping." />
+ <c:simple-property name="smax" type="integer" required="false" description="Maximum time on seconds for idle connections above smax." />
+ <c:simple-property name="ttl" type="integer" required="false" description="TTL" />
+ <c:simple-property name="nodeTimeout" type="integer" required="false" description="Node timeout" />
+ <c:simple-property name="balancer" type="string" required="false" description="Name of the balancer" />
+
+ <!-- Balancer Configuration -->
+ <c:simple-property name="stickySession" type="boolean" description="Enables sticky session for the node." />
+ <c:simple-property name="stickySessionRemove" type="boolean" description="Remove session when the request cannot be routed to the right node for this cluster." />
+ <c:simple-property name="stickySessionForce" type="boolean" description="Return an error when the request cannot be routed to the right node." />
+ <c:simple-property name="workerTimeout" type="integer" description="Timeout to wait for an available worker (default is no wait)." />
+ <c:simple-property name="maxAttempts" type="integer" description="Maximum number of attempts to send the request to the backend server." />
+ </resource-configuration>
+ </service>
+ <!-- End - Configuration for ModClusterService -->
+
+ <service name="Catalina Service" discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent" class="ModclusterServerComponent" supportsManualAdd="true" description="Catalina Service Listener" singleton="true">
+
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true" default="Catalina:type=ModClusterListener,*" />
+ <c:simple-property name="nameTemplate" default="mod_cluster Catalina Listener" />
+ </plugin-configuration>
+
+ <operation name="addProxy" displayName="Add a proxy" description="Add a proxy.">
+ <parameters>
+ <c:simple-property required="true" name="host" type="string" displayName="Proxy address" />
+ <c:simple-property required="true" name="port" type="string" displayName="Proxy port" />
+ </parameters>
+ </operation>
+ <operation name="removeProxy" displayName="Remove a proxy" description="Remove a proxy.">
+ <parameters>
+ <c:simple-property required="true" name="host" type="string" displayName="Proxy address" />
+ <c:simple-property required="true" name="port" type="string" displayName="Proxy port" />
+ </parameters>
+ </operation>
+ <operation name="disable" displayName="Disable all webpapps" description="Disable all webapps for all virtual hosts of this application server.">
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+ <operation name="enable" displayName="Enable all webapps" description="Enable all webapps for all virtual hosts of this application server.">
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+ <operation name="stop" displayName="Stop all webapps" description="Gracefully stops all webapps for all virtual hosts of this application server.">
+ <parameters>
+ <c:simple-property required="true" name="timeout" type="string" displayName="Session draining timeout" />
+ <c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
+ <c:property-options allowCustomValue="false">
+ <c:option value="MICROSECONDS" name="MICROSECONDS" />
+ <c:option value="MILLISECONDS" name="MILLISECONDS" />
+ <c:option value="NANOSECONDS" name="NANOSECONDS" />
+ <c:option value="SECONDS" name="SECONDS" />
+ <c:option value="HOURS" name="HOURS" />
+ <c:option value="DAYS" name="DAYS" />
+ </c:property-options>
+ </c:simple-property>
+ </parameters>
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+
+ <metric property="proxyConfiguration" displayName="Proxy Configuration" displayType="summary" dataType="trait" />
+ <metric property="modelerType" displayName="Type of the modeled resource" displayType="summary" dataType="trait" />
+ <metric property="className" displayName="Fully qualified class name of the managed object" displayType="summary" dataType="trait" />
+ <metric property="advertise" displayName="Enable autodiscovery of httpd servers." displayType="summary" dataType="trait" />
+
+ <resource-configuration>
+ <c:simple-property name="workerTimeout" type="integer" description="Timeout to wait for an available worker (default is no wait)." />
+ <c:simple-property name="stickySession" type="boolean" description="Enables sticky session for the cluster." />
+ <c:simple-property name="stickySessionRemove" type="boolean" description="Remove session when the request cannot be routed to the right node for this cluster." />
+ <c:simple-property name="smax" type="integer" description="Maximum time on seconds for idle connections above smax." />
+ <c:simple-property name="maxAttempts" type="integer" description="Maximum number of attempts to send the request to the backend server." />
+ <c:simple-property name="advertiseSecurityKey" type="string" required="false" description="Security key for discovery." />
+ <c:simple-property name="stickySessionForce" type="boolean" description="Return an error when the request cannot be routed to the right node." />
+ <c:simple-property name="balancer" type="string" required="false" description="Name of the balancer." />
+ <c:simple-property name="flushPackets" type="boolean" description="Allows controlling flusing of packets." />
+ <c:simple-property name="socketTimeout" type="integer" description="Connection timeout for communication with the proxy." />
+ <c:simple-property name="advertisePort" type="integer" required="false" description="Multicast port for discovery" />
+ <c:simple-property name="advertiseGroupAddress" type="string" required="false" description="Multicast address for discovery." />
+ <c:simple-property name="flushWait" type="integer" description="Time in ms to wait before flushing packets." />
+ <c:simple-property name="ping" type="integer" description="Time in s to wait for a pong answer to a ping." />
+ </resource-configuration>
+ </service>
+
+ <service name="Dynamic Load Balancer Factor" discovery="ClassNameMBeanDiscoveryComponent" class="FileConfiguredMBeanResourceComponent" supportsManualAdd="true" description="Dynamic Load balancer factor for mod_cluster" singleton="true">
+
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true" default="jboss.web:provider=LoadBalanceFactor,service=ModCluster,*" />
+ <c:simple-property name="className" readOnly="true" default="org.jboss.modcluster.load.impl.DynamicLoadBalanceFactorProvider" />
+ <c:simple-property name="nameTemplate" default="Dynamic Load Balancer Factor" />
+ </plugin-configuration>
+
+ <metric property="Metrics" displayName="Collected Metrics" displayType="summary" dataType="trait" />
+
+ <resource-configuration>
+ <c:simple-property name="DecayFactor" type="integer" description="The number of historical load values used to determine load factor." />
+ <c:simple-property name="History" type="integer" description="The exponential decay factor for historical load values." />
+ </resource-configuration>
+ </service>
+
+ <service name="Simple Load Balancer Factor" discovery="ClassNameMBeanDiscoveryComponent" class="FileConfiguredMBeanResourceComponent" supportsManualAdd="true" description="Simple load balancer factor for mod_cluster" singleton="true">
+
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true" default="jboss.web:provider=LoadBalanceFactor,service=ModCluster,*" />
+ <c:simple-property name="className" readOnly="true" default="org.jboss.modcluster.load.impl.SimpleLoadBalanceFactorProvider" />
+ <c:simple-property name="nameTemplate" default="Simple Load Balancer Factor" />
+ </plugin-configuration>
+
+ <resource-configuration>
+ <c:simple-property name="loadBalanceFactor" type="integer" description="The load balance factor." />
+ </resource-configuration>
+ </service>
+
+ <service name="Load Metric" discovery="LoadMetricDiscoveryComponent" class="org.rhq.plugins.jmx.MBeanResourceComponent" description="Load Metric">
+
+ <plugin-configuration>
+ <c:simple-property name="objectName" readOnly="true" default="jboss.web:provider=LoadBalanceFactor,service=ModCluster,metric=*,*" />
+ <c:simple-property name="nameTemplate" default="Load Metric" />
+ </plugin-configuration>
+
+ <metric property="Load" displayName="Load" category="utilization" description="The current load of this metric as a percent of the metric's capacity." dataType="measurement" />
+
+ <resource-configuration>
+ <c:simple-property name="Weight" type="integer" description="The significance of this load metric compared to the other metrics." />
+ <c:simple-property name="Capacity" type="double" description="Used to normalize the value returned by load expressed as a percentage of the capacity, such that: 0 < (load/capacity) < 1" />
+ </resource-configuration>
+ </service>
+
+ <service name="Webapp Context" discovery="ContextDiscoveryComponent" class="ContextComponent" description="Webapp Context">
+
+ <operation name="disableContext" displayName="Disable webapp" description="Disable this webapp.">
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation." />
+ </results>
+ </operation>
+ <operation name="stopContext" displayName="Stop webapp" description="Gracefully stops this webapp.">
<parameters>
- <c:simple-property required="true" name="timeout" type="integer" displayName="Session draining timeout"/>
- <c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
- <c:property-options allowCustomValue="false">
- <c:option value="MICROSECONDS" name="MICROSECONDS"/>
- <c:option value="MILLISECONDS" name="MILLISECONDS"/>
- <c:option value="NANOSECONDS" name="NANOSECONDS"/>
- <c:option value="SECONDS" name="SECONDS"/>
- <c:option value="HOURS" name="HOURS"/>
- <c:option value="DAYS" name="DAYS"/>
- </c:property-options>
- </c:simple-property>
+ <c:simple-property required="true" name="timeout" type="integer" displayName="Session draining timeout" />
+ <c:simple-property required="true" name="unit" default="MILLISECONDS" displayName="Time unit of the timeout parameter">
+ <c:property-options allowCustomValue="false">
+ <c:option value="MICROSECONDS" name="MICROSECONDS" />
+ <c:option value="MILLISECONDS" name="MILLISECONDS" />
+ <c:option value="NANOSECONDS" name="NANOSECONDS" />
+ <c:option value="SECONDS" name="SECONDS" />
+ <c:option value="HOURS" name="HOURS" />
+ <c:option value="DAYS" name="DAYS" />
+ </c:property-options>
+ </c:simple-property>
</parameters>
- <results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
- </results>
- </operation>
- <operation name="enableContext" displayName="Enable webapp" description="Enable this webapp.">
- <results>
- <c:simple-property name="result" type="boolean" description="The result of the operation" />
- </results>
- </operation>
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
+ <operation name="enableContext" displayName="Enable webapp" description="Enable this webapp.">
+ <results>
+ <c:simple-property name="result" type="boolean" description="The result of the operation" />
+ </results>
+ </operation>
</service>
</service>
diff --git a/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java
new file mode 100644
index 0000000..4e4aac1
--- /dev/null
+++ b/modules/plugins/mod-cluster/src/test/java/org/rhq/plugins/modcluster/test/ServerConfigTest.java
@@ -0,0 +1,58 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2008 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.plugins.modcluster.test;
+
+import org.testng.annotations.Test;
+
+import org.rhq.plugins.modcluster.config.ModClusterBeanFile;
+
+public class ServerConfigTest {
+
+ @Test
+ public void TestConfig() {
+
+ try {
+ ModClusterBeanFile config = new ModClusterBeanFile("org.jboss.modcluster.ha.HAModClusterService");
+ config.setPropertyValue("processStatusFrequency", "4");
+ config.setPropertyValue("test", "5");
+ config.setPropertyValue("test", "123");
+
+ System.out.println(config.getPropertyValue("test"));
+
+ config.saveConfigFile();
+
+ config = new ModClusterBeanFile("org.jboss.modcluster.ha.HAModClusterService",
+ "org.jboss.modcluster.config.ha.HAModClusterConfig");
+ config.setPropertyValue("processStatusFrequency", "4");
+ config.setPropertyValue("test", "5");
+ config.setPropertyValue("test", "123");
+
+ System.out.println(config.getPropertyValue("test"));
+
+ config.saveConfigFile();
+
+ config.setPropertyValue("test", null);
+ config.saveConfigFile();
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+}
commit f9107f719e5fa14265be4e4f6e2ed4c4d7f8a509
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Sun Aug 14 12:03:44 2011 -0500
With JBoss 5, the timeout is blocking the operation call for the period set. Reduce this period for these integration tests.
diff --git a/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index dc98d78..0a39eab 100644
--- a/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -168,7 +168,7 @@ public class ModclusterPluginTest {
log.info("Result of operation " + "enableContext" + " was: " + result.getSimpleResult());
Configuration config = new Configuration();
- config.put(new PropertySimple("timeout", "1000"));
+ config.put(new PropertySimple("timeout", "1"));
config.put(new PropertySimple("unit", java.util.concurrent.TimeUnit.SECONDS));
result = ((OperationFacet) resourceComponent).invokeOperation("stopContext", config);
log.info("Result of operation stopContext was: " + result.getSimpleResult());
commit 47ccc7a36d1dbce6c2e99ef5a83ec1bfcd250988
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Sun Aug 14 12:02:34 2011 -0500
Add jar dependencies for testing with JBoss 5&6.
diff --git a/modules/integration-tests/mod_cluster-plugin-test/pom.xml b/modules/integration-tests/mod_cluster-plugin-test/pom.xml
index 0cc3f4f..77a81b2 100644
--- a/modules/integration-tests/mod_cluster-plugin-test/pom.xml
+++ b/modules/integration-tests/mod_cluster-plugin-test/pom.xml
@@ -17,9 +17,37 @@
<properties>
<scm.module.path>modules/integration-tests/mod_cluster-plugin-test</scm.module.path>
+ <!-- jbossas.version>6.0.0.20100429-M3</jbossas.version-->
+ <jbossas.version>6.0.0.M1</jbossas.version>
+
</properties>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-parent</artifactId>
+ <version>${jbossas.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-component-matrix</artifactId>
+ <version>${jbossas.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
<dependencies>
+
+ <dependency>
+ <groupId>org.jboss.integration</groupId>
+ <artifactId>jboss-profileservice-spi</artifactId>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<groupId>${rhq.groupId}</groupId>
@@ -41,6 +69,213 @@
<version>1.2.14</version>
<scope>provided</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.jboss.naming</groupId>
+ <artifactId>jnp-client</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-aspects</artifactId>
+ <version>5.1.0.CR1</version>
+ <classifier>jboss-aspect-jdk50-client</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>trove</groupId>
+ <artifactId>trove</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-security-spi</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-javaee</artifactId>
+ <scope>test</scope>
+ </dependency-->
+
+ <dependency>
+ <groupId>oswego-concurrent</groupId>
+ <artifactId>concurrent</artifactId>
+ <version>1.3.4-jboss</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-server</artifactId>
+ <classifier>client</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-mdr</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ <scope>test</scope>
+ </dependency-->
+
+ <!-- dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-log4j</artifactId>
+ <scope>test</scope>
+ </dependency-->
+
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-security</artifactId>
+ <version>5.1.0.CR1</version>
+ <classifier>client</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.integration</groupId>
+ <artifactId>jboss-transaction-spi</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-common</artifactId>
+ <classifier>client</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-core</artifactId>
+ <classifier>client</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-ext-api</artifactId>
+ <version>1.0.0</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-proxy-spi</artifactId>
+ <classifier>client</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-proxy-impl</artifactId>
+ <classifier>client</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-security</artifactId>
+ <classifier>client</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-dependency</artifactId>
+ <scope>test</scope>
+ </dependency-->
+
+ <!-- dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jbosssx-client</artifactId>
+ <scope>test</scope>
+ </dependency-->
+
+ <dependency>
+ <groupId>org.jboss.aspects</groupId>
+ <artifactId>jboss-security-aspects</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.aop</groupId>
+ <artifactId>jboss-aop</artifactId>
+ <classifier>client</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-common-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-reflect</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-serialization</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-core-spi</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-client-spi</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-profileservice</artifactId>
+ <classifier>client</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-server</artifactId>
+ <classifier>jmx-invoker-adaptor-client</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- dependency>
+ <groupId>jboss.messaging</groupId>
+ <artifactId>jboss-messaging-client</artifactId>
+ <scope>test</scope>
+ </dependency-->
</dependencies>
commit 58bcfd2f5c502b59f4a362f05daa20e6a3c4ac0b
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Wed Aug 10 18:04:02 2011 -0500
Get the integration tests to compile and run again by creating the maven module and deploying the correct resources to target folder.
diff --git a/.classpath b/.classpath
index a46eaf4..e5225db 100644
--- a/.classpath
+++ b/.classpath
@@ -280,5 +280,6 @@
<classpathentry kind="src" path="modules/plugins/jboss-as-7/src/main/java"/>
<classpathentry kind="src" path="modules/plugins/jboss-as-7/src/test/java"/>
<classpathentry kind="src" path="modules/integration-tests/jboss-as-7-plugin-test/src/test/java"/>
+ <classpathentry kind="src" path="modules/integration-tests/mod_cluster-plugin-test/src/test/java"/>
<classpathentry kind="output" path="eclipse-classes"/>
</classpath>
diff --git a/modules/integration-tests/mod_cluster-plugin-test/pom.xml b/modules/integration-tests/mod_cluster-plugin-test/pom.xml
new file mode 100644
index 0000000..0cc3f4f
--- /dev/null
+++ b/modules/integration-tests/mod_cluster-plugin-test/pom.xml
@@ -0,0 +1,155 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.rhq</groupId>
+ <artifactId>rhq-plugins-parent</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.rhq</groupId>
+ <artifactId>modcluster-plugin-test</artifactId>
+ <packaging>jar</packaging>
+
+ <name>RHQ mod_cluster Plugin Integration Test</name>
+ <description>Integration tests for mod_cluster RHQ Agent plugin</description>
+
+ <properties>
+ <scm.module.path>modules/integration-tests/mod_cluster-plugin-test</scm.module.path>
+ </properties>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>${rhq.groupId}</groupId>
+ <artifactId>rhq-jmx-plugin</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>${rhq.groupId}</groupId>
+ <artifactId>modcluster-plugin</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ <scope>provided</scope>
+ </dependency>
+
+ </dependencies>
+
+ <profiles>
+
+ <profile>
+ <id>integration-tests</id>
+ <activation>
+ <property>
+ <name>maven.test.skip</name>
+ <value>!true</value>
+ </property>
+ </activation>
+
+ <properties>
+ <rhq.rootDir>../../..</rhq.rootDir>
+ <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir>
+ <rhq.deploymentDir>${rhq.containerDir}/jbossas/server/default/deploy/${rhq.earName}/rhq-downloads/rhq-plugins</rhq.deploymentDir>
+ </properties>
+
+ <build>
+ <plugins>
+
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>process-test-resources</phase>
+ <configuration>
+ <tasks>
+ <echo>Setting up plugin dependencies...</echo>
+ <property name="settings.localRepository" location="${user.home}/.m2/repository" />
+ <mkdir dir="target/testsetup" />
+
+ <mkdir dir="target/testsetup/plugins" />
+ <copy toDir="target/testsetup/plugins" flatten="true">
+ <fileset dir="${settings.localRepository}/">
+ <include name="org/rhq/rhq-platform-plugin/${project.version}/rhq-platform-plugin-${project.version}.jar" />
+ <include name="org/rhq/rhq-jmx-plugin/${project.version}/rhq-jmx-plugin-${project.version}.jar" />
+ <include name="org/jboss/on/jopr-jboss-as-plugin/${project.version}/jopr-jboss-as-plugin-${project.version}.jar" />
+ <include name="org/jboss/on/jopr-jboss-as-5-plugin/${project.version}/jopr-jboss-as-5-plugin-${project.version}.jar" />
+ <include name="org/rhq/modcluster-plugin/${project.version}/modcluster-plugin-${project.version}.jar" />
+ </fileset>
+ <fileset dir="${rhq.deploymentDir}">
+ <include name="${project.artifactId}-${project.version}.jar" />
+ </fileset>
+ </copy>
+
+ <mkdir dir="target/testsetup/lib" />
+ <unzip dest="target/testsetup/lib">
+ <fileset dir="${settings.localRepository}/org/hyperic/sigar-dist/${sigar.version}" includes="*.zip" />
+ <patternset>
+ <include name="**/lib/sigar.jar" />
+ <include name="**/lib/bcel*.jar" />
+ <include name="**/lib/*.so" />
+ <include name="**/lib/*.sl" />
+ <include name="**/lib/*.dll" />
+ <include name="**/lib/*.dylib" />
+ </patternset>
+ </unzip>
+ <move todir="target/testsetup/lib" flatten="true">
+ <fileset dir="target/testsetup/lib">
+ <include name="**/lib/*" />
+ </fileset>
+ </move>
+ <delete dir="target/testsetup/lib/hyperic-sigar-${sigar.version}" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ <executions>
+ <execution>
+ <id>surefire-it</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>${maven.test.skip}</skip>
+ <excludedGroups>${rhq.testng.excludedGroups}</excludedGroups>
+ <useSystemClassLoader>false</useSystemClassLoader>
+ <argLine>-Dorg.hyperic.sigar.path=${basedir}/target/testsetup/lib</argLine>
+ <systemProperties>
+ <property>
+ <name>project.artifactId</name>
+ <value>${project.artifactId}</value>
+ </property>
+ <property>
+ <name>project.version</name>
+ <value>${project.version}</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
diff --git a/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java b/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
index 0f644fc..dc98d78 100644
--- a/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
+++ b/modules/integration-tests/mod_cluster-plugin-test/src/test/java/org/rhq/plugins/modcluster/test/ModclusterPluginTest.java
@@ -148,10 +148,12 @@ public class ModclusterPluginTest {
}
if (resourceComponent instanceof OperationFacet) {
- OperationResult result = ((OperationFacet) resourceComponent).invokeOperation("reset", null);
+ OperationResult result = null;
+
+ result = ((OperationFacet) resourceComponent).invokeOperation("reset", new Configuration());
log.info("Result of operation test was: " + result);
- result = ((OperationFacet) resourceComponent).invokeOperation("disable", null);
+ result = ((OperationFacet) resourceComponent).invokeOperation("disable", new Configuration());
log.info("Result of operation test was: " + result.getSimpleResult());
}
}
diff --git a/modules/plugins/mod-cluster/pom.xml b/modules/plugins/mod-cluster/pom.xml
index ab52e84..fdc4f37 100644
--- a/modules/plugins/mod-cluster/pom.xml
+++ b/modules/plugins/mod-cluster/pom.xml
@@ -56,51 +56,6 @@
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
- <execution>
- <phase>process-test-resources</phase>
- <configuration>
- <tasks>
- <echo>Setting up plugin dependencies...</echo>
- <property name="settings.localRepository" location="${user.home}/.m2/repository" />
- <mkdir dir="target/testsetup" />
-
- <mkdir dir="target/testsetup/plugins" />
- <copy toDir="target/testsetup/plugins" flatten="true">
- <fileset dir="${settings.localRepository}/">
- <include name="org/rhq/rhq-platform-plugin/${project.version}/rhq-platform-plugin-${project.version}.jar" />
- <include name="org/rhq/rhq-jmx-plugin/${project.version}/rhq-jmx-plugin-${project.version}.jar" />
- <include name="org/jboss/on/jopr-jboss-as-plugin/${project.version}/jopr-jboss-as-plugin-${project.version}.jar" />
- <include name="org/jboss/on/jopr-jboss-as-5-plugin/${project.version}/jopr-jboss-as-5-plugin-${project.version}.jar" />
- </fileset>
- <fileset dir="${rhq.deploymentDir}">
- <include name="${project.artifactId}-${project.version}.jar" />
- </fileset>
- </copy>
-
- <mkdir dir="target/testsetup/lib" />
- <unzip dest="target/testsetup/lib">
- <fileset dir="${settings.localRepository}/org/hyperic/sigar-dist/${sigar.version}" includes="*.zip" />
- <patternset>
- <include name="**/lib/sigar.jar" />
- <include name="**/lib/bcel*.jar" />
- <include name="**/lib/*.so" />
- <include name="**/lib/*.sl" />
- <include name="**/lib/*.dll" />
- <include name="**/lib/*.dylib" />
- </patternset>
- </unzip>
- <move todir="target/testsetup/lib" flatten="true">
- <fileset dir="target/testsetup/lib">
- <include name="**/lib/*" />
- </fileset>
- </move>
- <delete dir="target/testsetup/lib/hyperic-sigar-${sigar.version}" />
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
<execution>
<id>deploy</id>
@@ -203,12 +158,10 @@
<build>
<plugins>
-
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.1</version>
<executions>
-
<execution>
<id>deploy</id>
<phase>compile</phase>
@@ -258,14 +211,10 @@
<goal>run</goal>
</goals>
</execution>
-
</executions>
</plugin>
-
</plugins>
</build>
</profile>
-
</profiles>
-
</project>
12 years, 7 months
[rhq] modules/core
by John Sanda
modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java | 55 ++++++++--
modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java | 21 +++
2 files changed, 68 insertions(+), 8 deletions(-)
New commits:
commit 5d4fbbefb4f9ee8767e3fb8e18c87a95bdd80d79
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Aug 31 12:49:03 2011 -0400
[BZ 734842] Adding more detailed logging around drift detection
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
index 4bffe9e..d2956d3 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/DriftManager.java
@@ -243,8 +243,8 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
@Override
public void detectDrift(int resourceId, DriftConfiguration driftConfiguration) {
- if (log.isDebugEnabled()) {
- log.debug("Received request to schedule drift detection immediately for [resourceId: " + resourceId
+ if (log.isInfoEnabled()) {
+ log.info("Received request to schedule drift detection immediately for [resourceId: " + resourceId
+ ", driftConfigurationId: " + driftConfiguration.getId() + ", driftConfigurationName: "
+ driftConfiguration.getName() + "]");
}
@@ -258,16 +258,41 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
}
log.debug("Resetting " + schedule + " for immediate detection.");
schedule.resetSchedule();
- schedulesQueue.addSchedule(schedule);
+ boolean queueUpdated = schedulesQueue.addSchedule(schedule);
+
+ if (queueUpdated) {
+ if (log.isDebugEnabled()) {
+ log.debug(schedule + " has been added to " + schedulesQueue + " for immediate detection.");
+ }
+ } else {
+ log.warn("Failed to add " + schedule + " to " + schedulesQueue + " for immediate detection.");
+ }
}
@Override
public void scheduleDriftDetection(int resourceId, DriftConfiguration driftConfiguration) {
- schedulesQueue.addSchedule(new DriftDetectionSchedule(resourceId, driftConfiguration));
+ DriftDetectionSchedule schedule = new DriftDetectionSchedule(resourceId, driftConfiguration);
+ if (log.isInfoEnabled()) {
+ log.info("Scheduling drift detection for " + schedule);
+ }
+ boolean added = schedulesQueue.addSchedule(schedule);
+
+ if (added) {
+ if (log.isDebugEnabled()) {
+ log.debug(schedule + " has been added to " + schedulesQueue);
+ } else {
+ log.warn("Failed to add " + schedule + " to " + schedulesQueue);
+ }
+ }
}
@Override
public boolean requestDriftFiles(int resourceId, Headers headers, List<? extends DriftFile> driftFiles) {
+ if (log.isInfoEnabled()) {
+ log.info("Server is requesting files for [resourceId: " + resourceId + ", driftConfigurationId: " +
+ headers.getDriftCofigurationId() + ", driftConfigurationName: " + headers.getDriftConfigurationName() +
+ "]");
+ }
DriftFilesSender sender = new DriftFilesSender();
sender.setResourceId(resourceId);
sender.setDriftClient(this);
@@ -282,8 +307,8 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
@Override
public void unscheduleDriftDetection(final int resourceId, final DriftConfiguration driftConfiguration) {
- log.debug("Received request to unschedule drift detection for [resourceId:" + resourceId +
- ", driftConfigurationId:" + driftConfiguration.getId() + ", driftConfigurationName: " +
+ log.info("Received request to unschedule drift detection for [resourceId:" + resourceId +
+ ", driftConfigurationId: " + driftConfiguration.getId() + ", driftConfigurationName: " +
driftConfiguration.getName() + "].");
DriftDetectionSchedule schedule = schedulesQueue.removeAndExecute(resourceId, driftConfiguration,
@@ -298,15 +323,29 @@ public class DriftManager extends AgentService implements DriftAgentService, Dri
}
});
- log.debug("Removed " + schedule + " from the schedule queue.");
+ if (log.isDebugEnabled()) {
+ log.debug("Removed " + schedule + " from the queue " + schedulesQueue);
+ }
}
@Override
public void updateDriftDetection(int resourceId, DriftConfiguration driftConfiguration) {
+ log.info("Received request to update schedule for [resourceId: " + resourceId + ", driftConfigurationId: " +
+ driftConfiguration.getId() + ", driftConfigurationName: " + driftConfiguration.getName() + "]");
DriftDetectionSchedule updatedSchedule = schedulesQueue.update(resourceId, driftConfiguration);
if (updatedSchedule == null) {
updatedSchedule = new DriftDetectionSchedule(resourceId, driftConfiguration);
- schedulesQueue.addSchedule(updatedSchedule);
+ if (log.isInfoEnabled()) {
+ log.info("Adding " + updatedSchedule + " to " + schedulesQueue);
+ }
+ boolean added = schedulesQueue.addSchedule(updatedSchedule);
+ if (added) {
+ if (log.isDebugEnabled()) {
+ log.debug(updatedSchedule + " has been added to " + schedulesQueue);
+ }
+ } else {
+ log.warn("Failed to add " + updatedSchedule + " to " + schedulesQueue);
+ }
}
InventoryManager inventoryMgr = PluginContainer.getInstance().getInventoryManager();
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
index f944299..003868d 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/drift/ScheduleQueueImpl.java
@@ -166,4 +166,25 @@ public class ScheduleQueueImpl implements ScheduleQueue {
lock.writeLock().unlock();
}
}
+
+ @Override
+ public String toString() {
+ try {
+ lock.readLock().lock();
+ if (queue.isEmpty()) {
+ return "ScheduleQueue[]";
+ }
+ StringBuilder buffer = new StringBuilder("ScheduleQueue[");
+ for (DriftDetectionSchedule schedule : queue) {
+ buffer.append(schedule).append(", ");
+ }
+ int end = buffer.length();
+ buffer.delete(end - 2, end);
+ buffer.append("]");
+
+ return buffer.toString();
+ } finally {
+ lock.readLock().unlock();
+ }
+ }
}
12 years, 7 months
[rhq] modules/core
by lkrejci
modules/core/plugin-container/pom.xml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit e7acb51347c550e38c5a35d6a5fbba61e5908110
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Wed Aug 31 18:03:07 2011 +0200
BZ 707669 - Forgot to check in the plugin-container pom that actually fetches the augeas-native as its dependency.
diff --git a/modules/core/plugin-container/pom.xml b/modules/core/plugin-container/pom.xml
index 1d12869..5e8397b 100644
--- a/modules/core/plugin-container/pom.xml
+++ b/modules/core/plugin-container/pom.xml
@@ -104,7 +104,8 @@
<dependency>
<groupId>net.augeas</groupId>
<artifactId>augeas-native</artifactId>
- <version>0.7.1.1</version>
+ <version>${augeas.version}</version>
+ <classifier>${augeas.classifier}</classifier>
<type>zip</type>
</dependency>
12 years, 7 months