modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ServerGroupComponent.java
| 27 ++
modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
| 115 ++++++++--
2 files changed, 118 insertions(+), 24 deletions(-)
New commits:
commit ef475f431b3d6e4c356a72c2fb4198a632c10fa4
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Mar 29 15:18:15 2012 +0200
BZ 802561 - fix display of resource configuration. Add system-properties.
diff --git
a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ServerGroupComponent.java
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ServerGroupComponent.java
index c5a17a8..139fdff 100644
---
a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ServerGroupComponent.java
+++
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ServerGroupComponent.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2011 Red Hat, Inc.
+ * Copyright (C) 2005-2012 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -29,6 +29,7 @@ import java.util.Set;
import org.codehaus.jackson.JsonNode;
+import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.content.PackageDetailsKey;
import org.rhq.core.domain.content.PackageType;
import org.rhq.core.domain.content.transfer.ContentResponseResult;
@@ -41,6 +42,8 @@ import org.rhq.core.pluginapi.content.ContentContext;
import org.rhq.core.pluginapi.content.ContentFacet;
import org.rhq.core.pluginapi.content.ContentServices;
import org.rhq.core.pluginapi.inventory.CreateChildResourceFacet;
+import org.rhq.core.pluginapi.operation.OperationFacet;
+import org.rhq.core.pluginapi.operation.OperationResult;
import org.rhq.modules.plugins.jbossas7.json.Address;
import org.rhq.modules.plugins.jbossas7.json.CompositeOperation;
import org.rhq.modules.plugins.jbossas7.json.Operation;
@@ -53,12 +56,32 @@ import org.rhq.modules.plugins.jbossas7.json.Result;
* @author Heiko W. Rupp
*/
@SuppressWarnings("unused")
-public class ServerGroupComponent extends ManagedASComponent implements ContentFacet,
CreateChildResourceFacet {
+public class ServerGroupComponent extends BaseComponent implements ContentFacet,
CreateChildResourceFacet,
+ OperationFacet {
private static final String SUCCESS = "success";
private static final String OUTCOME = "outcome";
@Override
+ public OperationResult invokeOperation(String name,
+ Configuration parameters) throws
InterruptedException, Exception {
+
+ Operation op = new Operation(name,getAddress());
+ Result res = getASConnection().execute(op);
+
+ OperationResult result = new OperationResult();
+
+ if (res.isSuccess()) {
+ result.setSimpleResult(SUCCESS);
+ }
+ else {
+ result.setErrorMessage(res.getFailureDescription());
+ }
+ return result;
+
+ }
+
+ @Override
public List<DeployPackageStep> generateInstallationSteps(ResourcePackageDetails
packageDetails) {
return null; // TODO: Customise this generated block
}
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 8436761..40c49c0 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
@@ -147,6 +147,12 @@
<c:map-property name="*:name"
displayName="Name" readOnly="true">
<c:simple-property name="name"
displayName="Property-Name" readOnly="true"/>
<c:simple-property name="value"
displayName="Value"/>
+ <c:simple-property name="boot-time"
defaultValue="true" description="If true the system property is passed on
the command-line to the started server jvm. If false, it will be pushed to the server as
part of the startup sequence.">
+ <c:property-options>
+ <c:option value="true"/>
+ <c:option value="false"/>
+ </c:property-options>
+ </c:simple-property>
</c:map-property>
</c:list-property>
</c:group>
@@ -222,9 +228,54 @@
</c:simple-property>
<c:simple-property name="socket-binding-port-offset"
required="false" defaultValue="0" type="integer"
description="The default offset to be added to
the port values given by the socket binding group."/>
- <c:simple-property name="jvm"
required="false"/> <!-- TODO -->
- </resource-configuration>
+
+ <c:group name="children:system-property:name+"
displayName="System-properties">
+ <c:list-property name="*2"
displayName="Properties" required="false"
readOnly="false">
+ <c:map-property name="*:name"
displayName="Name" readOnly="true">
+ <c:simple-property name="name"
displayName="Property-Name" readOnly="true"/>
+ <c:simple-property name="value"
displayName="Value"/>
+ <c:simple-property name="boot-time"
defaultValue="true" description="If true the system property is passed on
the command-line to the started server jvm. If false, it will be pushed to the server as
part of the startup sequence.">
+ <c:property-options>
+ <c:option value="true"/>
+ <c:option value="false"/>
+ </c:property-options>
+ </c:simple-property>
+ </c:map-property>
+ </c:list-property>
+ </c:group>
+<!-- TODO commented out as it makes the whole config not show in the UI - fetch from
AS works ok
+ <c:group name="children:jvm:name+"
displayName="JVMs">
+ <c:list-property name="*3" displayName="JVM"
required="false" description="JVM properties">
+ <c:map-property name="*:name"
displayName="Name" readOnly="false">
+ <c:simple-property name="name"
required="true" type="string" readOnly="true"
description="Name of this JVM definition"/>
+ <c:simple-property name="agent-lib"
required="false" type="string" readOnly="false"
description="The JVM agent lib."/>
+ <c:simple-property name="agent-path"
required="false" type="string" readOnly="false"
description="The JVM agent path."/>
+ <c:simple-property name="env-classpath-ignored"
required="false" type="boolean" readOnly="false"
description="Ignore the environment classpath."/>
+ <c:list-property name="environment-variables"
description="The JVM environment variables." >
+ <c:simple-property
name="environment-variable" />
+ </c:list-property>
+ <c:simple-property name="heap-size"
required="false" type="string" readOnly="false"
description="The initial heap size allocated by the JVM."/>
+ <c:simple-property name="java-agent"
required="false" type="string" readOnly="false"
description="The java agent."/>
+ <c:simple-property name="java-home"
required="false" type="string" readOnly="false"
description="The java home"/>
+ <c:list-property name="jvm-options"
description="The JVM options." >
+ <c:simple-property name="jvm-option" />
+ </c:list-property>
+ <c:simple-property name="max-heap-size"
required="false" type="string" readOnly="false"
description="The maximum heap size that can be allocated by the JVM."/>
+ <c:simple-property name="max-permgen-size"
required="false" type="string" readOnly="false"
description="The maximum size of the permanent generation."/>
+ <c:simple-property name="permgen-size"
required="false" type="string" readOnly="false"
description="The initial permanent generation size."/>
+ <c:simple-property name="stack-size"
required="false" type="string" readOnly="false"
description="The JVM stack size settings."/>
+ <c:simple-property name="type"
required="false" type="string" readOnly="true"
description="The JVM type can be either SUN or IBM" default="SUN">
+ <c:property-options>
+ <c:option value="SUN"/>
+ <c:option value="IBM"/>
+ </c:property-options>
+ </c:simple-property>
+ </c:map-property>
+ </c:list-property>
+ </c:group>
+-->
+ </resource-configuration>
</server>
<server name="Host"
description="Host involved in this domain"
@@ -236,29 +287,28 @@
</plugin-configuration>
-
<resource-configuration>
<c:group name="children:system-property:name+"
displayName="System-properties">
- <c:list-property name="*2"
displayName="Properties" required="false"
readOnly="false">
- <c:map-property name="*:name"
displayName="Name" readOnly="true">
- <c:simple-property name="name"
displayName="Property-Name" readOnly="true"/>
- <c:simple-property name="value"
displayName="Value"/>
- </c:map-property>
- </c:list-property>
- </c:group>
+ <c:list-property name="*2"
displayName="Properties" required="false"
readOnly="false">
+ <c:map-property name="*:name"
displayName="Name" readOnly="true">
+ <c:simple-property name="name"
displayName="Property-Name" readOnly="true"/>
+ <c:simple-property name="value"
displayName="Value"/>
+ </c:map-property>
+ </c:list-property>
+ </c:group>
<c:group name="children:path:name+"
displayName="Path">
- <c:list-property name="*3"
displayName="Path" required="false"
- description="The standard paths
provided by the system include: jboss.home - the root directory of the JBoss AS
distribution; user.home - user's home directory; user.dir - user's current working
directory; java.home - java installation directory; jboss.server.base.dir - root directory
for an individual server instance; jboss.server.data.dir - directory the server will use
for persistent data file storage; jboss.server.log.dir - directory the server will use for
log file storage; jboss.server.tmp.dir - directory the server will use for temporary file
storage; jboss.domain.servers.dir - directory under which a host controller will create
the working area for individual server instances">
- <c:map-property name="*"
displayName="Entry">
- <c:simple-property name="name"
required="true" type="string" readOnly="false"
- description="The name of
the path. Cannot be one of the standard fixed paths provided by the system"/>
- <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."/>
- <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."/>
- </c:map-property>
- </c:list-property>
- </c:group>
+ <c:list-property name="*3" displayName="Path"
required="false"
+ description="The standard paths provided by the
system include: jboss.home - the root directory of the JBoss AS distribution; user.home -
user's home directory; user.dir - user's current working directory; java.home -
java installation directory; jboss.server.base.dir - root directory for an individual
server instance; jboss.server.data.dir - directory the server will use for persistent data
file storage; jboss.server.log.dir - directory the server will use for log file storage;
jboss.server.tmp.dir - directory the server will use for temporary file storage;
jboss.domain.servers.dir - directory under which a host controller will create the working
area for individual server instances">
+ <c:map-property name="*"
displayName="Entry">
+ <c:simple-property name="name"
required="true" type="string" readOnly="false"
+ description="The name of the path.
Cannot be one of the standard fixed paths provided by the system"/>
+ <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."/>
+ <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."/>
+ </c:map-property>
+ </c:list-property>
+ </c:group>
</resource-configuration>
</server>
@@ -313,6 +363,21 @@
<c:simple-property name="auto-start"
displayName="Autostart" default="false" type="boolean"
/>
+ <c:group name="children:system-property:name+"
displayName="System-properties">
+ <c:list-property name="*2"
displayName="Properties" required="false"
readOnly="false">
+ <c:map-property name="*:name"
displayName="Name" readOnly="true">
+ <c:simple-property name="name"
displayName="Property-Name" readOnly="true"/>
+ <c:simple-property name="value"
displayName="Value"/>
+ <c:simple-property name="boot-time"
defaultValue="true" description="If true the system property is passed on
the command-line to the started server jvm. If false, it will be pushed to the server as
part of the startup sequence.">
+ <c:property-options>
+ <c:option value="true"/>
+ <c:option value="false"/>
+ </c:property-options>
+ </c:simple-property>
+ </c:map-property>
+ </c:list-property>
+ </c:group>
+
</resource-configuration>
</server>
@@ -441,6 +506,12 @@
<c:map-property name="*:name"
displayName="Name" readOnly="true">
<c:simple-property name="name"
displayName="Property-Name" readOnly="true"/>
<c:simple-property name="value"
displayName="Value"/>
+ <c:simple-property name="boot-time"
defaultValue="true" description="If true the system property is passed on
the command-line to the started server jvm. If false, it will be pushed to the server as
part of the startup sequence.">
+ <c:property-options>
+ <c:option value="true"/>
+ <c:option value="false"/>
+ </c:property-options>
+ </c:simple-property>
</c:map-property>
</c:list-property>
</c:group>
Show replies by date