阅读:22114回复:1
在Listener类的init()中获取hibernateSession问题
系统Listener类中,需要获得hibernateSession,以便从数据库表中读取一些配置信息。
但是获取hibernateSession失败,见图。 图片:session.png |
|
沙发#
发布于:2015-10-19 14:59
@Name(CConstants.WPS_COMP_SEAM_HELPER)
@Scope(ScopeType.APPLICATION) @Startup @AutoCreate public class SeamHelper { public static final Float VERSION =CConstants.VERSION; private ProcessEngine processEngine; private RepositoryService repositoryService; private TaskService taskService; private ExecutionService executionService; private HistoryService historyService; @Create public void init() { //Session hibernateSession = (Session) Component.getInstance("hibernateSession",true); Session hibernateSession = IdsDataBaseUtil.getHibernateSession().getSession();} 建议参考一下流程中调用Seam相关的启动监听实现,谢谢肖大神的支持@molang |
|
|