git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@652437 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2008-05-01 06:10:08 +00:00
parent a3fb0301f9
commit 8248314204
2 changed files with 9 additions and 5 deletions

View File

@ -282,8 +282,7 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge {
brokerInfo.setDuplexConnection(configuration.isDuplex());
// set our properties
Properties props = new Properties();
IntrospectionSupport.getProperties(this, props, null);
props.setProperty("networkTTL", String.valueOf(configuration.getNetworkTTL()));
IntrospectionSupport.getProperties(configuration, props, null);
String str = MarshallingSupport.propertiesToString(props);
brokerInfo.setNetworkProperties(str);
remoteBroker.oneway(brokerInfo);

View File

@ -59,7 +59,7 @@ public final class IntrospectionSupport {
String name = method.getName();
Class type = method.getReturnType();
Class params[] = method.getParameterTypes();
if (name.startsWith("get") && params.length == 0 && type != null && isSettableType(type)) {
if ((name.startsWith("is") || name.startsWith("get")) && params.length == 0 && type != null && isSettableType(type)) {
try {
@ -72,8 +72,13 @@ public final class IntrospectionSupport {
if (strValue == null) {
continue;
}
name = name.substring(3, 4).toLowerCase() + name.substring(4);
if (name.startsWith("get")) {
name = name.substring(3, 4).toLowerCase()
+ name.substring(4);
} else {
name = name.substring(2, 3).toLowerCase()
+ name.substring(3);
}
props.put(optionPrefix + name, strValue);
rc = true;