modules/common/jboss-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller/JBossASClient.java | 16 ++++++++++ modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/Installer.java | 3 + 2 files changed, 18 insertions(+), 1 deletion(-)
New commits: commit e7753928bddf03a031642b43c1ff9031813abee5 Author: John Mazzitelli mazz@redhat.com Date: Fri Dec 21 13:34:12 2012 -0500
add generic API to remove a resource
diff --git a/modules/common/jboss-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller/JBossASClient.java b/modules/common/jboss-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller/JBossASClient.java index fa4a5b9..a4f47a0 100644 --- a/modules/common/jboss-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller/JBossASClient.java +++ b/modules/common/jboss-as-dmr-client/src/main/java/org/rhq/common/jbossas/client/controller/JBossASClient.java @@ -57,6 +57,7 @@ public class JBossASClient { public static final String ADD = "add"; public static final String SYSTEM_PROPERTY = "system-property"; public static final String PERSISTENT = "persistent"; // used by some operations to persist their effects + public static final String REMOVE = "remove";
private ModelControllerClient client;
@@ -283,6 +284,21 @@ public class JBossASClient { }
/** + * Removes the resource at the given address. + * + * @param doomedAddr the address of the resource to remove + * @throws Exception + */ + public void remove(Address doomedAddr) throws Exception { + final ModelNode request = createRequest(REMOVE, doomedAddr); + final ModelNode response = execute(request); + if (!isSuccess(response)) { + throw new FailureException(response, "Failed to remove resource at address [" + doomedAddr + "]"); + } + return; + } + + /** * Convienence method that allows you to obtain a single attribute's string value from * a resource. *
commit 7d167bdc1be3e4c5e1bae16881cbe7e11db213b8 Author: John Mazzitelli mazz@redhat.com Date: Fri Dec 21 13:01:30 2012 -0500
don't dump the whole stack, just show the error messages
diff --git a/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/Installer.java b/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/Installer.java index 909a39e..0c8876b 100644 --- a/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/Installer.java +++ b/modules/enterprise/server/installer/src/main/java/org/rhq/enterprise/server/installer/Installer.java @@ -27,6 +27,7 @@ import java.util.HashMap; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory;
+import org.rhq.core.util.exception.ThrowableUtil; import org.rhq.enterprise.server.installer.InstallerService.AlreadyInstalledException; import org.rhq.enterprise.server.installer.InstallerService.AutoInstallDisabledException;
@@ -103,7 +104,7 @@ public class Installer { installerService.prepareDatabase(serverProperties, null, null); LOG.info("Database setup is complete."); } catch (Exception e) { - LOG.error(e.getMessage(), e); + LOG.error(ThrowableUtil.getAllMessages(e)); System.exit(EXIT_CODE_INSTALLATION_ERROR); } continue;
rhq-commits@lists.fedorahosted.org