@Override
protected void onSubmit() {
try {
ConnectionPropertiesPatcher.patch(getModelObject());
XmlWebApplicationContext ctx = (XmlWebApplicationContext)getWebApplicationContext(Application.get().getServletContext());
if (ctx == null) {
form.error(new StringResourceModel("install.wizard.db.step.error.patch", InstallWizard.this).setParameters("Web context is NULL").getObject());
log.error("Web context is NULL");
return;
}
LocalEntityManagerFactoryBean emb = ctx.getBeanFactory().getBean(LocalEntityManagerFactoryBean.class);
emb.afterPropertiesSet();
dbType = getModelObject().getDbType();
} catch (Exception e) {
form.error(new StringResourceModel("install.wizard.db.step.error.patch", InstallWizard.this).setParameters(e.getMessage()).getObject());
log.error("error while patching", e);
}
}
InstallWizard.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:openmeetings
作者:
评论列表
文章目录