private void createTables(final String unitName,
final BeePersistenceProperties props) throws Exception {
//-- create tables property --//
props.setDDLGENERATION(true);
final BeeEntityFactoryRepository ctrl = BeeEntityFactoryRepository.getInstance();
final BeeEntityManagerFactory emf = ctrl.get(unitName).getFactoryWrapper();
try {
this.checkDatabaseExists(props);
if (null != emf) {
emf.createTables();
} else {
throw new Exception(
StringUtils.format("Persistence unit '%s' not found.",
unitName));
}