{
activationMapper.setDestinationType(activationConfigValues, false) ;
}
else
{
throw new ConfigurationException("Unknown destination type: " + messageFilter.getDestType()) ;
}
activationMapper.setMessageSelector(activationConfigValues, messageFilter.getSelector()) ;
final Integer maxThreads = (listener.isSetMaxThreads() ? Integer.valueOf(listener.getMaxThreads()) : null) ;
activationMapper.setMaxThreads(activationConfigValues, maxThreads) ;
final Element activationConfigElement = YADOMUtil.addElement(listenerNode, JcaConstants.ELEMENT_ACTIVATION_CONFIG) ;
for(Map.Entry<String, String> entry: activationConfigValues.entrySet())
{
addPropertyElement(activationConfigElement, entry.getKey(), entry.getValue()) ;
}
final Set<String> defaultPropertyNames = activationConfigValues.keySet() ;
log.debug("Default activation-config properties :" + defaultPropertyNames );
/*
* add user activation-config properties specified in the provider element.
*/
ActivationConfig activationConfig = jmsJcaProvider.getActivationConfig();
if ( activationConfig != null )
{
List<Property> propertyList = activationConfig.getPropertyList();
for (Iterator<Property> iterator = propertyList.iterator(); iterator.hasNext();)
{
Property prop = iterator.next();
if ( defaultPropertyNames.contains( prop.getName() ))
throw new ConfigurationException( "activation-config already contains [" + prop.getName() + "], which cannot be overridden");
addPropertyElement(activationConfigElement, prop.getName(), prop.getValue()) ;
}
}
}