AnsweredAssumed Answered

cycle db sql session factory

Question asked by tombaeyens on Nov 15, 2010
Hi Bernd et co,

I'm thinking about how to clean up the relation between engine and cycle component in terms of persistence.

I can make out the "ibatis" piece polymorphic

  protected SqlSessionFactory createSessionFactory(DataSource dataSource, TransactionFactory transactionFactory) {
    InputStream inputStream = null;
    try {
      inputStream = ReflectUtil.getResourceAsStream("org/activiti/db/ibatis/activiti.ibatis.mem.conf.xml");

and same for this

  public static void executeSchemaResource(String operation, String databaseType, SqlSessionFactory sqlSessionFactory) {
    SqlSession sqlSession = sqlSessionFactory.openSession();
    boolean success = false;
    InputStream inputStream = null;
    try {
      Connection connection = sqlSession.getConnection();
      String resource = "org/activiti/db/" + operation + "/activiti." + databaseType + "." + operation + ".sql";

then you wouldn't have to overwrite the whole methods.

But apart from that (and before I start) I want to analyze also how we handle cycle configuration and the relation to the process engine.
We acknowledge that it should be possible to run cycle independent without the engine (at least DB tables, not removing the lib dependency on activiti-engine)

It think it could be possible that cycle also starts from the activiti.cfg.xml file, builds a process engine and then have something like:


Would that be progress?  The current cycle bootstrap (and sticking the service in the http session) doesn't look very consistent with the engine approach.  All this doesn't look very urgent to me, but I think we should discuss and define what is the way we want to move forward.  And then decide what we do when.

What are your thoughts?