.classpath | 1 etc/cli-scripts/drift.js | 164 -- etc/cli-scripts/measurement_utils.js | 134 -- etc/cli-scripts/util.js | 95 - modules/common/ant-bundle/pom.xml | 2 modules/common/drift/pom.xml | 2 modules/common/filetemplate-bundle/pom.xml | 2 modules/common/jboss-as/pom.xml | 2 modules/common/pom.xml | 2 modules/core/client-api/pom.xml | 2 modules/core/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/comm-api/pom.xml | 2 modules/core/dbutils/pom.xml | 2 modules/core/domain/pom.xml | 2 modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftConfigurationDefinition.java | 2 modules/core/gui/pom.xml | 2 modules/core/native-system/pom.xml | 2 modules/core/plugin-api/pom.xml | 2 modules/core/plugin-container/pom.xml | 2 modules/core/plugin-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 | 89 + modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftManagerTest.java | 133 ++ modules/core/plugin-validator/pom.xml | 2 modules/core/plugindoc/pom.xml | 38 modules/core/pom.xml | 5 modules/core/util/pom.xml | 2 modules/enterprise/agent/pom.xml | 37 modules/enterprise/agentupdate/pom.xml | 2 modules/enterprise/binding/pom.xml | 4 modules/enterprise/comm/pom.xml | 2 modules/enterprise/gui/base-perspective-jar/pom.xml | 2 modules/enterprise/gui/base-perspective-war/pom.xml | 2 modules/enterprise/gui/content_http-war/pom.xml | 2 modules/enterprise/gui/coregui/pom.xml | 2 modules/enterprise/gui/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/admin/roles/PermissionsEditor.java | 4 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/drift/DriftDetailsView.java | 91 + modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java | 4 modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/AbstractTwoLevelTabSetView.java | 22 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/search/FlexSearchBar.java | 31 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 | 68 - modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java | 11 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 | 3 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/gui/coregui/src/main/webapp/css/search.css | 7 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/installer-war/pom.xml | 2 modules/enterprise/gui/pom.xml | 2 modules/enterprise/gui/portal-war/pom.xml | 2 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 | 4 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 | 17 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 | 40 modules/enterprise/pom.xml | 2 modules/enterprise/remoting/cli/pom.xml | 2 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/remoting/client-api/pom.xml | 2 modules/enterprise/remoting/client-deps/pom.xml | 2 modules/enterprise/remoting/pom.xml | 2 modules/enterprise/remoting/webservices/pom.xml | 2 modules/enterprise/server/client-api/pom.xml | 4 modules/enterprise/server/container-lib/pom.xml | 2 modules/enterprise/server/container/pom.xml | 2 modules/enterprise/server/ear/pom.xml | 2 modules/enterprise/server/jar/pom.xml | 2 modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerBean.java | 55 modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/drift/DriftManagerLocal.java | 2 modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/search/execution/SearchAssistManager.java | 121 +- modules/enterprise/server/plugins/alert-cli/pom.xml | 4 modules/enterprise/server/plugins/alert-email/pom.xml | 4 modules/enterprise/server/plugins/alert-irc/pom.xml | 4 modules/enterprise/server/plugins/alert-log4j/pom.xml | 4 modules/enterprise/server/plugins/alert-microblog/pom.xml | 4 modules/enterprise/server/plugins/alert-mobicents/pom.xml | 4 modules/enterprise/server/plugins/alert-operations/pom.xml | 4 modules/enterprise/server/plugins/alert-roles/pom.xml | 4 modules/enterprise/server/plugins/alert-snmp/pom.xml | 4 modules/enterprise/server/plugins/alert-subject/pom.xml | 4 modules/enterprise/server/plugins/ant-bundle/pom.xml | 2 modules/enterprise/server/plugins/cobbler/pom.xml | 4 modules/enterprise/server/plugins/disk/pom.xml | 2 modules/enterprise/server/plugins/drift-rhq/pom.xml | 2 modules/enterprise/server/plugins/filetemplate-bundle/pom.xml | 2 modules/enterprise/server/plugins/groovy-script/pom.xml | 4 modules/enterprise/server/plugins/jboss-software/pom.xml | 2 modules/enterprise/server/plugins/packagetype-cli/pom.xml | 4 modules/enterprise/server/plugins/perspectives/core/perspective/pom.xml | 2 modules/enterprise/server/plugins/perspectives/core/pom.xml | 2 modules/enterprise/server/plugins/pom.xml | 2 modules/enterprise/server/plugins/rhnhosted/pom.xml | 2 modules/enterprise/server/plugins/url/pom.xml | 2 modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml | 2 modules/enterprise/server/plugins/yum/pom.xml | 2 modules/enterprise/server/safe-invoker/pom.xml | 2 modules/enterprise/server/sars/agent-sar/pom.xml | 2 modules/enterprise/server/sars/pom.xml | 2 modules/enterprise/server/xml-schemas/pom.xml | 2 modules/helpers/bundleGen/pom.xml | 4 modules/helpers/perftest-support/pom.xml | 4 modules/helpers/pom.xml | 2 modules/helpers/rtfilter/pom.xml | 2 modules/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/ant-bundle/pom.xml | 2 modules/plugins/apache/pom.xml | 2 modules/plugins/augeas/pom.xml | 2 modules/plugins/byteman/pom.xml | 2 modules/plugins/cobbler/pom.xml | 2 modules/plugins/cron/pom.xml | 2 modules/plugins/database/pom.xml | 2 modules/plugins/filetemplate-bundle/pom.xml | 2 modules/plugins/grub/pom.xml | 2 modules/plugins/hadoop/pom.xml | 2 modules/plugins/hibernate/pom.xml | 2 modules/plugins/hosts/pom.xml | 2 modules/plugins/hudson/pom.xml | 4 modules/plugins/iis/pom.xml | 2 modules/plugins/irc/pom.xml | 2 modules/plugins/jboss-as-5/pom.xml | 2 modules/plugins/jboss-as-7/pom.xml | 2 modules/plugins/jboss-as/pom.xml | 2 modules/plugins/jboss-cache-v3/pom.xml | 2 modules/plugins/jboss-cache/pom.xml | 2 modules/plugins/jmx/pom.xml | 2 modules/plugins/jmx/src/main/java/org/rhq/plugins/jmx/MBeanResourceComponent.java | 13 modules/plugins/kickstart/pom.xml | 2 modules/plugins/mod-cluster/pom.xml | 66 - 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 | 48 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 | 582 ++++++++-- 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/mysql/pom.xml | 2 modules/plugins/netservices/pom.xml | 2 modules/plugins/oracle/pom.xml | 2 modules/plugins/pattern-generator/pom.xml | 2 modules/plugins/perftest/pom.xml | 2 modules/plugins/platform/pom.xml | 2 modules/plugins/pom.xml | 2 modules/plugins/postfix/pom.xml | 2 modules/plugins/postgres/pom.xml | 2 modules/plugins/rhq-agent/pom.xml | 2 modules/plugins/rhq-server/pom.xml | 2 modules/plugins/samba/pom.xml | 2 modules/plugins/script/pom.xml | 2 modules/plugins/script2/pom.xml | 2 modules/plugins/snmptrapd/pom.xml | 2 modules/plugins/sshd/pom.xml | 2 modules/plugins/sudoers/pom.xml | 2 modules/plugins/tomcat/pom.xml | 2 modules/plugins/twitter/pom.xml | 2 modules/plugins/validate-all-plugins/pom.xml | 2 modules/plugins/virt/pom.xml | 2 modules/pom.xml | 2 modules/test-utils/pom.xml | 2 pom.xml | 3 207 files changed, 4927 insertions(+), 1774 deletions(-)
New commits: commit 6db75f8bfbefbdeb7dd6c89a39fc1b8a8bf28c57 Merge: c1ddd73 9446ab1 Author: Simeon Pinder spinder@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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 66085d0afba8abd80f7288924ec1b34c2b7f7043 Author: John Sanda jsanda@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@redhat.com Date: Thu Aug 25 18:29:29 2011 -0500
Merge branch 'mod_cluster_plugin'
commit 8db63e00ec03b5c0257925becda0b984351b6664 Author: Stefan Negrea snegrea@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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@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 0b63dbefbc9f88145a8012a3677af665b41b13f7 Author: Stefan Negrea snegrea@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@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@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 676fc23804ccf42d8eb2ce236400bc08a4025f89 Author: Stefan Negrea snegrea@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 dee21cbe94b5d5befc5a087a74cc5884bea96ee4 Author: Stefan Negrea snegrea@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 35d73023552f4b83976705e88f14e6fecf0eed6f Author: Stefan Negrea snegrea@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 7b57da38ba1b16241e06480cf0b95a22c3508999 Author: Stefan Negrea snegrea@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@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@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@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@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>
rhq-commits@lists.fedorahosted.org