parser.parse(is, handler);
persistenceUnits.addAll(handler.getPersistenceUnits());
}
}
} catch (Exception e) {
throw new PersistenceDescriptorParserException("There was an error parsing " + descriptor.getLocation()
+ " in bundle " + b.getSymbolicName() + "_" + b.getVersion(), e);
} finally {
if(is != null) try {
is.close();
} catch (IOException e) {
//No logging necessary, just consume
}
}
if(!!!schemaFound) {
throw new PersistenceDescriptorParserException("No Schema could be located for the" +
"persistence descriptor " + descriptor.getLocation()
+ " in bundle " + b.getSymbolicName() + "_" + b.getVersion());
}
return persistenceUnits;
}