// ActionConfig must have at least one ActionConfigProperty
// and ActionConfigProperty must have a pair of name/value
// so filter out the entries with blank name or value
Set activationConfig2 = new HashSet();
for(Iterator iter = activationConfig.iterator(); iter.hasNext();) {
EnvironmentProperty next = (EnvironmentProperty) iter.next();
if ( ! next.getName().trim().equals("") &&
! next.getValue().trim().equals("")) {
activationConfig2.add(next);
}
}
if( activationConfig2.size() > 0 ) {
activationConfigNode =
appendChild(parent, nodeName);
writeLocalizedDescriptions(activationConfigNode, descriptor);
for(Iterator iter = activationConfig2.iterator(); iter.hasNext();) {
Node activationConfigPropertyNode =
appendChild(activationConfigNode,
EjbTagNames.ACTIVATION_CONFIG_PROPERTY);
EnvironmentProperty next = (EnvironmentProperty) iter.next();
appendTextChild(activationConfigPropertyNode,
EjbTagNames.ACTIVATION_CONFIG_PROPERTY_NAME,
(String) next.getName());
appendTextChild(activationConfigPropertyNode,
EjbTagNames.ACTIVATION_CONFIG_PROPERTY_VALUE,
(String) next.getValue());
}
}
return activationConfigNode;
}