Class SolaceJndiVendorImplementation
- java.lang.Object
-
- com.adaptris.core.jms.VendorImplementationImp
-
- com.adaptris.core.jms.jndi.BaseJndiImplementation
-
- com.adaptris.core.jms.jndi.StandardJndiImplementation
-
- com.adaptris.core.jms.solace.SolaceJndiVendorImplementation
-
- All Implemented Interfaces:
ComponentLifecycleExtension
,ConnectionComparator<VendorImplementationBase>
,VendorImplementation
,VendorImplementationBase
@ComponentProfile(summary="Custom solace JNDI implementation that has consumer creation reties should it error when starting up/restarting..", tag="consumer,jms,jndi,vendor") public class SolaceJndiVendorImplementation extends StandardJndiImplementation
JNDI Solace implementation of
VendorImplementation
.This vendor implementation allows you to configure the JNDI properties that will fetch the connection-factory from the Solace JNDI store..
The main reason to use this JNDI implementation rather than the standard JNDI implementation, is that this one allows us retry creating the consumer should it fail. Typically this might happen if a Solace queue has been shutdown. In which case the consumer creation will fail.
This was built against Solace 10.6.0
In the adapter configuration file this class is aliased as solace-jndi-implementation which is the preferred alternative to the fully qualified classname when building your configuration.
License Required: BASIC
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.jms.jndi.BaseJndiImplementation
context, jndiName
-
Fields inherited from class com.adaptris.core.jms.VendorImplementationImp
log
-
-
Constructor Summary
Constructors Constructor Description SolaceJndiVendorImplementation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.jms.MessageConsumer
createConsumer(JmsDestination d, java.lang.String selector, JmsActorConfig c)
java.lang.Integer
createConsumerMaxRetries()
java.lang.Integer
createConsumerRetryWaitSeconds()
javax.jms.MessageConsumer
createQueueReceiver(java.lang.String queueName, java.lang.String selector, JmsActorConfig c)
If a Solace queue has been shutdown, we should wait for it to come back up before we continue.javax.jms.MessageConsumer
createTopicSubscriber(java.lang.String topicName, java.lang.String selector, java.lang.String subscriptionId, JmsActorConfig c)
java.lang.Integer
getCreateConsumerMaxRetries()
Sets the maximum amount of times to retry attempting to create the message consumer.java.lang.Integer
getCreateConsumerRetryWaitSeconds()
Sets the amount of time in seconds to wait before each attempt to create the message consumer.void
setCreateConsumerMaxRetries(java.lang.Integer createConsumerMaxRetries)
Sets the maximum amount of times to retry attempting to create the message consumer.void
setCreateConsumerRetryWaitSeconds(java.lang.Integer createConsumerRetryWaitSeconds)
Sets the amount of time in seconds to wait before each attempt to create the message consumer.-
Methods inherited from class com.adaptris.core.jms.jndi.StandardJndiImplementation
createConnectionFactory
-
Methods inherited from class com.adaptris.core.jms.jndi.BaseJndiImplementation
asList, connectionEquals, createQueue, createTopic, enableEncodedPasswords, getEnableEncodedPasswords, getEncodedPasswordKeys, getExtraFactoryConfiguration, getJndiName, getJndiParams, getNewContextOnException, getUseJndiForQueues, getUseJndiForTopics, lookup, newContextOnException, retrieveBrokerDetailsForLogging, setEnableEncodedPasswords, setEncodedPasswordKeys, setExtraFactoryConfiguration, setJndiName, setJndiParams, setNewContextOnException, setUseJndiForQueues, setUseJndiForTopics, useJndiForQueues, useJndiForTopics
-
Methods inherited from class com.adaptris.core.jms.VendorImplementationImp
applyVendorSessionProperties, createDestination, createSession, prepare
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.ComponentLifecycleExtension
prepare
-
Methods inherited from interface com.adaptris.core.jms.ConnectionComparator
connectionEquals
-
Methods inherited from interface com.adaptris.core.jms.VendorImplementation
createConnection
-
Methods inherited from interface com.adaptris.core.jms.VendorImplementationBase
createDestination, createQueue, createSession, createTopic, retrieveBrokerDetailsForLogging
-
-
-
-
Method Detail
-
createQueueReceiver
public javax.jms.MessageConsumer createQueueReceiver(java.lang.String queueName, java.lang.String selector, JmsActorConfig c) throws javax.jms.JMSException
If a Solace queue has been shutdown, we should wait for it to come back up before we continue.
- Specified by:
createQueueReceiver
in interfaceVendorImplementationBase
- Overrides:
createQueueReceiver
in classVendorImplementationImp
- Throws:
javax.jms.JMSException
- See Also:
VendorImplementationBase.createQueue(java.lang.String, JmsActorConfig)
-
createConsumer
public javax.jms.MessageConsumer createConsumer(JmsDestination d, java.lang.String selector, JmsActorConfig c) throws javax.jms.JMSException
- Specified by:
createConsumer
in interfaceVendorImplementationBase
- Overrides:
createConsumer
in classVendorImplementationImp
- Throws:
javax.jms.JMSException
-
createTopicSubscriber
public javax.jms.MessageConsumer createTopicSubscriber(java.lang.String topicName, java.lang.String selector, java.lang.String subscriptionId, JmsActorConfig c) throws javax.jms.JMSException
- Specified by:
createTopicSubscriber
in interfaceVendorImplementationBase
- Overrides:
createTopicSubscriber
in classVendorImplementationImp
- Throws:
javax.jms.JMSException
-
createConsumerRetryWaitSeconds
public java.lang.Integer createConsumerRetryWaitSeconds()
-
createConsumerMaxRetries
public java.lang.Integer createConsumerMaxRetries()
-
getCreateConsumerRetryWaitSeconds
public java.lang.Integer getCreateConsumerRetryWaitSeconds()
Sets the amount of time in seconds to wait before each attempt to create the message consumer.
-
setCreateConsumerRetryWaitSeconds
public void setCreateConsumerRetryWaitSeconds(java.lang.Integer createConsumerRetryWaitSeconds)
Sets the amount of time in seconds to wait before each attempt to create the message consumer.
-
getCreateConsumerMaxRetries
public java.lang.Integer getCreateConsumerMaxRetries()
Sets the maximum amount of times to retry attempting to create the message consumer.
A value of zero means continue trying forever
-
setCreateConsumerMaxRetries
public void setCreateConsumerMaxRetries(java.lang.Integer createConsumerMaxRetries)
Sets the maximum amount of times to retry attempting to create the message consumer.
A value of zero means continue trying forever
-
-