protected PersistenceAdapter tryCreatePersistenceAdapter(String className, File directory, boolean ignoreErrors) throws JMSException {
Class adapterClass = loadClass(className, ignoreErrors);
if (adapterClass != null) {
try {
PersistenceAdapterFactory factory = (PersistenceAdapterFactory) adapterClass.newInstance();
PersistenceAdapter answer = factory.createPersistenceAdapter(directory, memoryManager);
log.info("Persistence adapter created using: " + className);
return answer;
}
catch (IOException cause) {
throw createInstantiateAdapterException(className, (Exception) cause);