public void loadConfiguration(final String url) {
InputSource source = new InputSource(url);
_jdoConfBaseURL = source.getSystemId();
CpactfConf cpactfconf = null;
try {
Unmarshaller unmarshaller = new Unmarshaller(CpactfConf.class);
unmarshaller.setEntityResolver(new DTDResolver(null));
cpactfconf = (CpactfConf) unmarshaller.unmarshal(source);
} catch (MarshalException e) {
throw new CPAConfigException(e);
} catch (ValidationException e) {
throw new CPAConfigException(e);
}
_defaultDatabaseName = cpactfconf.getDefaultDatabase();
_defaultTransactionName = cpactfconf.getDefaultTransaction();
Iterator cfgIter = cpactfconf.iterateConfiguration();
while (cfgIter.hasNext()) {
Configuration config = (Configuration) cfgIter.next();
_configurations.put(config.getName(), config);
}
Iterator dbIter = cpactfconf.iterateDatabase();
while (dbIter.hasNext()) {
Database database = (Database) dbIter.next();
_databases.put(database.getName(), database);
}
Iterator transIter = cpactfconf.iterateTransaction();
while (transIter.hasNext()) {
Transaction trans = (Transaction) transIter.next();
_transactions.put(trans.getName(), trans);
}
}