modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/SubsystemDiscovery.java
| 42 +++
modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
| 110 ----------
2 files changed, 47 insertions(+), 105 deletions(-)
New commits:
commit 0b46807f2c0ca12cc33b9da3c0c8daf02e8fde4d
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Tue May 29 22:50:31 2012 +0200
BZ 825818 . Suppress AS7-ISPN type if JDG is deployed. Also remove JDG types from
AS7-descriptor (cherry picked from commit c52b96d)
diff --git
a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/SubsystemDiscovery.java
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/SubsystemDiscovery.java
index 4db21ba..c6f22b4 100644
---
a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/SubsystemDiscovery.java
+++
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/SubsystemDiscovery.java
@@ -31,6 +31,7 @@ import org.codehaus.jackson.map.ObjectMapper;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
@@ -84,6 +85,11 @@ public class SubsystemDiscovery implements
ResourceDiscoveryComponent<BaseCompon
lookForChildren = true;
}
+ if (isIspnForJDG(context, confPath)) {
+ log.debug("We have JDG as child, ignoring the {JBossAS7}Infinispan
type");
+ return details;
+ }
+
// Construct the full path including the parent
String path;
String parentPath = parentComponent.getPath();
@@ -183,4 +189,40 @@ public class SubsystemDiscovery implements
ResourceDiscoveryComponent<BaseCompon
return details;
}
+ private boolean isIspnForJDG(ResourceDiscoveryContext<BaseComponent<?>>
context, String confPath) {
+
+ // Check if this is ISPN
+ if (!"subsystem=infinispan".equals(confPath))
+ return false;
+
+ ResourceType ourType = context.getResourceType();
+ if (ourType.getPlugin().equals("JDG"))
+ return false;
+
+ if (!ourType.getName().equals("Infinispan"))
+ return false;
+
+ // So we are {JBossAS7}Infinispan
+ Set<ResourceType> parentTypes = ourType.getParentResourceTypes();
+ ResourceType parent = null;
+ for (ResourceType type : parentTypes) {
+ if (type.getName().equals("JBossAS7 Standalone Server") &&
type.getPlugin().equals("JBossAS7")) {
+ parent = type;
+ break;
+ }
+ }
+ if (parent==null)
+ return false;
+
+ // So we are as7/eap and need to check now if we have a JDG plugin's ISPN
resource as child
+ boolean found = false;
+ for (ResourceType type: parent.getChildResourceTypes()) {
+ if (type.getPlugin().equals("JDG") &&
type.getName().equals("Infinispan")) {
+ found = true;
+ }
+ }
+
+ return found;
+ }
+
}
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 e7136b7..8864361 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
@@ -7819,106 +7819,6 @@
</service>
-
- <service name="Datagrid Endpoints"
- discovery="SubsystemDiscovery"
- class="BaseComponent"
- singleton="true"
- >
-
- <runs-inside>
- <parent-resource-type name="JBossAS7 Standalone Server"
plugin="&pluginName;"/>
- </runs-inside>
-
- <plugin-configuration>
- <c:simple-property name="path" readOnly="true"
default="subsystem=endpoint"/>
- </plugin-configuration>
-
-
- <service name="Hotrod Connector"
- discovery="SubsystemDiscovery"
- class="BaseComponent"
- createDeletePolicy="both"
- creationDataType="configuration"
- >
-
- <plugin-configuration>
- <c:simple-property name="path" readOnly="true"
default="hotrod-connector"/>
- </plugin-configuration>
-
- <resource-configuration>
- <!--<c:simple-property name="name" required="false"
type="string" readOnly="true" description="The name to give to
this connector"/>-->
- <c:simple-property name="cache-container" required="true"
type="string" readOnly="true" description="The cache container to
use">
- <c:option-source target="resource"
expression="type='^Cache Container$'"/>
- </c:simple-property>
- <c:simple-property name="socket-binding" required="true"
type="string" readOnly="true" description="The socket binding to
use for this connector">
- <c:option-source target="configuration"
expression="*/socket-binding=name:type=SocketBindingGroup"/>
- </c:simple-property>
- <c:simple-property name="worker-threads" required="false"
type="integer" readOnly="true" description="The number of worker
threads to use for this connector"/>
- <c:simple-property name="idle-timeout" required="false"
type="long" readOnly="true" description="The timeout for idle
connections"/>
- <c:simple-property name="tcp-nodelay" required="false"
type="boolean" readOnly="true" description="Whether to use TCP
NO_DELAY"/>
- <c:simple-property name="receive-buffer-size"
required="false" type="long" readOnly="true"
description="Size of the receive buffer"/>
- <c:simple-property name="send-buffer-size"
required="false" type="long" readOnly="true"
description="Size of the send buffer"/>
- <!-- TODO add topology state transfer -->
- </resource-configuration>
-
- </service>
-
- <service name="Memcached Connector"
- discovery="SubsystemDiscovery"
- class="BaseComponent"
- createDeletePolicy="both"
- creationDataType="configuration"
- >
-
- <plugin-configuration>
- <c:simple-property name="path" readOnly="true"
default="memcached-connector"/>
- </plugin-configuration>
-
- <resource-configuration>
- <!--<c:simple-property name="name" required="false"
type="string" readOnly="true" description="The name to give to
this connector"/>-->
- <c:simple-property name="cache-container" required="true"
type="string" readOnly="true" description="The cache container to
use">
- <c:option-source target="resource"
expression="type='^Cache Container$'"/>
- </c:simple-property>
- <c:simple-property name="socket-binding" required="true"
type="string" readOnly="true" description="The socket binding to
use for this connector">
- <c:option-source target="configuration"
expression="*/socket-binding=name:type=SocketBindingGroup"/>
- </c:simple-property>
- <c:simple-property name="worker-threads" required="false"
type="integer" readOnly="true" description="The number of worker
threads to use for this connector"/>
- <c:simple-property name="idle-timeout" required="false"
type="long" readOnly="true" description="The timeout for idle
connections"/>
- <c:simple-property name="tcp-nodelay" required="false"
type="boolean" readOnly="true" description="Whether to use TCP
NO_DELAY"/>
- <c:simple-property name="receive-buffer-size"
required="false" type="long" readOnly="true"
description="Size of the receive buffer"/>
- <c:simple-property name="send-buffer-size"
required="false" type="long" readOnly="true"
description="Size of the send buffer"/>
- <!-- TODO add topology state transfer -->
- </resource-configuration>
-
- </service>
-
- <service name="REST Connector"
- discovery="SubsystemDiscovery"
- class="BaseComponent"
- createDeletePolicy="both"
- creationDataType="configuration"
- >
-
- <plugin-configuration>
- <c:simple-property name="path" readOnly="true"
default="rest-connector"/>
- </plugin-configuration>
-
- <resource-configuration>
- <!--<c:simple-property name="name" required="false"
type="string" readOnly="true" description="The name to give to
this connector"/>-->
- <c:simple-property name="cache-container" required="true"
type="string" readOnly="true" description="The cache container to
use">
- <c:option-source target="resource"
expression="type='^Cache Container'"/>
- </c:simple-property>
- <c:simple-property name="virtual-server" required="false"
type="string" readOnly="true" description="The virtual server on
which the REST connector should be published">
- <c:option-source target="resource"
expression="type=VHost"/>
- </c:simple-property>
- <c:simple-property name="context-path" required="false"
type="string" readOnly="true" description="The context path on
which the REST connector should be published"/>
- </resource-configuration>
- </service>
-
- </service>
-
-
<service name="Webservices"
discovery="SubsystemDiscovery"
class="WebservicesComponent"
@@ -9299,7 +9199,7 @@
<metric property="consumer-count" description="The number of
consumers consuming messages from this queue."/>
<metric property="dead-letter-address" dataType="trait"
description="The address to send dead messages to."/>
- <metric property="delivering-count" description="The number of
messages that this queue is currently delivering to its consumers."/>
+ <metric property="delivering-count" description="The number of
messages that this queue is currently delivering to its consumers."/>
<metric property="durable" dataType="trait"
description="Whether the queue is durable or not. The default value is
true."/>
<metric property="expiry-address" dataType="trait"
description="The address to send expired messages to."/>
<metric property="message-count" description="The number of
messages currently in this queue."/>
@@ -11140,7 +11040,7 @@
<c:simple-property name="machine" required="false"
type="string" readOnly="false" description="A machine identifier
for the transport"/>
<c:simple-property name="rack" required="false"
type="string" readOnly="false" description="A rack identifier for
the transport"/>
<c:simple-property name="site" required="false"
type="string" readOnly="false" description="A site identifier for
the transport"/>
- <c:simple-property name="stack" required="false"
type="string" readOnly="false" description="The jgroups stack to
use for the transport"/>
+ <c:simple-property name="stack" required="false"
type="string" readOnly="false" description="The jgroups stack to
use for the transport"/>
</resource-configuration>
</service>
</service>
@@ -11834,7 +11734,7 @@
<metric property="consumer-count" description="The number of
consumers consuming messages from this queue."/>
<metric property="dead-letter-address" dataType="trait"
description="The address to send dead messages to."/>
- <metric property="delivering-count" description="The number of
messages that this queue is currently delivering to its consumers."/>
+ <metric property="delivering-count" description="The number of
messages that this queue is currently delivering to its consumers."/>
<metric property="expiry-address" dataType="trait"
description="The address to send expired messages to."/>
<metric property="message-count" description="The number of
messages currently in this queue."/>
<metric property="messages-added" description="The number of
messages added to this queue since it was created."/>
@@ -12062,12 +11962,12 @@
<c:simple-property name="client-id" required="false"
type="string" readOnly="false" description="The client
id."/>
<c:simple-property name="confirmation-window-size"
required="false" type="integer" readOnly="false"
defaultValue="-1" description="The confirmation window size. The
default value is -1."/>
<c:simple-property
name="connection-load-balancing-policy-class-name" required="false"
type="string" readOnly="false"
defaultValue="org.hornetq.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy"
description="Name of a class implementing a client-side load balancing policy
that a client can use to load balance sessions across different nodes in a cluster. The
default value is
org.hornetq.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy."/>
- <c:simple-property name="connection-ttl"
required="false" type="long" readOnly="false"
defaultValue="60000" description="The connection ttl. The default value is
60000."/>
+ <c:simple-property name="connection-ttl"
required="false" type="long" readOnly="false"
defaultValue="60000" description="The connection ttl. The default value is
60000."/>
<c:simple-property name="consumer-max-rate"
required="false" type="integer" readOnly="false"
defaultValue="-1" description="The consumer max rate. The default
value is -1."/>
<c:simple-property name="consumer-window-size"
required="false" type="integer" readOnly="false"
defaultValue="1048576" description="The consumer window size. The default
value is 1048576."/>
<c:simple-property name="discovery-group-name"
required="false" type="string" readOnly="false"
description="The discovery group name."/>
<c:simple-property name="discovery-initial-wait-timeout"
required="false" type="long" readOnly="false"
description="The discovery initial wait time out."/>
- <c:simple-property name="dups-ok-batch-size"
required="false" type="integer" readOnly="false"
defaultValue="1048576" description="The dups ok batch size. The default
value is 1048576."/>
+ <c:simple-property name="dups-ok-batch-size"
required="false" type="integer" readOnly="false"
defaultValue="1048576" description="The dups ok batch size. The default
value is 1048576."/>
<c:simple-property name="failover-on-initial-connection"
required="false" type="boolean" readOnly="false"
defaultValue="false" description="True to fail over on initial connection.
The default value is false."/>
<c:simple-property name="failover-on-server-shutdown"
required="false" type="boolean" readOnly="false"
description="True to fail over on server shutdown."/>
<c:simple-property name="group-id" required="false"
type="string" readOnly="false" description="The group
id."/>
Show replies by date