This closes #1575
This commit is contained in:
commit
8af0569521
|
@ -185,4 +185,8 @@ public interface ConnectionFactoryConfiguration extends EncodingSupport {
|
||||||
String getDeserializationWhiteList();
|
String getDeserializationWhiteList();
|
||||||
|
|
||||||
void setDeserializationWhiteList(String whiteList);
|
void setDeserializationWhiteList(String whiteList);
|
||||||
|
|
||||||
|
int getInitialMessagePacketSize();
|
||||||
|
|
||||||
|
ConnectionFactoryConfiguration setInitialMessagePacketSize(int size);
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,6 +122,8 @@ public class ConnectionFactoryConfigurationImpl implements ConnectionFactoryConf
|
||||||
|
|
||||||
private String deserializationWhiteList;
|
private String deserializationWhiteList;
|
||||||
|
|
||||||
|
private int initialMessagePacketSize = ActiveMQClient.DEFAULT_INITIAL_MESSAGE_PACKET_SIZE;
|
||||||
|
|
||||||
// Static --------------------------------------------------------
|
// Static --------------------------------------------------------
|
||||||
|
|
||||||
// Constructors --------------------------------------------------
|
// Constructors --------------------------------------------------
|
||||||
|
@ -881,6 +883,18 @@ public class ConnectionFactoryConfigurationImpl implements ConnectionFactoryConf
|
||||||
return protocolManagerFactoryStr;
|
return protocolManagerFactoryStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getInitialMessagePacketSize() {
|
||||||
|
return initialMessagePacketSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConnectionFactoryConfiguration setInitialMessagePacketSize(int size) {
|
||||||
|
this.initialMessagePacketSize = size;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Public --------------------------------------------------------
|
// Public --------------------------------------------------------
|
||||||
|
|
||||||
// Package protected ---------------------------------------------
|
// Package protected ---------------------------------------------
|
||||||
|
|
|
@ -1209,6 +1209,8 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
|
||||||
cf.setProtocolManagerFactoryStr(cfConfig.getProtocolManagerFactoryStr());
|
cf.setProtocolManagerFactoryStr(cfConfig.getProtocolManagerFactoryStr());
|
||||||
cf.setDeserializationBlackList(cfConfig.getDeserializationBlackList());
|
cf.setDeserializationBlackList(cfConfig.getDeserializationBlackList());
|
||||||
cf.setDeserializationWhiteList(cfConfig.getDeserializationWhiteList());
|
cf.setDeserializationWhiteList(cfConfig.getDeserializationWhiteList());
|
||||||
|
cf.setInitialMessagePacketSize(cfConfig.getInitialMessagePacketSize());
|
||||||
|
|
||||||
return cf;
|
return cf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -225,7 +225,8 @@ public class ConnectionFactorySerializationTest extends JMSTestBase {
|
||||||
ArrayList<String> connectorNames = new ArrayList<>();
|
ArrayList<String> connectorNames = new ArrayList<>();
|
||||||
connectorNames.add(main.getName());
|
connectorNames.add(main.getName());
|
||||||
connectorNames.add(main2.getName());
|
connectorNames.add(main2.getName());
|
||||||
ConnectionFactoryConfiguration configuration = new ConnectionFactoryConfigurationImpl().setName("MyConnectionFactory").setHA(b).setConnectorNames(connectorNames).setClientID("clientID").setClientFailureCheckPeriod(-1).setConnectionTTL(-2).setFactoryType(JMSFactoryType.CF).setCallTimeout(-3).setCallFailoverTimeout(-4).setCacheLargeMessagesClient(b).setMinLargeMessageSize(-5).setConsumerWindowSize(-6).setConsumerMaxRate(-7).setConfirmationWindowSize(-8).setProducerWindowSize(-9).setProducerMaxRate(-10).setBlockOnAcknowledge(b).setBlockOnDurableSend(b).setBlockOnNonDurableSend(b).setAutoGroup(b).setPreAcknowledge(b).setLoadBalancingPolicyClassName("foobar").setTransactionBatchSize(-11).setDupsOKBatchSize(-12).setUseGlobalPools(b).setScheduledThreadPoolMaxSize(-13).setThreadPoolMaxSize(-14).setRetryInterval(-15).setRetryIntervalMultiplier(-16).setMaxRetryInterval(-17).setReconnectAttempts(-18).setFailoverOnInitialConnection(b).setGroupID("groupID");
|
ConnectionFactoryConfiguration configuration = new ConnectionFactoryConfigurationImpl().setName("MyConnectionFactory").setHA(b).setConnectorNames(connectorNames).setClientID("clientID").setClientFailureCheckPeriod(-1).setConnectionTTL(-2).setFactoryType(JMSFactoryType.CF).setCallTimeout(-3).setCallFailoverTimeout(-4).setCacheLargeMessagesClient(b).setMinLargeMessageSize(-5).setConsumerWindowSize(-6).setConsumerMaxRate(-7).setConfirmationWindowSize(-8).setProducerWindowSize(-9).setProducerMaxRate(-10).setBlockOnAcknowledge(b).setBlockOnDurableSend(b).setBlockOnNonDurableSend(b).setAutoGroup(b).setPreAcknowledge(b).setLoadBalancingPolicyClassName("foobar").setTransactionBatchSize(-11).setDupsOKBatchSize(-12).setUseGlobalPools(b).setScheduledThreadPoolMaxSize(-13).setThreadPoolMaxSize(-14).setRetryInterval(-15).setRetryIntervalMultiplier(-16).setMaxRetryInterval(-17).setReconnectAttempts(-18).setFailoverOnInitialConnection(b).setGroupID("groupID")
|
||||||
|
.setInitialMessagePacketSize(1499);
|
||||||
|
|
||||||
jmsServer.createConnectionFactory(false, configuration, "/MyConnectionFactory");
|
jmsServer.createConnectionFactory(false, configuration, "/MyConnectionFactory");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue