mirror of
https://github.com/apache/activemq.git
synced 2025-02-17 07:24:51 +00:00
Applied patch for https://issues.apache.org/activemq/browse/AMQ-1768
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@663689 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f7fa2bc58d
commit
e40e2ac67a
@ -47,7 +47,10 @@ public class ActiveMQComponent extends JmsComponent {
|
||||
*/
|
||||
public static ActiveMQComponent activeMQComponent(String brokerURL) {
|
||||
ActiveMQComponent answer = new ActiveMQComponent();
|
||||
answer.getConfiguration().setBrokerURL(brokerURL);
|
||||
if (answer.getConfiguration() instanceof ActiveMQConfiguration) {
|
||||
((ActiveMQConfiguration) answer.getConfiguration())
|
||||
.setBrokerURL(brokerURL);
|
||||
}
|
||||
return answer;
|
||||
}
|
||||
|
||||
@ -62,21 +65,23 @@ public class ActiveMQComponent extends JmsComponent {
|
||||
super(configuration);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActiveMQConfiguration getConfiguration() {
|
||||
return (ActiveMQConfiguration) super.getConfiguration();
|
||||
}
|
||||
|
||||
|
||||
public void setBrokerURL(String brokerURL) {
|
||||
getConfiguration().setBrokerURL(brokerURL);
|
||||
if (getConfiguration() instanceof ActiveMQConfiguration) {
|
||||
((ActiveMQConfiguration)getConfiguration()).setBrokerURL(brokerURL);
|
||||
}
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
getConfiguration().setUserName(userName);
|
||||
if (getConfiguration() instanceof ActiveMQConfiguration) {
|
||||
((ActiveMQConfiguration)getConfiguration()).setUserName(userName);
|
||||
}
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
getConfiguration().setPassword(password);
|
||||
if (getConfiguration() instanceof ActiveMQConfiguration) {
|
||||
((ActiveMQConfiguration)getConfiguration()).setPassword(password);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isExposeAllQueues() {
|
||||
@ -94,11 +99,15 @@ public class ActiveMQComponent extends JmsComponent {
|
||||
}
|
||||
|
||||
public void setUsePooledConnection(boolean usePooledConnection) {
|
||||
getConfiguration().setUsePooledConnection(usePooledConnection);
|
||||
if (getConfiguration() instanceof ActiveMQConfiguration) {
|
||||
((ActiveMQConfiguration)getConfiguration()).setUsePooledConnection(usePooledConnection);
|
||||
}
|
||||
}
|
||||
|
||||
public void setUseSingleConnection(boolean useSingleConnection) {
|
||||
getConfiguration().setUseSingleConnection(useSingleConnection);
|
||||
if (getConfiguration() instanceof ActiveMQConfiguration) {
|
||||
((ActiveMQConfiguration)getConfiguration()).setUseSingleConnection(useSingleConnection);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -118,8 +118,10 @@ public class CamelEndpointLoader implements InitializingBean, DisposableBean, Ca
|
||||
}
|
||||
|
||||
public ConnectionFactory getConnectionFactory() {
|
||||
if (connectionFactory == null) {
|
||||
connectionFactory = getComponent().getConfiguration().createConnectionFactory();
|
||||
if (connectionFactory == null
|
||||
&& getComponent().getConfiguration() instanceof ActiveMQConfiguration) {
|
||||
connectionFactory = ((ActiveMQConfiguration) getComponent()
|
||||
.getConfiguration()).createConnectionFactory();
|
||||
}
|
||||
return connectionFactory;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user