((ODatabasePoolBase<?>) owner).close();
}
public DB createNewResource(final String iDatabaseName, final Object... iAdditionalArgs) {
if (iAdditionalArgs.length < 2)
throw new OSecurityAccessException("Username and/or password missed");
return createResource(owner, iDatabaseName, iAdditionalArgs);
}
public boolean reuseResource(final String iKey, final Object[] iAdditionalArgs, final DB iValue) {
if (((ODatabasePooled) iValue).isUnderlyingOpen()) {
((ODatabasePooled) iValue).reuse(owner, iAdditionalArgs);
if (iValue.getStorage().isClosed())
// STORAGE HAS BEEN CLOSED: REOPEN IT
iValue.getStorage().open((String) iAdditionalArgs[0], (String) iAdditionalArgs[1], null);
else if (!((ODatabaseComplex<?>) iValue).getUser().checkPassword((String) iAdditionalArgs[1]))
throw new OSecurityAccessException(iValue.getName(), "User or password not valid for database: '"
+ iValue.getName() + "'");
return true;
}
return false;