0 Replies Latest reply on Nov 16, 2005 3:59 AM by xema blasco

    Problem with memory tables

    xema blasco Newbie

      I'm trying to divide teh example program in three different programs.
      The first one creates the schema.

      JbpmSessionFactory jbpmSessionFactory =
       JbpmSessionFactory.buildJbpmSessionFactory();
      jbpmSessionFactory.getJbpmSchema().createSchema();
      


      The second one saves a Processdefinition.
      JbpmSessionFactory jbpmSessionFactory =
       JbpmSessionFactory.buildJbpmSessionFactory();
      ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
       "<process-definition name='hello world'> "+
       " <start-state name='start'> "+
       " <transition to='s' /> "+
       " </start-state> "+
       " <state name='s'> "+
       " <transition to='end' /> "+
       " </state> "+
       " <end-state name='end' /> "+
       "</process-definition>"
       );
       JbpmSession jbpmSession = jbpmSessionFactory.openJbpmSession();
       jbpmSession.beginTransaction();
       jbpmSession.getGraphSession().saveProcessDefinition(processDefinition);
       jbpmSession.commitTransaction();
       jbpmSession.close();
      

      The third one recovers the process definition.
      I don't show the code because the problem arrives in the second program.

      The configuration of 'hibernate.properties' is
      hibernate.connection.url=jdbc:hsqldb:file:/dime/algo
      to support in disk database.

      The problem is:
      The first program works correctly, it creates the schema. (I can see in the database file algo.log)
      The second program ALSO creates the schema but with memory tables, then put the processdefinition, and when it finished the data dissapear.

      How can I get a JbpmSession without recreate the hibernate tables?