modules/plugins/jboss-as-7/d2d.sh
| 7 ++--
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
| 17 +++++-----
2 files changed, 14 insertions(+), 10 deletions(-)
New commits:
commit 37eea22e7b71a82954c4f3081c01e0cf51e588ca
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Wed Feb 29 16:42:44 2012 +0100
BZ 708332 - don't fail when the AS sends us unknown properties.
diff --git
a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
index ef4506c..bbfff8d 100644
---
a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
+++
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
@@ -33,6 +33,7 @@ import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.codehaus.jackson.JsonNode;
+import org.codehaus.jackson.map.DeserializationConfig;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.SerializationConfig;
@@ -93,6 +94,8 @@ public class ASConnection {
verbose = Boolean.getBoolean("as7plugin.verbose");
mapper = new ObjectMapper();
+ mapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES,
false);
+
}
/**
@@ -264,11 +267,11 @@ public class ASConnection {
}
/** This operation purges the Operation passed in of EAP/EDG prefixes in the
- * Address portion and in the AdditionalProperties section. The returned
- * operation should be identical in every other way and should be used
+ * Address portion and in the AdditionalProperties section. The returned
+ * operation should be identical in every other way and should be used
* instead of the unpurged operation which will cause unrecognized property
* errors.
- *
+ *
* @param operation to be purged.
* @return The same operation minus the prefixes.
*/
@@ -278,8 +281,8 @@ public class ASConnection {
boolean prefixLocated = false;
//Ex.
- //Operation{operation='remove', address=Address{path:
host=master,server-config=EAP server-six},
- //additionalProperties={socket-binding-port-offset=0, name=EAP server-six,
auto-start=false, group=,
+ //Operation{operation='remove', address=Address{path:
host=master,server-config=EAP server-six},
+ //additionalProperties={socket-binding-port-offset=0, name=EAP server-six,
auto-start=false, group=,
//socket-binding-group=}}
//ADDRESS parsing
@@ -382,8 +385,8 @@ public class ASConnection {
return failure;
}
//spinder 2/22/12: if unparsable JSON detected remove it. TODO: see if fixed
with later version of jackson
- //This needs to be in place until i)Jackson version where this is fixed or
- // ii) fix for
https://issues.jboss.org/browse/JBPAPP-8233
+ //This needs to be in place until i)Jackson version where this is fixed or
+ // ii) fix for
https://issues.jboss.org/browse/JBPAPP-8233
if (as7ResultSerialization.indexOf(UNPARSABLE_JSON) > -1) {
if (verbose) {
log.warn("------ Detected unparsable JSON <" +
as7ResultSerialization + ">.");
commit 493983c9468f5db4ebdeb1d206d2452bbd5e9f4c
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Mon Feb 27 18:02:34 2012 +0100
Pull logging from the m2 repo, parametrize the RHQ version, add plugin-api to cp.
diff --git a/modules/plugins/jboss-as-7/d2d.sh b/modules/plugins/jboss-as-7/d2d.sh
index 7bf7b97..8591b48 100755
--- a/modules/plugins/jboss-as-7/d2d.sh
+++ b/modules/plugins/jboss-as-7/d2d.sh
@@ -1,6 +1,7 @@
-#!/bin/sh
+#!/bin/sh
-RHQ_DEV_HOME=${HOME}/dev/jboss/rhq
+RHQ_DEV_HOME=${HOME}/im/rhq
M2_REPO=${HOME}/.m2/repository
+RHQ_VERSION='4.3.0-SNAPSHOT'
-java -cp
target/rhq-jboss-as-7-plugin-4.3.0-SNAPSHOT.jar:${RHQ_DEV_HOME}/modules/enterprise/agent/target/rhq-agent/lib/commons-logging-1.1.0.jboss.jar:${M2_REPO}/org/codehaus/jackson/jackson-core-asl/1.7.4/jackson-core-asl-1.7.4.jar:${M2_REPO}/org/codehaus/jackson/jackson-mapper-asl/1.7.4/jackson-mapper-asl-1.7.4.jar
org.rhq.modules.plugins.jbossas7.Domain2Descriptor $*
+java -cp
target/rhq-jboss-as-7-plugin-${RHQ_VERSION}.jar:${M2_REPO}/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar:${M2_REPO}/org/codehaus/jackson/jackson-core-asl/1.7.4/jackson-core-asl-1.7.4.jar:${M2_REPO}/org/codehaus/jackson/jackson-mapper-asl/1.7.4/jackson-mapper-asl-1.7.4.jar:${M2_REPO}/org/rhq/rhq-core-plugin-api/${RHQ_VERSION}/rhq-core-plugin-api-${RHQ_VERSION}.jar
org.rhq.modules.plugins.jbossas7.Domain2Descriptor $*