use of com.adaptris.util.KeyValuePairSet in project interlok by adaptris.
the class JndiPtpProducerTest method createJndiVendorImpExample.
static JmsConnection createJndiVendorImpExample(StandardJndiImplementation jndi, JmsConnection c) {
jndi.setJndiName("MyConnectionFactory");
KeyValuePairSet kvps = jndi.getJndiParams();
// jndi.getJndiParams().addKeyValuePair(
// new KeyValuePair(Context.INITIAL_CONTEXT_FACTORY,
// "com.sun.jndi.fscontext.RefFSContextFactory"));
kvps.addKeyValuePair(new KeyValuePair(Context.SECURITY_PRINCIPAL, "Administrator"));
kvps.addKeyValuePair(new KeyValuePair(Context.SECURITY_CREDENTIALS, "Administrator"));
kvps.addKeyValuePair(new KeyValuePair("com.sonicsw.jndi.mfcontext.domain", "Domain1"));
kvps.addKeyValuePair(new KeyValuePair(Context.INITIAL_CONTEXT_FACTORY, "com.sonicsw.jndi.mfcontext.MFContextFactory"));
jndi.getJndiParams().addKeyValuePair(new KeyValuePair(Context.PROVIDER_URL, "tcp://localhost:2506"));
c.setVendorImplementation(jndi);
c.setClientId(null);
c.setConnectionErrorHandler(new JmsConnectionErrorHandler());
return c;
}
use of com.adaptris.util.KeyValuePairSet in project interlok by adaptris.
the class AdvancedActiveMqImplementationTest method createClient53Properties.
private static KeyValuePairSet createClient53Properties() {
KeyValuePairSet props = new KeyValuePairSet();
props.addKeyValuePair(new KeyValuePair("AlwaysSyncSend", FALSE));
props.addKeyValuePair(new KeyValuePair("CloseTimeout", "10"));
props.addKeyValuePair(new KeyValuePair("DisableTimeStampsByDefault", TRUE));
props.addKeyValuePair(new KeyValuePair("DispatchAsync", TRUE));
props.addKeyValuePair(new KeyValuePair("NestedMapAndListEnabled", TRUE));
props.addKeyValuePair(new KeyValuePair("OptimizeAcknowledge", TRUE));
props.addKeyValuePair(new KeyValuePair("ProducerWindowSize", "100"));
props.addKeyValuePair(new KeyValuePair("SendTimeout", "99"));
props.addKeyValuePair(new KeyValuePair("AlwaysSessionAsync", TRUE));
props.addKeyValuePair(new KeyValuePair("ClientID", "flintstone"));
props.addKeyValuePair(new KeyValuePair("ClientIDPrefix", "fred"));
props.addKeyValuePair(new KeyValuePair("CopyMessageOnSend", TRUE));
props.addKeyValuePair(new KeyValuePair("ExclusiveConsumer", TRUE));
props.addKeyValuePair(new KeyValuePair("ObjectMessageSerializationDeferred", TRUE));
props.addKeyValuePair(new KeyValuePair("ObjectMessageSerializationDefered", TRUE));
props.addKeyValuePair(new KeyValuePair("OptimizedMessageDispatch", TRUE));
props.addKeyValuePair(new KeyValuePair("SendAcksAsync", TRUE));
props.addKeyValuePair(new KeyValuePair("UseCompression", TRUE));
props.addKeyValuePair(new KeyValuePair("UseRetroactiveConsumer", TRUE));
return props;
}
use of com.adaptris.util.KeyValuePairSet in project interlok by adaptris.
the class AdvancedActiveMqImplementationTest method createClient59Properties.
private static KeyValuePairSet createClient59Properties() {
KeyValuePairSet props = new KeyValuePairSet();
// New 5.9 connection factory properties.
props.addKeyValuePair(new KeyValuePair("AuditDepth", "99"));
props.addKeyValuePair(new KeyValuePair("AuditMaximumProducerNumber", "99"));
props.addKeyValuePair(new KeyValuePair("ConnectionIDPrefix", "wilma"));
props.addKeyValuePair(new KeyValuePair("ConsumerFailoverRedeliveryWaitPeriod", "99"));
props.addKeyValuePair(new KeyValuePair("CheckForDuplicates", TRUE));
props.addKeyValuePair(new KeyValuePair("MaxThreadPoolSize", "99"));
props.addKeyValuePair(new KeyValuePair("MessagePrioritySupported", TRUE));
props.addKeyValuePair(new KeyValuePair("NonBlockingRedelivery", TRUE));
props.addKeyValuePair(new KeyValuePair("OptimizeAcknowledgeTimeOut", "99"));
props.addKeyValuePair(new KeyValuePair("OptimizedAckScheduledAckInterval", "99"));
props.addKeyValuePair(new KeyValuePair("StatsEnabled", TRUE));
props.addKeyValuePair(new KeyValuePair("TransactedIndividualAck", TRUE));
props.addKeyValuePair(new KeyValuePair("UseAsyncSend", TRUE));
props.addKeyValuePair(new KeyValuePair("UseDedicatedTaskRunner", TRUE));
props.addKeyValuePair(new KeyValuePair("WarnAboutUnstartedConnectionTimeout", "99"));
return props;
}
use of com.adaptris.util.KeyValuePairSet in project interlok by adaptris.
the class JndiPtpProducerCase method testProduceAndConsume_ExtraConfig.
@Test
public void testProduceAndConsume_ExtraConfig() throws Exception {
SimpleFactoryConfiguration sfc = new SimpleFactoryConfiguration();
KeyValuePairSet kvps = new KeyValuePairSet();
kvps.add(new KeyValuePair("ClientID", "testProduceAndConsume_ExtraConfig"));
kvps.add(new KeyValuePair("UseCompression", "true"));
sfc.setProperties(kvps);
String queueName = testName.getMethodName() + "_queue";
String topicName = testName.getMethodName() + "_topic";
StandardJndiImplementation recvVendorImp = createVendorImplementation();
StandardJndiImplementation sendVendorImp = createVendorImplementation();
sendVendorImp.setExtraFactoryConfiguration(sfc);
StandaloneConsumer standaloneConsumer = new StandaloneConsumer(activeMqBroker.getJndiPtpConnection(recvVendorImp, false, queueName, topicName), new PtpConsumer().withQueue(queueName));
MockMessageListener jms = new MockMessageListener();
standaloneConsumer.registerAdaptrisMessageListener(jms);
StandaloneProducer standaloneProducer = new StandaloneProducer(activeMqBroker.getJndiPtpConnection(sendVendorImp, false, queueName, topicName), new PtpProducer().withQueue((queueName)));
execute(standaloneConsumer, standaloneProducer, createMessage(null), jms);
assertMessages(jms);
}
use of com.adaptris.util.KeyValuePairSet in project interlok by adaptris.
the class SimpleFactoryConfigurationTest method create.
protected static SimpleFactoryConfiguration create(KeyValuePair kvp) {
SimpleFactoryConfiguration result = new SimpleFactoryConfiguration();
KeyValuePairSet kvps = new KeyValuePairSet();
kvps.add(kvp);
result.setProperties(kvps);
return result;
}
Aggregations