org.activiti.engine.impl.interceptor.Session Java Examples

The following examples show how to use org.activiti.engine.impl.interceptor.Session. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SpringEntityManagerSessionFactory.java    From activiti6-boot2 with Apache License 2.0 5 votes vote down vote up
public Session openSession(CommandContext commandContext) {
  EntityManager entityManager = EntityManagerFactoryUtils.getTransactionalEntityManager(entityManagerFactory);
  if (entityManager == null) {
    return new EntityManagerSessionImpl(entityManagerFactory, handleTransactions, closeEntityManager);
  }
  return new EntityManagerSessionImpl(entityManagerFactory, entityManager, false, false);
}
 
Example #2
Source File: GenericManagerFactory.java    From activiti6-boot2 with Apache License 2.0 5 votes vote down vote up
public Session openSession(CommandContext commandContext) {
  try {
    return implementationClass.newInstance();
  } catch (Exception e) {
    throw new ActivitiException("couldn't instantiate " + implementationClass.getName() + ": " + e.getMessage(), e);
  }
}
 
Example #3
Source File: GenericManagerFactory.java    From flowable-engine with Apache License 2.0 5 votes vote down vote up
@Override
public Session openSession() {
    try {
        return managerImplementation.newInstance();
    } catch (Exception e) {
        throw new ActivitiException("couldn't instantiate " + managerImplementation.getName() + ": " + e.getMessage(), e);
    }
}
 
Example #4
Source File: SpringEntityManagerSessionFactory.java    From flowable-engine with Apache License 2.0 5 votes vote down vote up
@Override
public Session openSession() {
    EntityManager entityManager = EntityManagerFactoryUtils.getTransactionalEntityManager(entityManagerFactory);
    if (entityManager == null) {
        return new EntityManagerSessionImpl(entityManagerFactory, handleTransactions, closeEntityManager);
    }
    return new EntityManagerSessionImpl(entityManagerFactory, entityManager, false, false);
}
 
Example #5
Source File: CustomGroupEntityManagerFactory.java    From lemon with Apache License 2.0 4 votes vote down vote up
public Session openSession() {
    return groupEntityManager;
}
 
Example #6
Source File: AiaGroupEntityManagerFactory.java    From activiti-in-action-codes with Apache License 2.0 4 votes vote down vote up
@Override
public Session openSession() {
    return aiaGroupEntityManager;
}
 
Example #7
Source File: AiaUserEntityManagerFactory.java    From activiti-in-action-codes with Apache License 2.0 4 votes vote down vote up
@Override
public Session openSession() {
    return aiaUserEntityManager;
}
 
Example #8
Source File: SessionedEntityManagerFactory.java    From openwebflow with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
public Session openSession()
{
	return _entityManager;
}
 
Example #9
Source File: SessionedEntityManagerFactory.java    From openwebflow with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public SessionedEntityManagerFactory(Class<?> sessionType, Session entityManager)
{
	super();
	_sessionType = sessionType;
	_entityManager = entityManager;
}
 
Example #10
Source File: DbSqlSessionFactory.java    From flowable-engine with Apache License 2.0 4 votes vote down vote up
@Override
public Session openSession() {
    return new DbSqlSession(this);
}
 
Example #11
Source File: GenericManagerFactory.java    From flowable-engine with Apache License 2.0 4 votes vote down vote up
public GenericManagerFactory(Class<? extends Session> managerImplementation) {
    this.managerImplementation = managerImplementation;
}
 
Example #12
Source File: DefaultHistoryManagerSessionFactory.java    From flowable-engine with Apache License 2.0 4 votes vote down vote up
@Override
public Session openSession() {
    return new DefaultHistoryManager();
}
 
Example #13
Source File: EntityManagerSessionFactory.java    From flowable-engine with Apache License 2.0 4 votes vote down vote up
@Override
public Session openSession() {
    return new EntityManagerSessionImpl(entityManagerFactory, handleTransactions, closeEntityManager);
}
 
Example #14
Source File: ActGroupEntityServiceFactory.java    From Shop-for-JavaWeb with MIT License 4 votes vote down vote up
public Session openSession() {
	// 返回自定义的GroupEntityManager实例
	return actGroupEntityService;
}
 
Example #15
Source File: ActUserEntityServiceFactory.java    From Shop-for-JavaWeb with MIT License 4 votes vote down vote up
public Session openSession() {
	// 返回自定义的GroupEntityManager实例
	return actUserEntityService;
}
 
Example #16
Source File: CustomUserEntityManagerFactory.java    From hsweb-framework with Apache License 2.0 4 votes vote down vote up
@Override
public Session openSession() {
    return customUserEntityManager;
}
 
Example #17
Source File: CustomGroupEntityManagerFactory.java    From hsweb-framework with Apache License 2.0 4 votes vote down vote up
@Override
public Session openSession() {
    // 返回自定义的GroupEntityManager实例
    return customGroupEntityManager;
}
 
Example #18
Source File: ProfilingDbSqlSessionFactory.java    From activiti6-boot2 with Apache License 2.0 4 votes vote down vote up
@Override
public Session openSession(CommandContext commandContext) {
    return new ProfilingDbSqlSession(this, commandContext.getEntityCache());
}
 
Example #19
Source File: GenericManagerFactory.java    From activiti6-boot2 with Apache License 2.0 4 votes vote down vote up
public GenericManagerFactory(Class<? extends Session> implementationClass) {
  this(implementationClass, implementationClass);
}
 
Example #20
Source File: GenericManagerFactory.java    From activiti6-boot2 with Apache License 2.0 4 votes vote down vote up
public GenericManagerFactory(Class<? extends Session> typeClass, Class<? extends Session> implementationClass) {
  this.typeClass = typeClass;
  this.implementationClass = implementationClass;
}
 
Example #21
Source File: EntityManagerSessionFactory.java    From activiti6-boot2 with Apache License 2.0 4 votes vote down vote up
public Session openSession(CommandContext commandContext) {
  return new EntityManagerSessionImpl(entityManagerFactory, handleTransactions, closeEntityManager);
}