String str = (String) Configurations.removeProperty("TransactionMode", props);
boolean managed;
if (str == null)
managed = conf.isTransactionModeManaged();
else {
Value val = conf.getValue("TransactionMode");
managed = Boolean.parseBoolean(val.unalias(str));
}
Object obj = Configurations.removeProperty("ConnectionRetainMode", props);
int retainMode;
if (obj instanceof Number) {
retainMode = ((Number) obj).intValue();
} else if (obj == null) {
retainMode = conf.getConnectionRetainModeConstant();
} else {
Value val = conf.getValue("ConnectionRetainMode");
try {
retainMode = Integer.parseInt(val.unalias((String) obj));
} catch (Exception e) {
throw new ArgumentException(_loc.get("bad-em-prop", "openjpa.ConnectionRetainMode", obj),
new Throwable[]{ e }, obj, true);
}
}