This closes #517

This commit is contained in:
jbertram 2016-05-16 11:23:08 -05:00
commit fdb8ca0055
3 changed files with 22 additions and 2 deletions

View File

@ -375,6 +375,16 @@ public interface ConnectionFactoryControl {
*/
DiscoveryGroupConfiguration getDiscoveryGroupConfiguration();
/**
* get the protocol manager factory name
*/
String getProtocolManagerFactoryStr();
/**
* set the protocol manager factory name
*/
void setProtocolManagerFactoryStr(String protocolManagerFactoryStr);
/**
* Add the Registry binding to this destination
*/

View File

@ -134,11 +134,11 @@ public class ActiveMQConnectionFactory implements Externalizable, Referenceable,
public void setProtocolManagerFactoryStr(final String protocolManagerFactoryStr) {
if (protocolManagerFactoryStr != null && !protocolManagerFactoryStr.trim().isEmpty()) {
if (protocolManagerFactoryStr != null && !protocolManagerFactoryStr.trim().isEmpty() &&
!protocolManagerFactoryStr.equals("undefined")) {
AccessController.doPrivileged(new PrivilegedAction<Object>() {
@Override
public Object run() {
ClientProtocolManagerFactory protocolManagerFactory =
(ClientProtocolManagerFactory) ClassloadingUtil.newInstanceFromClassLoader(protocolManagerFactoryStr);
serverLocator.setProtocolManagerFactory(protocolManagerFactory);

View File

@ -431,6 +431,16 @@ public class JMSConnectionFactoryControlImpl extends StandardMBean implements Co
return cfConfig.getTransactionBatchSize();
}
@Override
public void setProtocolManagerFactoryStr(String protocolManagerFactoryStr) {
cfConfig.setProtocolManagerFactoryStr(protocolManagerFactoryStr);
recreateCF();
}
@Override
public String getProtocolManagerFactoryStr() {
return cfConfig.getProtocolManagerFactoryStr();
}
@Override
public boolean isAutoGroup() {
return cfConfig.isAutoGroup();