*/
private EntityManagerFactoryReferenceDescriptor[]
getEmfReferenceDescriptors(String logicalName,
ResourceContainerContext[] rcContexts) {
EntityManagerFactoryReferenceDescriptor emfRefs[] =
new EntityManagerFactoryReferenceDescriptor[rcContexts.length];
for (int i = 0; i < rcContexts.length; i++) {
EntityManagerFactoryReferenceDescriptor emfRef =
(EntityManagerFactoryReferenceDescriptor)rcContexts[i].
getEntityManagerFactoryReference(logicalName);
if (emfRef == null) {
emfRef = new EntityManagerFactoryReferenceDescriptor();
rcContexts[i].addEntityManagerFactoryReferenceDescriptor
(emfRef);
}
emfRefs[i] = emfRef;
}