Assert.assertEquals(factory.isUseGlobalPools(), !HornetQClient.DEFAULT_USE_GLOBAL_POOLS);
}
public void testCreateConnectionFactoryOverrides() throws Exception
{
HornetQResourceAdapter ra = new HornetQResourceAdapter();
ra.setConnectorClassName(InVMConnector.class.getName());
ConnectionFactoryProperties connectionFactoryProperties = new ConnectionFactoryProperties();
connectionFactoryProperties.setAutoGroup(!HornetQClient.DEFAULT_AUTO_GROUP);
connectionFactoryProperties.setBlockOnAcknowledge(!HornetQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE);
connectionFactoryProperties.setBlockOnNonDurableSend(!HornetQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND);
connectionFactoryProperties.setBlockOnDurableSend(!HornetQClient.DEFAULT_BLOCK_ON_DURABLE_SEND);
connectionFactoryProperties.setCallTimeout(1l);
connectionFactoryProperties.setClientFailureCheckPeriod(2l);
connectionFactoryProperties.setClientID("myid");
connectionFactoryProperties.setConnectionLoadBalancingPolicyClassName("mlbcn");
connectionFactoryProperties.setConnectionTTL(3l);
connectionFactoryProperties.setConsumerMaxRate(4);
connectionFactoryProperties.setConsumerWindowSize(5);
connectionFactoryProperties.setDiscoveryInitialWaitTimeout(6l);
connectionFactoryProperties.setDiscoveryRefreshTimeout(7l);
connectionFactoryProperties.setDupsOKBatchSize(8);
connectionFactoryProperties.setMinLargeMessageSize(10);
connectionFactoryProperties.setPreAcknowledge(!HornetQClient.DEFAULT_PRE_ACKNOWLEDGE);
connectionFactoryProperties.setProducerMaxRate(11);
connectionFactoryProperties.setConfirmationWindowSize(12);
connectionFactoryProperties.setReconnectAttempts(13);
connectionFactoryProperties.setRetryInterval(14l);
connectionFactoryProperties.setRetryIntervalMultiplier(15d);
connectionFactoryProperties.setScheduledThreadPoolMaxSize(16);
connectionFactoryProperties.setThreadPoolMaxSize(17);
connectionFactoryProperties.setTransactionBatchSize(18);
connectionFactoryProperties.setUseGlobalPools(!HornetQClient.DEFAULT_USE_GLOBAL_POOLS);
HornetQConnectionFactory factory = ra.createHornetQConnectionFactory(connectionFactoryProperties);
Assert.assertEquals(factory.getCallTimeout(), 1);
Assert.assertEquals(factory.getClientFailureCheckPeriod(), 2);
Assert.assertEquals(factory.getClientID(), "myid");
Assert.assertEquals(factory.getConnectionLoadBalancingPolicyClassName(), "mlbcn");
Assert.assertEquals(factory.getConnectionTTL(), 3);