public String execute(CommandContext commandContext) { DbSqlSessionFactory dbSqlSessionFactory = (DbSqlSessionFactory) commandContext.getSessionFactories().get(DbSqlSession.class); DbSqlSession dbSqlSession = new DbSqlSession(dbSqlSessionFactory, commandContext.getEntityCache(), connection, catalog, schema); commandContext.getSessions().put(DbSqlSession.class, dbSqlSession); return dbSqlSession.dbSchemaUpdate(); } });
public Session openSession(CommandContext commandContext) { DbSqlSession dbSqlSession = new DbSqlSession(this, commandContext.getEntityCache()); if (getDatabaseSchema() != null && getDatabaseSchema().length() > 0) { try { dbSqlSession.getSqlSession().getConnection().setSchema(getDatabaseSchema()); } catch (SQLException e) { throw new ActivitiException("Could not set database schema on connection", e); } } if (getDatabaseCatalog() != null && getDatabaseCatalog().length() > 0) { try { dbSqlSession.getSqlSession().getConnection().setCatalog(getDatabaseCatalog()); } catch (SQLException e) { throw new ActivitiException("Could not set database catalog on connection", e); } } return dbSqlSession; }
public Session openSession() { return new DbSqlSession(this); }
@Override public Session openSession() { return new DbSqlSession(this); }
public String execute(CommandContext commandContext) { DbSqlSessionFactory dbSqlSessionFactory = (DbSqlSessionFactory) commandContext.getSessionFactories().get(DbSqlSession.class); DbSqlSession dbSqlSession = new DbSqlSession(dbSqlSessionFactory, connection, catalog, schema); commandContext.getSessions().put(DbSqlSession.class, dbSqlSession); return dbSqlSession.dbSchemaUpdate(); } });
public String execute(CommandContext commandContext) { DbSqlSessionFactory dbSqlSessionFactory = (DbSqlSessionFactory) commandContext.getSessionFactories().get(DbSqlSession.class); DbSqlSession dbSqlSession = new DbSqlSession(dbSqlSessionFactory, commandContext.getEntityCache(), connection, catalog, schema); commandContext.getSessions().put(DbSqlSession.class, dbSqlSession); return dbSqlSession.dbSchemaUpdate(); } });
public Session openSession(CommandContext commandContext) { DbSqlSession dbSqlSession = new DbSqlSession(this, commandContext.getEntityCache()); if (getDatabaseSchema() != null && getDatabaseSchema().length() > 0) { try { dbSqlSession.getSqlSession().getConnection().setSchema(getDatabaseSchema()); } catch (SQLException e) { throw new ActivitiException("Could not set database schema on connection", e); } } if (getDatabaseCatalog() != null && getDatabaseCatalog().length() > 0) { try { dbSqlSession.getSqlSession().getConnection().setCatalog(getDatabaseCatalog()); } catch (SQLException e) { throw new ActivitiException("Could not set database catalog on connection", e); } } return dbSqlSession; }