@Override
public Node writeDescriptor(Node parent, EjbBundleDescriptorImpl bundleDescriptor) {
Node ejbs = super.writeDescriptor(parent, bundleDescriptor);
List<SecurityRoleMapping> roleMappings = bundleDescriptor.getSecurityRoleMappings();
for (int i = 0; i < roleMappings.size(); i++) {
SecurityRoleMappingNode srmn = new SecurityRoleMappingNode();
srmn.writeDescriptor(ejbs, RuntimeTagNames.SECURITY_ROLE_MAPPING, roleMappings.get(i));
}
EnterpriseBeansRuntimeNode ejbsNode = new EnterpriseBeansRuntimeNode();
ejbsNode.writeDescriptor(ejbs, RuntimeTagNames.EJBS, bundleDescriptor);
appendTextChild(ejbs, RuntimeTagNames.COMPATIBILITY, bundleDescriptor.getCompatibility());
Boolean djndi = bundleDescriptor.getDisableNonportableJndiNames();
if (djndi != null) {
appendTextChild(ejbs, RuntimeTagNames.DISABLE_NONPORTABLE_JNDI_NAMES, String.valueOf(djndi));
}
appendTextChild(ejbs, RuntimeTagNames.KEEP_STATE, String.valueOf(bundleDescriptor.getKeepState()));
return ejbs;
}
}