for (int index = 0; index < nodes.getLength(); index++) {
Node node = nodes.item(index);
persistenceUnit = ((Element) node).getAttribute("name");
if ("".equals(persistenceUnit)) {
throw new DemoiselleException(bundle.getString("can-not-get-persistence-unit-from-persistence"));
} else {
persistenceUnits.add(persistenceUnit);
}
}
return persistenceUnits.toArray(new String[0]);
} catch (Exception cause) {
String message = bundle.getString("can-not-get-persistence-unit-from-persistence");
logger.error(message, cause);
throw new DemoiselleException(message, cause);
}
}