Reader in = new InputStreamReader(resource.openStream(), "UTF-8");
// TODO: andrus, 04/18/2006 - an inefficiency in XMLDecoder - it
// doesn't cache the mapping
XMLDecoder decoder = new XMLDecoder();
JpaEntityMap entityMap = (JpaEntityMap) decoder.decode(in, mappingURL
.toExternalForm());
return entityMap;
}
catch (Exception e) {