Class ActiveMQConfiguration
- java.lang.Object
-
- org.apache.camel.component.jms.JmsConfiguration
-
- org.apache.camel.component.activemq.ActiveMQConfiguration
-
- All Implemented Interfaces:
Cloneable
public class ActiveMQConfiguration extends org.apache.camel.component.jms.JmsConfiguration
-
-
Constructor Summary
Constructors Constructor Description ActiveMQConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected javax.jms.ConnectionFactory
createConnectionFactory()
protected javax.jms.ConnectionFactory
createPooledConnectionFactory(org.apache.activemq.ActiveMQConnectionFactory connectionFactory)
protected org.springframework.transaction.PlatformTransactionManager
createTransactionManager()
Factory method to create a default transaction manager if one is not specifiedString
getBrokerURL()
String
getUserName()
Deprecated.- use JmsConfiguration#getUsername()boolean
isTrustAllPackages()
boolean
isUsePooledConnection()
boolean
isUseSingleConnection()
static Class<?>
loadClass(String name, ClassLoader loader)
protected void
setActiveMQComponent(ActiveMQComponent activeMQComponent)
void
setBrokerURL(String brokerURL)
Sets the broker URL to use to connect to ActiveMQ broker.void
setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)
void
setTrustAllPackages(boolean trustAllPackages)
ObjectMessage objects depend on Java serialization of marshal/unmarshal object payload.void
setUsePooledConnection(boolean usePooledConnection)
Enables or disables whether a PooledConnectionFactory will be used so that when messages are sent to ActiveMQ from outside of a message consuming thread, pooling will be used rather than the default with the SpringJmsTemplate
which will create a new connection, session, producer for each message then close them all down again.void
setUserName(String userName)
Deprecated.- use JmsConfiguration#setUsername(String)void
setUseSingleConnection(boolean useSingleConnection)
Enables or disables whether a SpringSingleConnectionFactory
will be used so that when messages are sent to ActiveMQ from outside of a message consuming thread, pooling will be used rather than the default with the SpringJmsTemplate
which will create a new connection, session, producer for each message then close them all down again.-
Methods inherited from class org.apache.camel.component.jms.JmsConfiguration
chooseMessageListenerContainerImplementation, chooseMessageListenerContainerImplementation, configuredQoS, configureMessageListener, configureMessageListenerContainer, copy, createDestinationResolver, createInOnlyTemplate, createInOutTemplate, createListenerConnectionFactory, createMessageListenerContainer, createTemplateConnectionFactory, defaultCacheLevel, getAcknowledgementMode, getAcknowledgementModeName, getAllowAdditionalHeaders, getArtemisConsumerPriority, getCacheLevel, getCacheLevelName, getClientId, getConcurrentConsumers, getConnectionFactory, getConsumerType, getCorrelationProperty, getDefaultTaskExecutorType, getDeliveryDelay, getDeliveryMode, getDestinationResolver, getDurableSubscriptionName, getEagerPoisonBody, getErrorHandler, getErrorHandlerLoggingLevel, getExceptionListener, getExplicitQosEnabled, getIdleConsumerLimit, getIdleTaskExecutionLimit, getJmsKeyFormatStrategy, getJmsMessageType, getJmsOperations, getListenerConnectionFactory, getMaxConcurrentConsumers, getMaxMessagesPerTask, getMessageConverter, getMessageCreatedStrategy, getMessageListenerContainerFactory, getOrCreateConnectionFactory, getOrCreateListenerConnectionFactory, getOrCreateTemplateConnectionFactory, getOrCreateTransactionManager, getPassword, getPriority, getReceiveTimeout, getRecoveryInterval, getReplyTo, getReplyToCacheLevelName, getReplyToConcurrentConsumers, getReplyToConsumerType, getReplyToDestinationSelectorName, getReplyToMaxConcurrentConsumers, getReplyToOnTimeoutMaxConcurrentConsumers, getReplyToOverride, getReplyToType, getRequestTimeout, getRequestTimeoutCheckerInterval, getSelector, getSubscriptionName, getTaskExecutor, getTemplateConnectionFactory, getTimeToLive, getTransactionManager, getTransactionName, getTransactionTimeout, getUsername, getWaitForProvisionCorrelationToBeUpdatedCounter, getWaitForProvisionCorrelationToBeUpdatedThreadSleepingTime, isAcceptMessagesWhileStopping, isAllowNullBody, isAllowReplyManagerQuickStop, isAllowSerializedHeaders, isAlwaysCopyMessage, isArtemisStreamingEnabled, isAsyncConsumer, isAsyncStartListener, isAsyncStopListener, isAutoStartup, isDeliveryPersistent, isDisableReplyTo, isDisableTimeToLive, isEagerLoadingOfProperties, isErrorHandlerLogStackTrace, isExplicitQosEnabled, isExposeListenerSession, isForceSendOriginalMessage, isFormatDateHeadersToIso8601, isIncludeAllJMSXProperties, isIncludeSentJMSMessageID, isLazyCreateTransactionManager, isMapJmsMessage, isMessageIdEnabled, isMessageTimestampEnabled, isPreserveMessageQos, isPubSubNoLocal, isReplyToDeliveryPersistent, isReplyToSameDestinationAllowed, isStreamMessageTypeEnabled, isSubscriptionDurable, isSubscriptionShared, isSynchronous, isTestConnectionOnStartup, isTransacted, isTransactedInOut, isTransferException, isTransferExchange, isUseMessageIDAsCorrelationID, setAcceptMessagesWhileStopping, setAcknowledgementMode, setAcknowledgementModeName, setAllowAdditionalHeaders, setAllowNullBody, setAllowReplyManagerQuickStop, setAllowSerializedHeaders, setAlwaysCopyMessage, setArtemisConsumerPriority, setArtemisStreamingEnabled, setAsyncConsumer, setAsyncStartListener, setAsyncStopListener, setAutoStartup, setCacheLevel, setCacheLevelName, setClientId, setConcurrentConsumers, setConsumerType, setCorrelationProperty, setDefaultTaskExecutorType, setDeliveryDelay, setDeliveryMode, setDeliveryPersistent, setDestinationResolver, setDisableReplyTo, setDisableTimeToLive, setDurableSubscriptionName, setEagerLoadingOfProperties, setEagerPoisonBody, setErrorHandler, setErrorHandlerLoggingLevel, setErrorHandlerLogStackTrace, setExceptionListener, setExplicitQosEnabled, setExposeListenerSession, setForceSendOriginalMessage, setFormatDateHeadersToIso8601, setIdleConsumerLimit, setIdleTaskExecutionLimit, setIncludeAllJMSXProperties, setIncludeSentJMSMessageID, setJmsKeyFormatStrategy, setJmsMessageType, setJmsOperations, setLazyCreateTransactionManager, setListenerConnectionFactory, setMapJmsMessage, setMaxConcurrentConsumers, setMaxMessagesPerTask, setMessageConverter, setMessageCreatedStrategy, setMessageIdEnabled, setMessageListenerContainerFactory, setMessageTimestampEnabled, setPassword, setPreserveMessageQos, setPriority, setPubSubNoLocal, setReceiveTimeout, setRecoveryInterval, setReplyTo, setReplyToCacheLevelName, setReplyToConcurrentConsumers, setReplyToConsumerType, setReplyToDeliveryPersistent, setReplyToDestinationSelectorName, setReplyToMaxConcurrentConsumers, setReplyToOnTimeoutMaxConcurrentConsumers, setReplyToOverride, setReplyToSameDestinationAllowed, setReplyToType, setRequestTimeout, setRequestTimeoutCheckerInterval, setSelector, setStreamMessageTypeEnabled, setSubscriptionDurable, setSubscriptionName, setSubscriptionShared, setSynchronous, setTaskExecutor, setTemplateConnectionFactory, setTestConnectionOnStartup, setTimeToLive, setTransacted, setTransactedInOut, setTransactionManager, setTransactionName, setTransactionTimeout, setTransferException, setTransferExchange, setUseMessageIDAsCorrelationID, setUsername, setWaitForProvisionCorrelationToBeUpdatedCounter, setWaitForProvisionCorrelationToBeUpdatedThreadSleepingTime, supportBlobMessage
-
-
-
-
Method Detail
-
getBrokerURL
public String getBrokerURL()
-
setBrokerURL
public void setBrokerURL(String brokerURL)
Sets the broker URL to use to connect to ActiveMQ broker.
-
isUseSingleConnection
public boolean isUseSingleConnection()
-
getUserName
@Deprecated public String getUserName()
Deprecated.- use JmsConfiguration#getUsername()- See Also:
JmsConfiguration.getUsername()
-
setUserName
@Deprecated public void setUserName(String userName)
Deprecated.- use JmsConfiguration#setUsername(String)- See Also:
JmsConfiguration.setUsername(String)
-
setUseSingleConnection
public void setUseSingleConnection(boolean useSingleConnection)
Enables or disables whether a SpringSingleConnectionFactory
will be used so that when messages are sent to ActiveMQ from outside of a message consuming thread, pooling will be used rather than the default with the SpringJmsTemplate
which will create a new connection, session, producer for each message then close them all down again. The default value is false and a pooled connection is used by default.
-
isUsePooledConnection
public boolean isUsePooledConnection()
-
setUsePooledConnection
public void setUsePooledConnection(boolean usePooledConnection)
Enables or disables whether a PooledConnectionFactory will be used so that when messages are sent to ActiveMQ from outside of a message consuming thread, pooling will be used rather than the default with the SpringJmsTemplate
which will create a new connection, session, producer for each message then close them all down again. The default value is true.
-
isTrustAllPackages
public boolean isTrustAllPackages()
-
setTrustAllPackages
public void setTrustAllPackages(boolean trustAllPackages)
ObjectMessage objects depend on Java serialization of marshal/unmarshal object payload. This process is generally considered unsafe as malicious payload can exploit the host system. That's why starting with versions 5.12.2 and 5.13.0, ActiveMQ enforces users to explicitly whitelist packages that can be exchanged using ObjectMessages.
This option can be set to true to trust all packages (eg whitelist is *). See more details at: http://activemq.apache.org/objectmessage.html
-
createTransactionManager
protected org.springframework.transaction.PlatformTransactionManager createTransactionManager()
Factory method to create a default transaction manager if one is not specified- Overrides:
createTransactionManager
in classorg.apache.camel.component.jms.JmsConfiguration
-
setActiveMQComponent
protected void setActiveMQComponent(ActiveMQComponent activeMQComponent)
-
setConnectionFactory
public void setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)
- Overrides:
setConnectionFactory
in classorg.apache.camel.component.jms.JmsConfiguration
-
createConnectionFactory
protected javax.jms.ConnectionFactory createConnectionFactory()
- Overrides:
createConnectionFactory
in classorg.apache.camel.component.jms.JmsConfiguration
-
createPooledConnectionFactory
protected javax.jms.ConnectionFactory createPooledConnectionFactory(org.apache.activemq.ActiveMQConnectionFactory connectionFactory)
-
loadClass
public static Class<?> loadClass(String name, ClassLoader loader) throws ClassNotFoundException
- Throws:
ClassNotFoundException
-
-