JBPM4 get Sessionfactory

It is logical you can't find the current Hibernate Session, since there is
none. A hibernate session is only open during a jbpm operation and is closed
afterwards.

So I guess that basically what you want is access to the same SessionFactory as
the one that is used by jBPM, which you can get through the processEngine in
the same construct as the one I pasted above:

SessionFactory sessionFactory = processEngine.get(SessionFactory.class);

你可能感兴趣的:(Hibernate,jbpm,Access)