use of org.glassfish.ejb.deployment.descriptor.runtime.PersistenceManagerInUse in project Payara by payara.
the class PMDescriptorsNode method writeDescriptor.
/**
* write the descriptor class to a DOM tree and return it
*
* @param parent node for the DOM tree
* @param node name
* @param the descriptor to write
* @return the DOM tree top node
*/
public Node writeDescriptor(Node parent, String nodeName, EjbBundleDescriptorImpl descriptor) {
Node pms = null;
Vector pmDescriptors = descriptor.getPersistenceManagers();
if (pmDescriptors != null && !pmDescriptors.isEmpty()) {
pms = super.writeDescriptor(parent, nodeName, descriptor);
PMDescriptorNode pmNode = new PMDescriptorNode();
for (Iterator pmIterator = pmDescriptors.iterator(); pmIterator.hasNext(); ) {
IASPersistenceManagerDescriptor pmDescriptor = (IASPersistenceManagerDescriptor) pmIterator.next();
pmNode.writeDescriptor(pms, RuntimeTagNames.PM_DESCRIPTOR, pmDescriptor);
}
PersistenceManagerInUse inUse = descriptor.getPersistenceManagerInUse();
if (inUse != null) {
PMInUseNode inUseNode = new PMInUseNode();
inUseNode.writeDescriptor(pms, RuntimeTagNames.PM_INUSE, inUse);
}
}
return pms;
}
Aggregations