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.ConnectionFactorycreateConnectionFactory()protected javax.jms.ConnectionFactorycreatePooledConnectionFactory(org.apache.activemq.ActiveMQConnectionFactory connectionFactory)protected org.springframework.transaction.PlatformTransactionManagercreateTransactionManager()Factory method to create a default transaction manager if one is not specifiedStringgetBrokerURL()StringgetUserName()Deprecated.- use JmsConfiguration#getUsername()booleanisTrustAllPackages()booleanisUsePooledConnection()booleanisUseSingleConnection()static Class<?>loadClass(String name, ClassLoader loader)protected voidsetActiveMQComponent(ActiveMQComponent activeMQComponent)voidsetBrokerURL(String brokerURL)Sets the broker URL to use to connect to ActiveMQ broker.voidsetConnectionFactory(javax.jms.ConnectionFactory connectionFactory)voidsetTrustAllPackages(boolean trustAllPackages)ObjectMessage objects depend on Java serialization of marshal/unmarshal object payload.voidsetUsePooledConnection(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 SpringJmsTemplatewhich will create a new connection, session, producer for each message then close them all down again.voidsetUserName(String userName)Deprecated.- use JmsConfiguration#setUsername(String)voidsetUseSingleConnection(boolean useSingleConnection)Enables or disables whether a SpringSingleConnectionFactorywill 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 SpringJmsTemplatewhich 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, 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, 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, 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 SpringSingleConnectionFactorywill 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 SpringJmsTemplatewhich 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 SpringJmsTemplatewhich 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:
createTransactionManagerin classorg.apache.camel.component.jms.JmsConfiguration
-
setActiveMQComponent
protected void setActiveMQComponent(ActiveMQComponent activeMQComponent)
-
setConnectionFactory
public void setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)
- Overrides:
setConnectionFactoryin classorg.apache.camel.component.jms.JmsConfiguration
-
createConnectionFactory
protected javax.jms.ConnectionFactory createConnectionFactory()
- Overrides:
createConnectionFactoryin 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
-
-