This closes #1843
This commit is contained in:
commit
075004c4f7
|
@ -542,6 +542,11 @@ public class ActiveMQActivation {
|
||||||
}
|
}
|
||||||
|
|
||||||
String calculatedDestinationName = destinationName.substring(destinationName.lastIndexOf('/') + 1);
|
String calculatedDestinationName = destinationName.substring(destinationName.lastIndexOf('/') + 1);
|
||||||
|
if (isTopic && spec.getTopicPrefix() != null) {
|
||||||
|
calculatedDestinationName = spec.getTopicPrefix() + calculatedDestinationName;
|
||||||
|
} else if (!isTopic && spec.getQueuePrefix() != null) {
|
||||||
|
calculatedDestinationName = spec.getQueuePrefix() + calculatedDestinationName;
|
||||||
|
}
|
||||||
|
|
||||||
logger.debug("Unable to retrieve " + destinationName +
|
logger.debug("Unable to retrieve " + destinationName +
|
||||||
" from JNDI. Creating a new " + destinationType.getName() +
|
" from JNDI. Creating a new " + destinationType.getName() +
|
||||||
|
|
|
@ -53,6 +53,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
||||||
public String strConnectionParameters;
|
public String strConnectionParameters;
|
||||||
protected Boolean allowLocalTransactions;
|
protected Boolean allowLocalTransactions;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The resource adapter
|
* The resource adapter
|
||||||
*/
|
*/
|
||||||
|
@ -135,6 +136,11 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
||||||
|
|
||||||
private Boolean rebalanceConnections = false;
|
private Boolean rebalanceConnections = false;
|
||||||
|
|
||||||
|
// Enables backwards compatibility of the pre 2.x addressing model
|
||||||
|
private String topicPrefix;
|
||||||
|
|
||||||
|
private String queuePrefix;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
|
@ -368,6 +374,23 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setQueuePrefix(String prefix) {
|
||||||
|
this.queuePrefix = prefix;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQueuePrefix() {
|
||||||
|
return queuePrefix;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTopicPrefix(String prefix) {
|
||||||
|
this.topicPrefix = prefix;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTopicPrefix() {
|
||||||
|
return topicPrefix;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the acknowledge mode
|
* Set the acknowledge mode
|
||||||
*
|
*
|
||||||
|
@ -878,6 +901,10 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
||||||
return false;
|
return false;
|
||||||
if (setupAttempts != null ? !setupAttempts.equals(that.setupAttempts) : that.setupAttempts != null)
|
if (setupAttempts != null ? !setupAttempts.equals(that.setupAttempts) : that.setupAttempts != null)
|
||||||
return false;
|
return false;
|
||||||
|
if (queuePrefix != null ? !queuePrefix.equals(that.queuePrefix) : that.queuePrefix != null)
|
||||||
|
return false;
|
||||||
|
if (topicPrefix != null ? !topicPrefix.equals(that.topicPrefix) : that.topicPrefix != null)
|
||||||
|
return false;
|
||||||
return !(setupInterval != null ? !setupInterval.equals(that.setupInterval) : that.setupInterval != null);
|
return !(setupInterval != null ? !setupInterval.equals(that.setupInterval) : that.setupInterval != null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -907,6 +934,8 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
|
||||||
result = 31 * result + (rebalanceConnections != null ? rebalanceConnections.hashCode() : 0);
|
result = 31 * result + (rebalanceConnections != null ? rebalanceConnections.hashCode() : 0);
|
||||||
result = 31 * result + (setupAttempts != null ? setupAttempts.hashCode() : 0);
|
result = 31 * result + (setupAttempts != null ? setupAttempts.hashCode() : 0);
|
||||||
result = 31 * result + (setupInterval != null ? setupInterval.hashCode() : 0);
|
result = 31 * result + (setupInterval != null ? setupInterval.hashCode() : 0);
|
||||||
|
result = 31 * result + (queuePrefix != null ? queuePrefix.hashCode() : 0);
|
||||||
|
result = 31 * result + (topicPrefix != null ? queuePrefix.hashCode() :0);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue