[rhq] etc/rhq-ircBot
by ips
etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBot.java | 19 +++++++---
1 file changed, 15 insertions(+), 4 deletions(-)
New commits:
commit b07cce4f5440a616011e02aa7b81e59e40e5b59c
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Sat Jun 2 13:09:14 2012 -0400
add support for command line args for specifying IRC server and channel
diff --git a/etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBot.java b/etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBot.java
index 681707c..08f715a 100644
--- a/etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBot.java
+++ b/etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBot.java
@@ -112,25 +112,36 @@ public class RhqIrcBot extends ListenerAdapter {
disconnectEvent.getBot().reconnect();
connected = true;
} catch (Exception e) {
- // ignore
+ System.err.println("Failed to reconnect to " + disconnectEvent.getBot().getServer() + " IRC server: " + e);
}
}
}
public static void main(String[] args) throws Exception {
+ if (args.length != 2) {
+ System.err.println("Usage: RhqIrcBot IRC_SERVER IRC_CHANNEL");
+ System.err.println(" e.g.: RhqIrcBot irc.freenode.net '#rhq'");
+ System.exit(1);
+ }
+ String server = args[0];
+ String channel = args[1];
+ if (channel.charAt(0) != '#') {
+ channel = '#' + channel;
+ }
+
PircBotX bot = new PircBotX();
bot.setName("rhq-bot");
bot.setVersion("1.0");
- bot.setFinger("#rhq IRC bot (source code in RHQ git under etc/rhq-ircBot/)");
+ bot.setFinger("RHQ IRC bot (source code in RHQ git under etc/rhq-ircBot/)");
bot.setVerbose(true);
bot.getListenerManager().addListener(new RhqIrcBot());
bot.setSocketTimeout(1 * 60 * 1000); // 1 minute
// TODO: Try other Freenode IRC servers if this one is down.
- bot.connect("irc.freenode.net");
- bot.joinChannel("#rhq");
+ bot.connect(server);
+ bot.joinChannel(channel);
}
}
11 years, 11 months
[rhq] modules/plugins
by snegrea
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/IspnCContainerComponent.java | 66 --------
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/IspnCacheComponent.java | 81 ----------
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/IspnComponent.java | 10 -
modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml | 73 ++++++---
4 files changed, 49 insertions(+), 181 deletions(-)
New commits:
commit 64d1a7cc342250063d5325aba89fed454c73cd45
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Jun 1 17:59:12 2012 -0500
[BZ 827636] Updated Cache component and parents to use generic component code since the functionality required was implemented in a generic fashion.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/IspnCContainerComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/IspnCContainerComponent.java
deleted file mode 100644
index aec501b..0000000
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/IspnCContainerComponent.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package org.rhq.modules.plugins.jbossas7;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.Property;
-import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.domain.resource.CreateResourceStatus;
-import org.rhq.core.pluginapi.inventory.CreateChildResourceFacet;
-import org.rhq.core.pluginapi.inventory.CreateResourceReport;
-import org.rhq.modules.plugins.jbossas7.json.Address;
-import org.rhq.modules.plugins.jbossas7.json.Operation;
-import org.rhq.modules.plugins.jbossas7.json.Result;
-
-/**
- * // TODO: Document this
- * @author Heiko W. Rupp
- */
-public class IspnCContainerComponent extends BaseComponent implements CreateChildResourceFacet{
- static final String FLAVOR = "_flavor";
-
-// private final Log log = LogFactory.getLog(IspnCContainerComponent.class);
-
- /**
- * Create embedded cache elements
- * Ttick is to take the _flavor property and turn it into a part of the path
- * @param report contains all of the necessary information to create the specified resource and should be populated
- * with the
- *
- * @return
- */
- @Override
- public CreateResourceReport createResource(CreateResourceReport report) {
-
- Configuration config = report.getResourceConfiguration();
- String flavor = config.getSimpleValue(FLAVOR,null);
- if (flavor==null) {
- report.setStatus(CreateResourceStatus.INVALID_CONFIGURATION);
- report.setErrorMessage("No flavor given");
-
- return report;
- }
- String newName = report.getUserSpecifiedResourceName();
- Address address = new Address(this.address);
- address.add(flavor,newName);
- Operation add = new Operation("add",address);
- for (Property prop: config.getProperties()) {
- if (prop.getName().equals(FLAVOR)) {
- continue;
- }
- PropertySimple ps = (PropertySimple) prop;
- add.addAdditionalProperty(prop.getName(),ps.getStringValue()); // TODO format conversion?
-
- }
- Result result = getASConnection().execute(add);
- if (result.isSuccess()) {
- report.setResourceKey(address.getPath());
- report.setResourceName(address.getPath());
- report.setStatus(CreateResourceStatus.SUCCESS);
- }
- else {
- report.setErrorMessage(result.getFailureDescription());
- report.setStatus(CreateResourceStatus.FAILURE);
- }
-
- return report;
- }
-}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/IspnCacheComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/IspnCacheComponent.java
deleted file mode 100644
index c6de975..0000000
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/IspnCacheComponent.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2012 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.modules.plugins.jbossas7;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.domain.measurement.MeasurementDataTrait;
-import org.rhq.core.domain.measurement.MeasurementReport;
-import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
-import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
-import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
-
-/**
- * Component class for Infinispan caches
- * @author Heiko W. Rupp
- */
-public class IspnCacheComponent extends BaseComponent implements ConfigurationFacet {
-
-
- @Override
- public void getValues(MeasurementReport report, Set metrics) throws Exception {
-
- Set<MeasurementScheduleRequest> requests = metrics;
- Set<MeasurementScheduleRequest> todo = new HashSet<MeasurementScheduleRequest>();
-
- for (MeasurementScheduleRequest req: requests) {
- if (req.getName().equals("__flavor")) {
- String flavor = getCacheFlavorFromPath();
- MeasurementDataTrait trait = new MeasurementDataTrait(req,flavor);
- report.addData(trait);
- }
- else
- todo.add(req);
- }
-
-
- super.getValues(report, todo);
- }
-
- private String getCacheFlavorFromPath() {
- String flavor = path.substring(path.lastIndexOf(",")+1);
- flavor = flavor.substring(0,flavor.indexOf("="));
- return flavor;
- }
-
- @Override
- public Configuration loadResourceConfiguration() throws Exception {
- Configuration config = super.loadResourceConfiguration();
- String f = getCacheFlavorFromPath();
- PropertySimple flavor = new PropertySimple(IspnCContainerComponent.FLAVOR,f);
- config.put(flavor);
- return config;
- }
-
- @Override
- public void updateResourceConfiguration(ConfigurationUpdateReport report) {
-
- report.getConfiguration().remove(IspnCContainerComponent.FLAVOR);
-
- super.updateResourceConfiguration(report);
- }
-}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/IspnComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/IspnComponent.java
deleted file mode 100644
index bf809cf..0000000
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/IspnComponent.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.rhq.modules.plugins.jbossas7;
-
-/**
- * Component class for Infinispan
- * @author Heiko W. Rupp
- */
-public class IspnComponent extends BaseComponent {
-
-
-}
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index ec17e84..ffc0246 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -1899,7 +1899,7 @@
<service name="Infinispan (Managed Server)"
discovery="SubsystemDiscovery"
- class="IspnComponent"
+ class="BaseComponent"
singleton="true">
<plugin-configuration>
@@ -1909,7 +1909,7 @@
<service name="Cache Container (Managed Server)"
discovery="SubsystemDiscovery"
- class="IspnCContainerComponent">
+ class="TemplatedSubResourcesComponent">
<plugin-configuration>
<c:simple-property name="path" readOnly="true" default="cache-container"/>
@@ -1936,21 +1936,13 @@
<service name="Cache (Managed Server)"
discovery="SubsystemDiscovery"
- class="IspnCacheComponent">
+ class="TemplatedComponent">
<plugin-configuration>
<c:simple-property name="path" readOnly="true" default="distributed-cache|local-cache|invalidation-cache|replicated-cache"/>
</plugin-configuration>
<resource-configuration>
- <c:simple-property name="_flavor" displayName="Kind of cache" required="true" readOnly="true" default="local-cache" description="What special kind of cache is this.">
- <c:property-options>
- <c:option value="local-cache"/>
- <c:option value="invalidation-cache"/>
- <c:option value="distributed-cache"/>
- <c:option value="replicated-cache"/>
- </c:property-options>
- </c:simple-property>
<c:simple-property name="start" required="false" type="string" readOnly="true" default="LAZY" description="The cache start mode, which can be EAGER (immediate start) or LAZY (on-demand start).">
<c:property-options>
<c:option value="LAZY"/>
@@ -1980,6 +1972,27 @@
<c:simple-property name="module" required="false" type="string" readOnly="true" description="The module whose class loader should be used when building this cache's configuration."/>
<c:simple-property name="owners" required="false" type="integer" readOnly="true" defaultValue="2" description="Number of cluster-wide replicas for each cache entry. The default value is 2."/>
<c:simple-property name="virtual-nodes" required="false" type="integer" readOnly="true" defaultValue="1" description="Controls the number of virtual nodes per 'real' node. If numVirtualNodes is 1, then virtual nodes are disabled. The topology aware consistent hash must be used if you wish to take advantage of virtual nodes. A default of 1 is used. The default value is 1."/>
+
+ <c:simple-property name="__type" displayName="Type of cache" required="true" readOnly="true" default="local-cache" description="Type of cache">
+ <c:property-options>
+ <c:option value="local-cache"/>
+ <c:option value="invalidation-cache"/>
+ <c:option value="distributed-cache"/>
+ <c:option value="replicated-cache"/>
+ </c:property-options>
+ </c:simple-property>
+ <c:template name="Local Cache" description="Local Cache">
+ <c:simple-property name="__type" readOnly="true" default="local-cache"/>
+ </c:template>
+ <c:template name="Invalidation Cache" description="Invalidation Cache">
+ <c:simple-property name="__type" readOnly="true" default="invalidation-cache"/>
+ </c:template>
+ <c:template name="Distributed Cache" description="Distributed Cache">
+ <c:simple-property name="__type" readOnly="true" default="distributed-cache"/>
+ </c:template>
+ <c:template name="Replicated Cache" description="Replicated Cache">
+ <c:simple-property name="__type" readOnly="true" default="replicated-cache"/>
+ </c:template>
</resource-configuration>
</service>
@@ -11090,7 +11103,7 @@
<service name="Infinispan"
discovery="SubsystemDiscovery"
- class="IspnComponent"
+ class="BaseComponent"
singleton="true">
<runs-inside>
@@ -11104,7 +11117,7 @@
<service name="Cache Container"
discovery="SubsystemDiscovery"
- class="IspnCContainerComponent"
+ class="TemplatedSubResourcesComponent"
createDeletePolicy="both"
creationDataType="configuration">
@@ -11133,7 +11146,7 @@
<service name="Cache"
discovery="SubsystemDiscovery"
- class="IspnCacheComponent"
+ class="TemplatedComponent"
createDeletePolicy="both"
creationDataType="configuration">
@@ -11142,14 +11155,6 @@
</plugin-configuration>
<resource-configuration>
- <c:simple-property name="_flavor" displayName="Kind of cache" required="true" readOnly="true" default="local-cache" description="What special kind of cache is this.">
- <c:property-options>
- <c:option value="local-cache"/>
- <c:option value="invalidation-cache"/>
- <c:option value="distributed-cache"/>
- <c:option value="replicated-cache"/>
- </c:property-options>
- </c:simple-property>
<c:simple-property name="start" required="false" type="string" readOnly="false" default="LAZY" description="The cache start mode, which can be EAGER (immediate start) or LAZY (on-demand start).">
<c:property-options>
<c:option value="LAZY"/>
@@ -11165,7 +11170,7 @@
</c:property-options>
</c:simple-property>
<c:simple-property name="jndi-name" required="false" type="string" readOnly="false" description="The jndi-name to which to bind this cache instance."/>
- <c:simple-property name="mode" required="false" type="string" readOnly="true" default="SYNC" description="Sets the clustered cache mode, ASYNC for asynchronous operation, or SYNC for synchronous operation.">
+ <c:simple-property name="mode" required="true" type="string" readOnly="false" default="SYNC" description="Sets the clustered cache mode, ASYNC for asynchronous operation, or SYNC for synchronous operation.">
<c:property-options>
<c:option value="SYNC"/>
<c:option value="ASYNC"/>
@@ -11174,12 +11179,32 @@
<c:simple-property name="queue-size" required="false" type="integer" readOnly="false" default="0" description="In ASYNC mode, this attribute can be used to trigger flushing of the queue when it reaches a specific threshold."/>
<c:simple-property name="queue-flush-interval" required="false" type="long" readOnly="false" default="10" description="In ASYNC mode, this attribute controls how often the asynchronous thread used to flush the replication queue runs. This should be a positive integer which represents thread wakeup time in milliseconds."/>
<c:simple-property name="remote-timeout" required="false" type="long" readOnly="false" default="17500" description="In SYNC mode, the timeout (in ms) used to wait for an acknowledgment when making a remote call, after which the call is aborted and an exception is thrown."/>
-
<c:simple-property name="async-marshalling" required="false" type="boolean" readOnly="false" defaultValue="false" description="If enabled, this will cause marshalling of entries to be performed asynchronously. The default value is false."/>
<c:simple-property name="l1-lifespan" required="false" type="long" readOnly="false" defaultValue="600000" description="Maximum lifespan of an entry placed in the L1 cache. This element configures the L1 cache behavior in 'distributed' caches instances. In any other cache modes, this element is ignored. The default value is 600000."/>
<c:simple-property name="module" required="false" type="string" readOnly="false" description="The module whose class loader should be used when building this cache's configuration."/>
<c:simple-property name="owners" required="false" type="integer" readOnly="false" defaultValue="2" description="Number of cluster-wide replicas for each cache entry. The default value is 2."/>
<c:simple-property name="virtual-nodes" required="false" type="integer" readOnly="false" defaultValue="1" description="Controls the number of virtual nodes per 'real' node. If numVirtualNodes is 1, then virtual nodes are disabled. The topology aware consistent hash must be used if you wish to take advantage of virtual nodes. A default of 1 is used. The default value is 1."/>
+
+ <c:simple-property name="__type" displayName="Type of cache" required="true" readOnly="true" default="local-cache" description="Type of cache">
+ <c:property-options>
+ <c:option value="local-cache"/>
+ <c:option value="invalidation-cache"/>
+ <c:option value="distributed-cache"/>
+ <c:option value="replicated-cache"/>
+ </c:property-options>
+ </c:simple-property>
+ <c:template name="Local Cache" description="Local Cache">
+ <c:simple-property name="__type" readOnly="true" default="local-cache"/>
+ </c:template>
+ <c:template name="Invalidation Cache" description="Invalidation Cache">
+ <c:simple-property name="__type" readOnly="true" default="invalidation-cache"/>
+ </c:template>
+ <c:template name="Distributed Cache" description="Distributed Cache">
+ <c:simple-property name="__type" readOnly="true" default="distributed-cache"/>
+ </c:template>
+ <c:template name="Replicated Cache" description="Replicated Cache">
+ <c:simple-property name="__type" readOnly="true" default="replicated-cache"/>
+ </c:template>
</resource-configuration>
</service>
11 years, 11 months
[rhq] Branch 'release/jon3.1.x' - modules/enterprise
by ips
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/plugin/ProductPluginDeployer.java | 5 --
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginManagerBean.java | 22 ++++------
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginManagerLocal.java | 5 --
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/core/plugin/DatabaseAndFilePluginDeploymentTest.java | 2
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java | 2
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/test/UpdatePluginMetadataTestBase.java | 2
6 files changed, 16 insertions(+), 22 deletions(-)
New commits:
commit 750a134d6012f9f1d9e9b0d731e01d34abfcefaa
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Fri Jun 1 15:18:34 2012 -0400
[BZ 827447] prevent subject session timeouts from occurring during registration of agent plugins with tons of types (e.g. the as7 plugin) (https://bugzilla.redhat.com/show_bug.cgi?id=827447)
(cherry picked from commit 5ffd188798d92b0bf455dd5b7a4766dd31f20825)
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/plugin/ProductPluginDeployer.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/plugin/ProductPluginDeployer.java
index cf1da6b..1d674a8 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/plugin/ProductPluginDeployer.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/plugin/ProductPluginDeployer.java
@@ -41,7 +41,6 @@ import org.rhq.core.clientapi.descriptor.plugin.PluginDescriptor;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.plugin.Plugin;
import org.rhq.core.util.MessageDigestGenerator;
-import org.rhq.enterprise.server.auth.SubjectManagerLocal;
import org.rhq.enterprise.server.core.concurrency.LatchedServiceCircularityException;
import org.rhq.enterprise.server.core.concurrency.LatchedServiceController;
import org.rhq.enterprise.server.core.concurrency.LatchedServiceException;
@@ -478,9 +477,7 @@ public class ProductPluginDeployer {
// since we assume we are called in the proper deployment order, this should not fail
// if we are called when hot-deploying a plugin whose dependencies aren't deployed, this will fail
PluginManagerLocal pluginMgr = LookupUtil.getPluginManager();
- SubjectManagerLocal subjectManager = LookupUtil.getSubjectManager();
- pluginMgr.registerPlugin(subjectManager.getOverlord(), plugin, pluginDescriptor, localPluginFile,
- forceUpdate);
+ pluginMgr.registerPlugin(plugin, pluginDescriptor, localPluginFile, forceUpdate);
} catch (Exception e) {
log.error("Failed to register RHQ plugin file [" + deploymentInfo.url + "]", e);
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginManagerBean.java
index 4bc097f..09563df 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginManagerBean.java
@@ -332,21 +332,20 @@ public class PluginManagerBean implements PluginManagerLocal {
}
// Start with no transaction so we can control the transactional boundaries. This is important for a
- // few reasons. Registering the plugin and removing obsolete types are perfromed in different, subsequent,
- // transactions. The register may update types, and that locks various rows of the database. Those rows
+ // few reasons. Registering the plugin and removing obsolete types are performed in different, subsequent,
+ // transactions. The registration may update types, and that locks various rows of the database. Those rows
// must be unlocked before obsolete type removal. Type removal executes (resource) bulk delete under the covers,
// and that will deadlock with the rows locked by the type update (at least in oracle) if performed in the same
// transaction. Furthermore, as mentioned, obsolete type removal removes resources of the obsolete type. We
// need to avoid an umbrella transaction for the type removal because large inventories of obsolete resources
// will generate very large transactions. Potentially resulting in timeouts or other issues.
- @RequiredPermission(Permission.MANAGE_SETTINGS)
@TransactionAttribute(TransactionAttributeType.NEVER)
- public void registerPlugin(Subject subject, Plugin plugin, PluginDescriptor pluginDescriptor, File pluginFile,
- boolean forceUpdate) throws Exception {
- log.debug("Registering " + plugin);
+ public void registerPlugin(Plugin plugin, PluginDescriptor pluginDescriptor, File pluginFile,
+ boolean forceUpdate) throws Exception {
+ log.debug("Registering " + plugin + "...");
long startTime = System.currentTimeMillis();
- boolean newOrUpdated = pluginMgr.installPluginJar(subject, plugin, pluginDescriptor, pluginFile);
+ boolean newOrUpdated = pluginMgr.installPluginJar(plugin, pluginDescriptor, pluginFile);
boolean typesUpdated = pluginMgr.registerPluginTypes(plugin.getName(), pluginDescriptor, newOrUpdated,
forceUpdate);
@@ -365,22 +364,21 @@ public class PluginManagerBean implements PluginManagerLocal {
log.debug("Plugin [" + extPluginName
+ "] will be re-registered because it embeds types from plugin [" + plugin.getName() + "]");
pluginMgr.registerPluginTypes(extPluginName, extPluginDescriptor, false, true);
- resourceMetadataManager.removeObsoleteTypes(subject, extPluginName, metadataManager);
+ resourceMetadataManager.removeObsoleteTypes(subjectMgr.getOverlord(), extPluginName, metadataManager);
}
}
// now remove any obsolete types from the newly registered plugin
- resourceMetadataManager.removeObsoleteTypes(subject, plugin.getName(), metadataManager);
+ resourceMetadataManager.removeObsoleteTypes(subjectMgr.getOverlord(), plugin.getName(), metadataManager);
}
long endTime = System.currentTimeMillis();
log.debug("Finished registering " + plugin + " in " + (endTime - startTime) + " ms");
}
- @RequiredPermission(Permission.MANAGE_SETTINGS)
@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
- public boolean installPluginJar(Subject subject, Plugin newPlugin, PluginDescriptor pluginDescriptor,
- File pluginFile) throws Exception {
+ public boolean installPluginJar(Plugin newPlugin, PluginDescriptor pluginDescriptor, File pluginFile)
+ throws Exception {
Plugin existingPlugin = null;
boolean newOrUpdated = false;
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginManagerLocal.java
index 3ee593e..7a36305 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginManagerLocal.java
@@ -122,9 +122,8 @@ public interface PluginManagerLocal {
* @param metadata The plugin descriptor file
* @param pluginFile the actual plugin file whose content will be stored in the database (will be ignored if null)
* @param forceUpdate if <code>true</code>, the plugin's types will be updated, even if the plugin hasn't changed since
- * the last time it was registered
*/
- void registerPlugin(Subject subject, Plugin plugin, PluginDescriptor metadata, File pluginFile, boolean forceUpdate)
+ void registerPlugin(Plugin plugin, PluginDescriptor metadata, File pluginFile, boolean forceUpdate)
throws Exception;
/** Exists only to for transactional boundary reasons. Not for general consumption. */
@@ -132,7 +131,7 @@ public interface PluginManagerLocal {
boolean forceUpdate) throws Exception;
/** Exists only for transactional boundary reasons. Not for general consumption. */
- boolean installPluginJar(Subject subject, Plugin newPlugin, PluginDescriptor pluginDescriptor, File pluginFile)
+ boolean installPluginJar(Plugin newPlugin, PluginDescriptor pluginDescriptor, File pluginFile)
throws Exception;
/**
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/core/plugin/DatabaseAndFilePluginDeploymentTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/core/plugin/DatabaseAndFilePluginDeploymentTest.java
index c6180fc..b8b426e 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/core/plugin/DatabaseAndFilePluginDeploymentTest.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/core/plugin/DatabaseAndFilePluginDeploymentTest.java
@@ -529,7 +529,7 @@ public class DatabaseAndFilePluginDeploymentTest extends AbstractEJB3Test {
pluginDup.setVersion(plugin.getVersion());
PluginDescriptor pluginDescriptor = this.testPluginDescriptors.get(pluginId);
File localPluginFile = this.testPluginFiles.get(pluginId);
- pluginMgr.registerPlugin(subjectManager.getOverlord(), pluginDup, pluginDescriptor, localPluginFile, false);
+ pluginMgr.registerPlugin(pluginDup, pluginDescriptor, localPluginFile, false);
}
return;
}
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java
index bade273..71dc3a8 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java
@@ -163,7 +163,7 @@ public class MetadataBeanTest extends AbstractEJB3Test {
SubjectManagerLocal subjectMgr = LookupUtil.getSubjectManager();
PluginManagerLocal pluginMgr = LookupUtil.getPluginManager();
- pluginMgr.registerPlugin(subjectMgr.getOverlord(), plugin, pluginDescriptor, null, true);
+ pluginMgr.registerPlugin(plugin, pluginDescriptor, null, true);
pluginIds.add(plugin.getId());
}
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/test/UpdatePluginMetadataTestBase.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/test/UpdatePluginMetadataTestBase.java
index 55f47b8..a564aca 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/test/UpdatePluginMetadataTestBase.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/test/UpdatePluginMetadataTestBase.java
@@ -190,7 +190,7 @@ public class UpdatePluginMetadataTestBase extends AbstractEJB3Test {
testPlugin.setVersion(descriptor.getVersion());
}
try {
- pluginMgr.registerPlugin(getOverlord(), testPlugin, descriptor, null, true);
+ pluginMgr.registerPlugin(testPlugin, descriptor, null, true);
} catch (Throwable t) {
t.printStackTrace();
throw new RuntimeException(t);
11 years, 11 months
[rhq] modules/enterprise
by ips
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/plugin/ProductPluginDeployer.java | 5 --
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginManagerBean.java | 22 ++++------
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginManagerLocal.java | 5 --
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/core/plugin/DatabaseAndFilePluginDeploymentTest.java | 2
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java | 2
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/test/UpdatePluginMetadataTestBase.java | 2
6 files changed, 16 insertions(+), 22 deletions(-)
New commits:
commit 5ffd188798d92b0bf455dd5b7a4766dd31f20825
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Fri Jun 1 15:18:34 2012 -0400
[BZ 827447] prevent subject session timeouts from occurring during registration of agent plugins with tons of types (e.g. the as7 plugin) (https://bugzilla.redhat.com/show_bug.cgi?id=827447)
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/plugin/ProductPluginDeployer.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/plugin/ProductPluginDeployer.java
index cf1da6b..1d674a8 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/plugin/ProductPluginDeployer.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/plugin/ProductPluginDeployer.java
@@ -41,7 +41,6 @@ import org.rhq.core.clientapi.descriptor.plugin.PluginDescriptor;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.plugin.Plugin;
import org.rhq.core.util.MessageDigestGenerator;
-import org.rhq.enterprise.server.auth.SubjectManagerLocal;
import org.rhq.enterprise.server.core.concurrency.LatchedServiceCircularityException;
import org.rhq.enterprise.server.core.concurrency.LatchedServiceController;
import org.rhq.enterprise.server.core.concurrency.LatchedServiceException;
@@ -478,9 +477,7 @@ public class ProductPluginDeployer {
// since we assume we are called in the proper deployment order, this should not fail
// if we are called when hot-deploying a plugin whose dependencies aren't deployed, this will fail
PluginManagerLocal pluginMgr = LookupUtil.getPluginManager();
- SubjectManagerLocal subjectManager = LookupUtil.getSubjectManager();
- pluginMgr.registerPlugin(subjectManager.getOverlord(), plugin, pluginDescriptor, localPluginFile,
- forceUpdate);
+ pluginMgr.registerPlugin(plugin, pluginDescriptor, localPluginFile, forceUpdate);
} catch (Exception e) {
log.error("Failed to register RHQ plugin file [" + deploymentInfo.url + "]", e);
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginManagerBean.java
index 4bc097f..09563df 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginManagerBean.java
@@ -332,21 +332,20 @@ public class PluginManagerBean implements PluginManagerLocal {
}
// Start with no transaction so we can control the transactional boundaries. This is important for a
- // few reasons. Registering the plugin and removing obsolete types are perfromed in different, subsequent,
- // transactions. The register may update types, and that locks various rows of the database. Those rows
+ // few reasons. Registering the plugin and removing obsolete types are performed in different, subsequent,
+ // transactions. The registration may update types, and that locks various rows of the database. Those rows
// must be unlocked before obsolete type removal. Type removal executes (resource) bulk delete under the covers,
// and that will deadlock with the rows locked by the type update (at least in oracle) if performed in the same
// transaction. Furthermore, as mentioned, obsolete type removal removes resources of the obsolete type. We
// need to avoid an umbrella transaction for the type removal because large inventories of obsolete resources
// will generate very large transactions. Potentially resulting in timeouts or other issues.
- @RequiredPermission(Permission.MANAGE_SETTINGS)
@TransactionAttribute(TransactionAttributeType.NEVER)
- public void registerPlugin(Subject subject, Plugin plugin, PluginDescriptor pluginDescriptor, File pluginFile,
- boolean forceUpdate) throws Exception {
- log.debug("Registering " + plugin);
+ public void registerPlugin(Plugin plugin, PluginDescriptor pluginDescriptor, File pluginFile,
+ boolean forceUpdate) throws Exception {
+ log.debug("Registering " + plugin + "...");
long startTime = System.currentTimeMillis();
- boolean newOrUpdated = pluginMgr.installPluginJar(subject, plugin, pluginDescriptor, pluginFile);
+ boolean newOrUpdated = pluginMgr.installPluginJar(plugin, pluginDescriptor, pluginFile);
boolean typesUpdated = pluginMgr.registerPluginTypes(plugin.getName(), pluginDescriptor, newOrUpdated,
forceUpdate);
@@ -365,22 +364,21 @@ public class PluginManagerBean implements PluginManagerLocal {
log.debug("Plugin [" + extPluginName
+ "] will be re-registered because it embeds types from plugin [" + plugin.getName() + "]");
pluginMgr.registerPluginTypes(extPluginName, extPluginDescriptor, false, true);
- resourceMetadataManager.removeObsoleteTypes(subject, extPluginName, metadataManager);
+ resourceMetadataManager.removeObsoleteTypes(subjectMgr.getOverlord(), extPluginName, metadataManager);
}
}
// now remove any obsolete types from the newly registered plugin
- resourceMetadataManager.removeObsoleteTypes(subject, plugin.getName(), metadataManager);
+ resourceMetadataManager.removeObsoleteTypes(subjectMgr.getOverlord(), plugin.getName(), metadataManager);
}
long endTime = System.currentTimeMillis();
log.debug("Finished registering " + plugin + " in " + (endTime - startTime) + " ms");
}
- @RequiredPermission(Permission.MANAGE_SETTINGS)
@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
- public boolean installPluginJar(Subject subject, Plugin newPlugin, PluginDescriptor pluginDescriptor,
- File pluginFile) throws Exception {
+ public boolean installPluginJar(Plugin newPlugin, PluginDescriptor pluginDescriptor, File pluginFile)
+ throws Exception {
Plugin existingPlugin = null;
boolean newOrUpdated = false;
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginManagerLocal.java
index 3ee593e..7a36305 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/metadata/PluginManagerLocal.java
@@ -122,9 +122,8 @@ public interface PluginManagerLocal {
* @param metadata The plugin descriptor file
* @param pluginFile the actual plugin file whose content will be stored in the database (will be ignored if null)
* @param forceUpdate if <code>true</code>, the plugin's types will be updated, even if the plugin hasn't changed since
- * the last time it was registered
*/
- void registerPlugin(Subject subject, Plugin plugin, PluginDescriptor metadata, File pluginFile, boolean forceUpdate)
+ void registerPlugin(Plugin plugin, PluginDescriptor metadata, File pluginFile, boolean forceUpdate)
throws Exception;
/** Exists only to for transactional boundary reasons. Not for general consumption. */
@@ -132,7 +131,7 @@ public interface PluginManagerLocal {
boolean forceUpdate) throws Exception;
/** Exists only for transactional boundary reasons. Not for general consumption. */
- boolean installPluginJar(Subject subject, Plugin newPlugin, PluginDescriptor pluginDescriptor, File pluginFile)
+ boolean installPluginJar(Plugin newPlugin, PluginDescriptor pluginDescriptor, File pluginFile)
throws Exception;
/**
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/core/plugin/DatabaseAndFilePluginDeploymentTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/core/plugin/DatabaseAndFilePluginDeploymentTest.java
index c6180fc..b8b426e 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/core/plugin/DatabaseAndFilePluginDeploymentTest.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/core/plugin/DatabaseAndFilePluginDeploymentTest.java
@@ -529,7 +529,7 @@ public class DatabaseAndFilePluginDeploymentTest extends AbstractEJB3Test {
pluginDup.setVersion(plugin.getVersion());
PluginDescriptor pluginDescriptor = this.testPluginDescriptors.get(pluginId);
File localPluginFile = this.testPluginFiles.get(pluginId);
- pluginMgr.registerPlugin(subjectManager.getOverlord(), pluginDup, pluginDescriptor, localPluginFile, false);
+ pluginMgr.registerPlugin(pluginDup, pluginDescriptor, localPluginFile, false);
}
return;
}
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java
index bade273..71dc3a8 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/MetadataBeanTest.java
@@ -163,7 +163,7 @@ public class MetadataBeanTest extends AbstractEJB3Test {
SubjectManagerLocal subjectMgr = LookupUtil.getSubjectManager();
PluginManagerLocal pluginMgr = LookupUtil.getPluginManager();
- pluginMgr.registerPlugin(subjectMgr.getOverlord(), plugin, pluginDescriptor, null, true);
+ pluginMgr.registerPlugin(plugin, pluginDescriptor, null, true);
pluginIds.add(plugin.getId());
}
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/test/UpdatePluginMetadataTestBase.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/test/UpdatePluginMetadataTestBase.java
index 55f47b8..a564aca 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/test/UpdatePluginMetadataTestBase.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/resource/metadata/test/UpdatePluginMetadataTestBase.java
@@ -190,7 +190,7 @@ public class UpdatePluginMetadataTestBase extends AbstractEJB3Test {
testPlugin.setVersion(descriptor.getVersion());
}
try {
- pluginMgr.registerPlugin(getOverlord(), testPlugin, descriptor, null, true);
+ pluginMgr.registerPlugin(testPlugin, descriptor, null, true);
} catch (Throwable t) {
t.printStackTrace();
throw new RuntimeException(t);
11 years, 11 months
[rhq] modules/enterprise
by Jay Shaughnessy
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/AutoRefreshPortletUtil.java | 5 ++++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardView.java | 3 ++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/PortalColumn.java | 2 ++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java | 4 ----
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/preferences/UserPreferences.java | 4 ++++
5 files changed, 12 insertions(+), 6 deletions(-)
New commits:
commit a4b6506d915ea2ef26ff92005c46f0d6947eee7c
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Fri Jun 1 14:33:07 2012 -0400
[Bug 827150 - Dashboard portlets left running queries in background]
There were a few issues here.
First, whenever the dash was re-built (when the refresh period changed
or a portlet was deleted, and maybe other scenarios) old portlets may have been
left with stale references, leaving them around, undrawn, but for auto-refresh
portlets, still querying the server at their refresh intervals. Note
that this happens *even when* proper destroy() calls have been made.
Second, we had protection in place not to refresh hidden portlets, but
undrawn/visible portlets (like the ones in this scenario) still refreshed. So,
I beefed up that check just to block backend queries in a similar situation.
Third, we shouldn't even have been rebuilding the dash when changing the
refresh interval, the refresh period update was already being applied to the
existing portlets. So, stopped that from happening. This may have actually solved a
different problem I've noticed, a double-rendering of the dash on he very
first login for a user. I think because we set the refresh period for
the first time.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/AutoRefreshPortletUtil.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/AutoRefreshPortletUtil.java
index 00e51ac..8f0ca51 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/AutoRefreshPortletUtil.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/AutoRefreshPortletUtil.java
@@ -38,6 +38,7 @@ public class AutoRefreshPortletUtil {
//cancel any existing timer
if (null != refreshTimer) {
refreshTimer.cancel();
+ refreshTimer = null;
}
if (refreshInterval >= MeasurementUtility.MINUTES) {
@@ -48,7 +49,9 @@ public class AutoRefreshPortletUtil {
// if the portlet is already refreshing or if the portlet is not currently on screen then
// don't bother doing the work. this protects against unnecessary or unwanted db queries
// being performed in the background.
- if (!autoRefreshPortlet.isRefreshing() && autoRefreshPortletCanvas.isVisible()) {
+ if (!autoRefreshPortlet.isRefreshing() && autoRefreshPortletCanvas.isDrawn()
+ && autoRefreshPortletCanvas.isVisible()) {
+
autoRefreshPortlet.refresh();
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardView.java
index ac85aad..6c6544c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardView.java
@@ -196,6 +196,8 @@ public class DashboardView extends LocatableVLayout {
portalLayout.destroy();
portalLayout = null;
+ portletWindows.clear();
+
buildPortlets();
}
@@ -548,7 +550,6 @@ public class DashboardView extends LocatableVLayout {
}
private void loadPortletWindows() {
-
for (int i = 0; i < storedDashboard.getColumns(); i++) {
for (DashboardPortlet storedPortlet : storedDashboard.getPortlets(i)) {
String locatorId = getPortletLocatorId(portalLayout, storedPortlet);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/PortalColumn.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/PortalColumn.java
index fcc65b4..a68c1ae 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/PortalColumn.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/PortalColumn.java
@@ -78,7 +78,9 @@ public class PortalColumn extends VStack {
@Override
public void destroy() {
+ removeFromParent();
SeleniumUtility.destroyMembers(this);
+
super.destroy();
}
}
\ No newline at end of file
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java
index a3aff3a..9c10889 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/alerts/AbstractRecentAlertsPortlet.java
@@ -116,10 +116,6 @@ public abstract class AbstractRecentAlertsPortlet extends AlertHistoryView imple
return refreshTimer;
}
- public void setRefreshTimer(Timer refreshTimer) {
- this.refreshTimer = refreshTimer;
- }
-
public PortletWindow getPortletWindow() {
return portletWindow;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/preferences/UserPreferences.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/preferences/UserPreferences.java
index 09279cd..4847085 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/preferences/UserPreferences.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/preferences/UserPreferences.java
@@ -64,8 +64,12 @@ public class UserPreferences {
private static ArrayList<String> preferencesThatShouldNotCauseRefresh;
static {
preferencesThatShouldNotCauseRefresh = new ArrayList<String>();
+ // this is auto-set while navigating around and does not affect the current page
preferencesThatShouldNotCauseRefresh.add(UserPreferenceNames.RECENT_RESOURCES);
+ // this is auto-set while navigating around and does not affect the current page
preferencesThatShouldNotCauseRefresh.add(UserPreferenceNames.RECENT_RESOURCE_GROUPS);
+ // this update is already applied to current portlets by the dashboard impl
+ preferencesThatShouldNotCauseRefresh.add(UserPreferenceNames.PAGE_REFRESH_PERIOD);
}
public UserPreferences(Subject subject) {
11 years, 11 months
[rhq] modules/plugins
by snegrea
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HornetQComponent.java | 2
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/TemplatedComponent.java | 90 ++++++
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/TemplatedSubResourcesComponent.java | 72 +++++
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ThreadPoolComponent.java | 63 ----
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ThreadsComponent.java | 56 ---
modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml | 143 +++++++---
6 files changed, 265 insertions(+), 161 deletions(-)
New commits:
commit ba758053aebffb25af2f35fab27a49ee1a942258
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Jun 1 10:11:31 2012 -0500
[BZ 826066] Path resource has now templates and a property to allow users to create all four types.
Also, updated the code for templated AS7 resources to take into account either name or type can be templated.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HornetQComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HornetQComponent.java
index a289a1a..dad90bc 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HornetQComponent.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HornetQComponent.java
@@ -30,7 +30,7 @@ import org.rhq.core.pluginapi.inventory.CreateResourceReport;
* Component class for HornetQ related stuff
* @author Heiko W. Rupp
*/
-public class HornetQComponent extends BaseComponent {
+public class HornetQComponent extends TemplatedSubResourcesComponent {
@Override
public CreateResourceReport createResource(CreateResourceReport report) {
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/TemplatedComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/TemplatedComponent.java
new file mode 100644
index 0000000..ed07a8a
--- /dev/null
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/TemplatedComponent.java
@@ -0,0 +1,90 @@
+/*
+ * RHQ Management Platform
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.modules.plugins.jbossas7;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
+import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+
+/**
+ * @author Stefan Negrea
+ *
+ */
+public class TemplatedComponent extends BaseComponent<ResourceComponent<?>> {
+
+ private final static String TYPE_CONFIGURATION = "__type";
+ private final static String NAME_CONFIGURATION = "__name";
+
+ @Override
+ public Configuration loadResourceConfiguration() throws Exception {
+ ConfigurationDefinition configDef = context.getResourceType().getResourceConfigurationDefinition();
+
+ if (configDef.getDefaultTemplate().getConfiguration().get(TYPE_CONFIGURATION) != null) {
+ //__type is a fake property, do not attempt to load it from the managed server
+ configDef.getPropertyDefinitions().remove(TYPE_CONFIGURATION);
+ ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(configDef, getASConnection(), address);
+ Configuration configuration = delegate.loadResourceConfiguration();
+
+ //manually load type based on the resource path
+ PropertySimple pathProperty = (PropertySimple) context.getPluginConfiguration().get("path");
+ String type = pathProperty.getStringValue();
+ type = type.substring(path.lastIndexOf(',') + 1, type.lastIndexOf('='));
+ configuration.put(new PropertySimple(TYPE_CONFIGURATION, type));
+
+ return configuration;
+ } else if (configDef.getDefaultTemplate().getConfiguration().get(NAME_CONFIGURATION) != null) {
+ //__name is a fake property, do not attempt to load it from the managed server
+ configDef.getPropertyDefinitions().remove(NAME_CONFIGURATION);
+ ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(configDef, getASConnection(), address);
+ Configuration configuration = delegate.loadResourceConfiguration();
+
+ //manually load name based on the resource path
+ PropertySimple pathProperty = (PropertySimple) context.getPluginConfiguration().get("path");
+ String name = pathProperty.getStringValue();
+ name = name.substring(name.lastIndexOf('=') + 1);
+ configuration.put(new PropertySimple(NAME_CONFIGURATION, name));
+
+ return configuration;
+ }
+
+ return super.loadResourceConfiguration();
+ }
+
+ @Override
+ public void updateResourceConfiguration(ConfigurationUpdateReport report) {
+ ConfigurationDefinition configDef = context.getResourceType().getResourceConfigurationDefinition();
+
+ if (configDef.getDefaultTemplate().getConfiguration().get(TYPE_CONFIGURATION) != null) {
+ //__type is a fake property, do not attempt to save it.
+ configDef.getPropertyDefinitions().remove(TYPE_CONFIGURATION);
+ report.getConfiguration().remove(TYPE_CONFIGURATION);
+ } else if (configDef.getDefaultTemplate().getConfiguration().get(NAME_CONFIGURATION) != null) {
+ //__name is a fake property, do not attempt to save it.
+ configDef.getPropertyDefinitions().remove(NAME_CONFIGURATION);
+ report.getConfiguration().remove(NAME_CONFIGURATION);
+ }
+
+ ConfigurationWriteDelegate delegate = new ConfigurationWriteDelegate(configDef, getASConnection(), address);
+ delegate.updateResourceConfiguration(report);
+ }
+}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/TemplatedSubResourcesComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/TemplatedSubResourcesComponent.java
new file mode 100644
index 0000000..0a9cf23
--- /dev/null
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/TemplatedSubResourcesComponent.java
@@ -0,0 +1,72 @@
+/*
+ * RHQ Management Platform
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.modules.plugins.jbossas7;
+
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
+import org.rhq.core.pluginapi.inventory.CreateResourceReport;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+
+/**
+ * @author Stefan Negrea
+ *
+ */
+public class TemplatedSubResourcesComponent extends BaseComponent<ResourceComponent<?>> {
+
+ private final static String TYPE_CONFIGURATION = "__type";
+ private final static String NAME_CONFIGURATION = "__name";
+
+ @Override
+ public CreateResourceReport createResource(CreateResourceReport report) {
+ if (report.getResourceConfiguration().get(TYPE_CONFIGURATION) != null) {
+ //Need to munge the report and configuration definition for with type in configuration:
+ //1) Remove type from the properties and configuration.
+ //2) Update path to the selected type.
+ ConfigurationDefinition configDef = report.getResourceType().getResourceConfigurationDefinition();
+ configDef.getPropertyDefinitions().remove(TYPE_CONFIGURATION);
+ CreateResourceDelegate delegate = new CreateResourceDelegate(configDef, getASConnection(), address);
+
+ Configuration configuration = report.getResourceConfiguration();
+ PropertySimple typeProperty = (PropertySimple) configuration.get(TYPE_CONFIGURATION);
+ configuration.remove(TYPE_CONFIGURATION);
+ report.getPluginConfiguration().put(new PropertySimple("path", typeProperty.getStringValue()));
+
+ return delegate.createResource(report);
+ } else if (report.getResourceConfiguration().get(NAME_CONFIGURATION) != null) {
+ //Need to munge the report and configuration definition for with name in configuration:
+ //1) Remove name from the properties and configuration.
+ //2) Update user specified name to the implicitly selected name.
+ ConfigurationDefinition configDef = report.getResourceType().getResourceConfigurationDefinition();
+ configDef.getPropertyDefinitions().remove(NAME_CONFIGURATION);
+ CreateResourceDelegate delegate = new CreateResourceDelegate(configDef, getASConnection(), address);
+
+ Configuration configuration = report.getResourceConfiguration();
+ PropertySimple nameProperty = (PropertySimple) configuration.get(NAME_CONFIGURATION);
+ configuration.remove(NAME_CONFIGURATION);
+ report.setUserSpecifiedResourceName(nameProperty.getStringValue());
+
+ return delegate.createResource(report);
+ } else {
+ return super.createResource(report);
+ }
+ }
+}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ThreadPoolComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ThreadPoolComponent.java
deleted file mode 100644
index 7fd478c..0000000
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ThreadPoolComponent.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright 2012, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.modules.plugins.jbossas7;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
-import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
-import org.rhq.core.pluginapi.inventory.ResourceComponent;
-
-/**
- * @author Stefan Negrea
- *
- */
-public class ThreadPoolComponent extends BaseComponent<ResourceComponent<?>> {
-
- @Override
- public Configuration loadResourceConfiguration() throws Exception {
- ConfigurationDefinition configDef = context.getResourceType().getResourceConfigurationDefinition();
- //type is a fake property, do not attempt to load it from the managed server
- configDef.getPropertyDefinitions().remove("type");
- ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(configDef, getASConnection(), address);
- Configuration configuration = delegate.loadResourceConfiguration();
-
- //manually load type based on the resource path
- PropertySimple pathProperty = (PropertySimple) context.getPluginConfiguration().get("path");
- String type = pathProperty.getStringValue();
- type = type.substring(path.lastIndexOf(',') + 1, type.lastIndexOf('='));
- configuration.put(new PropertySimple("type", type));
-
- return configuration;
- }
-
- @Override
- public void updateResourceConfiguration(ConfigurationUpdateReport report) {
- ConfigurationDefinition configDef = context.getResourceType().getResourceConfigurationDefinition();
- //type is a fake property, do not attempt to save it.
- configDef.getPropertyDefinitions().remove("type");
- ConfigurationWriteDelegate delegate = new ConfigurationWriteDelegate(configDef, getASConnection(), address);
-
- //type is a fake property, do not attempt to save it.
- report.getConfiguration().remove("type");
- delegate.updateResourceConfiguration(report);
- }
-}
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ThreadsComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ThreadsComponent.java
deleted file mode 100644
index a215398..0000000
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ThreadsComponent.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright 2012, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.modules.plugins.jbossas7;
-
-import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
-import org.rhq.core.pluginapi.inventory.CreateResourceReport;
-import org.rhq.core.pluginapi.inventory.ResourceComponent;
-
-/**
- * @author Stefan Negrea
- *
- */
-public class ThreadsComponent extends BaseComponent<ResourceComponent<?>> {
-
- @Override
- public CreateResourceReport createResource(CreateResourceReport report) {
- if (report.getResourceType().getName().equals("ThreadPool")) {
- //Need to munge the report and configuration definition for ThreadPools:
- //1) Remove type from the properties and configuration.
- //2) Update path to the selected thread pool type.
- ConfigurationDefinition configDef = report.getResourceType().getResourceConfigurationDefinition();
- configDef.getPropertyDefinitions().remove("type");
- CreateResourceDelegate delegate = new CreateResourceDelegate(configDef, getASConnection(), address);
-
- Configuration configuration = report.getResourceConfiguration();
- PropertySimple threadPoolType = (PropertySimple) configuration.get("type");
- configuration.remove("type");
- report.getPluginConfiguration().put(new PropertySimple("path", threadPoolType.getStringValue()));
-
- return delegate.createResource(report);
- } else {
- return super.createResource(report);
- }
- }
-
-}
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index dd36061..ec17e84 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -2931,7 +2931,7 @@
<service name="Threads (Managed Server)"
discovery="SubsystemDiscovery"
- class="ThreadsComponent"
+ class="TemplatedSubResourcesComponent"
singleton="true">
<plugin-configuration>
@@ -2963,8 +2963,9 @@
<service name="ThreadPool (Managed Server)"
discovery="SubsystemDiscovery"
- class="ThreadPoolComponent"
- description="A thread pool executor">
+ class="TemplatedComponent"
+ description="A thread pool executor"
+ createDeletePolicy="neither">
<plugin-configuration>
<c:simple-property name="path" readOnly="true" default="bounded-queue-thread-pool|queueless-thread-pool|scheduled-thread-pool|unbounded-queue-thread-pool"/>
@@ -2978,15 +2979,15 @@
<metric property="task-count" description="The approximate total number of tasks that have ever been scheduled for execution."/>
<resource-configuration>
- <c:map-property name="keepalive-time" readOnly="true" description="Used to specify the amount of time that pool threads should be kept running when idle; if not specified, threads will run until the executor is shut down.">
- <c:simple-property name="time" required="true" readOnly="true" type="long" description="The time"/>
- <c:simple-property name="unit" required="true" readOnly="true" type="string" description="The time unit"/>
+ <c:map-property name="keepalive-time" readOnly="false" description="Used to specify the amount of time that pool threads should be kept running when idle; if not specified, threads will run until the executor is shut down.">
+ <c:simple-property name="time" required="true" readOnly="false" type="long" description="The time"/>
+ <c:simple-property name="unit" required="true" readOnly="false" type="string" description="The time unit"/>
</c:map-property>
- <c:simple-property name="max-threads:expr" required="true" type="string" readOnly="true" displayName="Max Threads" description="The maximum thread pool size."/>
+ <c:simple-property name="max-threads:expr" required="true" type="string" readOnly="false" displayName="Max Threads" description="The maximum thread pool size."/>
<c:simple-property name="name" required="false" type="string" readOnly="true" description="The name of the thread pool."/>
- <c:simple-property name="thread-factory" required="false" type="string" readOnly="true" description="Specifies the name of a specific thread factory to use to create worker threads. If not defined an appropriate default thread factory will be used."/>
+ <c:simple-property name="thread-factory" required="false" type="string" readOnly="false" description="Specifies the name of a specific thread factory to use to create worker threads. If not defined an appropriate default thread factory will be used."/>
- <c:simple-property name="type" readOnly="true" default="scheduled-thread-pool" displayName="Thread Pool Type" description="Thread pool type">
+ <c:simple-property name="__type" readOnly="true" default="scheduled-thread-pool" displayName="Thread Pool Type" description="Thread pool type">
<c:property-options>
<c:option value="bounded-queue-thread-pool"/>
<c:option value="queueless-thread-pool"/>
@@ -2995,16 +2996,16 @@
</c:property-options>
</c:simple-property>
<c:template name="Bounded Queue Thread Pool" description="Bounded Queue Thread Pool">
- <c:simple-property name="type" readOnly="true" default="bounded-queue-thread-pool"/>
+ <c:simple-property name="__type" readOnly="true" default="bounded-queue-thread-pool"/>
</c:template>
<c:template name="Queueless Thread Pool" description="Queueless Thread Pool">
- <c:simple-property name="type" readOnly="true" default="queueless-thread-pool"/>
+ <c:simple-property name="__type" readOnly="true" default="queueless-thread-pool"/>
</c:template>
<c:template name="Scheduled Thread Pool" description="Scheduled Thread Pool">
- <c:simple-property name="type" readOnly="true" default="scheduled-thread-pool"/>
+ <c:simple-property name="__type" readOnly="true" default="scheduled-thread-pool"/>
</c:template>
<c:template name="Unbounded Queue Thread Pool" description="Unbounded Queue Thread Pool">
- <c:simple-property name="type" readOnly="true" default="unbounded-queue-thread-pool"/>
+ <c:simple-property name="__type" readOnly="true" default="unbounded-queue-thread-pool"/>
</c:template>
</resource-configuration>
</service>
@@ -4614,17 +4615,37 @@
<service name="Path (Managed Server)"
discovery="SubsystemDiscovery"
- class="BaseComponent"
- createDeletePolicy="neither"
- singleton="true">
+ class="TemplatedComponent"
+ createDeletePolicy="neither">
<plugin-configuration>
- <c:simple-property name="path" readOnly="true" default="path=journal-directory"/>
+ <c:simple-property name="path" readOnly="true" default="path"/>
</plugin-configuration>
<resource-configuration>
- <c:simple-property name="path" required="true" type="string" readOnly="false" description="The actual filesystem path. Treated as an absolute path, unless the 'relative-to' attribute is specified, in which case the value is treated as relative to that path. <p>If treated as an absolute path, the actual runtime pathname specified by the value of this attribute will be determined as follows: </p>If this value is already absolute, then the value is directly used. Otherwise the runtime pathname is resolved in a system-dependent way. On UNIX systems, a relative pathname is made absolute by resolving it against the current user directory. On Microsoft Windows systems, a relative pathname is made absolute by resolving it against the current directory of the drive named by the pathname, if any; if not, it is resolved against the current user directory."/>
- <c:simple-property name="relative-to" required="false" type="string" readOnly="false" description="The name of another previously named path, or of one of the standard paths provided by the system. If 'relative-to' is provided, the value of the 'path' attribute is treated as relative to the path specified by this attribute. The standard paths provided by the system include:<ul><li>jboss.home - the root directory of the JBoss AS distribution</li><li>user.home - user's home directory</li><li>user.dir - user's current working directory</li><li>java.home - java installation directory</li><li>jboss.server.base.dir - root directory for an individual server instance</li><li>jboss.server.data.dir - directory the server will use for persistent data file storage</li><li>jboss.server.log.dir - directory the server will use for log file storage</li><li>jboss.server.tmp.dir - directory the server will use for temporary file storage</li><li>jboss.domain.servers.dir - directory under which a host controller will create the working area for individual server instances</li></ul>"/>
+ <c:simple-property name="path" required="true" type="string" readOnly="true" description="The actual filesystem path. Treated as an absolute path, unless the 'relative-to' attribute is specified, in which case the value is treated as relative to that path. <p>If treated as an absolute path, the actual runtime pathname specified by the value of this attribute will be determined as follows: </p>If this value is already absolute, then the value is directly used. Otherwise the runtime pathname is resolved in a system-dependent way. On UNIX systems, a relative pathname is made absolute by resolving it against the current user directory. On Microsoft Windows systems, a relative pathname is made absolute by resolving it against the current directory of the drive named by the pathname, if any; if not, it is resolved against the current user directory."/>
+ <c:simple-property name="relative-to" required="false" type="string" readOnly="true" description="The name of another previously named path, or of one of the standard paths provided by the system. If 'relative-to' is provided, the value of the 'path' attribute is treated as relative to the path specified by this attribute. The standard paths provided by the system include:<ul><li>jboss.home - the root directory of the JBoss AS distribution</li><li>user.home - user's home directory</li><li>user.dir - user's current working directory</li><li>java.home - java installation directory</li><li>jboss.server.base.dir - root directory for an individual server instance</li><li>jboss.server.data.dir - directory the server will use for persistent data file storage</li><li>jboss.server.log.dir - directory the server will use for log file storage</li><li>jboss.server.tmp.dir - directory the server will use for temporary file storage</li><li>jboss.domain.servers.dir - directory under which a host controller will create the working area for individual server instances</li></ul>"/>
+
+ <c:simple-property name="__name" readOnly="true" displayName="Path Type" description="Path Type">
+ <c:property-options>
+ <c:option value="journal-directory"/>
+ <c:option value="paging-directory"/>
+ <c:option value="large-messages-directory"/>
+ <c:option value="bindings-directory"/>
+ </c:property-options>
+ </c:simple-property>
+ <c:template name="Journal Directory" description="The directory in which the message journal lives. The default is ${jboss.server.data.dir}/messaging/journal.">
+ <c:simple-property name="__name" readOnly="true" default="journal-directory"/>
+ </c:template>
+ <c:template name="Paging Directory" description="The directory where page files are stored. The default is ${jboss.server.data.dir}/messaging/paging.">
+ <c:simple-property name="__name" readOnly="true" default="paging-directory"/>
+ </c:template>
+ <c:template name="Large Messages Directory" description="The directory in which large messages are stored. The default is ${jboss.server.data.dir}/messaging/largemessages.">
+ <c:simple-property name="__name" readOnly="true" default="large-messages-directory"/>
+ </c:template>
+ <c:template name="Bindings Directory" description="The directory in which the bindings journal lives. The default is ${jboss.server.data.dir}/messaging/bindings.">
+ <c:simple-property name="__name" readOnly="true" default="bindings-directory"/>
+ </c:template>
</resource-configuration>
</service>
@@ -5729,7 +5750,7 @@
<service name="Threads (Profile)"
discovery="SubsystemDiscovery"
- class="ThreadsComponent"
+ class="TemplatedSubResourcesComponent"
singleton="true">
<plugin-configuration>
@@ -5761,7 +5782,7 @@
<service name="ThreadPool (Profile)"
discovery="SubsystemDiscovery"
- class="ThreadPoolComponent"
+ class="TemplatedComponent"
description="A thread pool executor"
createDeletePolicy="both">
@@ -5778,7 +5799,7 @@
<c:simple-property name="name" required="false" type="string" readOnly="true" description="The name of the thread pool."/>
<c:simple-property name="thread-factory" required="false" type="string" readOnly="false" description="Specifies the name of a specific thread factory to use to create worker threads. If not defined an appropriate default thread factory will be used."/>
- <c:simple-property name="type" readOnly="true" default="scheduled-thread-pool" displayName="Thread Pool Type" description="Thread pool type">
+ <c:simple-property name="__type" readOnly="true" default="scheduled-thread-pool" displayName="Thread Pool Type" description="Thread pool type">
<c:property-options>
<c:option value="bounded-queue-thread-pool"/>
<c:option value="queueless-thread-pool"/>
@@ -5787,16 +5808,16 @@
</c:property-options>
</c:simple-property>
<c:template name="Bounded Queue Thread Pool" description="Bounded Queue Thread Pool">
- <c:simple-property name="type" readOnly="true" default="bounded-queue-thread-pool"/>
+ <c:simple-property name="__type" readOnly="true" default="bounded-queue-thread-pool"/>
</c:template>
<c:template name="Queueless Thread Pool" description="Queueless Thread Pool">
- <c:simple-property name="type" readOnly="true" default="queueless-thread-pool"/>
+ <c:simple-property name="__type" readOnly="true" default="queueless-thread-pool"/>
</c:template>
<c:template name="Scheduled Thread Pool" description="Scheduled Thread Pool">
- <c:simple-property name="type" readOnly="true" default="scheduled-thread-pool"/>
+ <c:simple-property name="__type" readOnly="true" default="scheduled-thread-pool"/>
</c:template>
<c:template name="Unbounded Queue Thread Pool" description="Unbounded Queue Thread Pool">
- <c:simple-property name="type" readOnly="true" default="unbounded-queue-thread-pool"/>
+ <c:simple-property name="__type" readOnly="true" default="unbounded-queue-thread-pool"/>
</c:template>
</resource-configuration>
</service>
@@ -6659,17 +6680,37 @@
<service name="Path (Profile)"
discovery="SubsystemDiscovery"
- class="BaseComponent"
- createDeletePolicy="both"
- singleton="true">
+ class="TemplatedComponent"
+ createDeletePolicy="both">
<plugin-configuration>
- <c:simple-property name="path" readOnly="true" default="path=journal-directory"/>
+ <c:simple-property name="path" readOnly="true" default="path"/>
</plugin-configuration>
<resource-configuration>
<c:simple-property name="path" required="true" type="string" readOnly="false" description="The actual filesystem path. Treated as an absolute path, unless the 'relative-to' attribute is specified, in which case the value is treated as relative to that path. <p>If treated as an absolute path, the actual runtime pathname specified by the value of this attribute will be determined as follows: </p>If this value is already absolute, then the value is directly used. Otherwise the runtime pathname is resolved in a system-dependent way. On UNIX systems, a relative pathname is made absolute by resolving it against the current user directory. On Microsoft Windows systems, a relative pathname is made absolute by resolving it against the current directory of the drive named by the pathname, if any; if not, it is resolved against the current user directory."/>
<c:simple-property name="relative-to" required="false" type="string" readOnly="false" description="The name of another previously named path, or of one of the standard paths provided by the system. If 'relative-to' is provided, the value of the 'path' attribute is treated as relative to the path specified by this attribute. The standard paths provided by the system include:<ul><li>jboss.home - the root directory of the JBoss AS distribution</li><li>user.home - user's home directory</li><li>user.dir - user's current working directory</li><li>java.home - java installation directory</li><li>jboss.server.base.dir - root directory for an individual server instance</li><li>jboss.server.data.dir - directory the server will use for persistent data file storage</li><li>jboss.server.log.dir - directory the server will use for log file storage</li><li>jboss.server.tmp.dir - directory the server will use for temporary file storage</li><li>jboss.domain.servers.dir - directory under which a host controller will create the working area for individual server instances</li></ul>"/>
+
+ <c:simple-property name="__name" readOnly="true" displayName="Path Type" description="Path Type">
+ <c:property-options>
+ <c:option value="journal-directory"/>
+ <c:option value="paging-directory"/>
+ <c:option value="large-messages-directory"/>
+ <c:option value="bindings-directory"/>
+ </c:property-options>
+ </c:simple-property>
+ <c:template name="Journal Directory" description="The directory in which the message journal lives. The default is ${jboss.server.data.dir}/messaging/journal.">
+ <c:simple-property name="__name" readOnly="true" default="journal-directory"/>
+ </c:template>
+ <c:template name="Paging Directory" description="The directory where page files are stored. The default is ${jboss.server.data.dir}/messaging/paging.">
+ <c:simple-property name="__name" readOnly="true" default="paging-directory"/>
+ </c:template>
+ <c:template name="Large Messages Directory" description="The directory in which large messages are stored. The default is ${jboss.server.data.dir}/messaging/largemessages.">
+ <c:simple-property name="__name" readOnly="true" default="large-messages-directory"/>
+ </c:template>
+ <c:template name="Bindings Directory" description="The directory in which the bindings journal lives. The default is ${jboss.server.data.dir}/messaging/bindings.">
+ <c:simple-property name="__name" readOnly="true" default="bindings-directory"/>
+ </c:template>
</resource-configuration>
</service>
@@ -10569,7 +10610,7 @@
<service name="Threads"
discovery="SubsystemDiscovery"
- class="ThreadsComponent"
+ class="TemplatedSubResourcesComponent"
singleton="true">
<runs-inside>
@@ -10605,7 +10646,7 @@
<service name="ThreadPool"
discovery="SubsystemDiscovery"
- class="ThreadPoolComponent"
+ class="TemplatedComponent"
description="A thread pool executor"
createDeletePolicy="both">
@@ -10629,7 +10670,7 @@
<c:simple-property name="name" required="false" type="string" readOnly="true" description="The name of the thread pool."/>
<c:simple-property name="thread-factory" required="false" type="string" readOnly="false" description="Specifies the name of a specific thread factory to use to create worker threads. If not defined an appropriate default thread factory will be used."/>
- <c:simple-property name="type" readOnly="true" default="scheduled-thread-pool" displayName="Thread Pool Type" description="Thread pool type">
+ <c:simple-property name="__type" readOnly="true" default="scheduled-thread-pool" displayName="Thread Pool Type" description="Thread pool type">
<c:property-options>
<c:option value="bounded-queue-thread-pool"/>
<c:option value="queueless-thread-pool"/>
@@ -10638,16 +10679,16 @@
</c:property-options>
</c:simple-property>
<c:template name="Bounded Queue Thread Pool" description="Bounded Queue Thread Pool">
- <c:simple-property name="type" readOnly="true" default="bounded-queue-thread-pool"/>
+ <c:simple-property name="__type" readOnly="true" default="bounded-queue-thread-pool"/>
</c:template>
<c:template name="Queueless Thread Pool" description="Queueless Thread Pool">
- <c:simple-property name="type" readOnly="true" default="queueless-thread-pool"/>
+ <c:simple-property name="__type" readOnly="true" default="queueless-thread-pool"/>
</c:template>
<c:template name="Scheduled Thread Pool" description="Scheduled Thread Pool">
- <c:simple-property name="type" readOnly="true" default="scheduled-thread-pool"/>
+ <c:simple-property name="__type" readOnly="true" default="scheduled-thread-pool"/>
</c:template>
<c:template name="Unbounded Queue Thread Pool" description="Unbounded Queue Thread Pool">
- <c:simple-property name="type" readOnly="true" default="unbounded-queue-thread-pool"/>
+ <c:simple-property name="__type" readOnly="true" default="unbounded-queue-thread-pool"/>
</c:template>
</resource-configuration>
</service>
@@ -12674,17 +12715,37 @@
<service name="Path"
discovery="SubsystemDiscovery"
- class="BaseComponent"
- createDeletePolicy="both"
- singleton="true">
+ class="TemplatedComponent"
+ createDeletePolicy="both">
<plugin-configuration>
- <c:simple-property name="path" readOnly="true" default="path=journal-directory"/>
+ <c:simple-property name="path" readOnly="true" default="path"/>
</plugin-configuration>
<resource-configuration>
<c:simple-property name="path" required="true" type="string" readOnly="false" description="The actual filesystem path. Treated as an absolute path, unless the 'relative-to' attribute is specified, in which case the value is treated as relative to that path. <p>If treated as an absolute path, the actual runtime pathname specified by the value of this attribute will be determined as follows: </p>If this value is already absolute, then the value is directly used. Otherwise the runtime pathname is resolved in a system-dependent way. On UNIX systems, a relative pathname is made absolute by resolving it against the current user directory. On Microsoft Windows systems, a relative pathname is made absolute by resolving it against the current directory of the drive named by the pathname, if any; if not, it is resolved against the current user directory."/>
<c:simple-property name="relative-to" required="false" type="string" readOnly="false" description="The name of another previously named path, or of one of the standard paths provided by the system. If 'relative-to' is provided, the value of the 'path' attribute is treated as relative to the path specified by this attribute. The standard paths provided by the system include:<ul><li>jboss.home - the root directory of the JBoss AS distribution</li><li>user.home - user's home directory</li><li>user.dir - user's current working directory</li><li>java.home - java installation directory</li><li>jboss.server.base.dir - root directory for an individual server instance</li><li>jboss.server.data.dir - directory the server will use for persistent data file storage</li><li>jboss.server.log.dir - directory the server will use for log file storage</li><li>jboss.server.tmp.dir - directory the server will use for temporary file storage</li><li>jboss.domain.servers.dir - directory under which a host controller will create the working area for individual server instances</li></ul>"/>
+
+ <c:simple-property name="__name" readOnly="true" displayName="Path Type" description="Path Type">
+ <c:property-options>
+ <c:option value="journal-directory"/>
+ <c:option value="paging-directory"/>
+ <c:option value="large-messages-directory"/>
+ <c:option value="bindings-directory"/>
+ </c:property-options>
+ </c:simple-property>
+ <c:template name="Journal Directory" description="The directory in which the message journal lives. The default is ${jboss.server.data.dir}/messaging/journal.">
+ <c:simple-property name="__name" readOnly="true" default="journal-directory"/>
+ </c:template>
+ <c:template name="Paging Directory" description="The directory where page files are stored. The default is ${jboss.server.data.dir}/messaging/paging.">
+ <c:simple-property name="__name" readOnly="true" default="paging-directory"/>
+ </c:template>
+ <c:template name="Large Messages Directory" description="The directory in which large messages are stored. The default is ${jboss.server.data.dir}/messaging/largemessages.">
+ <c:simple-property name="__name" readOnly="true" default="large-messages-directory"/>
+ </c:template>
+ <c:template name="Bindings Directory" description="The directory in which the bindings journal lives. The default is ${jboss.server.data.dir}/messaging/bindings.">
+ <c:simple-property name="__name" readOnly="true" default="bindings-directory"/>
+ </c:template>
</resource-configuration>
</service>
11 years, 11 months
[rhq] modules/enterprise
by Jiri Kremser
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertDetailsView.java | 8 ++++++++
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties | 4 +++-
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties | 5 +++--
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties | 4 +++-
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties | 4 +++-
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties | 4 +++-
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties | 2 ++
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties | 2 ++
8 files changed, 27 insertions(+), 6 deletions(-)
New commits:
commit 965b7d821a28dde377e2696236ffdd1808883cea
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Fri Jun 1 13:44:11 2012 +0200
[BZ 805503 - Recently triggered alerts report does not show resource in details view] Resource name and resource ancestry form fields have been added.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertDetailsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertDetailsView.java
index 361be3c..296b22e 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertDetailsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertDetailsView.java
@@ -183,6 +183,14 @@ public class AlertDetailsView extends LocatableVLayout implements BookmarkableVi
StaticTextItem recoveryItem = new StaticTextItem("recovery", MSG.view_alert_details_field_recovery_info());
recoveryItem.setValue(record.getAttribute("recoveryInfo"));
items.add(recoveryItem);
+
+ StaticTextItem resourceItem = new StaticTextItem("resourceName", MSG.view_alert_details_field_watched_resource());
+ resourceItem.setValue(record.getAttribute("resourceName"));
+ items.add(resourceItem);
+
+ StaticTextItem resourceAncestryItem = new StaticTextItem("resourceAncestry", MSG.view_alert_details_field_resource_ancestry());
+ resourceAncestryItem.setValue(record.getAttribute("resourceAncestry"));
+ items.add(resourceAncestryItem);
form.setItems(items.toArray(new FormItem[items.size()]));
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 eeeefb0..d1a9b90 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
@@ -922,6 +922,8 @@ view_alert_definitions_update_success = Alert definition successfully updated
view_alert_details_field_ack_at = Acknowledged at
view_alert_details_field_ack_by = Acknowledged by
view_alert_details_field_recovery_info = Recovery Info
+view_alert_details_field_resource_ancestry = Resource Ancestry
+view_alert_details_field_watched_resource = Watched Resource
view_alert_details_loadFailed = Failed to fetch alert details
view_alerts_ack_confirm = Acknowledge the selected alert(s)?
view_alerts_ack_confirm_all = Acknowledge all alerts from this source?
@@ -2016,8 +2018,8 @@ widget_resourceFactoryWizard_infoStepName = Resource Information
widget_resourceFactoryWizard_infoStep_loadFail = Failed to get available Architectures
widget_resourceFactoryWizard_namePrompt = New Resource Name
widget_resourceFactoryWizard_templatePrompt = Connection Settings Template
-widget_resourceFactoryWizard_timeoutHelp = A timeout duration. If specified will override the default timeout for child resource creation (on the {0} Agent). The default timeout is set to 60 seconds. Useful for particularly long create actions, like deployment of a large application. Usually used if a previous attempt suffered a timeout failure.
widget_resourceFactoryWizard_timeoutFailure = Timed out. Note that it is possible that the deployment may still succeed.
+widget_resourceFactoryWizard_timeoutHelp = A timeout duration. If specified will override the default timeout for child resource creation (on the {0} Agent). The default timeout is set to 60 seconds. Useful for particularly long create actions, like deployment of a large application. Usually used if a previous attempt suffered a timeout failure.
widget_resourceFactoryWizard_uploadFailure = Failed to upload file
widget_resourceFactoryWizard_uploadFileStepName = Upload Resource Content File
widget_resourceFactoryWizard_uploadInProgress = The upload is in progress... This can take several minutes to complete for large distribution files.
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
index 8797465..88b9e87 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
@@ -18,7 +18,6 @@
# * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# */
#
-
# suppress inspection "UnusedProperty" for whole file
#
# RHQ GUI i18n Messages - Locale: CS
@@ -941,6 +940,8 @@ view_alert_definitions_update_success = Úspěšně změněna definice výstrahy
view_alert_details_field_ack_at = Potvrzeno v
view_alert_details_field_ack_by = Potvrzeno kým
view_alert_details_field_recovery_info = Informace o obnově
+view_alert_details_field_resource_ancestry = Původ zdroje
+view_alert_details_field_watched_resource = Sledovaný zdroj
view_alert_details_loadFailed = Nepodařilo se načíst výstrahy
view_alerts_ack_confirm = Potvrdit vybrané výstrahy?
view_alerts_ack_confirm_all = Potvrdit všechny výstrahy tohoto zdroje?
@@ -2035,8 +2036,8 @@ widget_resourceFactoryWizard_infoStepName = Informace o zdroji
widget_resourceFactoryWizard_infoStep_loadFail = Nepodařilo se získat dostupné architektury
widget_resourceFactoryWizard_namePrompt = Nové jméno zdroje
widget_resourceFactoryWizard_templatePrompt = Šablona pro nastavení připojení
-##widget_resourceFactoryWizard_timeoutHelp = A timeout duration. If specified will override the default timeout for child resource creation (on the {0} Agent). The default timeout is set to 60 seconds. Useful for particularly long create actions, like deployment of a large application. Usually used if a previous attempt suffered a timeout failure.
##widget_resourceFactoryWizard_timeoutFailure = Timed out. Note that it is possible that the deployment may still succeed.
+##widget_resourceFactoryWizard_timeoutHelp = A timeout duration. If specified will override the default timeout for child resource creation (on the {0} Agent). The default timeout is set to 60 seconds. Useful for particularly long create actions, like deployment of a large application. Usually used if a previous attempt suffered a timeout failure.
widget_resourceFactoryWizard_uploadFailure = Nepodařilo se nahrát soubor
widget_resourceFactoryWizard_uploadFileStepName = Nahrát obsah souboru zdroje
widget_resourceFactoryWizard_uploadInProgress = Upload právě probíhá... Může to trvat několik minut.
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 e47bcdb..cfde9eb 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
@@ -803,6 +803,8 @@ view_alert_definitions_update_success = Alarm-Definition erfolgreich aktualisier
view_alert_details_field_ack_at = Bestätigt um
view_alert_details_field_ack_by = Bestätigt durch
view_alert_details_field_recovery_info = Info zur Erholung
+##view_alert_details_field_resource_ancestry = Resource Ancestry
+##view_alert_details_field_watched_resource = Watched Resource
view_alert_details_loadFailed = Laden der Details für den Alarm fehlgeschlagen
view_alerts_ack_confirm = Die ausgewählten Alarme bestätigen?
view_alerts_ack_confirm_all = Alle Alarme dieser Quelle bestätigen?
@@ -1777,8 +1779,8 @@ widget_resourceFactoryWizard_infoStepName = Information über die Ressource
widget_resourceFactoryWizard_infoStep_loadFail = Konnte die verfügbaren Architekturen nicht ermitteln
widget_resourceFactoryWizard_namePrompt = Name der neuen Ressource
widget_resourceFactoryWizard_templatePrompt = Vorlage für die Verbindungseinstellungen
-widget_resourceFactoryWizard_uploadFailure = Konnte die Datei nicht hochladen
##widget_resourceFactoryWizard_timeoutHelp = A timeout duration. If specified will override the default timeout for child resource creation (on the {0} Agent). The default timeout is set to 60 seconds. Useful for particularly long create actions, like deployment of a large application. Usually used if a previous attempt suffered a timeout failure.
+widget_resourceFactoryWizard_uploadFailure = Konnte die Datei nicht hochladen
###widget_resourceFactoryWizard_timeoutFailure = Timed out. Note that it is possible that the deployment may still succeed.
##widget_resourceFactoryWizard_uploadFileStepName = Upload Resource Content File
##widget_resourceFactoryWizard_uploadInProgress = The upload is in progress... This can take several minutes to complete for large distribution files.
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 ee72bd8..b5bc116 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
@@ -916,6 +916,8 @@ view_alert_definitions_update_success = アラート定義の更新に成功し
view_alert_details_field_ack_at = 次の場所で確認済みです
view_alert_details_field_ack_by = 次の人によって確認済みです
view_alert_details_field_recovery_info = リカバリ情報
+##view_alert_details_field_resource_ancestry = Resource Ancestry
+##view_alert_details_field_watched_resource = Watched Resource
view_alert_details_loadFailed = アラートの詳細を取り出すのに失敗しました
view_alerts_ack_confirm = 選択されたアラートを確認しますか?
view_alerts_ack_confirm_all = このソースからすべてのアラートを確認しますか?
@@ -2005,8 +2007,8 @@ widget_resourceFactoryWizard_infoStepName = リソース情報
widget_resourceFactoryWizard_infoStep_loadFail = アーキテクチャーを利用可能にするのに失敗しました
widget_resourceFactoryWizard_namePrompt = 新規リソース名
widget_resourceFactoryWizard_templatePrompt = コネクション設定テンプレート
-##widget_resourceFactoryWizard_timeoutHelp = A timeout duration. If specified will override the default timeout for child resource creation (on the {0} Agent). The default timeout is set to 60 seconds. Useful for particularly long create actions, like deployment of a large application. Usually used if a previous attempt suffered a timeout failure.
###widget_resourceFactoryWizard_timeoutFailure = Timed out. Note that it is possible that the deployment may still succeed.
+##widget_resourceFactoryWizard_timeoutHelp = A timeout duration. If specified will override the default timeout for child resource creation (on the {0} Agent). The default timeout is set to 60 seconds. Useful for particularly long create actions, like deployment of a large application. Usually used if a previous attempt suffered a timeout failure.
widget_resourceFactoryWizard_uploadFailure = ファイルアップロードの失敗
widget_resourceFactoryWizard_uploadFileStepName = リソースコンテントファイルのアップロード
widget_resourceFactoryWizard_uploadInProgress = アップロードは処理中です... 大きなファイルを配布するには数分かかることもあります。
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 c8afbd8..91345f5 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
@@ -923,6 +923,8 @@ view_alert_details_breadcrumb = Detalhes
view_alert_details_field_ack_at = Verificado em
view_alert_details_field_ack_by = Verificado por
view_alert_details_field_recovery_info = Informa\u00E7\u00E3o de Recupera\u00E7\u00E3o
+##view_alert_details_field_resource_ancestry = Resource Ancestry
+##view_alert_details_field_watched_resource = Watched Resource
view_alert_details_loadFailed = Falha ao recuperar detalhes do alerta
view_alerts_ack_confirm = Confirma o(s) alerta(s) selecionado(s)?
view_alerts_ack_confirm_all = Confirma todos os alertas?
@@ -2118,8 +2120,8 @@ widget_resourceFactoryWizard_infoStepName = Informa\u00E7\u00E3o do Recurso
widget_resourceFactoryWizard_infoStep_loadFail = Falha ao recuperar Arquiteturas dispon\u00EDveis.
widget_resourceFactoryWizard_namePrompt = Novo Nome do Recurso
widget_resourceFactoryWizard_templatePrompt = Modelo de Propriedades para Conex\u00E3o
-##widget_resourceFactoryWizard_timeoutHelp = A timeout duration. If specified will override the default timeout for child resource creation (on the {0} Agent). The default timeout is set to 60 seconds. Useful for particularly long create actions, like deployment of a large application. Usually used if a previous attempt suffered a timeout failure.
##widget_resourceFactoryWizard_timeoutFailure = Timed out. Note that it is possible that the deployment may still succeed.
+##widget_resourceFactoryWizard_timeoutHelp = A timeout duration. If specified will override the default timeout for child resource creation (on the {0} Agent). The default timeout is set to 60 seconds. Useful for particularly long create actions, like deployment of a large application. Usually used if a previous attempt suffered a timeout failure.
widget_resourceFactoryWizard_uploadFailure = Falha ao realizar o upload do arquivo
widget_resourceFactoryWizard_uploadFileStepName = Upload do Arquivo do Recurso
widget_resourceFactoryWizard_uploadInProgress = Upload em andamento... Esse processo pode demorar alguns minutos para ser finalizado em caso de arquivos muito grandes.
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
index 2692287..361f831 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
@@ -2445,5 +2445,7 @@ view_admin_downloads_cli_link_value = Загрузить CLI {0} ({1})
view_admin_downloads_cli_loadError = Не удалось получить версию CLI
view_admin_downloads_cli_md5 = CLI MD5
view_admin_downloads_cli_version = Версия CLI
+##view_alert_details_field_resource_ancestry = Resource Ancestry
+##view_alert_details_field_watched_resource = Watched Resource
##view_bundle_revertWizard_getInfoStep_revertDeployDescFull = [REVERT From] {0} [REVERT To] {1}
##view_messageCenter_messageRootCause = Root Cause
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 9453ba2..08e15fd 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
@@ -910,6 +910,8 @@ view_alert_definitions_update_success = \u544a\u8b66\u5b9a\u4e49\u66f4\u65b0\u62
view_alert_details_field_ack_at = \u786e\u8ba4\u4e8e
view_alert_details_field_ack_by = \u786e\u8ba4\u8005
view_alert_details_field_recovery_info = \u8fd8\u539f\u4fe1\u606f
+##view_alert_details_field_resource_ancestry = Resource Ancestry
+##view_alert_details_field_watched_resource = Watched Resource
view_alert_details_loadFailed = \u53d6\u5f97\u544a\u8b66\u8be6\u60c5\u5931\u8d25
view_alerts_ack_confirm = \u786e\u8ba4\u9009\u62e9\u7684\u544a\u8b66(s)?
view_alerts_ack_confirm_all = \u4ece\u8fd9\u4e2a\u6e90\u4e0a\u786e\u8ba4\u6240\u6709\u544a\u8b66?
11 years, 11 months
[rhq] etc/rhq-ircBot
by ips
etc/rhq-ircBot/pom.xml | 81 +++++
etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBot.java | 136 ++++++++++
2 files changed, 217 insertions(+)
New commits:
commit b80b3c15a5912d5edf8b6b15d91a74accbbf63dc
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Thu May 31 22:25:14 2012 -0400
an IRC bot for #rhq
diff --git a/etc/rhq-ircBot/pom.xml b/etc/rhq-ircBot/pom.xml
new file mode 100644
index 0000000..c747084
--- /dev/null
+++ b/etc/rhq-ircBot/pom.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0"?>
+
+<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>
+
+ <groupId>org.rhq.etc</groupId>
+ <artifactId>rhq-ircbot</artifactId>
+ <version>1.0</version>
+ <packaging>jar</packaging>
+
+ <name>RHQ IRC Bot</name>
+ <description>an IRC bot for doing helpful stuff on the Freenode #rhq channel</description>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.pircbotx</groupId>
+ <artifactId>pircbotx</artifactId>
+ <version>1.7</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.j2bugzilla</groupId>
+ <artifactId>j2bugzilla</artifactId>
+ <version>2.0</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.5</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ <verbose>true</verbose>
+ <proc>none</proc>
+ <!-- disable annotation processing -->
+ <showWarnings>true</showWarnings>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <descriptorRefs>
+ <descriptorRef>jar-with-dependencies</descriptorRef>
+ </descriptorRefs>
+ <archive>
+ <manifest>
+ <mainClass>org.rhq.etc.ircbot.RhqIrcBot</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <!-- this is used for inheritance merges -->
+ <phase>package</phase>
+ <!-- bind to the packaging phase -->
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+
+
+ </build>
+
+</project>
+
diff --git a/etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBot.java b/etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBot.java
new file mode 100644
index 0000000..681707c
--- /dev/null
+++ b/etc/rhq-ircBot/src/main/java/org/rhq/etc/ircbot/RhqIrcBot.java
@@ -0,0 +1,136 @@
+package org.rhq.etc.ircbot;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import com.j2bugzilla.base.Bug;
+import com.j2bugzilla.base.BugzillaConnector;
+import com.j2bugzilla.base.BugzillaException;
+import com.j2bugzilla.rpc.GetBug;
+
+import org.apache.xmlrpc.XmlRpcException;
+import org.pircbotx.PircBotX;
+import org.pircbotx.User;
+import org.pircbotx.hooks.ListenerAdapter;
+import org.pircbotx.hooks.events.DisconnectEvent;
+import org.pircbotx.hooks.events.MessageEvent;
+
+/**
+ * An IRC bot for doing helpful stuff on the Freenode #rhq channel.
+ *
+ * @author Ian Springer
+ */
+public class RhqIrcBot extends ListenerAdapter {
+
+ private static final Pattern BUG_PATTERN = Pattern.compile("(?i)(bz|bug)[ ]*(\\d{6,7})");
+
+ private static final Set<String> JON_DEVS = new HashSet<String>();
+ static {
+ JON_DEVS.add("ccrouch");
+ JON_DEVS.add("ips");
+ JON_DEVS.add("jkremser");
+ JON_DEVS.add("jsanda");
+ JON_DEVS.add("jshaughn");
+ JON_DEVS.add("lkrejci");
+ JON_DEVS.add("mazz");
+ JON_DEVS.add("mtho11");
+ JON_DEVS.add("pilhuhn");
+ JON_DEVS.add("spinder");
+ JON_DEVS.add("stefan_n");
+ }
+
+ private BugzillaConnector bzConnector = new BugzillaConnector();
+ private Map<Integer, Long> bugLogTimestamps = new HashMap<Integer, Long>();
+
+ @Override
+ public void onMessage(MessageEvent event) throws Exception {
+ String message = event.getMessage();
+
+ Matcher bugMatcher = BUG_PATTERN.matcher(message);
+ while (bugMatcher.find()) {
+ int bugId = Integer.valueOf(bugMatcher.group(2));
+ GetBug getBug = new GetBug(bugId);
+ try {
+ bzConnector.executeMethod(getBug);
+ } catch (Exception e) {
+ bzConnector = new BugzillaConnector();
+ bzConnector.connectTo("https://bugzilla.redhat.com");
+ try {
+ bzConnector.executeMethod(getBug);
+ } catch (BugzillaException e1) {
+ //e1.printStackTrace();
+ Throwable cause = e1.getCause();
+ String details = (cause instanceof XmlRpcException) ? cause.getMessage() : e1.getMessage();
+ event.getBot().sendMessage(event.getChannel(), "Failed to access BZ " + bugId + ": " + details);
+ continue;
+ }
+ }
+ Bug bug = getBug.getBug();
+ if (bug != null) {
+ String product = bug.getProduct();
+ if (product.equals("RHQ Project")) {
+ product = "RHQ";
+ } else if (product.equals("JBoss Operations Network")) {
+ product = "JON";
+ }
+ Long timestamp = bugLogTimestamps.get(bugId);
+ if ((timestamp == null) || ((System.currentTimeMillis() - timestamp) > (5 * 60 * 1000L))) {
+ event.getBot().sendMessage(event.getChannel(), "BZ " + bugId + " [product=" + product
+ + ", priority=" + bug.getPriority() + ", status=" + bug.getStatus() + "] "
+ + bug.getSummary() + " [ https://bugzilla.redhat.com/" + bugId + " ]");
+ }
+ bugLogTimestamps.put(bugId, System.currentTimeMillis());
+ } else {
+ event.getBot().sendMessage(event.getChannel(), "BZ " + bugId + " does not exist.");
+ }
+ }
+
+ if (message.matches(".*\\b(jon-team|jboss-on-team)\\b.*")) {
+ Set<User> users = event.getBot().getUsers(event.getChannel());
+ StringBuilder presentJonDevs = new StringBuilder();
+ for (User user : users) {
+ String nick = user.getNick();
+ if (JON_DEVS.contains(nick) && !nick.equals(event.getUser().getNick())) {
+ presentJonDevs.append(nick).append(' ');
+ }
+ }
+ event.getBot().sendMessage(event.getChannel(), presentJonDevs + ": see message from "
+ + event.getUser().getNick() + " above");
+ }
+ }
+
+ @Override
+ public void onDisconnect(DisconnectEvent disconnectEvent) throws Exception {
+ boolean connected = false;
+ while (!connected) {
+ Thread.sleep(60 * 1000L); // 1 minute
+ try {
+ disconnectEvent.getBot().reconnect();
+ connected = true;
+ } catch (Exception e) {
+ // ignore
+ }
+ }
+ }
+
+ public static void main(String[] args) throws Exception {
+ PircBotX bot = new PircBotX();
+
+ bot.setName("rhq-bot");
+ bot.setVersion("1.0");
+ bot.setFinger("#rhq IRC bot (source code in RHQ git under etc/rhq-ircBot/)");
+
+ bot.setVerbose(true);
+ bot.getListenerManager().addListener(new RhqIrcBot());
+ bot.setSocketTimeout(1 * 60 * 1000); // 1 minute
+
+ // TODO: Try other Freenode IRC servers if this one is down.
+ bot.connect("irc.freenode.net");
+ bot.joinChannel("#rhq");
+ }
+
+}
11 years, 11 months
[rhq] Branch 'release/jon3.1.x' - modules/plugins
by ips
modules/plugins/jboss-as-7/pom.xml | 16 ++++++++++
modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/AbstractServerComponentTest.java | 1
2 files changed, 17 insertions(+)
New commits:
commit 816768035d02f4a350e448cc7e3aeddeccf9bbc6
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Thu May 31 21:05:14 2012 -0400
add support for running AS7 itests against EAP 6.0 CR1
(cherry picked from commit 8f9015478b2fe9855111d0d4f0dce1c2dbb62cd1)
diff --git a/modules/plugins/jboss-as-7/pom.xml b/modules/plugins/jboss-as-7/pom.xml
index c690ee1..8b4a086 100644
--- a/modules/plugins/jboss-as-7/pom.xml
+++ b/modules/plugins/jboss-as-7/pom.xml
@@ -319,6 +319,22 @@
</properties>
</profile>
+ <profile>
+ <id>eap600CR1.itest.setup</id>
+
+ <activation>
+ <property>
+ <name>as7.version</name>
+ <value>6.0.0.CR1</value>
+ </property>
+ </activation>
+
+ <properties>
+ <as7.url>Please set the as7.url system property to the location of the EAP ${as7.version} distribution zipfile.</as7.url>
+ <jboss-as-arquillian-container-managed.version>7.1.1.Final</jboss-as-arquillian-container-managed.version>
+ </properties>
+ </profile>
+
<!-- Activate this profile to run the integration tests (these can take a while to complete). -->
<!-- activate with -Das7.itest. See also http://rhq-project.org/display/RHQ/Notes#Notes-IntegrationTests -->
<profile>
diff --git a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/AbstractServerComponentTest.java b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/AbstractServerComponentTest.java
index 0ce32c7..a1e26e2 100644
--- a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/AbstractServerComponentTest.java
+++ b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/AbstractServerComponentTest.java
@@ -67,6 +67,7 @@ public abstract class AbstractServerComponentTest extends AbstractJBossAS7Plugin
EAP6_VERSION_TO_AS7_VERSION_MAP.put("6.0.0.ER6", "7.1.1.Final-redhat-1");
EAP6_VERSION_TO_AS7_VERSION_MAP.put("6.0.0.ER7", "7.1.1.Final-redhat-1");
EAP6_VERSION_TO_AS7_VERSION_MAP.put("6.0.0.ER8", "7.1.2.Final-redhat-1");
+ EAP6_VERSION_TO_AS7_VERSION_MAP.put("6.0.0.CR1", "7.1.2.Final-redhat-1");
}
private static final String RELEASE_VERSION_TRAIT_NAME = "_skm:release-version";
11 years, 11 months
[rhq] modules/plugins
by ips
modules/plugins/jboss-as-7/pom.xml | 16 ++++++++++
modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/AbstractServerComponentTest.java | 1
2 files changed, 17 insertions(+)
New commits:
commit 8f9015478b2fe9855111d0d4f0dce1c2dbb62cd1
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Thu May 31 21:05:14 2012 -0400
add support for running AS7 itests against EAP 6.0 CR1
diff --git a/modules/plugins/jboss-as-7/pom.xml b/modules/plugins/jboss-as-7/pom.xml
index 31a4c3b..e9f877a 100644
--- a/modules/plugins/jboss-as-7/pom.xml
+++ b/modules/plugins/jboss-as-7/pom.xml
@@ -319,6 +319,22 @@
</properties>
</profile>
+ <profile>
+ <id>eap600CR1.itest.setup</id>
+
+ <activation>
+ <property>
+ <name>as7.version</name>
+ <value>6.0.0.CR1</value>
+ </property>
+ </activation>
+
+ <properties>
+ <as7.url>Please set the as7.url system property to the location of the EAP ${as7.version} distribution zipfile.</as7.url>
+ <jboss-as-arquillian-container-managed.version>7.1.1.Final</jboss-as-arquillian-container-managed.version>
+ </properties>
+ </profile>
+
<!-- Activate this profile to run the integration tests (these can take a while to complete). -->
<!-- activate with -Das7.itest. See also http://rhq-project.org/display/RHQ/Notes#Notes-IntegrationTests -->
<profile>
diff --git a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/AbstractServerComponentTest.java b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/AbstractServerComponentTest.java
index 0ce32c7..a1e26e2 100644
--- a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/AbstractServerComponentTest.java
+++ b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/itest/AbstractServerComponentTest.java
@@ -67,6 +67,7 @@ public abstract class AbstractServerComponentTest extends AbstractJBossAS7Plugin
EAP6_VERSION_TO_AS7_VERSION_MAP.put("6.0.0.ER6", "7.1.1.Final-redhat-1");
EAP6_VERSION_TO_AS7_VERSION_MAP.put("6.0.0.ER7", "7.1.1.Final-redhat-1");
EAP6_VERSION_TO_AS7_VERSION_MAP.put("6.0.0.ER8", "7.1.2.Final-redhat-1");
+ EAP6_VERSION_TO_AS7_VERSION_MAP.put("6.0.0.CR1", "7.1.2.Final-redhat-1");
}
private static final String RELEASE_VERSION_TRAIT_NAME = "_skm:release-version";
11 years, 11 months