package com.vci.server.mw;
|
|
import org.hibernate.HibernateException;
|
import org.hibernate.classic.Session;
|
import org.hibernate.context.CurrentSessionContext;
|
import org.hibernate.engine.SessionFactoryImplementor;
|
|
import com.vci.server.base.persistence.dao.HibernateSessionFactory;
|
|
public class SessionContext4JBPM implements CurrentSessionContext {
|
|
/**
|
*
|
*/
|
private static final long serialVersionUID = 1L;
|
|
private final SessionFactoryImplementor factory;
|
|
public SessionContext4JBPM(SessionFactoryImplementor factory) {
|
this.factory = factory;
|
}
|
|
public Session currentSession() throws HibernateException {
|
return (org.hibernate.classic.Session ) HibernateSessionFactory.getSession();
|
}
|
|
}
|