站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss JBPM 3.0.4 API 英文版文档

JbpmSessionFactory (jbpm-3.0.4) - JBoss JBPM 3.0.4 API 英文版文档


org.jbpm.db
Class JbpmSessionFactory

java.lang.Object
  extended byorg.jbpm.db.JbpmSessionFactory
All Implemented Interfaces:
java.io.Serializable

public class JbpmSessionFactory
extends java.lang.Object
implements java.io.Serializable

creates JbpmSessions. Obtain a JbpmSessionFactory with

 static JbpmSessionFactory jbpmSessionFactory = JbpmSessionFactory.buildJbpmSessionFactory();
 
and store it somewhere static. It takes quite some time to create a DbSessionFactory, but you only have to do it once. After that, creating DbSession's is really fast.

See Also:
Serialized Form

Constructor Summary
JbpmSessionFactory(org.hibernate.cfg.Configuration configuration)
           
JbpmSessionFactory(org.hibernate.cfg.Configuration configuration, org.hibernate.SessionFactory sessionFactory)
           
 
Method Summary
static JbpmSessionFactory buildJbpmSessionFactory()
           
static JbpmSessionFactory buildJbpmSessionFactory(org.hibernate.cfg.Configuration configuration)
           
static JbpmSessionFactory buildJbpmSessionFactory(java.lang.String configResource)
           
static org.hibernate.SessionFactory buildSessionFactory(org.hibernate.cfg.Configuration configuration)
           
static org.hibernate.cfg.Configuration createConfiguration()
           
static org.hibernate.cfg.Configuration createConfiguration(java.lang.String configResource)
           
 void evictCachedProcessDefinitions()
          clears the process definitions from hibernate's second level cache.
 org.hibernate.cfg.Configuration getConfiguration()
           
static JbpmSessionFactory getInstance()
          a singleton is kept in JbpmSessionFactory as a convenient central location.
 JbpmSchema getJbpmSchema()
           
 org.hibernate.SessionFactory getSessionFactory()
           
 boolean isHibernatableWithLongId(java.lang.Class clazz)
          checks if the given class is persistable with hibernate and has an id of type long.
 boolean isHibernatableWithStringId(java.lang.Class clazz)
          checks if the given class is persistable with hibernate and has an id of type string.
 JbpmSession openJbpmSession()
          obtains a jdbc connection as specified in the hibernate configurations and creates a DbSession with it.
 JbpmSession openJbpmSession(java.sql.Connection jdbcConnection)
          creates a DbSession around the given connection.
 JbpmSession openJbpmSession(org.hibernate.Session session)
           
 JbpmSession openJbpmSessionAndBeginTransaction()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JbpmSessionFactory

public JbpmSessionFactory(org.hibernate.cfg.Configuration configuration)

JbpmSessionFactory

public JbpmSessionFactory(org.hibernate.cfg.Configuration configuration,
                          org.hibernate.SessionFactory sessionFactory)
Method Detail

getInstance

public static JbpmSessionFactory getInstance()
a singleton is kept in JbpmSessionFactory as a convenient central location.


buildJbpmSessionFactory

public static JbpmSessionFactory buildJbpmSessionFactory()

buildJbpmSessionFactory

public static JbpmSessionFactory buildJbpmSessionFactory(java.lang.String configResource)

buildJbpmSessionFactory

public static JbpmSessionFactory buildJbpmSessionFactory(org.hibernate.cfg.Configuration configuration)

createConfiguration

public static org.hibernate.cfg.Configuration createConfiguration()

createConfiguration

public static org.hibernate.cfg.Configuration createConfiguration(java.lang.String configResource)

buildSessionFactory

public static org.hibernate.SessionFactory buildSessionFactory(org.hibernate.cfg.Configuration configuration)

openJbpmSession

public JbpmSession openJbpmSession()
obtains a jdbc connection as specified in the hibernate configurations and creates a DbSession with it.


openJbpmSession

public JbpmSession openJbpmSession(java.sql.Connection jdbcConnection)
creates a DbSession around the given connection. Note that you are responsible for closing the connection so closing the DbSession will not close the jdbc connection.


openJbpmSession

public JbpmSession openJbpmSession(org.hibernate.Session session)

openJbpmSessionAndBeginTransaction

public JbpmSession openJbpmSessionAndBeginTransaction()

getSessionFactory

public org.hibernate.SessionFactory getSessionFactory()

getConfiguration

public org.hibernate.cfg.Configuration getConfiguration()

evictCachedProcessDefinitions

public void evictCachedProcessDefinitions()
clears the process definitions from hibernate's second level cache.


isHibernatableWithLongId

public boolean isHibernatableWithLongId(java.lang.Class clazz)
checks if the given class is persistable with hibernate and has an id of type long.


isHibernatableWithStringId

public boolean isHibernatableWithStringId(java.lang.Class clazz)
checks if the given class is persistable with hibernate and has an id of type string.


getJbpmSchema

public JbpmSchema getJbpmSchema()


Version : jbpm-3.0.4