mirror of https://github.com/apache/activemq.git
Fix configuration bug for factory and ActiveMQPojoSPI
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@416637 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4bcac89d49
commit
6a794d8a60
|
@ -36,11 +36,6 @@ public final class ReflectionUtil {
|
|||
}
|
||||
|
||||
public static void configureClass(Object obj, String key, String val) {
|
||||
// Check if we will recognize the property first
|
||||
if (obj instanceof ReflectionConfigurable && !((ReflectionConfigurable)obj).acceptConfig(key, val)) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
String debugInfo;
|
||||
|
||||
|
@ -68,6 +63,11 @@ public final class ReflectionUtil {
|
|||
// Property name
|
||||
String property = tokenizer.nextToken();
|
||||
|
||||
// Check if the target object will accept the settings
|
||||
if (obj instanceof ReflectionConfigurable && !((ReflectionConfigurable)target).acceptConfig(property, val)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Determine data type of property
|
||||
Class propertyType = getField(targetClass, property).getType();
|
||||
|
||||
|
|
|
@ -22,24 +22,24 @@ import javax.jms.ConnectionFactory;
|
|||
import java.util.Properties;
|
||||
|
||||
public class ActiveMQPojoSPI implements SPIConnectionFactory {
|
||||
public static final String KEY_BROKER_URL = "factory.brokerUrl";
|
||||
public static final String KEY_USERNAME = "factory.username";
|
||||
public static final String KEY_PASSWORD = "factory.password";
|
||||
public static final String KEY_CLIENT_ID = "factory.clientID";
|
||||
public static final String KEY_BROKER_URL = "brokerUrl";
|
||||
public static final String KEY_USERNAME = "username";
|
||||
public static final String KEY_PASSWORD = "password";
|
||||
public static final String KEY_CLIENT_ID = "clientID";
|
||||
|
||||
public static final String KEY_ASYNC_SEND = "factory.asyncSend";
|
||||
public static final String KEY_ASYNC_DISPATCH = "factory.asyncDispatch";
|
||||
public static final String KEY_ASYNC_SESSION = "factory.asyncSession";
|
||||
public static final String KEY_CLOSE_TIMEOUT = "factory.closeTimeout";
|
||||
public static final String KEY_COPY_MSG_ON_SEND = "factory.copyMsgOnSend";
|
||||
public static final String KEY_DISABLE_TIMESTAMP = "factory.disableTimestamp";
|
||||
public static final String KEY_DEFER_OBJ_SERIAL = "factory.deferObjSerial";
|
||||
public static final String KEY_OPTIM_ACK = "factory.optimAck";
|
||||
public static final String KEY_OPTIM_DISPATCH = "factory.optimDispatch";
|
||||
public static final String KEY_PREFETCH_QUEUE = "factory.prefetchQueue";
|
||||
public static final String KEY_PREFETCH_TOPIC = "factory.prefetchTopic";
|
||||
public static final String KEY_USE_COMPRESSION = "factory.useCompression";
|
||||
public static final String KEY_USE_RETROACTIVE = "factory.useRetroactive";
|
||||
public static final String KEY_ASYNC_SEND = "asyncSend";
|
||||
public static final String KEY_ASYNC_DISPATCH = "asyncDispatch";
|
||||
public static final String KEY_ASYNC_SESSION = "asyncSession";
|
||||
public static final String KEY_CLOSE_TIMEOUT = "closeTimeout";
|
||||
public static final String KEY_COPY_MSG_ON_SEND = "copyMsgOnSend";
|
||||
public static final String KEY_DISABLE_TIMESTAMP = "disableTimestamp";
|
||||
public static final String KEY_DEFER_OBJ_SERIAL = "deferObjSerial";
|
||||
public static final String KEY_OPTIM_ACK = "optimAck";
|
||||
public static final String KEY_OPTIM_DISPATCH = "optimDispatch";
|
||||
public static final String KEY_PREFETCH_QUEUE = "prefetchQueue";
|
||||
public static final String KEY_PREFETCH_TOPIC = "prefetchTopic";
|
||||
public static final String KEY_USE_COMPRESSION = "useCompression";
|
||||
public static final String KEY_USE_RETROACTIVE = "useRetroactive";
|
||||
|
||||
public ConnectionFactory createConnectionFactory(Properties settings) throws Exception {
|
||||
ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory();
|
||||
|
|
Loading…
Reference in New Issue