String resolvedPersistenceType
= persistenceTypeResolver.resolvePersistenceType(persistenceType);
debug("resolvedPersistenceType = " + resolvedPersistenceType);
*/
String passedInPersistenceType = persistenceType;
PersistenceStrategyBuilder builder = new FileStrategyBuilder();
String className = createClassNameFrom(persistenceType);
if(_logger.isLoggable(Level.FINEST)) {
_logger.finest("PersistenceStrategyBuilderFactory>>createPersistenceStrategyBuilder: "
+ "CandidateBuilderClassName = " + className);
}
boolean requestedBuilderCreated = false;
try {
builder =
(PersistenceStrategyBuilder) (Class.forName(className)).newInstance();
requestedBuilderCreated = true;
} catch (ClassNotFoundException clnfEx) {
_logger.log(Level.WARNING, "Couldn't find class: "
+ className + " for persistenceType: "
+ persistenceType);
if(_logger.isLoggable(Level.FINE)) {
_logger.log(Level.FINE, "Exception while creating Builder", clnfEx);
}
} catch (Exception ex) {
_logger.log(Level.WARNING, "Exception while creating Builder", ex);
}
if (! requestedBuilderCreated) {
_logger.log(Level.WARNING, "Couldn't create builder for "
+ "persistence type: " + persistenceType
+". Instead created FileStrategyBuilder....");
}
builder.setPassedInPersistenceType(passedInPersistenceType);
return builder;
}